diff --git a/src/main/java/cokr/xit/fims/crdn/dao/CrdnListMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/CrdnListMapper.java index f143876d..5801a4eb 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/CrdnListMapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/CrdnListMapper.java @@ -56,11 +56,4 @@ public interface CrdnListMapper extends AbstractMapper { */ List selectTagInformationUndefinedDataList(CrdnQuery query); - /**과태료 감경 자료 목록을 조회한다.
- * {@link cokr.xit.fims.crdn.service.bean.CrdnService#getCrackdownList(CrdnQuery)} 참고 - * @param query 과태료 감경 자료 목록 조회 조건 - * @return 과태료 감경 자료 목록 - */ - List selectFineReductionDataList(CrdnQuery query); - } 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 73d116b6..23af1bf4 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 @@ -82,9 +82,6 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService case "tagInformationUndefinedData": dataObjectList = crdnListMapper.selectTagInformationUndefinedDataList(query.setOrderBy("CRDN_ID")); break; - case "fineReductionData": - dataObjectList = crdnListMapper.selectFineReductionDataList(query.setOrderBy("CRDN_ID")); - break; case "photo": dataObjectList = crdnListMapper.selectPhotoInspectionDataList(query.setOrderBy("VHRNO, CRDN_PLC, CRDN_ID")); break; @@ -108,8 +105,7 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService break; } - if(ifEmpty(query.getGridType(), () -> "").equals("tagInformationUndefinedData") - || ifEmpty(query.getGridType(), () -> "").equals("fineReductionData")) { + if(ifEmpty(query.getGridType(), () -> "").equals("tagInformationUndefinedData")) { Iterator iterator = dataObjectList.iterator(); while(iterator.hasNext()) { DataObject dataObject = iterator.next(); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn04Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn04Controller.java deleted file mode 100644 index 1e49d8aa..00000000 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn04Controller.java +++ /dev/null @@ -1,61 +0,0 @@ -package cokr.xit.fims.crdn.web; - -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import org.springframework.web.servlet.ModelAndView; - -import cokr.xit.base.code.CommonCode; -import cokr.xit.base.web.ApplicationController; -import cokr.xit.fims.crdn.CrdnQuery; -import cokr.xit.fims.crdn.service.CrdnService; -import cokr.xit.fims.crdn.service.CrdnStngService; - -/**과태료감경자료 관리 서비스 웹 컨트롤러.
- * {웹 컨텍스트}/crdn/crdn04 로 접근할 수 있다. - * @author leebj - */ -public class Crdn04Controller extends ApplicationController { - - public static final String CLASS_URL = "/crdn/crdn04"; - - public class METHOD_URL { - public static final String - fineReductionDataMain = "/010/main.do", - getFineReductionDataList = "/040/list.do" - ; - } - - @Resource(name="crdnService") - private CrdnService crdnService; - - @Resource(name="crdnStngService") - private CrdnStngService crdnStngService; - - /** 과태료 감경 자료 메인화면을 연다. - * @return fims/crdn/crdn04010-main - */ - public ModelAndView fineReductionDataMain() { - ModelAndView mav = new ModelAndView(); - mav.setViewName("fims/crdn/crdn04010-main"); - mav.addObject("pageName","crdn04010-main"); - - Map> commonCodes = getCodesOf("FIM010", "FIM019", "FIM054"); - mav.addObject("FIM054List", commonCodes.get("FIM054")); - addCodes(commonCodes, mav, "FIM010", "FIM019"); - return mav; - } - - /**감경자료 목록을 조회한다.
- * {@link CrdnService#getCrackdownList(CrdnQuery)} 참고 - * @param query 감경자료 목록 조회 조건 - * @return jsonView - */ - public ModelAndView getFineReductionDataList(CrdnQuery query) { - query.setGridType("fineReductionData"); - setFetchSize(query); - return setCollectionInfo(new ModelAndView("jsonView"), crdnService.getCrackdownList(query),""); - } -} diff --git a/src/main/java/cokr/xit/fims/levy/LevyQuery.java b/src/main/java/cokr/xit/fims/levy/LevyQuery.java index 0adb951b..f9687dc7 100644 --- a/src/main/java/cokr/xit/fims/levy/LevyQuery.java +++ b/src/main/java/cokr/xit/fims/levy/LevyQuery.java @@ -1,6 +1,6 @@ package cokr.xit.fims.levy; -import cokr.xit.foundation.component.QueryRequest; +import cokr.xit.fims.cmmn.CmmnQuery; /**과태료 부과 대장 정보 조회 요청 * @@ -12,13 +12,12 @@ import cokr.xit.foundation.component.QueryRequest; * ================================ * */ -public class LevyQuery extends QueryRequest { +public class LevyQuery extends CmmnQuery { private static final long serialVersionUID = 1L; // 필수 조건 private String sggCd; // 시군구 코드 - private String taskSeCd; // 업무 구분 코드 private String delYn; // 삭제 여부 // ID private String crdnId; // 단속 ID @@ -26,10 +25,16 @@ public class LevyQuery extends QueryRequest { private String levyId; // 부과 ID private String[] rductIDs; // 감경 IDs private String rductId; // 감경 ID + + //날짜 + private String schRductYmdFrom; + private String schRductYmdTo; + // ETC private String callPurpose; // 호출용도 필요시 사용(select, create, update) private String delRsn; // 삭제 사유 + public String getSggCd() { return ifEmpty(sggCd, () -> null); } @@ -40,16 +45,6 @@ public class LevyQuery extends QueryRequest { return self(); } - public String getTaskSeCd() { - return ifEmpty(taskSeCd, () -> null); - } - - public T setTaskSeCd(String taskSeCd) { - this.taskSeCd = taskSeCd; - - return self(); - } - public String getDelYn() { return ifEmpty(delYn, () -> null); } @@ -110,6 +105,24 @@ public class LevyQuery extends QueryRequest { return self(); } + public String getSchRductYmdFrom() { + return ifEmpty(schRductYmdFrom, () -> null); + } + + public T setSchRductYmdFrom(String schRductYmdFrom) { + this.schRductYmdFrom = schRductYmdFrom; + return self(); + } + + public String getSchRductYmdTo() { + return ifEmpty(schRductYmdTo, () -> null); + } + + public T setSchRductYmdTo(String schRductYmdTo) { + this.schRductYmdTo = schRductYmdTo; + return self(); + } + // ETC ///////////////////////////////////////////////////////////////////// public String getCallPurpose() { return ifEmpty(callPurpose, () -> null); diff --git a/src/main/java/cokr/xit/fims/levy/service/bean/Levy02Bean.java b/src/main/java/cokr/xit/fims/levy/service/bean/Levy02Bean.java index 9bfbe837..4936fe8e 100644 --- a/src/main/java/cokr/xit/fims/levy/service/bean/Levy02Bean.java +++ b/src/main/java/cokr/xit/fims/levy/service/bean/Levy02Bean.java @@ -1,17 +1,18 @@ package cokr.xit.fims.levy.service.bean; +import java.util.Iterator; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Component; -import cokr.xit.foundation.AbstractComponent; -import cokr.xit.foundation.data.DataObject; - -import cokr.xit.fims.levy.Rduct; +import cokr.xit.fims.crdn.service.bean.CrdnStngBean; import cokr.xit.fims.levy.LevyQuery; +import cokr.xit.fims.levy.Rduct; import cokr.xit.fims.levy.dao.RductMapper; +import cokr.xit.foundation.AbstractComponent; +import cokr.xit.foundation.data.DataObject; /**과태료 감경 대장 정보 관리 Bean * @@ -30,12 +31,31 @@ public class Levy02Bean extends AbstractComponent { @Resource(name = "rductMapper") private RductMapper rductMapper; + @Resource(name = "crdnStngBean") + private CrdnStngBean crdnStngBean; + /**지정한 조건에 따라 과태료 감경 대장 목록을 조회하여 반환한다. * @param req 과태료 감경 대장 조회 조건 * @return 과태료 감경 대장 목록 */ public List getRductList(LevyQuery req) { - return rductMapper.selectRductList(req); + List dataObjectList = rductMapper.selectRductList(req); + + Iterator iterator = dataObjectList.iterator(); + while(iterator.hasNext()) { + DataObject dataObject = iterator.next(); + String state = dataObject.string("CRDN_STTS_CD"); + int advntceAmt = dataObject.number("ADVNTCE_AMT").intValue(); + int ffnlgAmt = dataObject.number("FFNLG_AMT").intValue(); + int minusAmt = dataObject.number("MINUS_AMT").intValue(); + int adtnAmt = dataObject.number("ADTN_AMT").intValue(); + int rcvmtAmt = dataObject.number("RCVMT_AMT").intValue(); + + dataObject.set("BLNC", crdnStngBean.getBalance(state,advntceAmt,ffnlgAmt,minusAmt,adtnAmt,rcvmtAmt)); + } + + return dataObjectList; + } /**지정한 조건에 따라 과태료 감경 대장 객체들을 반환한다. diff --git a/src/main/java/cokr/xit/fims/levy/web/Levy02Controller.java b/src/main/java/cokr/xit/fims/levy/web/Levy02Controller.java index 95fbaaf7..99570ef0 100644 --- a/src/main/java/cokr/xit/fims/levy/web/Levy02Controller.java +++ b/src/main/java/cokr/xit/fims/levy/web/Levy02Controller.java @@ -1,6 +1,7 @@ package cokr.xit.fims.levy.web; import java.util.List; +import java.util.Map; import javax.annotation.Resource; @@ -8,9 +9,10 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; +import cokr.xit.base.code.CommonCode; import cokr.xit.base.web.ApplicationController; -import cokr.xit.fims.levy.Rduct; import cokr.xit.fims.levy.LevyQuery; +import cokr.xit.fims.levy.Rduct; import cokr.xit.fims.levy.service.Levy02Service; /**과태료 감경 대장 서비스의 웹 컨트롤러 @@ -29,7 +31,7 @@ public class Levy02Controller extends ApplicationController { @Resource(name = "levy02Service") private Levy02Service levy02Service; - /**과태료 감경 대장 관리 메인화면(rduct/rduct-main)을 연다. + /**과태료 감경 대장 관리 메인화면(levy/levy02010-main)을 연다. * 조건없는 {@link #getRductList(RductQuery) 과태료 감경 대장 조회 결과}를 포함시킨다. * @return /rduct/rduct-main */ @@ -37,7 +39,12 @@ public class Levy02Controller extends ApplicationController { public ModelAndView main() { ModelAndView mav = getRductList(new LevyQuery().setPageNum(1)); - mav.setViewName("/rduct/rduct-main"); + mav.setViewName("fims/levy/levy02010-main"); + mav.addObject("pageName","levy02010-main"); + + Map> commonCodes = getCodesOf("FIM010", "FIM019", "FIM054"); + mav.addObject("FIM054List", commonCodes.get("FIM054")); + addCodes(commonCodes, mav, "FIM010", "FIM019"); return mav.addObject("rductList", toJson(mav.getModel().get("rductList"))); } @@ -57,7 +64,7 @@ public class Levy02Controller extends ApplicationController { public ModelAndView getRductList(LevyQuery req) { List result = levy02Service.getRductList(setFetchSize(req)); - return setCollectionInfo(new ModelAndView("jsonView"), result, "rduct"); + return setCollectionInfo(new ModelAndView("jsonView"), result, ""); } /**과태료 감경 대장를 등록한다. diff --git a/src/main/java/cokr/xit/fims/task/web/BpvController.java b/src/main/java/cokr/xit/fims/task/web/BpvController.java index b35dd0ba..03520453 100644 --- a/src/main/java/cokr/xit/fims/task/web/BpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/BpvController.java @@ -192,18 +192,6 @@ public class BpvController { } - @Controller - @RequestMapping(name="전용차로과태료업무 과태료감경자료 업무", value=CLASS_URL+Crdn04Controller.CLASS_URL) - class Crdn04Controller extends cokr.xit.fims.crdn.web.Crdn04Controller { - - @Override - @RequestMapping(name="전용차로과태료업무 감경자료 목록 조회", value=METHOD_URL.getFineReductionDataList) - public ModelAndView getFineReductionDataList(CrdnQuery query) { - return super.getFineReductionDataList(query); - } - - } - @Controller @RequestMapping(name="전용차로과태료업무 단속등록업무", value=CLASS_URL+Crdn05Controller.CLASS_URL) class Crdn05Controller extends cokr.xit.fims.crdn.web.Crdn05Controller { diff --git a/src/main/java/cokr/xit/fims/task/web/CmnController.java b/src/main/java/cokr/xit/fims/task/web/CmnController.java index 4195305f..705fc67d 100644 --- a/src/main/java/cokr/xit/fims/task/web/CmnController.java +++ b/src/main/java/cokr/xit/fims/task/web/CmnController.java @@ -114,19 +114,6 @@ public class CmnController { } } - @Controller - @RequestMapping(name="과태료 감경 자료", value=Crdn04Controller.CLASS_URL) - class Crdn04Controller extends cokr.xit.fims.crdn.web.Crdn04Controller { - /** 과태료 감경 자료 메인화면을 연다. - * @return fims/crdn/crdn04010-main - */ - @Override - @RequestMapping(name="과태료 감경 자료 메인", value=METHOD_URL.fineReductionDataMain) - public ModelAndView fineReductionDataMain() { - return super.fineReductionDataMain(); - } - } - @Controller @RequestMapping(name="단속 자료 등록", value=Crdn05Controller.CLASS_URL) class Crdn05Controller extends cokr.xit.fims.crdn.web.Crdn05Controller { @@ -240,6 +227,19 @@ public class CmnController { } } + @Controller + @RequestMapping(name = "과태료 감경 관리", value = "/levy/levy02") + class Levy02Controller extends cokr.xit.fims.levy.web.Levy02Controller { + /** 과태료 감경 관리 메인화면을 연다. + * @return fims/levy/levy02010-main + */ + @Override + @RequestMapping(name = "과태료 감경 대장 메인", value = "/010/main.do") + public ModelAndView main() { + return super.main(); + } + } + @Controller @RequestMapping(name = "발송 관리", value = "/sndb/sndb01") class Sndb01Controller extends cokr.xit.fims.sndb.web.Sndb01Controller { 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 8f637fae..16f70429 100644 --- a/src/main/java/cokr/xit/fims/task/web/DpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/DpvController.java @@ -215,18 +215,6 @@ public class DpvController { } - @Controller - @RequestMapping(name="장애인과태료업무 과태료감경자료 업무", value=CLASS_URL+Crdn04Controller.CLASS_URL) - class Crdn04Controller extends cokr.xit.fims.crdn.web.Crdn04Controller { - - @Override - @RequestMapping(name="장애인과태료업무 감경자료 목록 조회", value=METHOD_URL.getFineReductionDataList) - public ModelAndView getFineReductionDataList(CrdnQuery query) { - return super.getFineReductionDataList(query); - } - - } - @Controller @RequestMapping(name="장애인과태료업무 단속등록업무", value=CLASS_URL+Crdn05Controller.CLASS_URL) class Crdn05Controller extends cokr.xit.fims.crdn.web.Crdn05Controller { diff --git a/src/main/java/cokr/xit/fims/task/web/EcaController.java b/src/main/java/cokr/xit/fims/task/web/EcaController.java index 8fdc1efb..2aef3400 100644 --- a/src/main/java/cokr/xit/fims/task/web/EcaController.java +++ b/src/main/java/cokr/xit/fims/task/web/EcaController.java @@ -192,17 +192,6 @@ public class EcaController { } - @Controller - @RequestMapping(name="전기차과태료업무 과태료감경자료 업무", value=CLASS_URL+Crdn04Controller.CLASS_URL) - class Crdn04Controller extends cokr.xit.fims.crdn.web.Crdn04Controller { - - @Override - @RequestMapping(name="전기차과태료업무 감경자료 목록 조회", value=METHOD_URL.getFineReductionDataList) - public ModelAndView getFineReductionDataList(CrdnQuery query) { - return super.getFineReductionDataList(query); - } - - } @Controller @RequestMapping(name="전기차과태료업무 단속등록업무", value=CLASS_URL+Crdn05Controller.CLASS_URL) 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 9c0e93b1..c9d993a8 100644 --- a/src/main/java/cokr/xit/fims/task/web/PvsController.java +++ b/src/main/java/cokr/xit/fims/task/web/PvsController.java @@ -204,17 +204,6 @@ public class PvsController { } - @Controller - @RequestMapping(name="주정차과태료업무 과태료감경자료 업무", value=CLASS_URL+Crdn04Controller.CLASS_URL) - class Crdn04Controller extends cokr.xit.fims.crdn.web.Crdn04Controller { - - @Override - @RequestMapping(name="주정차과태료업무 감경자료 목록 조회", value=METHOD_URL.getFineReductionDataList) - public ModelAndView getFineReductionDataList(CrdnQuery query) { - return super.getFineReductionDataList(query); - } - - } @Controller @RequestMapping(name="주정차과태료업무 단속등록업무", value=CLASS_URL+Crdn05Controller.CLASS_URL) 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 86a61794..c4baec17 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 @@ -404,54 +404,4 @@ SELECT C.CRDN_ID - - - \ No newline at end of file diff --git a/src/main/resources/sql/mapper/fims/levy/rduct-mapper.xml b/src/main/resources/sql/mapper/fims/levy/rduct-mapper.xml index b737a58b..951c0227 100644 --- a/src/main/resources/sql/mapper/fims/levy/rduct-mapper.xml +++ b/src/main/resources/sql/mapper/fims/levy/rduct-mapper.xml @@ -33,7 +33,7 @@ , R.RDUCT_RSN_CD /* 감경 사유 코드 */ , (SELECT FN_GET_CODE_NM('FIM019', R.RDUCT_RSN_CD) FROM DUAL) AS RDUCT_RSN_NM /* 감경 사유 명 */ , R.RDUCT_AMT /* 감경 금액 */ - , R.ETC_CN /* 기타 내용 */ + , R.ETC_CN AS RDUCT_ETC_CN /* 감액 기타 내용 */ , R.DEL_YN /* 삭제 여부 */ , R.REG_DT /* 등록 일시 */ , R.RGTR /* 등록자 */ @@ -45,14 +45,50 @@ , R.DLTR /* 삭제자 */ , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = R.DLTR) AS DLTR_NM /* 삭제자 명 */ , R.DEL_RSN /* 삭제 사유 */ - FROM TB_RDUCT R + , CONCAT(C.CRDN_YMD,'',C.CRDN_TM) AS CRDN_YMD_TM /* 단속 일시 */ + , C.VHRNO /* 차량 번호 */ + , C.FFNLG_AMT /* 과태료금액 */ + , C.ADVNTCE_AMT /* 사전통지금액 */ + , C.MINUS_AMT /* 감경금액 */ + , C.ADTN_AMT /* 가산금액 */ + , C.RCVMT_AMT /* 수납금액 */ + , 0 AS BLNC /* 잔액 */ + , C.CRDN_STTS_CD /* 처리상태 */ + FROM TB_CRDN C + INNER JOIN TB_RDUCT R ON (C.CRDN_ID = R.CRDN_ID AND R.DEL_YN = 'N') - + /* 과태료 감경 대장 목록 조회(rductMapper.selectRductList) */ - - + WHERE C.DEL_YN = 'N' + AND C.TASK_SE_CD = #{taskSeCd} + + + + + + R.RDUCT_YMD + R.RDUCT_RSN_CD + C.CRDN_YMD + C.VHRNO + R.RDUCT_AMT + R.ETC_CN + C.CRDN_STTS_CD + + #{term} + + + + + + AND C.CRDN_ID = #{crdnId} + + AND R.RDUCT_YMD = ]]> #{schRductYmdFrom} + AND R.RDUCT_YMD #{schRductYmdTo} + + diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp similarity index 78% rename from src/main/webapp/WEB-INF/jsp/fims/crdn/crdn04010-main.jsp rename to src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp index fffe751b..ac70ecae 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp @@ -56,9 +56,10 @@
- -
    -
+ +
    +
@@ -72,7 +73,7 @@ - @@ -93,8 +94,8 @@ style="min-width: 80px;">처리상태 - -