diff --git a/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java b/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java index 789e1c9..5df2a02 100644 --- a/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java +++ b/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java @@ -18,13 +18,13 @@ public class DsuseMgtReceiptQuery extends QueryRequest{ //폐기관리 private String dscdmngId; // 폐기관리 ID - public String getDscdmngId() { +/* public String getDscdmngId() { return dscdmngId; } public void setDscdmngId(String dscdmngId) { this.dscdmngId = dscdmngId; - } + }*/ private String deptCd; // 부서 코드 private String userId; // 사용자 ID 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 5a9dbd9..2e84678 100644 --- a/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtReceiptMapper.java +++ b/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtReceiptMapper.java @@ -20,5 +20,10 @@ public interface DsuseMgtReceiptMapper extends AbstractMapper { List selectDsuseMgtReceiptList(DsuseMgtReceiptQuery req); DataObject selectDsuseMgtReceiptInfo(String dscdmngId); - + + /** 처리상태 수정. + * @param DsuseMgtReceiptQuery + * @return 저장된 정보수 + */ + int updatePrgsSttusOfDsuseMgt(DsuseMgtReceiptQuery query); } 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 4a0b073..cd9ec09 100644 --- a/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java +++ b/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java @@ -18,4 +18,9 @@ public interface DsuseMgtReceiptService { DataObject getDsuseMgtReceiptInfo(String dscdmngId); + /** 처리상태 수정. + * @param DsuseMgtReceiptQuery + * @return 저장된 정보수 + */ + String updatePrgsSttusOfDsuseMgt(DsuseMgtReceiptQuery query); } 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 a7215a4..882c541 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -151,6 +151,17 @@ public class AddsNimsController extends ApplicationController { // .addObject("infoPrefixUrl", "/adds/nims") // prefixUrl ; } + @RequestMapping(value = "/updatePrgsSttusOfDsuseMgt.do", name = "페기 보고 확인 등록") + public ModelAndView updatePrgsSttusOfDsuseMgt(DsuseMgtReceiptQuery qry) { + boolean saved = false; + String rtnMsg = dsuseMgtReceiptService.updatePrgsSttusOfDsuseMgt(qry); + if(rtnMsg.contains("[S]")) { + saved = true; + } + return new ModelAndView("jsonView") + .addObject("saved", saved) + .addObject("rtnMsg", rtnMsg); + } //------------------------------------------------------------------------------------------------- // 보고 확인 처리 //------------------------------------------------------------------------------------------------- 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 c9c3e4e..5c9f140 100644 --- a/src/main/resources/sql/mapper/adds/nims/dsuseMgtReceipt-mapper.xml +++ b/src/main/resources/sql/mapper/adds/nims/dsuseMgtReceipt-mapper.xml @@ -45,6 +45,7 @@ LEFT OUTER JOIN TB_BSSH_INFO B ON A.BSSH_CD = B.BSSH_CD + + + + UPDATE tb_dsuse_mgt + SET prgrs_stts_cd = #{prgrsSttsCd} + , mdfcn_dt = DATE_FORMAT(now(), '%Y%m%d%H%i%s') + , mdfr = #{mdfr} + WHERE dscdmng_id = #{dscdmngId} + 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 ff0d7ca..d8aebec 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 @@ -65,6 +65,9 @@
+ @@ -281,7 +284,7 @@ }; - // 신청서 정보 dialog + // 맵핑 dialog $P.control.getInfo = (gdccId) => { let dialogTitle = "폐기 보고 확인 등록"; let row = $P.control.dataset.getCurrent(); @@ -317,6 +320,40 @@ }); } + $P.control.onSave = (resp) => { +// let dialogTitle = $("#" + $P.control.prefix + "Dialog").find("h5.modal-title").html(); + let showMessage = "저장에 실패 하였습니다."; + if (resp.saved) { + showMessage = "저장에 성공 하였습니다."; + } + + dialog.alert({ + content : showMessage, + init : function(){ + setDialogZindex(); + focusClose(); + } + }); + + + } + + // 처리상태 완료 처리 + $P.control.prgsSttus = () => { + const row = $P.control.dataset.getCurrent(); + if (typeof row == "undefined" || row == null || row == "") return; + let params = { + dscdmngId: $P.control.dataset.getCurrent().DSCDMNG_ID, + userId: "${currentUser.account}", + prgrsSttsCd: "99" + }; + + ajax.get({ + url : wctx.url("/adds/nims/updatePrgsSttusOfDsuseMgt.do") + , data: params + , success : resp => $P.control.onSave(resp) + }); + } /************************************************************************** * DataTables 이벤트 @@ -416,11 +453,24 @@ $("#schRgtrNm--${pageName}").val(userNm); // 사용자 명 } - // 전자우편 안내문 등록 버튼 이벤트 + // 맵핑 기능 $P.fnCreateDsuseMgtMapping = (title) => { $P.control.getInfo(); } + // 처리상태 완료로 변경 + $P.fnPrgsStts = () => { + dialog.alert({ + content : "현재 " + $P.control.dataset.getCurrent().DSCDMNG_ID + " 정보를 완료 처리 하시겠습니까?", + init : function() { + focusOK(); + }, + onOK : () => { + $P.control.prgsSttus(); + } + }); + } + // 전자우편 안내문 등록 버튼 이벤트 $P.fnSearchBssh = (title) => { $P.control.getBsshInfo(); @@ -480,6 +530,7 @@ $("#btnReset--${pageName}").on("click", () => $P.fnResetAndChangeBiz()); // 초기화 $("#btnSearch--${pageName}").on("click", () => $P.fnSearchList()); // 검색 $("#btnExcel--${pageName}").on("click", () => $P.fnExcel()); // 엑셀 + $("#btnPrgsSttus--${pageName}").on("click", () => $P.fnPrgsStts()); // 엑셀 // 동적검색에서 엔터(Enter) 키를 누르면 검색한다. $("#term--${pageName}").keypress(function(e) {