|
|
|
@ -51,9 +51,8 @@ public class ImportBean extends AbstractComponent {
|
|
|
|
|
|
|
|
|
|
Map<String, String>
|
|
|
|
|
ssgs = getSSGs(petitions),
|
|
|
|
|
tasks = importMapper.selectTaskMap(), //TODO: 업무구분 추출 다시 검토할 것
|
|
|
|
|
carModels = importMapper.selectCarMdl();
|
|
|
|
|
List<Crdn> crdns = create(petitions, ssgs, tasks);
|
|
|
|
|
List<Crdn> crdns = create(petitions, ssgs);
|
|
|
|
|
|
|
|
|
|
BiFunction<String, String, String> getCarModel = (vhctyAsortCd, mxmmLdg) -> {
|
|
|
|
|
if (isEmpty(vhctyAsortCd)) return null;
|
|
|
|
@ -86,7 +85,7 @@ public class ImportBean extends AbstractComponent {
|
|
|
|
|
* @param sggs 시군구코드
|
|
|
|
|
* @return 단속자료 목록
|
|
|
|
|
*/
|
|
|
|
|
private List<Crdn> create(List<Petition> petitions, Map<String, String> sggs, Map<String, String> tasks) {
|
|
|
|
|
private List<Crdn> create(List<Petition> petitions, Map<String, String> sggs) {
|
|
|
|
|
Petition.Violation violation = new Petition.Violation();
|
|
|
|
|
DateFormats dateFormats = new DateFormats();
|
|
|
|
|
|
|
|
|
@ -100,6 +99,8 @@ public class ImportBean extends AbstractComponent {
|
|
|
|
|
.collect(Collectors.groupingBy(map -> map.get("vehicleNo"))); //차량번호별 단속정보
|
|
|
|
|
List<String> vehicleNos = List.copyOf(byVehicleNo.keySet());
|
|
|
|
|
|
|
|
|
|
String taskCd = importMapper.selectTaskCd(petition.getPetiTitleV() + " " + petition.getPetiReasonL()); //업무 구분(FIM054)
|
|
|
|
|
|
|
|
|
|
return byVehicleNo.entrySet().stream()
|
|
|
|
|
.map(entry -> {
|
|
|
|
|
String vehicleNo = entry.getKey();
|
|
|
|
@ -109,8 +110,7 @@ public class ImportBean extends AbstractComponent {
|
|
|
|
|
String instDept = petition.getPcdAncCodeV() + "-" + petition.getPcdDeptV(),
|
|
|
|
|
sgg = sggs.get(instDept);
|
|
|
|
|
crdn.setSggCd(sgg);
|
|
|
|
|
String dept = petition.getPcdDeptV();
|
|
|
|
|
crdn.setTaskSeCd(ifEmpty(tasks.get(dept), () -> tasks.get("default")));
|
|
|
|
|
crdn.setTaskSeCd(taskCd);
|
|
|
|
|
|
|
|
|
|
crdn.setCrdnRegSeCd(first ? "02" : "04"); // 첫번째면 자동등록, 아니면 복사등록 (FIM026)
|
|
|
|
|
crdn.setCrdnInptSeCd("14"); // 국민신문고 연계 (FIM003)
|
|
|
|
|