주정차위반 2시간 처리 화면 추가

main
이범준 1 year ago
parent 00ea9180c8
commit 2274568f2a

@ -187,6 +187,11 @@ public class Crdn extends AbstractEntity {
*/
private String ovtimeYn;
/**
*
*/
private String ovtimePrttnYn;
/**
*
*/

@ -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 extends CrdnQuery> T setSchExclTimeout(String schExclTimeout) {
this.schExclTimeout = schExclTimeout;
public <T extends CrdnQuery> T setSchExclOvtime(String schExclOvtime) {
this.schExclOvtime = schExclOvtime;
return self();
}

@ -15,6 +15,6 @@ public interface CrdnInfoMapper extends AbstractMapper {
* @param crdnId
* @return
*/
DataObject getCrdnInfo(String crdnId);
DataObject selectCrdnInfo(String crdnId);
}

@ -37,11 +37,11 @@ public interface CrdnService {
*/
boolean update(Map<String,Object> nonQueryRequest, Crdn crdn, List<FileInfo> newFileInfoList);
/** , .
* @param crdn
/** , .
* @param chgAmtSe , crdnId ID
* @return
*/
boolean updateOverTimeInfo(Crdn crdn);
boolean updateOverTimeInfo(String chgAmtSe, String crdnId);
/** .
* @param crdn

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

@ -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 = "";

@ -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();

@ -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<String, Object> nonQueryRequest = new HashMap<String, Object>();
nonQueryRequest.put("updateInfomationType", "tagInformationUndefinedData");
boolean saved = crdnService.updateTagInfo(crdn);
return new ModelAndView("jsonView")
.addObject("saved", saved);

@ -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 .<br />
* @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 , . <br />
* @param chgAmtSe , crdnId ID
* @return jsonView
* <pre><code> {
* "saved": true, false
* }</code></pre>
*/
@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")

@ -85,15 +85,22 @@
<result property="delRsn" column="DEL_RSN" /> <!-- 삭제 사유 -->
</resultMap>
<select id="getCrdnInfo" parameterType="string">
/* 단속정보 조회(crdnInfoMapper.getCrdnInfo) */
<select id="selectCrdnInfo" parameterType="string">
/* 단속정보 조회(crdnInfoMapper.selectCrdnInfo) */
SELECT C.CRDN_ID <!-- 단속 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 <!-- 연계 ID -->
, C.FFNLG_AMT <!-- 과태료 금액 -->
, C.CRDN_YMD <!-- 단속 일자 -->
, C.CRDN_TM <!-- 단속 시간 -->
, CA.OVTIME_YN <!-- 시간외 여부 -->
<!-- , CA.OVTIME_PRTTN_YN TODO:컬럼추가 후 주석 제거 --> <!-- 시간외 분할 여부 -->
, CA.CRDN_SPAREA_CD <!-- 단속 특별구역 코드 -->
, CA.FFNLG_CARMDL_CD <!-- 과태료 차종 코드 -->
, P.RTPYR_ID <!-- 납부자 ID -->
, CC.CVLCPT_LINK_ID <!-- 민원 연계 ID -->
, CC.CVLCPT_TRSM_CD <!-- 민원 전송 코드 -->

@ -177,6 +177,7 @@ SELECT C.CRDN_ID <!-- 단속 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}
<if test="schCrdnYmdFrom != null or schCrdnYmdTo != null">
@ -190,8 +191,9 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<!-- TODO : 미납만 조회 -->
</if>
<if test="taskSeCd == 'PVS'">
<if test="schExclTimeout == 'on'">
AND OVTIME_YN = 'N'
<if test="schExclOvtime == 'on'">
AND IFNULL(CA.OVTIME_YN,'N') = 'N'
<!-- AND IFNULL(CA.OVTIME_PRTTN_YN,'N') = 'N' --> <!-- TODO:컬럼추가 후 주석 제거 -->
</if>
</if>
<if test="by != null and by != '' and term != null">

@ -82,8 +82,8 @@
<template class="pvs">
<slot>
<label class="area-photoinspection">
<input type="checkbox" name="schExclTimeout" class="form-check-input" />
2시간초과제외
<input type="checkbox" name="schExclOvtime" class="form-check-input" />
2시간초과 처리 자료 제외
</label>
</slot>
</template>
@ -153,7 +153,9 @@
<span slot="button">
<template class="pvs">
<slot>
<button class="btn btn-primary" id="btnInstTimeout--${pageName}" title="2시간초과 등록">2시간초과 등록</button>
<button id="btnOpenOverTime--${pageName}"
class="btn btn-primary area-photoinspection"
title="2시간 초과 처리">2시간 초과 처리</button>
</slot>
</template>
</span>
@ -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); });

