diff --git a/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java b/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java index 84610d3..e78d01c 100644 --- a/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java +++ b/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java @@ -17,6 +17,14 @@ public class DsuseMgtReceiptQuery extends QueryRequest{ //폐기관리 private String dscdmngId; // 폐기관리 ID + public String getDscdmngId() { + return dscdmngId; + } + + public void setDscdmngId(String dscdmngId) { + this.dscdmngId = dscdmngId; + } + private String deptCd; // 부서 코드 private String userId; // 사용자 ID private String prgrsSttsCd; // 진행 상태 코드 diff --git a/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtReceiptMapper.java b/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtReceiptMapper.java index 5f4e8ce..5a9dbd9 100644 --- a/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtReceiptMapper.java +++ b/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtReceiptMapper.java @@ -19,4 +19,6 @@ public interface DsuseMgtReceiptMapper extends AbstractMapper { */ List selectDsuseMgtReceiptList(DsuseMgtReceiptQuery req); + DataObject selectDsuseMgtReceiptInfo(String dscdmngId); + } diff --git a/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java b/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java index abec077..4a0b073 100644 --- a/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java +++ b/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java @@ -1,10 +1,8 @@ package cokr.xit.adds.nims.service; import java.util.List; -import java.util.Map; import cokr.xit.adds.nims.DsuseMgtReceiptQuery; -import cokr.xit.base.file.FileInfo; import cokr.xit.foundation.data.DataObject; public interface DsuseMgtReceiptService { @@ -16,6 +14,8 @@ public interface DsuseMgtReceiptService { * * @return 단속자료 목록 */ - List getdsuseMgtReceiptList(DsuseMgtReceiptQuery query); + List getDsuseMgtReceiptList(DsuseMgtReceiptQuery query); + + DataObject getDsuseMgtReceiptInfo(String dscdmngId); } diff --git a/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtReceiptServiceBean.java b/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtReceiptServiceBean.java index 02b0620..0ab57e6 100644 --- a/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtReceiptServiceBean.java +++ b/src/main/java/cokr/xit/adds/nims/service/bean/DsuseMgtReceiptServiceBean.java @@ -20,10 +20,14 @@ public class DsuseMgtReceiptServiceBean extends AbstractServiceBean implements D private DsuseMgtReceiptMapper dsuseMgtReceiptMapper; @Override - public List getdsuseMgtReceiptList(DsuseMgtReceiptQuery query){ + public List getDsuseMgtReceiptList(DsuseMgtReceiptQuery query){ query.setOrderBy("DSCDMNG_ID DESC"); return dsuseMgtReceiptMapper.selectDsuseMgtReceiptList(query); } + @Override + public DataObject getDsuseMgtReceiptInfo(String dscdmngId){ + return dsuseMgtReceiptMapper.selectDsuseMgtReceiptInfo(dscdmngId); + } } diff --git a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java index b80e7bd..bb7fe0d 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -18,6 +18,8 @@ import cokr.xit.adds.nims.service.DsuseMgtReceiptService; import cokr.xit.applib.ogdp.OgdpQuery; import cokr.xit.applib.ogdp.service.bean.DefaultOgdpBean; import cokr.xit.base.code.CommonCode; +import cokr.xit.base.file.service.FileQuery; +import cokr.xit.base.file.service.FileService; import cokr.xit.base.web.ApplicationController; import cokr.xit.foundation.data.DataObject; @@ -31,7 +33,7 @@ public class AddsNimsController extends ApplicationController { private String apiHost; @Resource(name="defaultOgdpBean") - DefaultOgdpBean defaultOgdpBean; + private DefaultOgdpBean defaultOgdpBean; @Resource(name="dsuseMgtReceiptService") private DsuseMgtReceiptService dsuseMgtReceiptService; @@ -39,6 +41,9 @@ public class AddsNimsController extends ApplicationController { @Resource(name="dsuseMgtDocService") private DsuseMgtDocService dsuseMgtDocService; + @Resource(name="fileService") + private FileService fileService; + //------------------------------------------------------------------------------------------------- // 신청서 접수 //------------------------------------------------------------------------------------------------- @@ -46,13 +51,24 @@ public class AddsNimsController extends ApplicationController { public ModelAndView getDsuseMgtReceiptList(DsuseMgtReceiptQuery query) { setFetchSize(query); - return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtReceiptService.getdsuseMgtReceiptList(query),"",""); + return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtReceiptService.getDsuseMgtReceiptList(query),"",""); } @RequestMapping(value = "/dsuseMgtReceipt-info.do", name="신청서 접수 상세") - public ModelAndView getDsuseMgtReceiptInfo() { - ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-info"); + public ModelAndView getDsuseMgtReceiptInfo(String dscdmngId) { + ModelAndView mav = new ModelAndView(); + setCmmCode("ADDS04", mav); + + if(!isEmpty(dscdmngId)){ + mav.setViewName("adds/nims/dsuseMgtReceipt-detail"); + mav.addObject("dsuseReceptInfo", toJson(dsuseMgtReceiptService.getDsuseMgtReceiptInfo(dscdmngId))); + DsuseMgtReceiptQuery query = new DsuseMgtReceiptQuery(); + query.setDscdmngId(dscdmngId); + mav.addObject("dsuseReceptDetails", toJson(dsuseMgtReceiptService.getDsuseMgtReceiptList(query))); + }else{ + mav.setViewName("adds/nims/dsuseMgtReceipt-info"); + } return mav .addObject("pageName", "dsuseMgtReceiptInfo") // View(jsp)에서 사용할 id 뒤에 붙일 suffix @@ -70,13 +86,17 @@ public class AddsNimsController extends ApplicationController { public ModelAndView getDsuseMgtRsltList(DsuseMgtReceiptQuery query) { setFetchSize(query); - return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtReceiptService.getdsuseMgtReceiptList(query),"",""); + return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtReceiptService.getDsuseMgtReceiptList(query),"",""); } @RequestMapping(value = "dsuseMgtRslt-info.do", name="결과[통보] 상세") public ModelAndView getDsuseMgtRsltInfo(DsuseRsltInfo dsuseRsltInfo) { ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtRslt-info"); + FileQuery fileQuery = new FileQuery().setInfoType("110").setInfoKeys(dsuseRsltInfo.getDscdmngId()); + List fileInfos = fileService.getFileList(fileQuery); + mav.addObject("fileInfos", toJson(fileInfos)); + return mav .addObject("pageName", "dsuseMgtRsltInfo") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("infoPrefix", "dsuseMgtRsltInfo") // prefix @@ -131,7 +151,7 @@ public class AddsNimsController extends ApplicationController { public ModelAndView dsuseMgtReceiptMain() { ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-main"); - setCmmCodeAdds11(mav); + setCmmCode("ADDS11", mav); List deptList = defaultOgdpBean.getDeptList(new OgdpQuery()); mav.addObject("DEPTList", deptList); @@ -146,7 +166,7 @@ public class AddsNimsController extends ApplicationController { @RequestMapping(value = "dsuseMgtRslt.do", name="결과[통보] 처리 메인") public ModelAndView dsuseMgtRsltMain() { ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtRslt-main"); - setCmmCodeAdds11(mav); + setCmmCode("ADDS11", mav); return mav .addObject("pageName", "dsuseMgtRslt") // View(jsp)에서 사용할 id 뒤에 붙일 suffix @@ -158,7 +178,7 @@ public class AddsNimsController extends ApplicationController { @RequestMapping(value = "/dsuseMgtMapping.do", name="폐기 보고 확인 메인") public ModelAndView dsuseMgtMapping() { ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtMapping-main"); - setCmmCodeAdds11(mav); + setCmmCode("ADDS11", mav); return mav .addObject("pageName", "dsuseMgtMapping") // View(jsp)에서 사용할 id 뒤에 붙일 suffix @@ -171,16 +191,11 @@ public class AddsNimsController extends ApplicationController { public ModelAndView dsuseMgtDoc() { ModelAndView mav = new ModelAndView(); mav.setViewName("adds/nims/dsuseDoc-main"); - setCmmCodeAdds11(mav); + setCmmCode("ADDS11", mav); mav.addObject("pageName", "dsuseMgtDoc"); return mav; } - - private void setCmmCodeAdds11(ModelAndView mav){ - Map> commonCodes = getCodesOf("ADDS11"); - mav.addObject("ADDS11List", commonCodes.get("ADDS11")); - } //------------------------------------------------------------------------------------------------- // menu 호출 처리 //------------------------------------------------------------------------------------------------- @@ -216,4 +231,16 @@ public class AddsNimsController extends ApplicationController { //------------------------------------------------------------------------------------------------- // 마약류폐기보고 팝업 //------------------------------------------------------------------------------------------------- + + //------------------------------------------------------------------------------------------------- + // private method + //------------------------------------------------------------------------------------------------- + private void setCmmCode(String grpCode, ModelAndView mav){ + Map> commonCodes = getCodesOf(grpCode); + mav.addObject(grpCode, commonCodes.get(grpCode)); + } + //------------------------------------------------------------------------------------------------- + // private method + //------------------------------------------------------------------------------------------------- + } diff --git a/src/main/resources/sql/mapper/adds/nims/dsuseMgtReceipt-mapper.xml b/src/main/resources/sql/mapper/adds/nims/dsuseMgtReceipt-mapper.xml index 067ea43..81dde78 100644 --- a/src/main/resources/sql/mapper/adds/nims/dsuseMgtReceipt-mapper.xml +++ b/src/main/resources/sql/mapper/adds/nims/dsuseMgtReceipt-mapper.xml @@ -46,7 +46,7 @@ + diff --git a/src/main/resources/sql/mapper/base/code-mapper.xml b/src/main/resources/sql/mapper/base/code-mapper.xml index be27d2b..3934e28 100644 --- a/src/main/resources/sql/mapper/base/code-mapper.xml +++ b/src/main/resources/sql/mapper/base/code-mapper.xml @@ -44,8 +44,8 @@ SELECT * FROM TB_CODE_CTGR - WHERE USE_YN = 'Y' - AND CTGR_ID IN (#{categoryID}) + AND USE_YN = 'Y' + AND CTGR_ID IN (#{categoryID}) @@ -94,9 +94,9 @@ UPDATE TB_CODE_CTGR SET SELECT * FROM TB_CODE_GRP - WHERE USE_YN = 'Y' -AND CTGR_ID IN (#{categoryID}) -AND GRP_ID IN (#{groupID}) + AND USE_YN = 'Y' + AND CTGR_ID IN (#{categoryID}) + AND GRP_ID IN (#{groupID}) @@ -151,9 +151,9 @@ UPDATE TB_CODE_GRP SET SELECT * FROM TB_CMN_CODE - WHERE USE_YN = 'Y' - AND GRP_ID IN (#{groupID}) - AND CODE IN (#{code}) + AND USE_YN = 'Y' + AND GRP_ID IN (#{groupID}) + AND CODE IN (#{code}) diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseDoc-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseDoc-main.jsp index 76e30a0..7a04ed9 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseDoc-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseDoc-main.jsp @@ -45,7 +45,7 @@ diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp index f1b7136..cda7565 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtMapping-main.jsp @@ -45,7 +45,7 @@ diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp index d9b9064..3c8f57c 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp @@ -12,7 +12,7 @@
- +
@@ -38,21 +38,16 @@
+ + + +
- +
@@ -515,8 +510,8 @@ $P.initForm(); // 3. Dataset 설정 - $P.control.setData([${opnnDlbrMbrInfo}]); - $P.productControl.setData([${opnnDlbrMbrInfo}]); + //$P.control.setData([${dsuseReceptInfo}]); + //$P.productControl.setData([${opnnDlbrMbrInfo}]); }); diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp index ae3c988..65f70ee 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp @@ -48,7 +48,7 @@ @@ -278,13 +278,13 @@ }; // 신청서 정보 dialog - $P.control.getInfo = (gdccId) => { + $P.control.getInfo = (dscdmngId) => { let dialogTitle = "폐기 신청서 접수"; - let params = {}; + if(dscdmngId) dialogTitle = "폐기 신청서 접수 상세"; ajax.get({ url : wctx.url("/adds/nims/dsuseMgtReceipt-info.do") - , data : params || {} + , data : dscdmngId? {dscdmngId: dscdmngId} : {} , success : resp => { dialog.open({ id : "dsuseMgtReceiptDialog" @@ -317,9 +317,8 @@ // let replacer = (str, dataItem) => str - .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("DSCDMNG_ID") + "');"); -// .replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("DSCDMNG_ID") + "');"); - + .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("DSCDMNG_ID") + "');") + .replace(/{ondblclick}/gi, "pageObject['${pageName}'].control.getInfo('" + dataItem.getValue("DSCDMNG_ID") + "');"); let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML] : ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer); @@ -458,7 +457,7 @@ $P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수 $P.control.query.delYn = "N"; // 삭제 여부 - $P.control.load(1); + $P.control.load(); } // 엑셀 버튼 클릭 이벤트 @@ -560,5 +559,4 @@ $P.fnResetAndChangeBiz($("#layout-navbar input[name='taskSeCd']:checked").val()); }); - diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceiptMain-detail.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceiptMain-detail.jsp new file mode 100644 index 0000000..0073b2c --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceiptMain-detail.jsp @@ -0,0 +1,438 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> + +폐기관리 등록 + + +
+ +
+ +
+ + + + +
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+ + + + + + +
+ +
+
+ + diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp index a59c1e2..ef7dda4 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp @@ -236,6 +236,7 @@ upload({ url: '' , data: { + fileChangeYn: "Y", dsuseMgtRsltJsonStr: JSON.stringify(saveData), dsuseDsuseImgFiles: fileArr } @@ -475,6 +476,22 @@ // 3. Dataset 설정 $P.control.setData([${dsuseRsltInfo}]); - }); + + let fileInfos = ${fileInfos}; + if(fileInfos.length > 0){ + let promiseArr = []; + fileInfos.forEach(f => promiseArr.push(fnCreateFileFromFileInfo(f))); + + Promise.all(promiseArr).then((values) => { + $P.fileArr = $P.fileArr.concat(values); + $P.fnDisplay(); + }).catch((error) => { + alert(error); + dialog.close($P.control.prefix + "Dialog--${openerPageName}"); + }); + } + }); + + diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-main.jsp index a9a060c..9983289 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-main.jsp @@ -46,7 +46,7 @@ @@ -136,15 +136,15 @@ - - - - - - - - - + + + + + + + + + @@ -197,8 +197,6 @@ $P.control = new DatasetControl({ urls : { load : wctx.url("/adds/nims/dsuseMgtRslt-list.do") - // FIXME: POST로 변경 - //load : '' } , prefix: "dsuseMgtRslt" , prefixName: "결과(통보)처리" @@ -207,8 +205,7 @@ , appendData: true , infoSize: "xl" , formats: { - RPT_DE: dateFormat - , HDR_DE: dateFormat + HDR_DE: dateFormat , DSUSE_DE: dateFormat } }); @@ -221,11 +218,7 @@ $P.detailControl = new DatasetControl({ urls : { load : wctx.url("/adds/nims/dsuseMgtDetail-list.do") - // FIXME: POST로 변경 - //load : '' - } -// , query.schDscdmngId : $P.control.getValue("DSCDMNG_ID") -// , data : {"schDscdmngId" : $P.control.getValue("DSCDMNG_ID")} + } , prefix : "dsuseMgtDetail" , prefixName : "신청서접수상세" , keymapper : info => info ? info.DSCDMNG_SN : "" @@ -265,8 +258,7 @@ let key = item.data.DSCDMNG_ID; $("#tbody--${pageName}").setCurrentRow(key); - var dscdmngId = item.data.DSCDMNG_ID; - $P.detailControl.query = { "schDscdmngId" : dscdmngId}; + $P.detailControl.query = { "schDscdmngId" : item.data.DSCDMNG_ID}; $P.detailControl.load(1); }; @@ -283,6 +275,7 @@ // 신청서 정보 dialog $P.control.getInfo = (isDtl) => { let dialogTitle = "폐기 결과[통보] 등록"; + if(isDtl) dialogTitle = "폐기 결과[통보] 상세"; let row = $P.control.dataset.getCurrent(); if (typeof row == "undefined" || row == null || row == "") return; let params = { diff --git a/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp b/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp index 8284c77..6ac3389 100644 --- a/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp @@ -35,7 +35,7 @@