diff --git a/src/main/java/cokr/xit/fims/crdn/dao/ImportMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/ImportMapper.java
index cf032123..b8232f6a 100644
--- a/src/main/java/cokr/xit/fims/crdn/dao/ImportMapper.java
+++ b/src/main/java/cokr/xit/fims/crdn/dao/ImportMapper.java
@@ -41,16 +41,20 @@ public interface ImportMapper extends AbstractMapper {
));
}
- /**업무코드를 조회한다.
- * @return 업무코드 목록
+ /**국민신문고 민원제목 + 내용에서 단속정보에 필요한 코드들을 추출한다.
+ * @param params 파라미터
+ *
- violation - 민원제목 + " " + 내용
+ *
+ * @return 단속정보에 필요한 코드
*/
- String selectTaskCd(Map params);
+ DataObject selectViolationCodes(Map params);
- /**업무코드를 조회하여 {"부서코드", "업무코드"} 형식의 맵으로 반환한다.
- * @return {"부서코드", "업무코드"} 맵
+ /**국민신문고 민원제목 + 내용에서 단속정보에 필요한 코드들을 추출한다.
+ * @param violation - 민원제목 + " " + 내용
+ * @return 단속정보에 필요한 코드
*/
- default String selectTaskCd(String violation) {
- return selectTaskCd(params().set("violation", violation));
+ default DataObject selectViolationCodes(String violation) {
+ return selectViolationCodes(params().set("violation", violation));
}
/**차종별 과태료 차종코드를 조회한다.
diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java
index 1e89106a..dc42b82d 100644
--- a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java
+++ b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportBean.java
@@ -19,6 +19,7 @@ import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper;
import cokr.xit.fims.payer.Payer;
import cokr.xit.fims.payer.service.bean.PayerBean;
import cokr.xit.foundation.AbstractComponent;
+import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.util.DateFormats;
import cokr.xit.interfaces.lvis.service.bean.VehicleInfoBean;
import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest;
@@ -99,7 +100,10 @@ public class ImportBean extends AbstractComponent {
.collect(Collectors.groupingBy(map -> map.get("vehicleNo"))); //차량번호별 단속정보
List vehicleNos = List.copyOf(byVehicleNo.keySet());
- String taskCd = importMapper.selectTaskCd(petition.getPetiTitleV() + " " + petition.getPetiReasonL()); //업무 구분(FIM054)
+ DataObject codes = importMapper.selectViolationCodes(petition.getPetiTitleV() + " " + petition.getPetiReasonL());
+ String
+ taskCode = codes.string("TASK_CD"),
+ violationCode = codes.string("VLTN_CD");
return byVehicleNo.entrySet().stream()
.map(entry -> {
@@ -110,7 +114,7 @@ public class ImportBean extends AbstractComponent {
String instDept = petition.getPcdAncCodeV() + "-" + petition.getPcdDeptV(),
sgg = sggs.get(instDept);
crdn.setSggCd(sgg);
- crdn.setTaskSeCd(taskCd);
+ crdn.setTaskSeCd(taskCode);
crdn.setCrdnRegSeCd(first ? "02" : "04"); // 첫번째면 자동등록, 아니면 복사등록 (FIM026)
crdn.setCrdnInptSeCd("14"); // 국민신문고 연계 (FIM003)
@@ -150,7 +154,7 @@ public class ImportBean extends AbstractComponent {
crdn.setOpnnSbmsnYn("N");
crdn.setCrdnSttsCd("01");
- crdn.setVltnCd(violation.getCode());
+ crdn.setVltnCd(violationCode);
crdn.setAtchFileCnt(petition.getAttachmentCount());
return crdn;
diff --git a/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml
index 0dbec528..2e51568b 100644
--- a/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml
+++ b/src/main/resources/sql/mapper/fims/crdn/import-mapper.xml
@@ -18,13 +18,17 @@ SELECT CASE WHEN A.SGG_CD = B.SGG_CD THEN A.SGG_CD ELSE 'DIFF' END SGG_CD
) B
ON A.SGG_CD = B.SGG_CD
-