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) {
|
||||
try {
|
||||
String json = entityToJsonMapper.writeValueAsString(uniqueInnRegnumPairs.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.map(pair -> new HashMap<String, Object>() {{
|
||||
put("inn", pair.getKey());
|
||||
put("regnum", pair.getValue());
|
||||
}}).toList());
|
||||
List<InnRegnumPair> pairs = uniqueInnRegnumPairs.stream()
|
||||
.map(pair -> new InnRegnumPair(pair.getKey(), pair.getValue()))
|
||||
.toList();
|
||||
|
||||
String json = entityToJsonMapper.writeValueAsString(pairs);
|
||||
return packagesRecordsMapper.selectUserPackageLegalData(json);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// public List<PackagesRecordsMap> findByInnAndEgrn(Long phone) {
|
||||
// return packagesRecordsMapper.findByPhone(phone);
|
||||
// }
|
||||
|
||||
public record InnRegnumPair(Long inn, Long regNum) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue