selectTaskCd -> selectViolationCodes

main
mjkhan21 1 year ago
parent ecd7044a69
commit 3ed3441ab1

@ -41,16 +41,20 @@ public interface ImportMapper extends AbstractMapper {
));
}
/** .
* @return
/** + .
* @param params
* <ul><li>violation - + " " + </li>
* </ul>
* @return
*/
String selectTaskCd(Map<String, Object> params);
DataObject selectViolationCodes(Map<String, Object> 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));
}
/** .

@ -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<String> 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;

@ -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</select>
<select id="selectTaskCd" parameterType="map" resultType="string">/* importMapper.selectTaskCd(업무코드 조회) */
<select id="selectViolationCodes" parameterType="map" resultType="dataobject">/* importMapper.selectViolationCodes(위반내용 관련 코드 조회) */
SELECT CASE WHEN VLTN LIKE CONCAT('%', '전용차로', '%') THEN 'BPV'
WHEN VLTN LIKE CONCAT('%', '장애인', '%') THEN 'DPV'
WHEN VLTN LIKE CONCAT('%', '전기차', '%') THEN 'ECA'
WHEN VLTN LIKE CONCAT('%', '밤샘', '%') THEN 'TPV'
ELSE 'PVS'
END TASK_CD
END TASK_CD <!-- 업무구분(FIM054) -->
, CASE WHEN VLTN LIKE CONCAT('%', '방해', '%') THEN '03'
WHEN VLTN LIKE CONCAT('%', '표지', '%') THEN '05'
ELSE '01'
END VLTN_CD <!-- 위반코드 -->
FROM (SELECT #{violation} VLTN
) A</select>

Loading…
Cancel
Save