@ -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"%>
<div class="card">
<form id="frmEdit--${pageName}" name="frmEdit">
<input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
<div class="row g-1">
<div class="col-md-12">
<label for="levyExclRsnCd--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">금액 수정 구분</label>
<select class="form-select" id="chgAmtSe--${pageName}" name="chgAmtSe" required>
<option value="1">가산</option>
<option value="2">감액</option>
</select>
</div>
<div class="col-md-12">
★ 가산은 단속원금에 만원을 더합니다.<br />
★ 감액은 단속원금을 만원만 남깁니다.
</div>
</div>
</form>
</div>
<div>
<span class="container-page-btn">
<span class="container-window-btn-right">
<button class="btn btn-primary" id="btnRestore--${pageName}" title="원금 복원">원금 복원</button>
<button class="btn btn-primary" id="btnSave--${pageName}" title="금액 수정">금액 수정</button>
</span>
</span>
</div>
<!-- / 업무 버튼 표시 -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
$(document).ready(function(){
var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl, Dataset, FormFields
**************************************************************************/
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
$P.crdnControl = new DatasetControl({
urls : { update : wctx.url("/PVS/crdn/crdn06/050/update.do") },
keymapper : info => info ? info.CRDN_ID : "",
dataGetter : obj => obj.crdnInfo,
formats: {}
});
$P.crdnControl.save = (info) => {
if (!info) return;
ajax.post({
url : $P.crdnControl.urls.update,
data : info,
success : resp => { $P.crdnControl.onSave(resp); }
});
};
/**************************************************************************
* DatasetControl.on, Dataset.on
**************************************************************************/
$P.crdnControl.onCurrentChange = (item) => {
$P.formFields.set(item);
}
$P.crdnControl.onSave = (resp) => {
if (resp.saved) {
dialog.alert("저장됐습니다.");
dialog.close("overTimeProcessDialog--${openerPageName}");
if ("${savedCallbackFuncName}" != "") {
${savedCallbackFuncName}(resp.saved);
}
}
};
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnSave = () => {
var alertMessage = "";
if($("#chgAmtSe--${pageName}").val() == "1"){
if(crdnInfo.OVTIME_YN == "Y"){
dialog.alert({ content: "이미 가산 처리된 자료입니다." });
return;
}
alertMessage = "가산 처리하시겠습니까?";
} else if($("#chgAmtSe--${pageName}").val() == "2"){
if(crdnInfo.OVTIME_PRTTN_YN == "Y"){
dialog.alert({ content: "이미 감액 처리된 자료입니다." });
return;
}
alertMessage = "감액 처리하시겠습니까?";
}
dialog.alert({
content: alertMessage,
onOK:() => {
$P.crdnControl.save($P.formFields.get());
}
});
}
$P.fnRestore = () => {
if(crdnInfo.OVTIME_YN != "Y" && crdnInfo.OVTIME_PRTTN_YN != "Y"){
dialog.alert({ content: "2시간 초과 처리되지 않은 자료입니다." });
return;
}
dialog.alert({
content: "원금 복원하시겠습니까?",
onOK:() => {
var info = $P.formFields.get();
info.chgAmtSe = "0";
$P.crdnControl.save(info);
}
});
}
/**************************************************************************
* element.on
**************************************************************************/
$("#btnSave--${pageName}").on("click", () => $P.fnSave() );
$("#btnRestore--${pageName}").on("click", () => $P.fnRestore() );
/**************************************************************************
* 초기화
**************************************************************************/
var crdnInfo = ${crdnInfo};
$P.crdnControl.setData([crdnInfo]);
});
</script>
Loading…
Cancel
Save