fit : 신청서 삭제기능추가.

dev
Leeyh1121 5 months ago
parent b98e5b4e84
commit 2564e80bee

@ -21,6 +21,12 @@ public interface DsuseMgtReceiptMapper extends AbstractMapper {
DataObject selectDsuseMgtReceiptInfo(String dscdmngId);
/** .
* @param DsuseMgtReceiptQuery
* @return
*/
int removeDsuseMgt(DsuseMgtReceiptQuery query);
/** .
* @param DsuseMgtReceiptQuery
* @return

@ -18,6 +18,12 @@ public interface DsuseMgtReceiptService {
DataObject getDsuseMgtReceiptInfo(String dscdmngId);
/** .
* @param DsuseMgtReceiptQuery
* @return
*/
String removeDsuseMgt(DsuseMgtReceiptQuery query);
/** .
* @param DsuseMgtReceiptQuery
* @return

@ -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

@ -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);
}
//-------------------------------------------------------------------------------------------------
// 신청서 접수
//-------------------------------------------------------------------------------------------------

@ -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"
</sql>
@ -50,7 +51,6 @@
/* 폐기관리접수 목록 조회(dsuseMgtReceiptMapper.selectDsuseMgtReceiptList) */
<include refid="utility.paging-prefix" />
<include refid="select" />
WHERE 1=1
<if test="schSggCd != null">
AND A.DEPT_CD = #{schSggCd} <!-- 관할 관청 -->
</if>
@ -73,9 +73,17 @@
<select id="selectDsuseMgtReceiptInfo" parameterType="string" resultType="dataobject">
/* 폐기관리접수 목록 조회(dsuseMgtReceiptMapper.selectDsuseMgtReceiptInfo) */
<include refid="select" />
WHERE A.DSCDMNG_ID = #{dscdmngId}
AND A.DSCDMNG_ID = #{dscdmngId}
</select>
<update id="removeDsuseMgt" parameterType="map" >
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>
<update id="updatePrgsSttusOfDsuseMgt" parameterType="map" >
UPDATE tb_dsuse_mgt
SET prgrs_stts_cd = #{prgrsSttsCd}

@ -71,6 +71,9 @@
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseMGT--${pageName}" title="등록">
등록
</button>
<button type="button" class="btn btn-danger w-px-120" id="btnRemoveDsuseMGT--${pageName}" title="삭제">
삭제
</button>
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀">
엑셀
</button>
@ -338,6 +341,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()
});
}
}
});
}
/**************************************************************************
* DataTables 이벤트
@ -464,7 +494,25 @@
$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: "자료를 삭제할 경우 복구가 불가능합니다.<br>아래 자료를 삭제하시겠습니까?<br>폐기관리번호: "+row.DSCDMNG_ID + "<br>업체명: " +row.BSSH_NM+"<br>폐기건수: "+row.RND_DTL_RPT_CNT+"<br>폐기사유: " + row.DSUSE_PRV_NM
, init: () => { setDialogZindex(); }
, onOK: () => {
$P.control.removeDsuseMgt(row.DSCDMNG_ID);
}
});
}
// 업체 검색 버튼 이벤트
$P.fnSearchBssh = (title) => {
$P.control.getBsshInfo();
}
@ -541,6 +589,11 @@
$P.fnCreateDsuseMGT($(this).attr("title"));
});
// 폐기신청서 삭제
$("#btnRemoveDsuseMGT--${pageName}").on("click", function() {
$P.fnRemoveDsuseMGT($(this).attr("title"));
});
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input", function() {

Loading…
Cancel
Save