diff --git a/src/main/java/cokr/xit/fims/crdn/Crdn.java b/src/main/java/cokr/xit/fims/crdn/Crdn.java index de56d941..263bd70d 100644 --- a/src/main/java/cokr/xit/fims/crdn/Crdn.java +++ b/src/main/java/cokr/xit/fims/crdn/Crdn.java @@ -27,6 +27,11 @@ public class Crdn extends AbstractEntity { */ private String crdnId; + /** + * 단속 ID 목록 + */ + private String[] crdnIDs; + /** * 시군구 코드 */ diff --git a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java index b96d664f..698ac617 100644 --- a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java +++ b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java @@ -27,6 +27,7 @@ public class CrdnQuery extends QueryRequest { private String schDateFrom; private String schDateTo; private String vhrno; + private String cvlcptPrcsPicNm; private String schCvlcptRcptYmdFrom; private String schCvlcptRcptYmdTo; private String schRductYmdFrom; @@ -141,6 +142,15 @@ public class CrdnQuery extends QueryRequest { return self(); } + public String getCvlcptPrcsPicNm() { + return ifEmpty(cvlcptPrcsPicNm, () -> null); + } + + public T setCvlcptPrcsPicNm(String cvlcptPrcsPicNm) { + this.cvlcptPrcsPicNm = cvlcptPrcsPicNm; + return self(); + } + public String getSchCvlcptRcptYmdFrom() { return ifEmpty(schCvlcptRcptYmdFrom, () -> null); } diff --git a/src/main/java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java b/src/main/java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java index aa4d2a7e..36b6c34f 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/Crdn01Mapper.java @@ -1,6 +1,7 @@ package cokr.xit.fims.crdn.dao; import java.util.List; +import java.util.Map; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; @@ -34,4 +35,18 @@ public interface Crdn01Mapper extends AbstractMapper { * @return 민원답변대상자료 목록 */ List selectCivilComplaintAnswerTargetDataList(CrdnQuery req); + + /** 민원 자료를 삭제한다. + * @param params 파라미터 + * + * @return 저장된 정보수 + */ + int removeCivilComplaint(Map params); + + default boolean removeCivilComplaint(String... crdnIDs) { + if (isEmpty(crdnIDs)) return false; + return removeCivilComplaint(params().set("crdnIDs", crdnIDs)) == 1; + }; } diff --git a/src/main/java/cokr/xit/fims/crdn/service/Crdn01Service.java b/src/main/java/cokr/xit/fims/crdn/service/Crdn01Service.java index f77b5dbb..7228e5f3 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/Crdn01Service.java +++ b/src/main/java/cokr/xit/fims/crdn/service/Crdn01Service.java @@ -7,4 +7,13 @@ package cokr.xit.fims.crdn.service; */ public interface Crdn01Service extends CrdnService { + /**민원자료를 삭제한다. + * @param crdn 단속정보 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + boolean removeCivilComplaint(String... crdnIDs); + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01Bean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01Bean.java index 3c401550..408bb24c 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01Bean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01Bean.java @@ -16,4 +16,8 @@ public class Crdn01Bean extends AbstractComponent { @Resource(name = "crdn01Mapper") private Crdn01Mapper crdn01Mapper; + public boolean removeCivilComplaint(String... crdnIDs) { + return crdn01Mapper.removeCivilComplaint(crdnIDs); + } + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01ServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01ServiceBean.java index 060a83b9..858592b3 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01ServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn01ServiceBean.java @@ -30,7 +30,7 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements Crdn01Serv switch (ifEmpty(req.getGrid(), () -> "")) { case "receiptData": - return crdn01Mapper.selectCivilComplaintReceiptDataList(req.setOrderBy("CRDN_ID")); + return crdn01Mapper.selectCivilComplaintReceiptDataList(req.setOrderBy("CVLCPT_RCPT_YMD")); case "answerTargetData": return crdn01Mapper.selectCivilComplaintAnswerTargetDataList(req.setOrderBy("CRDN_ID")); default: @@ -39,4 +39,9 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements Crdn01Serv } + @Override + public boolean removeCivilComplaint(String... crdnIDs) { + return crdn01Bean.removeCivilComplaint(crdnIDs); + } + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java index f7fa64cb..863b4fd5 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java @@ -33,7 +33,6 @@ public class Crdn05ServiceBean extends AbstractServiceBean implements Crdn05Serv @Override public List getCrackdownList(CrdnQuery req) { - req.setThisDay(""); req.setCurrentUserId(currentUser().getId()); req.setOrderBy("CRDN_ID"); return crdn05Mapper.selectCrackdownList(req); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java index 7b280170..1d5c7eda 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn01Controller.java @@ -10,8 +10,10 @@ import org.springframework.web.servlet.ModelAndView; import cokr.xit.base.code.CommonCode; import cokr.xit.base.web.ApplicationController; +import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.service.Crdn01Service; +import cokr.xit.foundation.UserInfo; /**민원 관리 서비스 웹 컨트롤러.
* {웹 컨텍스트}/crdn/crdn01 로 접근할 수 있다. @@ -33,6 +35,8 @@ public class Crdn01Controller extends ApplicationController { Map> commonCodes = getCodesOf("FIM026","FIM054"); mav.addObject("FIM054List", commonCodes.get("FIM054")); addCodes(commonCodes, mav, "FIM026"); + + mav.addObject("currentUserName", UserInfo.current().getName()); return mav; } @@ -130,4 +134,20 @@ public class Crdn01Controller extends ApplicationController { "crdn" ); } + + /**지정한 민원자료를 제거한다. + * @param crdnId 단속대장 아이디 + * @return jsonView + *
 {
+	 *     "affected": 저장된 정보수
+	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + @RequestMapping(name="민원자료 제거", value="/010/remove.do") + public ModelAndView removeCivilComplaint(Crdn crdn) { + boolean saved = crdn01Service.removeCivilComplaint(crdn.getCrdnIDs()); + + return new ModelAndView("jsonView") + .addObject("saved", saved); + } } diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml index ed466083..ac2780f0 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml @@ -164,7 +164,7 @@ SELECT C.CRDN_ID , (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) ASVLTN_ARTCL , CC.CVLCPT_RCPT_NO , C.VHRNO - + , C.CRDN_PLC FROM TB_CRDN C INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID) WHERE C.DEL_YN = 'N' @@ -177,6 +177,9 @@ SELECT C.CRDN_ID AND CC.CVLCPT_RCPT_YMD = ]]> #{schCvlcptRcptYmdFrom} AND CC.CVLCPT_RCPT_YMD #{schCvlcptRcptYmdTo} + + AND CC.CVLCPT_PRCS_PIC_NM = #{cvlcptPrcsPicNm} + @@ -217,4 +220,15 @@ SELECT C.CRDN_ID + + + /* 민원자료 삭제(crdn01Mapper.removeCivilComplaint) */ + UPDATE TB_CRDN + SET DEL_YN = 'Y' + , DEL_DT = /* 삭제일시 */ + , DLTR = #{currentUser.id} /* 삭제자 */ + WHERE CRDN_ID IN ( + #{crdnId} + ) + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn05-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn05-mapper.xml index 82558d86..8d9b4ddd 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn05-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn05-mapper.xml @@ -24,7 +24,7 @@ SELECT C.CRDN_ID WHERE C.DEL_YN = 'N' AND C.TASK_SE_CD = #{taskSeCd} AND C.RGTR = #{currentUserId} - AND SUBSTR(C.REG_DT,1,8) = + AND SUBSTR(C.REG_DT,1,8) = @@ -172,11 +172,11 @@ INSERT INTO TB_CRDN ( , #{crdn.minusAmt} , #{crdn.rcvmtAmt} , #{crdn.bfrCrdnId} - , 'N' - , - , #{currentUser.id} - , - , #{currentUser.id} + , 'N' + , #{crdn.createdAt} + , #{crdn.createdBy} + , #{crdn.lastModified} + , #{crdn.modifiedBy} , #{crdn.removedAt} , #{crdn.removedBy} , #{crdn.delRsn} diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp index a86c73fe..e2382734 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp @@ -42,7 +42,11 @@ -
+
+ + +
+
@@ -59,8 +63,9 @@
+ 민원원본보기 - 처리 잠시 보류 + 처리 잠시 보류
@@ -68,7 +73,7 @@