From 2cd77efac6139625dc9ac0acf0c9e11cb8ac48c8 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 1 Feb 2024 09:39:23 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=A5=EC=95=A0=EC=9D=B8,=EC=A0=84=EA=B8=B0?= =?UTF-8?q?=EC=B0=A8=20=EC=97=85=EB=AC=B4=EC=97=90=EC=84=9C=20=EC=84=B8?= =?UTF-8?q?=EC=99=B8=EC=88=98=EC=9E=85=EC=A0=84=EC=86=A1=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/crdn/service/CrdnService.java | 6 +++ .../crdn/service/bean/CrdnServiceBean.java | 45 ++++++++++++++++ .../xit/fims/crdn/web/Crdn06Controller.java | 10 ++-- src/main/java/cokr/xit/fims/mngt/Task.java | 10 ++++ .../cokr/xit/fims/task/web/DpvController.java | 7 --- .../cokr/xit/fims/task/web/EcaController.java | 6 --- .../sql/mapper/fims/cmmn/stng-mapper.xml | 1 + .../sql/mapper/fims/mngt/task-mapper.xml | 54 +++++++++++-------- 8 files changed, 100 insertions(+), 39 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java b/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java index babf03ca..0c1fe495 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java @@ -97,4 +97,10 @@ public interface CrdnService { */ int countCrdn(CrdnQuery crdnQuery); + /** 단속자료를 압축파일로 생성하여 세외수입으로 전송한다. + * @param crdnIDs 단속ID 목록 + * @return 결과메시지 + */ + String sendCrdn(String[] crdnIDs); + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java index acdbdfb1..ae4d2b4d 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Service; import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.file.service.bean.FileBean; +import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.service.bean.CrdnPayerHstryBean; import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; @@ -27,6 +28,7 @@ import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; import cokr.xit.fims.cvlc.service.bean.CrdnCvlcptMainBean; import cokr.xit.fims.excl.service.bean.LevyExclBean; +import cokr.xit.fims.mngt.dao.TaskMapper; import cokr.xit.fims.sprt.dao.TotalInfoMapper; import cokr.xit.fims.sprt.service.bean.MediaBean; import cokr.xit.foundation.component.AbstractServiceBean; @@ -56,6 +58,9 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService @Resource(name="totalInfoMapper") private TotalInfoMapper totalInfoMapper; + @Resource(name="taskMapper") + private TaskMapper taskMapper; + @Resource(name="fileBean") private FileBean fileBean; @@ -342,4 +347,44 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService public int countCrdn(CrdnQuery crdnQuery) { return crdnListMapper.countCrdn(crdnQuery); } + + @Override + public String sendCrdn(String[] crdnIDs) { + String rtnMsg = "[F]"; + + for(String crdnID : crdnIDs) { + DataObject crdnInfo = crdnInfoMapper.selectCrdnInfo(crdnID); + + String taskSeCd = crdnInfo.string("TASK_SE_CD"); + + if(!taskSeCd.equals("PVS") && !taskSeCd.equals("BPV")) { + rtnMsg += "주정차위반 또는 전용차로위반 자료만 처리 가능합니다."; + throw new RuntimeException(rtnMsg); + } + + CmmnQuery cmmnQuery = new CmmnQuery(); + cmmnQuery.setUseYN("Y"); + cmmnQuery.setSggCd(crdnInfo.string("SGG_CD")); + cmmnQuery.setTaskSeCd(taskSeCd); + DataObject nxrpLinkInfo = taskMapper.selectTaskInfo(cmmnQuery); + + String nxrpLinkSeCd = nxrpLinkInfo.string("NXRP_LINK_SE_CD"); + String nxrpLinkSeDtlSn = nxrpLinkInfo.string("NXRP_LINK_SE_DTL_SN"); + + if(nxrpLinkSeDtlSn.equals("01")) { + //TODO + } else if(nxrpLinkSeDtlSn.equals("02")){ + //TODO + } else { + rtnMsg += "세외수입 연계 설정 오류"; + throw new RuntimeException(rtnMsg); + } + + //TODO + } + + rtnMsg = "[S]"; + + return rtnMsg; + } } diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn06Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn06Controller.java index e1828d7c..104318a1 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn06Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn06Controller.java @@ -209,10 +209,12 @@ public class Crdn06Controller extends ApplicationController { */ public ModelAndView sendCrdn(String... crdnIDs) { ModelAndView mav = new ModelAndView("jsonView"); - - //TODO : - - mav.addObject("saved", true); + boolean saved = false; + String rtnMsg = crdnService.sendCrdn(crdnIDs); + if(rtnMsg.contains("[S]")) { + saved = true; + } + mav.addObject("saved", saved); return mav; } diff --git a/src/main/java/cokr/xit/fims/mngt/Task.java b/src/main/java/cokr/xit/fims/mngt/Task.java index b65c26de..dffd7083 100644 --- a/src/main/java/cokr/xit/fims/mngt/Task.java +++ b/src/main/java/cokr/xit/fims/mngt/Task.java @@ -62,4 +62,14 @@ public class Task extends AbstractEntity { */ private Integer ffnlgInadtnMxmmCnt; + /** + * 세외수입 연계 구분 코드 + */ + private String nxrpLinkSeCd; + + /** + * 세외수입 연계 구분 상세 순번 + */ + private String nxrpLinkSeDtlSn; + } diff --git a/src/main/java/cokr/xit/fims/task/web/DpvController.java b/src/main/java/cokr/xit/fims/task/web/DpvController.java index a13f5a61..f79f5cd8 100644 --- a/src/main/java/cokr/xit/fims/task/web/DpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/DpvController.java @@ -337,13 +337,6 @@ public class DpvController { return super.countCrdn(query); } - @Override - @RequestMapping(name="장애인과태료업무 단속자료압축파일 세외수입 전송", value=METHOD_URL.sendCrdn) - public ModelAndView sendCrdn(String... crdnIDs) { - return super.sendCrdn(crdnIDs); - } - - @Override @RequestMapping(name="장애인과태료업무 단속자료 조회", value=METHOD_URL.getCrackdownStatusInfo) public ModelAndView getCrackdownStatusInfo(CrdnQuery query) { diff --git a/src/main/java/cokr/xit/fims/task/web/EcaController.java b/src/main/java/cokr/xit/fims/task/web/EcaController.java index b3f14e41..6187327c 100644 --- a/src/main/java/cokr/xit/fims/task/web/EcaController.java +++ b/src/main/java/cokr/xit/fims/task/web/EcaController.java @@ -296,12 +296,6 @@ public class EcaController { return super.countCrdn(query); } - @Override - @RequestMapping(name="전기차과태료업무 단속자료압축파일 세외수입 전송", value=METHOD_URL.sendCrdn) - public ModelAndView sendCrdn(String... crdnIDs) { - return super.sendCrdn(crdnIDs); - } - @Override @RequestMapping(name="전기차과태료업무 단속자료 조회", value=METHOD_URL.getCrackdownStatusInfo) public ModelAndView getCrackdownStatusInfo(CrdnQuery query) { diff --git a/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml b/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml index 02dc25a0..58432722 100644 --- a/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml @@ -22,6 +22,7 @@ SELECT USER_ID