From 9e88ae324769a4fef23a29684441e056ac9524d1 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 21 Nov 2023 16:08:30 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=A4=EC=A0=95=EC=A0=95=EB=B3=B4(=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9E=90,=EB=B6=80=EC=84=9C,=EC=8B=9C=EA=B5=B0?= =?UTF-8?q?=EA=B5=AC)=20=EC=A1=B0=ED=9A=8C=20=EC=B6=94=EA=B0=80,=20?= =?UTF-8?q?=EA=B5=90=EB=B6=80=20=EA=B3=84=EC=A2=8C=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/fims/base/UserController.java | 24 +++ .../cokr/xit/fims/cmmn/dao/StngMapper.java | 37 +++++ .../fims/cmmn/service/bean/FactionBean.java | 4 + .../xit/fims/cmmn/service/bean/StngBean.java | 62 +++++++ .../xit/fims/sprt/web/Sprt01Controller.java | 25 ++- .../cokr/xit/fims/task/web/CmnController.java | 14 ++ .../sql/mapper/fims/cmmn/stng-mapper.xml | 41 +++++ .../WEB-INF/jsp/fims/sprt/sprt01110-info.jsp | 14 +- .../WEB-INF/jsp/fims/sprt/sprt01120-info.jsp | 152 +++++++++++++++++- 9 files changed, 364 insertions(+), 9 deletions(-) create mode 100644 src/main/java/cokr/xit/fims/cmmn/dao/StngMapper.java create mode 100644 src/main/java/cokr/xit/fims/cmmn/service/bean/StngBean.java create mode 100644 src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml diff --git a/src/main/java/cokr/xit/fims/base/UserController.java b/src/main/java/cokr/xit/fims/base/UserController.java index 26438497..9e1d33f4 100644 --- a/src/main/java/cokr/xit/fims/base/UserController.java +++ b/src/main/java/cokr/xit/fims/base/UserController.java @@ -22,6 +22,7 @@ import cokr.xit.base.user.ManagedUser; import cokr.xit.fims.cmmn.DirectoryStructureToJson; import cokr.xit.fims.cmmn.DirectoryStructureToJson.Node; import cokr.xit.fims.cmmn.dao.FactionMapper; +import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.crdn.service.bean.ImportServiceBean; import cokr.xit.foundation.data.DataObject; import cokr.xit.interfaces.smg.service.bean.SmgServiceBean; @@ -38,6 +39,9 @@ public class UserController extends cokr.xit.base.user.web.UserController params); + +} diff --git a/src/main/java/cokr/xit/fims/cmmn/service/bean/FactionBean.java b/src/main/java/cokr/xit/fims/cmmn/service/bean/FactionBean.java index c322be87..a03bca94 100644 --- a/src/main/java/cokr/xit/fims/cmmn/service/bean/FactionBean.java +++ b/src/main/java/cokr/xit/fims/cmmn/service/bean/FactionBean.java @@ -25,6 +25,10 @@ public class FactionBean extends AbstractComponent { @Resource(name = "userMapper") private UserMapper userMapper; + /**userInfo 객체에 해당 사용자가 소속된 시군구,기관,부서 정보를 저장한다. + * @param userInfo 사용자 정보 + * @return + */ public void initUserInfo(UserInfo userInfo) { DataObject factionInfo = factionMapper.selectFactionInfoOfUser(userInfo.getId()); diff --git a/src/main/java/cokr/xit/fims/cmmn/service/bean/StngBean.java b/src/main/java/cokr/xit/fims/cmmn/service/bean/StngBean.java new file mode 100644 index 00000000..accf79f7 --- /dev/null +++ b/src/main/java/cokr/xit/fims/cmmn/service/bean/StngBean.java @@ -0,0 +1,62 @@ +package cokr.xit.fims.cmmn.service.bean; + +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Component; + +import cokr.xit.fims.cmmn.dao.StngMapper; +import cokr.xit.foundation.AbstractComponent; +import cokr.xit.foundation.UserInfo; +import cokr.xit.foundation.data.DataObject; + +@Component("stngBean") +public class StngBean extends AbstractComponent { + + @Resource(name = "factionBean") + FactionBean factionBean; + + @Resource(name = "stngMapper") + StngMapper stngMapper; + + /**현재 사용자와 관련된 설정 정보를 조회한다. + * @param type 설정 유형 + * @return + */ + public DataObject getStng(String type) { + + if(type.equals("user")) { + return stngMapper.selectUserStng(currentUser().getId()); + } else if(type.equals("dept")){ + UserInfo userInfo = currentUser(); + factionBean.initUserInfo(userInfo); + return stngMapper.selectDeptStng((String)userInfo.getInfo().get("deptCd")); + } else if(type.equals("sgg")){ + UserInfo userInfo = currentUser(); + factionBean.initUserInfo(userInfo); + return stngMapper.selectSggStng((String)userInfo.getInfo().get("sggCd")); + } else { + return null; + } + + } + + /**교부 계좌번호를 변경한다. + * @param dtbnBankNm 교부 은행명, dtbnActno 교부 계좌번호 + * @return 저장여부 + */ + public boolean updateDtbnActno(String dtbnBankNm, String dtbnActno) { + Map params = new HashMap(); + UserInfo userInfo = currentUser(); + factionBean.initUserInfo(userInfo); + params.put("mdfr", userInfo.getId()); + params.put("deptCd", (String)userInfo.getInfo().get("deptCd")); + params.put("dtbnBankNm", dtbnBankNm); + params.put("dtbnActno", dtbnActno); + + return stngMapper.updateDtbnActno(params) == 1 ? true : false; + } + +} diff --git a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java index cb9e3b0e..0616de20 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java @@ -47,7 +47,9 @@ public class Sprt01Controller extends ApplicationController { printCrdnMain = "/110/info.do", makeCrdnListFileFromHwpFormat = "/110/makeCrdnListFileFromHwpFormat.do", makeCrdnConfirmFileFromHwpFormat = "/110/makeCrdnConfirmFileFromHwpFormat.do", - printBillMain = "/120/info.do" + printBillMain = "/120/info.do", + makeRequestForDeliveryFileFromHwpFormat = "/120/makeRequestForDeliveryFileFromHwpFormat.do", + makeReportOnClaimsFileFromHwpFormat = "/120/makeReportOnClaimsFileFromHwpFormat.do" ; } @@ -326,4 +328,25 @@ public class Sprt01Controller extends ApplicationController { return mav; } + /** 교부청구서를 한글 파일로 작성한다. + * @return hwp파일 + */ + public ModelAndView makeRequestForDeliveryFileFromHwpFormat(PrintOption printOption, String[] crdnIds) { + ModelAndView mav = new ModelAndView("jsonView"); + + //TODO : 교부청구서 한글 파일 작성 + + return mav; + } + + /** 채권신고서를 한글 파일로 작성한다. + * @return hwp파일 + */ + public ModelAndView makeReportOnClaimsFileFromHwpFormat(PrintOption printOption, String[] crdnIds) { + ModelAndView mav = new ModelAndView("jsonView"); + + //TODO : 채권신고서 한글 파일 작성 + + return mav; + } } diff --git a/src/main/java/cokr/xit/fims/task/web/CmnController.java b/src/main/java/cokr/xit/fims/task/web/CmnController.java index fd974a6b..82dda93d 100644 --- a/src/main/java/cokr/xit/fims/task/web/CmnController.java +++ b/src/main/java/cokr/xit/fims/task/web/CmnController.java @@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import cokr.xit.fims.crdn.Crdn; +import cokr.xit.fims.sprt.PrintOption; import cokr.xit.fims.sprt.SprtQuery; import cokr.xit.fims.stat.StatQuery; @@ -384,6 +385,19 @@ public class CmnController { public ModelAndView printBillMain(String... crdnIds) { return super.printBillMain(crdnIds); } + + @Override + @RequestMapping(name="교부청구서 한글 파일 생성", value=METHOD_URL.makeRequestForDeliveryFileFromHwpFormat) + public ModelAndView makeRequestForDeliveryFileFromHwpFormat(PrintOption printOption, String... crdnIds) { + return super.makeRequestForDeliveryFileFromHwpFormat(printOption, crdnIds); + } + + @Override + @RequestMapping(name="채권신고서 한글 파일 생성", value=METHOD_URL.makeReportOnClaimsFileFromHwpFormat) + public ModelAndView makeReportOnClaimsFileFromHwpFormat(PrintOption printOption, String... crdnIds) { + return super.makeReportOnClaimsFileFromHwpFormat(printOption, crdnIds); + } + } @Controller diff --git a/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml b/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml new file mode 100644 index 00000000..4f7a80f2 --- /dev/null +++ b/src/main/resources/sql/mapper/fims/cmmn/stng-mapper.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + +/* 교부 계좌번호 변경 stngMapper.updateDtbnActno) */ +UPDATE TB_DEPT_INFO + SET MDFR = #{mdfr} + , MDFCN_DT = + , DTBN_BANK_NM = #{dtbnBankNm} + , DTBN_ACTNO = #{dtbnActno} + WHERE DEPT_CD = #{deptCd} + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01110-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01110-info.jsp index b9ff1a0b..85d15b9b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01110-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01110-info.jsp @@ -127,12 +127,14 @@ $(document).ready(function(){ crdnIds : $P.crdnIds.join(",") }, success : resp => { - var a = document.createElement("a"); - a.href = resp.filePath; - a.download = resp.fileName; - document.getElementById("tempArea--${pageName}").appendChild(a); - a.click(); - document.getElementById("tempArea--${pageName}").removeChild(a); + if(resp.filePath != null && resp.filePath != ""){ + var a = document.createElement("a"); + a.href = resp.filePath; + a.download = resp.fileName; + document.getElementById("tempArea--${pageName}").appendChild(a); + a.click(); + document.getElementById("tempArea--${pageName}").removeChild(a); + } } }); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01120-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01120-info.jsp index 509fbb3e..300a0188 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01120-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01120-info.jsp @@ -8,8 +8,8 @@
- - + +
@@ -126,9 +126,44 @@ + + + +