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/dsuseMgtReceipt-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp
index 4149e39..5d18863 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() {