diff --git a/src/main/java/cokr/xit/fims/crdn/Crdn.java b/src/main/java/cokr/xit/fims/crdn/Crdn.java index b2aa96bb..492559d6 100644 --- a/src/main/java/cokr/xit/fims/crdn/Crdn.java +++ b/src/main/java/cokr/xit/fims/crdn/Crdn.java @@ -187,6 +187,11 @@ public class Crdn extends AbstractEntity { */ private String ovtimeYn; + /** + * 시간외 분할 여부 + */ + private String ovtimePrttnYn; + /** * 과태료 금액 */ diff --git a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java index de35bafe..81b216d4 100644 --- a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java +++ b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java @@ -56,7 +56,7 @@ public class CrdnQuery extends CmmnQuery { private String schOnlySamePlace; private String schOnlyUnpay; private String schExclEnd; - private String schExclTimeout; + private String schExclOvtime; //기타 private String vhrno; @@ -242,12 +242,12 @@ public class CrdnQuery extends CmmnQuery { return self(); } - public String getSchExclTimeout() { - return ifEmpty(schExclTimeout, () -> null); + public String getSchExclOvtime() { + return ifEmpty(schExclOvtime, () -> null); } - public T setSchExclTimeout(String schExclTimeout) { - this.schExclTimeout = schExclTimeout; + public T setSchExclOvtime(String schExclOvtime) { + this.schExclOvtime = schExclOvtime; return self(); } diff --git a/src/main/java/cokr/xit/fims/crdn/dao/CrdnInfoMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/CrdnInfoMapper.java index 38a195c6..4da56bf0 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/CrdnInfoMapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/CrdnInfoMapper.java @@ -15,6 +15,6 @@ public interface CrdnInfoMapper extends AbstractMapper { * @param crdnId 단속 아이디 * @return 단속 정보 */ - DataObject getCrdnInfo(String crdnId); + DataObject selectCrdnInfo(String crdnId); } diff --git a/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java b/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java index ef7fcc3e..52dd5074 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java @@ -37,11 +37,11 @@ public interface CrdnService { */ boolean update(Map nonQueryRequest, Crdn crdn, List newFileInfoList); - /** 시간초과 여부를 변경하고, 금액을 증가 또는 감소시킨다. - * @param crdn 단속정보 + /** 시간초과 정보를 변경하고, 금액을 증가 또는 감소시킨다. + * @param chgAmtSe 금액 변경 구분, crdnId 단속 ID * @return 저장여부 */ - boolean updateOverTimeInfo(Crdn crdn); + boolean updateOverTimeInfo(String chgAmtSe, String crdnId); /** 표지정보 미확인 자료를 확인 자료로 수정한다. * @param crdn 단속정보 diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java index bf04b737..d3e90c55 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java @@ -17,6 +17,7 @@ import cokr.xit.fims.cmmn.CrdnSttsHstry; import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.crdn.dao.CrdnInfoMapper; import cokr.xit.fims.crdn.dao.CrdnInstMapper; import cokr.xit.fims.crdn.dao.CrdnListMapper; import cokr.xit.fims.crdn.dao.CrdnUpdtMapper; @@ -44,6 +45,9 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService @Resource(name="crdnUpdtMapper") protected CrdnUpdtMapper crdnUpdtMapper; + @Resource(name="crdnInfoMapper") + private CrdnInfoMapper crdnInfoMapper; + @Resource(name="globalStngMapper") protected GlobalStngMapper globalStngMapper; @@ -235,18 +239,50 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService } @Override - public boolean updateOverTimeInfo(Crdn crdn) { + public boolean updateOverTimeInfo(String chgAmtSe, String crdnId) { + + DataObject crdnInfo = crdnInfoMapper.selectCrdnInfo(crdnId); + Crdn crdn = new Crdn(); + crdn.setCrdnId(crdnInfo.string("CRDN_ID")); + crdn.setTaskSeCd(crdnInfo.string("TASK_SE_CD")); + crdn.setCrdnYmd(crdnInfo.string("CRDN_YMD")); + crdn.setCrdnSpareaCd(crdnInfo.string("CRDN_SPAREA_CD")); + crdn.setCrdnTm(crdnInfo.string("CRDN_TM")); + crdn.setFfnlgCarmdlCd(crdnInfo.string("FFNLG_CARMDL_CD")); + + if(chgAmtSe.equals("0")) { + crdn.setOvtimeYn("N"); + crdn.setOvtimePrttnYn("N"); + } else if(chgAmtSe.equals("1")) { + crdn.setOvtimeYn("Y"); + crdn.setOvtimePrttnYn("N"); + } else if(chgAmtSe.equals("2")) { + crdn.setOvtimeYn("Y"); + crdn.setOvtimePrttnYn("Y"); + } else { + throw new RuntimeException("2시간 초과 처리 중 오류가 발생하였습니다."); + } if(crdnUpdtMapper.updateOverTimeInfo(crdn) != 1) { return false; } - int[] basicAmt = crdnStngBean.getBasicAmt(crdn); - crdn.setFfnlgAmt(basicAmt[0]); - crdn.setLevyAmt(basicAmt[0]); - crdn.setAdvntceLevyAmt(basicAmt[1]); + if(chgAmtSe.equals("0") || chgAmtSe.equals("1")) { + int[] basicAmt = crdnStngBean.getBasicAmt(crdn); + crdn.setFfnlgAmt(basicAmt[0]); + crdn.setLevyAmt(basicAmt[0]); + crdn.setAdvntceLevyAmt(basicAmt[1]); + } else if(chgAmtSe.equals("2")) { + crdn.setFfnlgAmt(10000); + crdn.setLevyAmt(10000); + crdn.setAdvntceLevyAmt(8000); + } - return crdnUpdtMapper.updateCrdnAmt(crdn) == 1 ? true : false; + int effected = crdnUpdtMapper.updateCrdnAmt(crdn); + if(effected != 1) { + return false; + } + return true; } @Override diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java index 6eec8808..d141f3d4 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java @@ -269,7 +269,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv boolean saved = false; crdn.setSggCd(globalStngMapper.selectSggCdForCurrentUser()); - DataObject crdnInfo = crdnInfoMapper.getCrdnInfo(crdn.getCrdnId()); + DataObject crdnInfo = crdnInfoMapper.selectCrdnInfo(crdn.getCrdnId()); crdnCvlcpt.setCvlcptLinkId(crdnInfo.string("CVLCPT_LINK_ID")); @@ -360,19 +360,22 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv nonQueryRequest.put("changeFileCnt", changeFileCnt); //금액 변경 - int[] basicAmt = crdnStngBean.getBasicAmt(crdn); - int ffnlgAmt = crdnInfo.number("FFNLG_AMT").intValue(); - if(ffnlgAmt != basicAmt[0]){ - nonQueryRequest.put("changeAmountYn","Y"); - crdn.setFfnlgAmt(basicAmt[0]); - crdn.setLevyAmt(basicAmt[0]); - crdn.setAdvntceLevyAmt(basicAmt[1]); - crdn.setFfnlgRductRt("0"); - } else { + if(crdnInfo.string("TASK_SE_CD").equals("PVS") && "Y".equals(crdnInfo.string("OVTIME_PRTTN_YN"))) { nonQueryRequest.put("changeAmountYn","N"); + } else { + int[] basicAmt = crdnStngBean.getBasicAmt(crdn); + int ffnlgAmt = crdnInfo.number("FFNLG_AMT").intValue(); + if(ffnlgAmt != basicAmt[0]){ + nonQueryRequest.put("changeAmountYn","Y"); + crdn.setFfnlgAmt(basicAmt[0]); + crdn.setLevyAmt(basicAmt[0]); + crdn.setAdvntceLevyAmt(basicAmt[1]); + crdn.setFfnlgRductRt("0"); + } else { + nonQueryRequest.put("changeAmountYn","N"); + } } - //TODO : 납부자 저장 //String pyrId = ""; diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt03ServiceBean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt03ServiceBean.java index ed55900a..277dc346 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt03ServiceBean.java +++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt03ServiceBean.java @@ -31,7 +31,7 @@ public class Sprt03ServiceBean extends AbstractServiceBean implements Sprt03Serv public DataObject getVideoInfo(String crdnId) { DataObject fileInfo = new DataObject(); - DataObject cvlcptInfo = crdnInfoMapper.getCrdnInfo(crdnId); + DataObject cvlcptInfo = crdnInfoMapper.selectCrdnInfo(crdnId); String linkTblNm = cvlcptInfo.string("LINK_TBL_NM"); if(!linkTblNm.equals("")) { FileQuery fileQuery = new FileQuery(); diff --git a/src/main/java/cokr/xit/fims/task/web/DpvController.java b/src/main/java/cokr/xit/fims/task/web/DpvController.java index a9181e31..e76658ec 100644 --- a/src/main/java/cokr/xit/fims/task/web/DpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/DpvController.java @@ -1,8 +1,5 @@ package cokr.xit.fims.task.web; -import java.util.HashMap; -import java.util.Map; - import javax.annotation.Resource; import org.springframework.stereotype.Controller; @@ -62,8 +59,6 @@ public class DpvController { */ @PostMapping(name = "표지정보 미확인 자료 수정", value = "/030/update.do") public ModelAndView update(Crdn crdn) { - Map nonQueryRequest = new HashMap(); - nonQueryRequest.put("updateInfomationType", "tagInformationUndefinedData"); boolean saved = crdnService.updateTagInfo(crdn); return new ModelAndView("jsonView") .addObject("saved", saved); diff --git a/src/main/java/cokr/xit/fims/task/web/PvsController.java b/src/main/java/cokr/xit/fims/task/web/PvsController.java index 71b4f0be..e7268c00 100644 --- a/src/main/java/cokr/xit/fims/task/web/PvsController.java +++ b/src/main/java/cokr/xit/fims/task/web/PvsController.java @@ -1,7 +1,15 @@ package cokr.xit.fims.task.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.dao.CrdnInfoMapper; +import cokr.xit.fims.crdn.service.CrdnService; +import cokr.xit.foundation.data.DataObject; @Controller @@ -21,7 +29,47 @@ public class PvsController { @Controller @RequestMapping(name="주정차과태료업무 단속업무", value="/PVS/crdn/crdn06") - class Crdn06Controller extends cokr.xit.fims.crdn.web.Crdn06Controller {} + class Crdn06Controller extends cokr.xit.fims.crdn.web.Crdn06Controller { + @Resource(name="crdnService") + private CrdnService crdnService; + + @Resource(name="crdnInfoMapper") + private CrdnInfoMapper crdnInfoMapper; + + /**2시간 초과처리 팝업을 호출한다.
+ * @param crdnId 단속 ID + * @return crdn06050-info + */ + @RequestMapping(name="2시간 초과 처리 화면 호출", value="/050/info.do") + public ModelAndView getOverTimeInfo(String openerPageName, String savedCallbackFuncName, String crdnId) { + + ModelAndView mav = new ModelAndView(); + mav.setViewName("fims/crdn/crdn06050-info"); + mav.addObject("pageName","crdn06050-info"); + + DataObject crdnInfo = crdnInfoMapper.selectCrdnInfo(crdnId); + + mav.addObject("crdnInfo", toJson(crdnInfo)); + mav.addObject("openerPageName", openerPageName); + mav.addObject("savedCallbackFuncName", savedCallbackFuncName); + return mav; + } + + /**단속자료의 2시간 초과여부를 변경하고, 금액을 수정한다.
+ * @param chgAmtSe 금액 변경 구분, crdnId 단속 ID + * @return jsonView + *
 {
+		 *     "saved": 수정되었으면 true, 그렇지 않으면 false
+		 * }
+ */ + @PostMapping(name = "2시간 초과 정보 수정", value = "/050/update.do") + public ModelAndView updateOverTimeInfo(String chgAmtSe, String crdnId) { + boolean saved = crdnService.updateOverTimeInfo(chgAmtSe, crdnId); + return new ModelAndView("jsonView") + .addObject("saved", saved); + } + + } @Controller @RequestMapping(name="주정차과태료업무 단속팀 관리", value="/PVS/crdn/crdn07") diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml index b091c166..45e5df39 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml @@ -85,15 +85,22 @@ - +/* 단속정보 조회(crdnInfoMapper.selectCrdnInfo) */ SELECT C.CRDN_ID + , C.TASK_SE_CD , C.CRDN_REG_SE_CD , C.CRDN_STTS_CD , C.CRDN_STTS_CHG_DT , C.LINK_TBL_NM , C.LINK_ID , C.FFNLG_AMT + , C.CRDN_YMD + , C.CRDN_TM + , CA.OVTIME_YN + + , CA.CRDN_SPAREA_CD + , CA.FFNLG_CARMDL_CD , P.RTPYR_ID , CC.CVLCPT_LINK_ID , CC.CVLCPT_TRSM_CD diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-list-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-list-mapper.xml index 35100ed6..fc10d04f 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn-list-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-list-mapper.xml @@ -177,6 +177,7 @@ SELECT C.CRDN_ID , C.CRDN_INPT_SE_CD FROM TB_CRDN C + INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID) WHERE C.DEL_YN = 'N' AND C.TASK_SE_CD = #{taskSeCd} @@ -190,8 +191,9 @@ SELECT C.CRDN_ID - - AND OVTIME_YN = 'N' + + AND IFNULL(CA.OVTIME_YN,'N') = 'N' + diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp index 459e33bb..a4d802f4 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-main.jsp @@ -82,8 +82,8 @@ @@ -153,7 +153,9 @@ @@ -467,7 +469,10 @@ $(document).ready(function(){ renderForTask("frmSearch--${pageName}", clsForTask); //업무별 버튼 renderForTask("gridbuttonArea--${pageName}", clsForTask); - + //버튼 이벤트 재매핑 + $("#btnOpenOverTime--${pageName}").off("click"); + $("#btnOpenOverTime--${pageName}").on("click", () => $P.openOverTimePop()); + $('#btnPhotoInspection--${pageName}').trigger("click"); } @@ -566,8 +571,6 @@ $(document).ready(function(){ $("#curDataFiles--${pageName}").html(""); $("#nextDataFiles--${pageName}").html(""); - - currentDataFileList.forEach(function(item, index, array){ var output = fnMakeImgTag(item.URL, item.FILE_NM); $("#curDataFiles--${pageName}").append(output); @@ -577,7 +580,6 @@ $(document).ready(function(){ $("#nextDataFiles--${pageName}").append(output); }); - } }); break; @@ -621,7 +623,7 @@ $(document).ready(function(){ var params = { "crdnId" : info.data.CRDN_ID, "levyExclSeCd" : levyExclSeCd, - "savedCallbackFuncName" : "pageObject['crdn06020-main']['exclSavedCallback']", + "savedCallbackFuncName" : "pageObject['crdn06020-main']['popupSavedCallback']", }; ajax.get({ @@ -647,7 +649,47 @@ $(document).ready(function(){ }); }; - $P.exclSavedCallback = (saved) => { + $P.openOverTimePop = () => { + + if ($P.currentDisplay != "photoInspection") { + return; + } + + var info = $P.photoInspectionControl.dataset.getCurrent("item"); + + if (info == undefined || info == "") { + return; + } + + var params = { + "crdnId" : info.data.CRDN_ID, + "openerPageName" : "crdn06020-main", + "savedCallbackFuncName" : "pageObject['crdn06020-main']['popupSavedCallback']" + }; + + ajax.get({ + url : wctx.url("/PVS/crdn/crdn06/050/info.do"), + data : params, + success : resp => { + + if((typeof resp) != "string"){ + dialog.alert(resp.message); + return; + } + + dialog.open({ + id : "overTimeProcessDialog--${pageName}", + title : "2시간 초과 처리", + content : resp, + size : "lg", + init : () => {}, + onClose : () => {} + }); + } + }); + } + + $P.popupSavedCallback = (saved) => { if(saved){ $P.refreshInspectionList(); } @@ -757,7 +799,7 @@ $(document).ready(function(){ $('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼 $("#btnInstLevyExcl--${pageName}").on("click", () => $P.openLevyExclPop("1")); - + //스크롤 이벤트 추가(동일차량검사) $("#photoInspection-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); $("#sameVehicleInspectionMain-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06050-info.jsp new file mode 100644 index 00000000..9c3965e6 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06050-info.jsp @@ -0,0 +1,145 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> + +
+
+ + + +
+
+ + +
+
+ ★ 가산은 단속원금에 만원을 더합니다.
+ ★ 감액은 단속원금을 만원만 남깁니다. +
+
+
+
+
+ + + + + + +
+ + +