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}