접수경로가 안전신문고가 아닌 경우(단속일시와 차량번호를 추출하지 못한 경우)에도 단속자료가 입력되도록 수정

main
이범준 1 year ago
parent b337271790
commit debb7aaceb

@ -96,8 +96,19 @@ public class ImportBean extends AbstractComponent {
.setTitle(petition.getPetiTitleV())
.setReason(petition.getPetiReasonL());
Map<String, List<Map<String, String>>> byVehicleNo = violation.getVehicleNoDatetimes().stream()
List<Map<String, String>> vehicleNoDatetimes = violation.getVehicleNoDatetimes();
//민원내용으로부터 차량번호와 단속일시를 추출하지 못했을 때
if(vehicleNoDatetimes.size() == 0) {
vehicleNoDatetimes.add(Map.of(
"datetime", petition.getPetiRegD(),
"vehicleNo", ""
));
}
Map<String, List<Map<String, String>>> byVehicleNo = vehicleNoDatetimes.stream()
.collect(Collectors.groupingBy(map -> map.get("vehicleNo"))); //차량번호별 단속정보
List<String> vehicleNos = List.copyOf(byVehicleNo.keySet());
DataObject codes = importMapper.selectViolationCodes(petition.getPetiTitleV() + " " + petition.getPetiReasonL());

Loading…
Cancel
Save