diff --git a/src/main/java/cokr/xit/adds/nims/DsuseMgtRsltQuery.java b/src/main/java/cokr/xit/adds/nims/DsuseMgtRsltQuery.java index 2fbca1d..0d899c7 100644 --- a/src/main/java/cokr/xit/adds/nims/DsuseMgtRsltQuery.java +++ b/src/main/java/cokr/xit/adds/nims/DsuseMgtRsltQuery.java @@ -1,6 +1,6 @@ package cokr.xit.adds.nims; -import cokr.xit.foundation.component.QueryRequest; +import cokr.xit.foundation.component.*; /**폐기관리접수 정보 조회 요청 * @@ -14,6 +14,7 @@ public class DsuseMgtRsltQuery extends QueryRequest{ private String deptCd; // 부서 코드 private String userId; // 사용자 ID private String dsuseMthCd; // 폐기 방법 코드 + private String dsuseSeCd; // 폐기 구분 코드 private String dsuseDe; // 폐기 일자 public String getDscdmngId() { @@ -42,7 +43,7 @@ public class DsuseMgtRsltQuery extends QueryRequest{ this.userId = userId; return self(); } - + public String getDsuseMthCd() { return ifEmpty(dsuseMthCd, () -> null); } @@ -51,7 +52,16 @@ public class DsuseMgtRsltQuery extends QueryRequest{ this.dsuseMthCd = dsuseMthCd; return self(); } - + + public String getDsuseSeCd() { + return ifEmpty(dsuseSeCd, () -> null); + } + + public T setDsuseSeCd(String dsuseSeCd) { + this.dsuseSeCd = dsuseSeCd; + return self(); + } + public String getDsuseDe() { return ifEmpty(dsuseDe, () -> null); } 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 fac2cb2..1493abe 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -207,7 +207,8 @@ public class AddsNimsController extends ApplicationController { .setDscdmngId(dsuseRsltInfo.getDscdmngId()) .setDeptCd(dsuseRsltInfo.getDeptCd()) .setDsuseDe(dsuseRsltInfo.getDsuseDe().replaceAll("-", "")) - .setDsuseMthCd(dsuseRsltInfo.getDsuseMthCd() + .setDsuseMthCd(dsuseRsltInfo.getDsuseMthCd()) + .setDsuseSeCd(dsuseRsltInfo.getDsuseSeCd() ) ) ) diff --git a/src/main/resources/sql/mapper/adds/nims/dsuseMgtRslt-mapper.xml b/src/main/resources/sql/mapper/adds/nims/dsuseMgtRslt-mapper.xml index cb34202..890c86c 100644 --- a/src/main/resources/sql/mapper/adds/nims/dsuseMgtRslt-mapper.xml +++ b/src/main/resources/sql/mapper/adds/nims/dsuseMgtRslt-mapper.xml @@ -10,6 +10,7 @@ , tdm.DSUSE_MTH_CD , tcc.CODE_VAL AS DSUSE_MTH_NM , tdm.DSUSE_DE + , tdm.DSUSE_LOC , IF(#{dscdmngId} = tdm.DSCDMNG_ID, 'Y', 'N') AS SELF_YN , (SELECT GROUP_CONCAT(dscdmng_id SEPARATOR ',') FROM tb_dsuse_mgt @@ -30,6 +31,7 @@ AND tdm.use_yn = 'Y' AND tdm.dept_cd = #{deptCd} AND tdm.dsuse_mth_cd = #{dsuseMthCd} + AND tdm.dsuse_se_cd = #{dsuseSeCd} AND tdm.dsuse_de = #{dsuseDe} 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 e58d638..1ece058 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 @@ -94,7 +94,7 @@ - +
@@ -161,6 +161,7 @@ let param = { dscdmngId: $("#dscdmngId--${pageName}").val(), dsuseDe: $("#dsuseDe--${pageName}").val().replace(/-/g, ""), + dsuseSeCd: $("#dsuseSeCd--${pageName}").val(), dsuseMthCd: $("#dsuseMthCd--${pageName}").val(), deptCd: "${currentUser.deptCode}" }; @@ -197,7 +198,6 @@ $('#spnDsuseDe').show(); $('#spnDsuseMthCd').show(); - document.getElementById("rsltImgList").innerHTML = '총 ' + dscnmngIds.length + '건 에서 폐기사진 공유
폐기사진 공유 폐기관리번호 : [' + dscnmngIds.filter(item => item != $("#dscdmngId--${pageName}").val()).join(', ') + ']'; } return; @@ -217,7 +217,7 @@ } // pageObject let $P = pageObject["${pageName}"]; - + $P.fileInfos = ${fileInfos}; $P.fileArr = []; @@ -252,7 +252,7 @@ * DatasetControl 이벤트 **************************************************************************/ // Dataset 변경 이벤트 - // 현재 선택 자료 변경 이벤트 + // 현재 선택 자료 변경 이벤트 $P.control.onCurrentChange = item => { if (!item) return; @@ -306,7 +306,7 @@ } }); } - + // 저장 $P.control.save = (info, fileArr) => { let saveData = { @@ -376,11 +376,11 @@ $P.fileArr.push(files[i]); } } - + $P.fnDisplay(); - + }; - + /************************************************************************** * DataTables 이벤트 **************************************************************************/ @@ -415,10 +415,10 @@ /************************************************************************** * 사용자 함수(function) **************************************************************************/ - + // 이미지 표시 $P.fnDisplay = () => { - + if($P.fileArr.length > 0){ let tagsText = $P.fnMakeImgTags($P.fileArr); document.querySelector("#dragAndDrop--${pageName}").innerHTML = tagsText; @@ -427,9 +427,9 @@ document.querySelector("#dragAndDrop--${pageName}").innerHTML = ""; $("#btnImgDel--${pageName}").attr("hidden","hidden"); } - + } - + // HTML 태그(img,checkbox) 문자열 생성 $P.fnMakeImgTags = (fileArr) => { let tagsTextArr = []; @@ -438,7 +438,7 @@ let item = fileArr[index]; let template = document.getElementById("imgCheckboxTemplate--${pageName}").innerHTML; - + template = template.replace(/{name}/gi, "dsuseDsuseImgFilesSelector"); template = template.replace(/{value}/gi, item.id); template = template.replace(/{src}/gi, item.url); @@ -447,7 +447,7 @@ return tagsTextArr.join(""); } - + // 전자우편 안내문 등록 버튼 이벤트 $P.fnSearchBssh = (title) => { $P.control.getBsshInfo(); @@ -509,7 +509,7 @@ $("#btnBsshSearch--${pageName}").on("click", function() { $P.fnSearchBssh($(this).attr("title")); }); - + //이미지 삭제 버튼 $("#btnImgDel--${pageName}").on("click", function() { let checkeds = $("#dragAndDrop--${pageName}").find(":checkbox[name='dsuseDsuseImgFilesSelector']:checked"); @@ -518,16 +518,16 @@ checkeds.each(function(){ keys.push(this.value); }); - + $P.fileArr = $P.fileArr.filter((element) => keys.indexOf(element.id) === -1); $P.fnDisplay(); } }); - + // 버튼 이벤트 $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 - $("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}").on("change", () => { + $("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}, #dsuseSeCd--${pageName}").on("change", () => { isImgSaved = true; isRsltImgRemove = false; if(initDataset) searchRsltImgList(); @@ -545,7 +545,7 @@ let tmp = $P.fileArr[evt.oldIndex]; $P.fileArr[evt.oldIndex] = $P.fileArr[evt.newIndex]; $P.fileArr[evt.newIndex] = tmp; - + $P.fnDisplay(); } } @@ -593,24 +593,24 @@ $("#hdrDe--${pageName}").datepicker("setDate", new Date()); // 취급 일자 $("#dsuseDe--${pageName}").datepicker("setDate", new Date()); // 폐기 일자 } - + if($P.fileInfos.length > 0){ let promiseArr = []; - + $P.fileInfos.forEach(f => { // URL에 c: d: 제거 if(/^[a-zA-Z][\:]/.test(f.URL)){ f.URL = f.URL.substring(2); } - + try{ promiseArr.push(AddsSupport.fnCreateFileFromFileInfo(f)); }catch(e){ console.log(e); } }); - + Promise.all(promiseArr).then((values) => { $P.fileArr = $P.fileArr.concat(values); $P.fnDisplay(); @@ -621,6 +621,6 @@ }); - + diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/product-popup.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/product-popup.jsp index d62b482..cb96ddb 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/product-popup.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/product-popup.jsp @@ -63,10 +63,12 @@ - -<%--  신규API 업체코드 적용--%> +<%-- + +  신규API 업체코드 적용 +--%>
@@ -349,7 +351,7 @@ } // FIXME:: NIMS API 개발 완료후 적용 - <%--let bsshCd = '${bsshCd}';--%> + let bsshCd = '${bsshCd}'; <%--if(!$('#chkBsshCd--${pageName}').is(":checked")){--%> <%-- bsshCd = '';--%> <%--}--%>