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 1dc87da..d0be8b0 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -40,13 +40,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 @@ -64,7 +75,7 @@ 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="결과[통보] 상세") @@ -124,7 +135,7 @@ public class AddsNimsController extends ApplicationController { @RequestMapping(value = "/dsuseMgtReceipt.do", name="신청서 접수 메인") public ModelAndView dsuseMgtReceiptMain() { ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-main"); - setCmmCodeAdds11(mav); + setCmmCode("ADDS11", mav); return mav .addObject("pageName", "dsuseMgtReceipt") // View(jsp)에서 사용할 id 뒤에 붙일 suffix @@ -136,7 +147,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 @@ -148,7 +159,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 @@ -161,16 +172,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 호출 처리 //------------------------------------------------------------------------------------------------- @@ -206,4 +212,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/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 6f745d9..3c26a2f 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 96960f9..ad154a1 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-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 = {