From ab90b311f1a11c1badf31a06725f96197db8a270 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Fri, 13 Jan 2023 17:36:24 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8B=A8=EC=86=8D=EC=9E=90=EB=A3=8C=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=8B=9C=20reglt=5Fse=5Fcode(=EB=8B=A8?= =?UTF-8?q?=EC=86=8D=EA=B5=AC=EB=B6=84)=20set=20=EA=B4=80=EB=A0=A8=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ec/service/EcCctvCrackdownService.java | 18 ++++--------- .../biz/ec/service/EcCtznSttemntService.java | 4 ++- .../biz/ec/web/EcCctvCrackdownController.java | 22 +++------------ .../kr/xit/fims/biz/utils/FimsBizUtils.java | 27 +++++++++++++++++++ .../jsp/fims/biz/ec/ecCctvCrackdownPopup.jsp | 1 + .../biz/mng/menu/mngProgramSchPopup.jsp | 6 ++--- 6 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 src/main/java/kr/xit/fims/biz/utils/FimsBizUtils.java diff --git a/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java b/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java index b96d0fb1..4693abbb 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/EcCctvCrackdownService.java @@ -25,6 +25,7 @@ import kr.xit.fims.biz.ec.mapper.IEcCctvCrackdownMapper; import kr.xit.fims.biz.ec.mapper.IEcCtznSttemntMapper; import kr.xit.fims.biz.ec.model.CctvCrackdownDTO; import kr.xit.fims.biz.ec.model.FolderReqDTO; +import kr.xit.fims.biz.utils.FimsBizUtils; import kr.xit.framework.biz.cmm.model.CmmFileDTO; import kr.xit.framework.biz.cmm.service.ICmmFileService; import kr.xit.framework.biz.util.ExtlFileParseUtils; @@ -227,9 +228,9 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService { @Override @Transactional public void saveRtReglt(final CctvCrackdownDTO.Request dto) { - setJobSeCode(dto); - dto.setRegister(getUserInfo().getUniqId()); + dto.setJobSeCode(FimsBizUtils.getFileJobSeCode(dto.getRegltSeCode())); dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode()); + dto.setRegister(getUserInfo().getUniqId()); mapper.insertRtRegltFromEcExtrRegltCntc(dto); dto.setUpdusr(getUserInfo().getUniqId()); @@ -244,8 +245,9 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService { @Transactional public void saveRtErpp(final CctvCrackdownDTO.Request dto) { // 단속테이블 - dto.setRegister(getUserInfo().getUniqId()); + dto.setJobSeCode(FimsBizUtils.getFileJobSeCode(dto.getRegltSeCode())); dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.DESTRUCTION.getCode()); + dto.setRegister(getUserInfo().getUniqId()); mapper.insertRtRegltFromEcExtrRegltCntc(dto); // 서손테이블 @@ -304,14 +306,4 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService { .cmmFileDtls(new ArrayList<>()) .build(); } - - private void setJobSeCode(final CctvCrackdownDTO.Request dto){ - if(Objects.equals(dto.getRegltSeCode(), FimsConst.RegltSeCode.CCTV_FIX.getCode())) - dto.setJobSeCode(FimsConst.FileJobSeCode.CCTV_FIX.getCode()); - else if(Objects.equals(dto.getRegltSeCode(), FimsConst.RegltSeCode.CCTV_DRV.getCode())) - dto.setJobSeCode(FimsConst.FileJobSeCode.CCTV_DRV.getCode()); - else if(Objects.equals(dto.getRegltSeCode(), FimsConst.RegltSeCode.BUS_ONLY.getCode())) - dto.setJobSeCode(FimsConst.FileJobSeCode.BUS_ONLY.getCode()); - } - } diff --git a/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java b/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java index 27f21976..b6e07ce4 100644 --- a/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java +++ b/src/main/java/kr/xit/fims/biz/ec/service/EcCtznSttemntService.java @@ -100,8 +100,9 @@ public class EcCtznSttemntService implements IEcCtznSttemntService { @Transactional public void saveRtReglt(final CtznStmtDTO.Request dto) { // 단속테이블 - dto.setRegister(getUserInfo().getUniqId()); + dto.setRegltSeCode(FimsConst.RegltSeCode.CITIZEN.getCode()); dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode()); + dto.setRegister(getUserInfo().getUniqId()); mapper.insertRtRegltFromCtznStmt(dto); // 시민신고 상세 상태 변경 @@ -121,6 +122,7 @@ public class EcCtznSttemntService implements IEcCtznSttemntService { @Transactional public void saveRtErpp(final CtznStmtDTO.Request dto) { // 단속테이블 + dto.setRegltSeCode(FimsConst.RegltSeCode.CITIZEN.getCode()); dto.setRegister(getUserInfo().getUniqId()); dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.DESTRUCTION.getCode()); mapper.insertRtRegltFromCtznStmt(dto); diff --git a/src/main/java/kr/xit/fims/biz/ec/web/EcCctvCrackdownController.java b/src/main/java/kr/xit/fims/biz/ec/web/EcCctvCrackdownController.java index 40861794..8ebe34f4 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/EcCctvCrackdownController.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/EcCctvCrackdownController.java @@ -17,13 +17,13 @@ import kr.xit.fims.biz.FimsConst; import kr.xit.fims.biz.ec.model.CctvCrackdownDTO; import kr.xit.fims.biz.ec.model.FolderReqDTO; import kr.xit.fims.biz.ec.service.IEcCctvCrackdownService; +import kr.xit.fims.biz.utils.FimsBizUtils; import kr.xit.framework.biz.cmm.model.CmmFileDTO; import kr.xit.framework.biz.cmm.service.ICmmFileService; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.core.utils.fileExplorer.XitFileExplorerUtil; import kr.xit.framework.core.utils.fileExplorer.function.DirectorySearch; -import kr.xit.framework.support.exception.BizRuntimeException; import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.util.AjaxMessageMapRenderer; import kr.xit.framework.support.util.constants.MessageKey; @@ -60,7 +60,7 @@ public class EcCctvCrackdownController { public ModelAndView ecCctvCrackdownPopup(final String extrlRegltCntcId, final String regltSeCode){ ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCctvCrackdownPopup.popup"); - String fileJobSeCode = getFileJobSeCode(regltSeCode); + String fileJobSeCode = FimsBizUtils.getFileJobSeCode(regltSeCode); mav.addObject("extrlRegltCntcDTO", service .findExtrlRegltCntc(extrlRegltCntcId)); mav.addObject("attchFiles", fileService.findFilesByJobSeCodeAndJobId( @@ -146,7 +146,7 @@ public class EcCctvCrackdownController { return ResultResponse.of( fileService.findFilesByJobSeCodeAndJobId( CmmFileDTO.FileMst.builder() - .jobSeCode(getFileJobSeCode(regltSeCode)) + .jobSeCode(FimsBizUtils.getFileJobSeCode(regltSeCode)) .fileJobId(extrlRegltCntcId) .build()).stream() .filter(dtl -> !Objects.equals("png", dtl.getFileExtsn())) @@ -159,25 +159,11 @@ public class EcCctvCrackdownController { return ResultResponse.of( fileService.findFilesByJobSeCodeAndJobId( CmmFileDTO.FileMst.builder() - .jobSeCode(getFileJobSeCode(regltSeCode)) + .jobSeCode(FimsBizUtils.getFileJobSeCode(regltSeCode)) .fileJobId(extrlRegltCntcId) .build()).stream() .filter(dtl -> !Objects.equals("png", dtl.getFileExtsn())) .collect(Collectors.toList()) ); } - - private static String getFileJobSeCode(String regltSeCode) { - // 01 - 고정형CCTV - if(Objects.equals(regltSeCode, "01"))//FimsConst.FileJobSeCode.CCTV_FIX)) - return FimsConst.FileJobSeCode.CCTV_FIX.getCode(); - // 02 - 주행형CCTV - if(Objects.equals(regltSeCode, "02"))//FimsConst.FileJobSeCode.CCTV_DRV)) - return FimsConst.FileJobSeCode.CCTV_DRV.getCode(); - // 03 - 버스장착형CCTV - if(Objects.equals(regltSeCode, "07"))//FimsConst.FileJobSeCode.BUS_ONLY)) - return FimsConst.FileJobSeCode.BUS_ONLY.getCode(); - - throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "데이타 오류[파일정보를 확인해 주세요"); - } } diff --git a/src/main/java/kr/xit/fims/biz/utils/FimsBizUtils.java b/src/main/java/kr/xit/fims/biz/utils/FimsBizUtils.java new file mode 100644 index 00000000..a8a8f0c6 --- /dev/null +++ b/src/main/java/kr/xit/fims/biz/utils/FimsBizUtils.java @@ -0,0 +1,27 @@ +package kr.xit.fims.biz.utils; + +import java.util.Objects; + +import kr.xit.fims.biz.FimsConst; +import kr.xit.framework.support.exception.BizRuntimeException; +import kr.xit.framework.support.util.constants.MessageKey; + +public class FimsBizUtils { + + public static String getFileJobSeCode(String regltSeCode) { + // 01 - 고정형CCTV + if(Objects.equals(regltSeCode, "01"))//FimsConst.FileJobSeCode.CCTV_FIX)) + return FimsConst.FileJobSeCode.CCTV_FIX.getCode(); + // 02 - 주행형CCTV + if(Objects.equals(regltSeCode, "02"))//FimsConst.FileJobSeCode.CCTV_DRV)) + return FimsConst.FileJobSeCode.CCTV_DRV.getCode(); + // 03 - 버스장착형CCTV + if(Objects.equals(regltSeCode, "07"))//FimsConst.FileJobSeCode.BUS_ONLY)) + return FimsConst.FileJobSeCode.BUS_ONLY.getCode(); + + if(Objects.equals(regltSeCode, "09"))//FimsConst.FileJobSeCode.BUS_ONLY)) + return FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode(); + + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "데이타 오류[파일정보를 확인해 주세요"); + } +} diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCctvCrackdownPopup.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCctvCrackdownPopup.jsp index 631d4bc0..60a223d9 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCctvCrackdownPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCctvCrackdownPopup.jsp @@ -260,6 +260,7 @@ ,erpp: (extrlRegltCntcId) => { const data = { extrlRegltCntcId + ,regltSeCode: '${extrlRegltCntcDTO.regltSeCode}' } if(!confirm('서손 처리 하시겠습니까?')) return false; cmmAjax({ diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngProgramSchPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngProgramSchPopup.jsp index d2952c48..48a0dc22 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngProgramSchPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngProgramSchPopup.jsp @@ -64,8 +64,8 @@ } ,onClickGrid: (ev) => { const data = ev.grid.getRow(ev.rowKey); - window.opener?.unblockUI(); - window.opener.callbackSearch(data); + //window.opener?.unblockUI(); + window.opener?.callbackSearch(data); window.close(); } } @@ -75,7 +75,7 @@ **************************************************************************/ $(() => { $(window).on("unload", function (e) { - window.opener?.unblockUI(); + //window.opener?.unblockUI(); window.opener?.callbackSearch(); return null; });