From 6810e554928b764638a1591d3ba6bbfae6ca645d Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 2 Feb 2024 10:19:41 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AC=EC=A0=9C=EC=8B=9C=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=EC=97=90=20=EB=94=B0=EB=A5=B8=20=EB=8B=A8=EC=86=8D?= =?UTF-8?q?=EC=9E=90=EB=A3=8C=EC=95=95=EC=B6=95=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fims/crdn/send/nxrp/AttachedTxtMaker.java | 17 +++++++++++------ .../xit/fims/crdn/send/nxrp/LinkFileMaker.java | 5 +++++ .../xit/fims/crdn/send/nxrp/OnlyImageMaker.java | 17 +++++++++++------ .../fims/crdn/service/bean/CrdnServiceBean.java | 11 +++++++++++ .../sql/mapper/fims/cmmn/stng-mapper.xml | 3 ++- 5 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/send/nxrp/AttachedTxtMaker.java b/src/main/java/cokr/xit/fims/crdn/send/nxrp/AttachedTxtMaker.java index 0779f950..1cb1ab8e 100644 --- a/src/main/java/cokr/xit/fims/crdn/send/nxrp/AttachedTxtMaker.java +++ b/src/main/java/cokr/xit/fims/crdn/send/nxrp/AttachedTxtMaker.java @@ -131,9 +131,12 @@ public class AttachedTxtMaker extends LinkFileMaker { crdnSpareaCd = "03"; } B01[8] = crdnSpareaCd; - String gujesi = "1"; - //TODO : 구제시 - B01[9] = gujesi; + + if(this.gujesiStng != null && !this.gujesiStng.equals("")) { + B01[9] = gujesiStng; + } else { + B01[9] = "1"; + } if(crdnInfo.string("STDG_CD").equals("")) { B01[10] = "0000000000"; @@ -180,9 +183,11 @@ public class AttachedTxtMaker extends LinkFileMaker { } C01[6] = crdnPlc; - String gujesi = "1"; - //TODO : 구제시 - C01[7] = gujesi; + if(this.gujesiStng != null && !this.gujesiStng.equals("")) { + C01[7] = gujesiStng; + } else { + C01[7] = "1"; + } if(crdnInfo.string("STDG_CD").equals("")) { C01[8] = "0000000000"; diff --git a/src/main/java/cokr/xit/fims/crdn/send/nxrp/LinkFileMaker.java b/src/main/java/cokr/xit/fims/crdn/send/nxrp/LinkFileMaker.java index 70652d0c..e4f42051 100644 --- a/src/main/java/cokr/xit/fims/crdn/send/nxrp/LinkFileMaker.java +++ b/src/main/java/cokr/xit/fims/crdn/send/nxrp/LinkFileMaker.java @@ -7,6 +7,11 @@ public abstract class LinkFileMaker { protected String ifId; protected String zipFileName; protected int maxImageFileCnt; + protected String gujesiStng; + + public void setGujesiStng(String gujesi) { + this.gujesiStng = gujesi; + } public int getMaxImageFileCnt() { return this.maxImageFileCnt; diff --git a/src/main/java/cokr/xit/fims/crdn/send/nxrp/OnlyImageMaker.java b/src/main/java/cokr/xit/fims/crdn/send/nxrp/OnlyImageMaker.java index aa99c058..aa7e5a20 100644 --- a/src/main/java/cokr/xit/fims/crdn/send/nxrp/OnlyImageMaker.java +++ b/src/main/java/cokr/xit/fims/crdn/send/nxrp/OnlyImageMaker.java @@ -62,9 +62,12 @@ public class OnlyImageMaker extends LinkFileMaker { crdnSpareaCd = "03"; } B01[6] = crdnSpareaCd; - String gujesi = "1"; - //TODO : 구제시 - B01[7] = gujesi; + + if(this.gujesiStng != null && !this.gujesiStng.equals("")) { + B01[7] = gujesiStng; + } else { + B01[7] = "1"; + } if(crdnInfo.string("STDG_CD").equals("")) { B01[8] = "0000000000"; @@ -108,9 +111,11 @@ public class OnlyImageMaker extends LinkFileMaker { } C01[5] = crdnPlc; - String gujesi = "1"; - //TODO : 구제시 - C01[6] = crdnInfo.string(gujesi); + if(this.gujesiStng != null && !this.gujesiStng.equals("")) { + C01[6] = gujesiStng; + } else { + C01[6] = "1"; + } if(crdnInfo.string("STDG_CD").equals("")) { C01[7] = "0000000000"; 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 1aaad5ab..a1f6a58a 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 @@ -21,6 +21,7 @@ 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; +import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.CrdnInfoMapper; @@ -76,6 +77,9 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService @Resource(name="codeBean") private CodeBean codeBean; + @Resource(name="stngBean") + private StngBean stngBean; + @Resource(name="mediaBean") private MediaBean mediaBean; @@ -367,6 +371,9 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService List fimsVltnCodes = codeBean.getCodes("FIM004"); List nxrpVltnCodes = codeBean.getCodes("NTR055"); + DataObject deptStng = stngBean.getStng("dept"); + String gujesi = deptStng.string("NXRP_RGN_SE_CD"); + for(String crdnID : crdnIDs) { DataObject crdnInfo = crdnInfoMapper.selectCrdnInfo(crdnID); @@ -444,6 +451,10 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService linkFileMaker = new OnlyImageMaker(nxrpLinkSeCd, instDigit7); } + if(!gujesi.equals("")) { + linkFileMaker.setGujesiStng(gujesi); + } + String workPath = "files/temp/"+crdnInfo.string("SGG_CD")+"/"+crdnInfo.string("CRDN_ID"); File workFolder = new File(workPath); if(workFolder.exists()) { 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 a00c913d..c4f83b90 100644 --- a/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml @@ -27,8 +27,9 @@ SELECT DEPT_CD , DEPT_FXNO , DTBN_BANK_NM , DTBN_ACTNO - , NXRP_LINK_YN , CVLCPT_LINK_SE_CD + , NXRP_LINK_YN + , NXRP_RGN_SE_CD FROM TB_DEPT WHERE DEPT_CD = #{deptCd}