diff --git a/src/main/java/cokr/xit/adds/ServletInitializer.java b/src/main/java/cokr/xit/adds/ServletInitializer.java index 7e3c652..79bc1b7 100644 --- a/src/main/java/cokr/xit/adds/ServletInitializer.java +++ b/src/main/java/cokr/xit/adds/ServletInitializer.java @@ -1,12 +1,12 @@ -// package cokr.xit.adds; -// -// import org.springframework.boot.builder.SpringApplicationBuilder; -// import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; -// -// public class ServletInitializer extends SpringBootServletInitializer { -// -// @Override -// protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { -// return application.sources(XitBootApplication.class); -// } -// } +package cokr.xit.adds; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +public class ServletInitializer extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(XitBootApplication.class); + } +} diff --git a/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java b/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java index 5df2a02..7e512b2 100644 --- a/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java +++ b/src/main/java/cokr/xit/adds/nims/DsuseMgtReceiptQuery.java @@ -57,7 +57,7 @@ public class DsuseMgtReceiptQuery extends QueryRequest{ private String chrgNm; // 담당자 명 private String hptlNo; // 요양기관 기호 private String joinYn; // 획원가입 여부 - private String bsshSttsNm; // 상태 + private String bsshSttsNm; // 상태 private String prmisnNo; // 허가 번호 public String getSchSggCd() { 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 2e84678..cd9591a 100644 --- a/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtReceiptMapper.java +++ b/src/main/java/cokr/xit/adds/nims/dao/DsuseMgtReceiptMapper.java @@ -21,6 +21,12 @@ public interface DsuseMgtReceiptMapper extends AbstractMapper { DataObject selectDsuseMgtReceiptInfo(String dscdmngId); + /** 신청서 접수 삭제. + * @param DsuseMgtReceiptQuery + * @return 저장된 정보수 + */ + int removeDsuseMgt(DsuseMgtReceiptQuery query); + /** 처리상태 수정. * @param DsuseMgtReceiptQuery * @return 저장된 정보수 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 cd9ec09..fa61541 100644 --- a/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java +++ b/src/main/java/cokr/xit/adds/nims/service/DsuseMgtReceiptService.java @@ -18,6 +18,12 @@ public interface DsuseMgtReceiptService { DataObject getDsuseMgtReceiptInfo(String dscdmngId); + /** 신청서 접수 삭제. + * @param DsuseMgtReceiptQuery + * @return 저장된 정보수 + */ + String removeDsuseMgt(DsuseMgtReceiptQuery query); + /** 처리상태 수정. * @param DsuseMgtReceiptQuery * @return 저장된 정보수 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 704869c..f52e47c 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 @@ -31,6 +31,18 @@ public class DsuseMgtReceiptServiceBean extends AbstractServiceBean implements D return dsuseMgtReceiptMapper.selectDsuseMgtReceiptInfo(dscdmngId); } + /** 신청서 접수 삭제. + * @param DsuseMgtReceiptQuery + * @return 저장된 정보수 + */ + public String removeDsuseMgt(DsuseMgtReceiptQuery query) { + if(dsuseMgtReceiptMapper.removeDsuseMgt(query) == 1) { + return "[S]"; + } else { + return "[F]"; + } + } + /** 처리상태 수정. * @param DsuseMgtReceiptQuery * @return 저장된 정보수 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 882c541..bf1eb98 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -94,6 +94,19 @@ public class AddsNimsController extends ApplicationController { .addObject("pageName", "dsuseMgtReceiptInfo") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("apiHost", apiHost); } + + @RequestMapping(value = "/removeDsuseMgt.do", name="신청서 접수 목록 조회") + public ModelAndView removeDsuseMgt(DsuseMgtReceiptQuery query) { + boolean saved = false; + + String rtnMsg = dsuseMgtReceiptService.removeDsuseMgt(query); + 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 5c9f140..0b3b813 100644 --- a/src/main/resources/sql/mapper/adds/nims/dsuseMgtReceipt-mapper.xml +++ b/src/main/resources/sql/mapper/adds/nims/dsuseMgtReceipt-mapper.xml @@ -43,6 +43,7 @@ , B.PRMISN_NO /* 허가번호 */ FROM TB_DSUSE_MGT A LEFT OUTER JOIN TB_BSSH_INFO B ON A.BSSH_CD = B.BSSH_CD + WHERE A.USE_YN = "Y" @@ -50,22 +51,21 @@ /* 폐기관리접수 목록 조회(dsuseMgtReceiptMapper.selectDsuseMgtReceiptList) */ - WHERE 1=1 - - AND A.DEPT_CD = #{schSggCd} - - - AND A.HDR_DE =]]> #{schDateFrom} - - - AND A.HDR_DE #{schDateTo} - - - AND B.BSSH_CD = #{schBsshCd} - - - AND A.PRGRS_STTS_CD = #{schSttsCd} - + + AND A.DEPT_CD = #{schSggCd} + + + AND A.HDR_DE =]]> #{schDateFrom} + + + AND A.HDR_DE #{schDateTo} + + + AND B.BSSH_CD = #{schBsshCd} + + + AND A.PRGRS_STTS_CD = #{schSttsCd} + @@ -73,9 +73,17 @@ + + UPDATE tb_dsuse_mgt + SET use_yn = #{useYn} + , mdfcn_dt = DATE_FORMAT(now(), '%Y%m%d%H%i%s') + , mdfr = #{mdfr} + WHERE dscdmng_id = #{dscdmngId} + + UPDATE tb_dsuse_mgt SET prgrs_stts_cd = #{prgrsSttsCd} 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 f20283a..f4ed8eb 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 @@ -353,8 +353,7 @@ data: JSON.stringify({ "dscdmngIds" : [dscdmngId], "userId" : "${currentUser.account}", - "deptCd": "", - "prgrsSttsCd": "" + "deptCd": "" }), success:resp => { if(!resp.success){ @@ -529,9 +528,7 @@ $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $('#schSttsCd--${pageName}').val('06'); - // FIXME: 로그인 사용자의 관할관청 코드를 설정한다. - <%--$('#schSggCd--${pageName}').val("${currentUser.deptCd}");--%> - $('#schSggCd--${pageName}').val("4050149"); + $('#schSggCd--${pageName}').val("${currentUser.deptCode}"); $('input:radio[name="schSttsCd"]').filter('[value="ing"]').prop('checked', true); } 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 b918d5e..3c0bfea 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 @@ -595,9 +595,7 @@ $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $('#schSttsCd--${pageName}').val('06'); - // FIXME: 로그인 사용자의 관할관청 코드를 설정한다. - <%--$('#schSggCd--${pageName}').val("${currentUser.deptCd}");--%> - $('#schSggCd--${pageName}').val("4050149"); + $('#schSggCd--${pageName}').val("${currentUser.deptCode}"); } /************************************************************************** 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 4149e39..1062273 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 @@ -71,6 +71,9 @@ + @@ -337,6 +340,33 @@ } }); } + + // 신청서 정보 dialog + $P.control.removeDsuseMgt = (dscdmngId) => { + let params = { + dscdmngId: dscdmngId, + userId: "${currentUser.account}", + useYn: "N" + }; + + ajax.get({ + url : wctx.url("/adds/nims/removeDsuseMgt.do") + , data: params + , success : resp => { + if(resp.saved){ + dialog.close("layoutInfoDialog"); + dialog.alert({ + content:"삭제되었습니다.", + init : () => { + setDialogZindex(); + focusClose(); + }, + onClose : () => $P.fnRefreshList() + }); + } + } + }); + } /************************************************************************** @@ -463,8 +493,26 @@ $P.fnCreateDsuseMGT = () => { $P.control.getInfo(); } - - // 전자우편 안내문 등록 버튼 이벤트 + + // 폐기신청서 접수 등록 버튼 이벤트 + $P.fnRemoveDsuseMGT = () => { + const row = $P.control.dataset.getCurrent(); + if(row.PRGRS_STTS_CD == "99"){ + dialog.alert({ + content: "종료된 자료는 삭제하실 수 없습니다.." + }); + return false; + } + dialog.alert({ + content: "자료를 삭제할 경우 복구가 불가능합니다.
아래 자료를 삭제하시겠습니까?
폐기관리번호: "+row.DSCDMNG_ID + "
업체명: " +row.BSSH_NM+"
폐기건수: "+row.RND_DTL_RPT_CNT+"
폐기사유: " + row.DSUSE_PRV_NM + , init: () => { setDialogZindex(); } + , onOK: () => { + $P.control.removeDsuseMgt(row.DSCDMNG_ID); + } + }); + } + + // 업체 검색 버튼 이벤트 $P.fnSearchBssh = (title) => { $P.control.getBsshInfo(); } @@ -540,6 +588,11 @@ $("#btnCreateDsuseMGT--${pageName}").on("click", function() { $P.fnCreateDsuseMGT($(this).attr("title")); }); + + // 폐기신청서 삭제 + $("#btnRemoveDsuseMGT--${pageName}").on("click", function() { + $P.fnRemoveDsuseMGT($(this).attr("title")); + }); // form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용 $("#frmSearch--${pageName}").find(".form-date").each(function() { @@ -589,9 +642,7 @@ $("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateTo--${pageName}").datepicker("setDate", new Date()); - // FIXME: 로그인 사용자의 관할관청 코드를 설정한다. - <%--$('#schSggCd--${pageName}').val("${currentUser.deptCd}");--%> - $('#schSggCd--${pageName}').val("4050149");// 부과 제외 일자 종료 + $('#schSggCd--${pageName}').val("${currentUser.deptCode}"); } /************************************************************************** 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 deleted file mode 100644 index acf375c..0000000 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceiptMain-detail.jsp +++ /dev/null @@ -1,188 +0,0 @@ -<%@ 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/dsuseMgtReceipt_Test-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt_Test-main.jsp deleted file mode 100644 index 33bf0e3..0000000 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt_Test-main.jsp +++ /dev/null @@ -1,82 +0,0 @@ -<%@ 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 8715efe..ddfca7c 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 @@ -558,9 +558,7 @@ $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $('#schSttsCd--${pageName}').val('01'); - // FIXME: 로그인 사용자의 관할관청 코드를 설정한다. - <%--$('#schSggCd--${pageName}').val("${currentUser.deptCd}");--%> - $('#schSggCd--${pageName}').val("4050149"); + $('#schSggCd--${pageName}').val("${currentUser.deptCode}"); } /**************************************************************************