diff --git a/src/main/java/cokr/xit/fims/cmmn/FactionUtil.java b/src/main/java/cokr/xit/fims/cmmn/FactionUtil.java index 5ac3e38f..46717546 100644 --- a/src/main/java/cokr/xit/fims/cmmn/FactionUtil.java +++ b/src/main/java/cokr/xit/fims/cmmn/FactionUtil.java @@ -7,4 +7,14 @@ public class FactionUtil { return splitString[splitString.length-1]; } + public static String getInstituteLeader(String instNm, boolean jang) { + if(instNm.endsWith("구") || instNm.endsWith("군")) { + instNm += "청"; + } + if(!jang) { + instNm += "장"; + } + return instNm; + } + } diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/PrintUtil.java b/src/main/java/cokr/xit/fims/cmmn/hwp/PrintUtil.java index 18471ce9..d8b635d4 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/PrintUtil.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/PrintUtil.java @@ -5,6 +5,7 @@ import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; +import java.util.Map; import org.springframework.core.io.ClassPathResource; @@ -195,7 +196,7 @@ public class PrintUtil { if(printOption.getPrivateInfoYn() != null && printOption.getPrivateInfoYn().equals("N")) { privateInfoYn = false; } - + Map globalVariable = printOption.getGlobalVariable(); if(this.formatName.equals("crdnList")){ @@ -220,9 +221,7 @@ public class PrintUtil { String instNm = (String) this.printRequestUserInfo.getInfo().get("instNm"); instNm = FactionUtil.getLastWord(instNm); - if(instNm.endsWith("구") || instNm.endsWith("군")) { - instNm += "청"; - } + instNm = FactionUtil.getInstituteLeader(instNm, false); baseFileEditor.set("발신", instNm); } else if(this.formatName.equals("requestForDelivery")){ @@ -307,9 +306,7 @@ public class PrintUtil { baseFileEditor.set("연월일", ymd); String instNm = (String) this.printRequestUserInfo.getInfo().get("instNm"); - if(instNm.endsWith("구") || instNm.endsWith("군")) { - instNm += "청"; - } + instNm = FactionUtil.getInstituteLeader(instNm, false); baseFileEditor.set("발신", instNm); if(!dataObject.string("PHOTO1").equals("")) { diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java index 22c12366..11d5865e 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java +++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java @@ -14,6 +14,7 @@ import cokr.xit.base.file.service.bean.FileBean; import cokr.xit.fims.cmmn.hwp.AddUtil; import cokr.xit.fims.cmmn.hwp.PrintUtil; import cokr.xit.fims.cmmn.service.bean.FactionBean; +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.CrdnListMapper; @@ -53,6 +54,9 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv @Resource(name="fileBean") protected FileBean fileBean; + @Resource(name = "stngBean") + protected StngBean stngBean; + @Override public List getIntegrationDataList(SprtQuery query) { return sprt01Bean.getIntegrationDataList(query); @@ -110,10 +114,18 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv //TODO : //query.set(); //dataObjectList = Mapper.selectList(query); + + DataObject stngInfo = stngBean.getStng("dept"); + Map globalVariable = printOption.getGlobalVariable(); + globalVariable.put("dtbnBankNm", stngInfo.string("DTBN_BANK_NM")); + globalVariable.put("dtbnActno", stngInfo.string("DTBN_ACTNO")); + printOption.setGlobalVariable(globalVariable); + } else if(formatName.equals("reportOnClaims")) { //TODO : //query.set(); //dataObjectList = Mapper.selectList(query); + } int totalDataCount = dataObjectList.size();