Fix lp UserPackageLegalData selecting
This commit is contained in:
parent
a3a1debe45
commit
d958d73609
1 changed files with 7 additions and 10 deletions
|
|
@ -158,20 +158,17 @@ public class PackageRecordsService {
|
||||||
|
|
||||||
public List<UserPackageLegalData> selectUserPackageLegalData(Set<Pair<Long, Long>> uniqueInnRegnumPairs) {
|
public List<UserPackageLegalData> selectUserPackageLegalData(Set<Pair<Long, Long>> uniqueInnRegnumPairs) {
|
||||||
try {
|
try {
|
||||||
String json = entityToJsonMapper.writeValueAsString(uniqueInnRegnumPairs.stream()
|
List<InnRegnumPair> pairs = uniqueInnRegnumPairs.stream()
|
||||||
.filter(Objects::nonNull)
|
.map(pair -> new InnRegnumPair(pair.getKey(), pair.getValue()))
|
||||||
.map(pair -> new HashMap<String, Object>() {{
|
.toList();
|
||||||
put("inn", pair.getKey());
|
|
||||||
put("regnum", pair.getValue());
|
String json = entityToJsonMapper.writeValueAsString(pairs);
|
||||||
}}).toList());
|
|
||||||
return packagesRecordsMapper.selectUserPackageLegalData(json);
|
return packagesRecordsMapper.selectUserPackageLegalData(json);
|
||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public List<PackagesRecordsMap> findByInnAndEgrn(Long phone) {
|
public record InnRegnumPair(Long inn, Long regNum) {
|
||||||
// return packagesRecordsMapper.findByPhone(phone);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue