diff --git a/src/main/java/cokr/xit/fims/crdn/Crdn.java b/src/main/java/cokr/xit/fims/crdn/Crdn.java index 76222c89..8ddb5190 100644 --- a/src/main/java/cokr/xit/fims/crdn/Crdn.java +++ b/src/main/java/cokr/xit/fims/crdn/Crdn.java @@ -10,6 +10,11 @@ import lombok.Setter; @Getter @Setter public class Crdn extends AbstractEntity { + /** + * 수정 처리할 정보 + */ + private String updateInfomation; + /** * 단속 ID */ @@ -314,7 +319,7 @@ public class Crdn extends AbstractEntity { * 이전 단속 ID */ private String bfrCrdnId; - + /** * 민원 연계 ID */ diff --git a/src/main/java/cokr/xit/fims/crdn/dao/Crdn06Mapper.java b/src/main/java/cokr/xit/fims/crdn/dao/Crdn06Mapper.java index 1ed5592e..4ee6d429 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/Crdn06Mapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/Crdn06Mapper.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; @@ -15,32 +16,48 @@ import cokr.xit.foundation.data.DataObject; */ @Mapper("crdn06Mapper") public interface Crdn06Mapper extends AbstractMapper { - + /**단속자료 목록을 조회한다.
* {@link cokr.xit.fims.crdn.service.Crdn06Service#getCrackdownList(CrdnQuery)} 참고 * @param req 단속자료 목록 조회 조건 * @return 단속자료 목록 */ List selectCrackdownList(CrdnQuery req); - + /**표지정보 미확인 자료 목록을 조회한다.
* {@link cokr.xit.fims.crdn.service.Crdn06Service#getCrackdownList(CrdnQuery)} 참고 * @param req 표지정보 미확인 자료 목록 조회 조건 * @return 표지정보 미확인 자료 목록 */ List selectTagInformationUndefinedDataList(CrdnQuery req); - + /**과태료 감경 자료 목록을 조회한다.
* {@link cokr.xit.fims.crdn.service.Crdn06Service#getCrackdownList(CrdnQuery)} 참고 * @param req 과태료 감경 자료 목록 조회 조건 * @return 과태료 감경 자료 목록 */ List selectFineReductionDataList(QueryRequest setOrderBy); - + List selectCrackdowns(CrdnQuery req); - + /**표지정보 미확인 자료를 확인 자료로 수정한다. + * @param params 파라미터 + *
  • "crdn" - 단속 대장
  • + *
  • "currentUser" - 현재 접속한 사용자
  • + *
+ * @return 저장된 정보수 + */ + int updateTagInformation(Map params); + + /**표지정보 미확인 자료를 확인 자료로 수정한다. + * @param crdn 단속대장 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + default boolean updateTagInformation(Crdn crdn) { + return crdn != null && updateTagInformation(params().set("crdn", crdn)) == 1; + } - - } diff --git a/src/main/java/cokr/xit/fims/crdn/service/Crdn06Service.java b/src/main/java/cokr/xit/fims/crdn/service/Crdn06Service.java index e7bfc0de..831bc5fe 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/Crdn06Service.java +++ b/src/main/java/cokr/xit/fims/crdn/service/Crdn06Service.java @@ -13,7 +13,7 @@ import cokr.xit.foundation.data.DataObject; * @author leebj */ public interface Crdn06Service { - + /** 단속자료 목록을 조회한다. * @param req 단속자료 목록 조회 조건 *
  • pageNum: 페이지 번호
  • @@ -23,6 +23,12 @@ public interface Crdn06Service { */ List getCrackdownList(CrdnQuery req); - - + /**단속 대장 정보를 수정한다. + * @param crdn 단속 대장 + * @return 저장 여부 + *
    • 저장됐으면 true
    • + *
    • 그렇지 않으면 false
    • + *
    + */ + boolean update(Crdn crdn); } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06Bean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06Bean.java index e1cbe96b..72998191 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06Bean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06Bean.java @@ -49,4 +49,20 @@ public class Crdn06Bean extends AbstractComponent { } } + /**단속 대장 정보를 수정한다. + * @param crdn 단속 대장 + * @return 저장 여부 + *
    • 저장됐으면 true
    • + *
    • 그렇지 않으면 false
    • + *
    + */ + public boolean update(Crdn crdn) { + switch (ifEmpty(crdn.getUpdateInfomation(), () -> "")) { + case "TagInformationUndefinedData": + return crdn06Mapper.updateTagInformation(crdn); + default: + return false; //crdn06Mapper.update(crdn); + } + } + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06ServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06ServiceBean.java index 97535d60..a63ca360 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06ServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06ServiceBean.java @@ -6,6 +6,7 @@ import javax.annotation.Resource; import org.springframework.stereotype.Service; +import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.service.Crdn06Service; import cokr.xit.foundation.component.AbstractServiceBean; @@ -16,16 +17,19 @@ import cokr.xit.foundation.data.DataObject; */ @Service("crdn06Service") public class Crdn06ServiceBean extends AbstractServiceBean implements Crdn06Service { - + /** 단속관리 Bean */ @Resource(name="crdn06Bean") protected Crdn06Bean crdn06Bean; - + @Override public List getCrackdownList(CrdnQuery req) { return crdn06Bean.getCrackdownList(req); } - - - + + @Override + public boolean update(Crdn crdn) { + return crdn06Bean.update(crdn); + } + } diff --git a/src/main/java/cokr/xit/fims/crdn/web/TaskCrdn06Controller.java b/src/main/java/cokr/xit/fims/crdn/web/TaskCrdn06Controller.java index 6d742b2d..099710d9 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/TaskCrdn06Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/TaskCrdn06Controller.java @@ -1,10 +1,15 @@ package cokr.xit.fims.crdn.web; +import javax.annotation.Resource; + import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; +import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.crdn.service.Crdn06Service; /**단속 관리 서비스 웹 컨트롤러.
    * {웹 컨텍스트}/crdn/crdn06 로 접근할 수 있다. @@ -13,6 +18,9 @@ import cokr.xit.fims.crdn.CrdnQuery; @Controller public class TaskCrdn06Controller extends Crdn06Controller { + @Resource(name="crdn06Service") + private Crdn06Service crdn06Service; + @RequestMapping(name="주정차과태료업무 단속자료 목록", value="/010/PVS/list.do") public ModelAndView getPvsCrackdownList(CrdnQuery req) { return getCrackdownList(req); @@ -29,12 +37,27 @@ public class TaskCrdn06Controller extends Crdn06Controller { public ModelAndView getEcaCrackdownList(CrdnQuery req) { return getCrackdownList(req); } - + @RequestMapping(name="장애인과태료업무 표지정보미확인자료 목록", value="/030/DPV/list.do") public ModelAndView getTagInformationUndefinedDataList(CrdnQuery req) { return getCrackdownList(req.setGrid("TagInformationUndefinedData")); } - + + /**표지정보 미확인 자료를 수정한다. + * @param crdn 단속 대장 정보 + * @return jsonView + *
     {
    +	 *     "saved": 수정되었으면 true, 그렇지 않으면 false
    +	 * }
    + */ + @PostMapping(name = "단속 대장 수정", value = "/030/DPV/update.do") + public ModelAndView update(Crdn crdn) { + crdn.setUpdateInfomation("TagInformationUndefinedData"); + boolean saved = crdn06Service.update(crdn); + return new ModelAndView("jsonView") + .addObject("saved", saved); + } + @RequestMapping(name="주정차과태료업무 과태료 감경 자료 목록", value="/040/PVS/list.do") public ModelAndView getPvsFineReductionDataList(CrdnQuery req) { return getCrackdownList(req.setGrid("FineReductionData")); diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml index 361e9bbc..ef5ddd0a 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml @@ -244,12 +244,12 @@ SELECT C.CRDN_ID , C.ATCH_FILE_CNT , C.CRDN_SN - , C.CRDN_STTS_CD FROM TB_CRDN C LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID) LEFT OUTER JOIN TB_TEAM_INFO TI ON (C.TEAM_ID = TI.TEAM_ID) WHERE C.DEL_YN = 'N' +AND PARKNG_PSBLTY_RSLT_CD = '0' @@ -282,9 +282,6 @@ AND C.ATCH_FILE_CNT = #{term} AND C.CRDN_SN = #{term} - - - AND FN_GET_CODE_NM('FIM010', C.CRDN_STTS_CD) LIKE CONCAT('%', #{term}, '%') @@ -364,4 +361,13 @@ AND FN_GET_CODE_NM('FIM010', C.CRDN_STTS_CD) LIKE CONCAT('%', #{term}, '%') + + /* 표지정보확인 수정(crdn06Mapper.updateTagInformation) */ + UPDATE TB_CRDN + SET PARKNG_PSBLTY_RSLT_CD = '2' + , MDFCN_DT = /* 수정일시 */ + , MDFR = #{currentUser.id} /* 수정자 */ + WHERE CRDN_ID = #{crdn.crdnId} /* 단속 ID */ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp index 5f77ba6c..10bd56cf 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp @@ -32,16 +32,13 @@
    - - - 단속일자 + + ~ - @@ -75,7 +72,7 @@