부과 수정.

main
JoJH 4 days ago
parent 26bcbc95f2
commit 8b641e44f9

@ -36,7 +36,7 @@ import cokr.xit.foundation.data.DataObject;
* *
* <pre> * <pre>
* ============ ============ * ============ ============
* 2023-08-30 JoJH * 2023-08-30 JoJH
* ================================ * ================================
* </pre> * </pre>
*/ */
@ -44,300 +44,299 @@ import cokr.xit.foundation.data.DataObject;
@RequestMapping(name="부과", value=Levy01Controller.CLASS_URL) @RequestMapping(name="부과", value=Levy01Controller.CLASS_URL)
public class Levy01Controller extends ApplicationController { public class Levy01Controller extends ApplicationController {
public static final String CLASS_URL = "/levy/levy01"; public static final String CLASS_URL = "/levy/levy01";
public class METHOD_URL { public class METHOD_URL {
public static final String public static final String
reductionLevyTargetMain = "/010/main.do" // 사전 감경부과 대상 메인 화면 reductionLevyTargetMain = "/010/main.do" // 사전 감경부과 대상 메인 화면
, getReductionLevyTargetList = "/010/list.do" // 사전 감경부과 대상 대장 목록 조회 , getReductionLevyTargetList = "/010/list.do" // 사전 감경부과 대상 대장 목록 조회
, getReductionLevyTargetInfo = "/020/info.do" // 사전 감경부과 대상 정보 , getReductionLevyTargetInfo = "/020/info.do" // 사전 감경부과 대상 정보
, createReductionLevyList = "/020/createRdctLevyList.do" // 사전 감경부과 등록 , createReductionLevyList = "/020/createRdctLevyList.do" // 사전 감경부과 등록
, levyMain = "/050/main.do" // 부과 관리 메인 화면 , levyMain = "/050/main.do" // 부과 관리 메인 화면
, getLevyList = "/050/list.do" // 부과 대장 목록 조회 , getLevyList = "/050/list.do" // 부과 대장 목록 조회
; ;
} }
/**부과 대장 서비스*/ /**부과 대장 서비스*/
@Resource(name="levyService") @Resource(name="levyService")
private LevyService levyService; private LevyService levyService;
/**업무 정보 서비스 */ /**업무 정보 서비스 */
@Resource(name="taskBean") @Resource(name="taskBean")
private TaskBean taskBean; private TaskBean taskBean;
/**설정 정보 Bean */ /**설정 정보 Bean */
@Resource(name="stngBean") @Resource(name="stngBean")
private StngBean stngBean; private StngBean stngBean;
/** (levy/levy01010-main) . /** (levy/levy01010-main) .
* @return * @return
*/ */
@RequestMapping(name="사전 감경부과 등록 메인", value=METHOD_URL.reductionLevyTargetMain) @RequestMapping(name="사전 감경부과 등록 메인", value=METHOD_URL.reductionLevyTargetMain)
public ModelAndView reductionLevyTargetMain() { public ModelAndView reductionLevyTargetMain() {
ModelAndView mav = new ModelAndView("fims/levy/levy01010-main"); ModelAndView mav = new ModelAndView("fims/levy/levy01010-main");
// 사용자 정보 // 사용자 정보
FimsUser fimsUser = (FimsUser)currentUser().getUser(); FimsUser fimsUser = (FimsUser)currentUser().getUser();
// View(jsp)에서 사용할 공통코드를 조회 // View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM004", "FIM005", "FIM006", "FIM054", "FIM061", "FIM064"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM004", "FIM005", "FIM006", "FIM054", "FIM061", "FIM064");
addCodes(commonCodes, mav, "FIM004", "FIM005", "FIM006", "FIM061", "FIM064");
addCodes(commonCodes, mav, "FIM004", "FIM005", "FIM006", "FIM061", "FIM064");
return mav
return mav .addObject("pageName", "levy01010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("pageName", "levy01010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("prefixUrl", CLASS_URL) // prefixUrl
.addObject("infoPrefixUrl", CLASS_URL) // prefixUrl .addObject("sggCd", fimsUser.getOrgID()) // 시군구 코드(SGG_CD)
.addObject("sggCd", fimsUser.getOrgID()) // 시군구 코드(SGG_CD) .addObject("taskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054"))) // 업무 구분 코드(TASK_SE_CD)
.addObject("taskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054"))) // 업무 구분 코드(TASK_SE_CD) ;
; }
}
/** .
/** . * {@link LevyService#getRdctLevyTrgtList(LevyQuery)}
* {@link LevyService#getRdctLevyTrgtList(LevyQuery)} * @param req
* @param req * @return jsonView
* @return jsonView * <pre><code> {
* <pre><code> { * "levyList": [ ]
* "levyList": [ ] * "levyStart":
* "levyStart": * "levyFetch":
* "levyFetch": * "levyTotal":
* "levyTotal": * }</code></pre>
* }</code></pre> */
*/ @Task({"PVS","BPV"})
@Task({"PVS","BPV"}) @RequestMapping(name="사전 감경부과 대상 목록 조회", value=METHOD_URL.getReductionLevyTargetList)
@RequestMapping(name="사전 감경부과 대상 목록 조회", value=METHOD_URL.getReductionLevyTargetList) public ModelAndView getReductionLevyTargetList(LevyQuery req) {
public ModelAndView getReductionLevyTargetList(LevyQuery req) { if (!"xls".equals(req.getDownload())) {
if (!"xls".equals(req.getDownload())) { List<?> result = levyService.getRdctLevyTrgtList(setFetchSize(req));
List<?> result = levyService.getRdctLevyTrgtList(setFetchSize(req)); return setPagingInfo(new ModelAndView("jsonView"), result, "");
return setCollectionInfo(new ModelAndView("jsonView"), result, ""); } else {
} else { // 현재 날짜 구하기
// 현재 날짜 구하기 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis());
String dateTime = dateFormat.format(System.currentTimeMillis());
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType());
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType());
XLSWriter xlsx = new XLSWriter().worksheet(0);
XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx);
Format format = new Format(xlsx); CellStyle center = format.cellStyle(Style.CENTER);
CellStyle center = format.cellStyle(Style.CENTER); CellStyle numeric = format.n_nn0();
CellStyle numeric = format.n_nn0(); CellStyle dateYMD = format.yyyy_mm_dd();
CellStyle dateYMD = format.yyyy_mm_dd(); CellStyle dateDT = format.yyyy_mm_dd_hh_mm_ss();
CellStyle dateDT = format.yyyy_mm_dd_hh_mm_ss();
List<DataObject> list = levyService.getRdctLevyTrgtList(req.setFetchSize(0));
List<DataObject> list = levyService.getRdctLevyTrgtList(req.setFetchSize(0));
Map<String,Object> valueMap = new HashMap<String,Object>();
Map<String,Object> valueMap = new HashMap<String,Object>(); valueMap.put("업무구분", format.of("TASK_SE_NM").style(center));
valueMap.put("업무구분", format.of("TASK_SE_NM").style(center)); valueMap.put("단속일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "CRDN_YMD_TM").style(dateDT));
valueMap.put("단속일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "CRDN_YMD_TM").style(dateDT)); valueMap.put("차량번호", format.of("VHRNO"));
valueMap.put("차량번호", format.of("VHRNO")); valueMap.put("법정동", format.of("CRDN_STDG_NM"));
valueMap.put("법정동", format.of("CRDN_STDG_NM")); valueMap.put("단속장소", format.of("CRDN_PLC"));
valueMap.put("단속장소", format.of("CRDN_PLC")); valueMap.put("위반항목", format.of("VLTN_ARTCL"));
valueMap.put("위반항목", format.of("VLTN_ARTCL")); valueMap.put("단속원금", format.of("FFNLG_CRDN_AMT").style(numeric));
valueMap.put("단속원금", format.of("FFNLG_CRDN_AMT").style(numeric)); valueMap.put("과태료금액", format.of("FFNLG_AMT").style(numeric));
valueMap.put("과태료금액", format.of("FFNLG_AMT").style(numeric)); valueMap.put("처리상태", format.of("CRDN_STTS_NM"));
valueMap.put("처리상태", format.of("CRDN_STTS_NM"));
valueMap.put("민원접수일자", FormatMaker.yyyy_mm_dd(format, "CVLCPT_RCPT_YMD").style(dateYMD)); valueMap.put("민원접수일자", FormatMaker.yyyy_mm_dd(format, "CVLCPT_RCPT_YMD").style(dateYMD));
valueMap.put("민원신청번호", format.of("CVLCPT_APLY_NO").style(center)); valueMap.put("민원신청번호", format.of("CVLCPT_APLY_NO").style(center));
valueMap.put("민원접수번호", format.of("CVLCPT_RCPT_NO").style(center)); valueMap.put("민원접수번호", format.of("CVLCPT_RCPT_NO").style(center));
valueMap.put("민원담당자", format.of("CVLCPT_PRCS_PIC_NM").style(center)); valueMap.put("민원담당자", format.of("CVLCPT_PRCS_PIC_NM").style(center));
valueMap.put("민원처리일시", FormatMaker.yyyy_mm_dd(format, "CVLCPT_PRCS_CMPTN_DT").style(dateYMD)); valueMap.put("민원처리일시", FormatMaker.yyyy_mm_dd(format, "CVLCPT_PRCS_CMPTN_DT").style(dateYMD));
valueMap.put("민원전송결과", format.of("CVLCPT_TRSM_NM").style(center)); valueMap.put("민원전송결과", format.of("CVLCPT_TRSM_NM").style(center));
valueMap.put("납부자구분", format.of("RTPYR_SE_NM").style(center)); valueMap.put("납부자구분", format.of("RTPYR_SE_NM").style(center));
valueMap.put("납부자번호", format.of("RTPYR_NO").style(center)); valueMap.put("납부자번호", format.of("RTPYR_NO").style(center));
valueMap.put("납부자명", format.of("RTPYR_NM")); valueMap.put("납부자명", format.of("RTPYR_NM"));
valueMap.put("우편번호", format.of("ZIP").style(center)); valueMap.put("우편번호", format.of("ZIP").style(center));
valueMap.put("주소", format.of("ADDR")); valueMap.put("주소", format.of("ADDR"));
valueMap.put("상세주소", format.of("DTL_ADDR")); valueMap.put("상세주소", format.of("DTL_ADDR"));
valueMap.put("등록일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "REG_DT").style(dateDT)); valueMap.put("등록일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "REG_DT").style(dateDT));
valueMap.put("등록사용자", format.of("RGTR_NM").style(center)); valueMap.put("등록사용자", format.of("RGTR_NM").style(center));
valueMap.put("수정일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "MDFCN_DT").style(dateDT)); valueMap.put("수정일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "MDFCN_DT").style(dateDT));
valueMap.put("수정사용자", format.of("MDFR_NM").style(center)); valueMap.put("수정사용자", format.of("MDFR_NM").style(center));
CellDef.setValues(cellDefs, valueMap); CellDef.setValues(cellDefs, valueMap);
xlsx.cell(0, 0).value("사전 감경부과 대상").value(center).merge(0, cellDefs.size() - 1) xlsx.cell(0, 0).value("사전 감경부과 대상").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)))
.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList()));
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("사전감경부과대상" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("사전감경부과대상" + "_목록_" + dateTime + ".xlsx"));
} }
} }
/** (info) . /** (info) .
* @param req * @param req
* @return fims/levy/levy01020-info jsonView * @return fims/levy/levy01020-info jsonView
* <pre>{ * <pre>{
* "rdctLevyYmdInfo": * "rdctLevyYmdInfo":
* }</pre> * }</pre>
*/ */
@Task({"PVS","BPV"}) @Task({"PVS","BPV"})
@RequestMapping(name="사전 감경부과 정보 조회", value=METHOD_URL.getReductionLevyTargetInfo) @RequestMapping(name="사전 감경부과 정보 조회", value=METHOD_URL.getReductionLevyTargetInfo)
public ModelAndView getReductionLevyTargetInfo(HttpServletRequest hReq, LevyQuery req) { public ModelAndView getReductionLevyTargetInfo(HttpServletRequest hReq, LevyQuery req) {
// 감경 부과일자 // 감경 부과일자
DataObject info = taskBean.getAdvntceYmdInfo(new CmmnQuery().setSggCd(req.getSggCd()) DataObject info = taskBean.getAdvntceYmdInfo(new CmmnQuery().setSggCd(req.getSggCd())
.setTaskSeCd(req.getTaskSeCd())); .setTaskSeCd(req.getTaskSeCd()));
boolean json = jsonResponse(); boolean json = jsonResponse();
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/levy/levy01020-info"); ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/levy/levy01020-info");
// 이전에 조회되었던 총건수, 금액 // 이전에 조회되었던 총건수, 금액
info.put("TNOCS", req.getTnocs()); info.put("TNOCS", req.getTnocs());
info.put("GRAMT_FFNLG_AMT", req.getGramtFfnlgAmt()); info.put("GRAMT_FFNLG_AMT", req.getGramtFfnlgAmt());
info.put("GRAMT_ADVNTCE_AMT", req.getGramtAdvntceAmt()); info.put("GRAMT_ADVNTCE_AMT", req.getGramtAdvntceAmt());
return mav return mav
.addObject("callPurpose", req.getCallPurpose()) // 호출 용도 .addObject("callPurpose", req.getCallPurpose()) // 호출 용도
.addObject("pageName", "levy01020") // jsp pageName .addObject("pageName", "levy01020") // jsp pageName
.addObject("infoPrefixUrl", CLASS_URL) // prefixUrl .addObject("prefixUrl", CLASS_URL) // prefixUrl
.addObject("mainQuery", json ? req : toJson(req)) // 검색 조건 .addObject("mainQuery", json ? req : toJson(req)) // 검색 조건
.addObject("info", json ? info : toJson(info)) .addObject("Info", json ? info : toJson(info))
; ;
} }
/** . /** .
* @param levy * @param levy
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "saved": true, false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@Task({"PVS","BPV"}) @Task({"PVS","BPV"})
@RequestMapping(name="사전 감경부과 대장 등록", value=METHOD_URL.createReductionLevyList) @RequestMapping(name="사전 감경부과 대장 등록", value=METHOD_URL.createReductionLevyList)
public ModelAndView createReductionLevyList(LevyQuery req) { public ModelAndView createReductionLevyList(LevyQuery req) {
boolean saved = false; boolean saved = false;
String rtnMsg = levyService.createRdctLevyList(req); String rtnMsg = levyService.createRdctLevyList(req);
if (rtnMsg.contains("[S]")) { if (rtnMsg.contains("[S]")) {
saved = true; saved = true;
} else { } else {
saved = false; saved = false;
} }
return new ModelAndView("jsonView") return new ModelAndView("jsonView")
.addObject("saved", saved) .addObject("saved", saved)
.addObject("rtnMsg", rtnMsg); .addObject("rtnMsg", rtnMsg);
} }
/** (levy/levy01050-main) . /** (levy/levy01050-main) .
* @return * @return
*/ */
@RequestMapping(name="부과 관리 메인", value=METHOD_URL.levyMain) @RequestMapping(name="부과 관리 메인", value=METHOD_URL.levyMain)
public ModelAndView levyMain() { public ModelAndView levyMain() {
ModelAndView mav = new ModelAndView("fims/levy/levy01050-main"); ModelAndView mav = new ModelAndView("fims/levy/levy01050-main");
// 사용자 정보 // 사용자 정보
FimsUser fimsUser = (FimsUser)currentUser().getUser(); FimsUser fimsUser = (FimsUser)currentUser().getUser();
// View(jsp)에서 사용할 공통코드를 조회 // View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM010", "FIM046", "FIM054"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM010", "FIM046", "FIM054");
return mav return mav
.addObject("pageName", "levy01050") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("pageName", "levy01050") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefixUrl", CLASS_URL) // prefixUrl .addObject("prefixUrl", CLASS_URL) // prefixUrl
.addObject("sggCd", fimsUser.getOrgID()) // 시군구 코드(SGG_CD) .addObject("sggCd", fimsUser.getOrgID()) // 시군구 코드(SGG_CD)
.addObject("taskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054"))) // 업무 구분 코드(TASK_SE_CD) .addObject("taskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054"))) // 업무 구분 코드(TASK_SE_CD)
.addObject("FIM010List", commonCodes.get("FIM010")) // 단속 상태 코드(CRDN_STTS_CD) .addObject("FIM010List", commonCodes.get("FIM010")) // 단속 상태 코드(CRDN_STTS_CD)
.addObject("FIM046List", commonCodes.get("FIM046")) // 감경 구분 코드(RDCT_SE_CD) .addObject("FIM046List", commonCodes.get("FIM046")) // 감경 구분 코드(RDCT_SE_CD)
; ;
} }
/** . /** .
* {@link LevyService#getLevyList(LevyQuery)} * {@link LevyService#getLevyList(LevyQuery)}
* @param req * @param req
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "levyList": [ ] * "levyList": [ ]
* "levyStart": * "levyStart":
* "levyFetch": * "levyFetch":
* "levyTotal": * "levyTotal":
* }</code></pre> * }</code></pre>
*/ */
@Task @Task
@RequestMapping(name="부과 대장 목록 조회", value=METHOD_URL.getLevyList) @RequestMapping(name="부과 대장 목록 조회", value=METHOD_URL.getLevyList)
public ModelAndView getLevyList(LevyQuery req) { public ModelAndView getLevyList(LevyQuery req) {
if (!"xls".equals(req.getDownload())) { if (!"xls".equals(req.getDownload())) {
List<?> result = levyService.getLevyList(setFetchSize(req)); List<?> result = levyService.getLevyList(setFetchSize(req));
return setCollectionInfo(new ModelAndView("jsonView"), result, ""); return setPagingInfo(new ModelAndView("jsonView"), result, "");
} else { } else {
// 현재 날짜 구하기 // 현재 날짜 구하기
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String dateTime = dateFormat.format(System.currentTimeMillis()); String dateTime = dateFormat.format(System.currentTimeMillis());
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType());
XLSWriter xlsx = new XLSWriter().worksheet(0); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(Style.CENTER); CellStyle center = format.cellStyle(Style.CENTER);
CellStyle numeric = format.n_nn0(); CellStyle numeric = format.n_nn0();
CellStyle dateYMD = format.yyyy_mm_dd(); CellStyle dateYMD = format.yyyy_mm_dd();
CellStyle dateDT = format.yyyy_mm_dd_hh_mm_ss(); CellStyle dateDT = format.yyyy_mm_dd_hh_mm_ss();
List<DataObject> list = levyService.getLevyList(req.setFetchSize(0)); List<DataObject> list = levyService.getLevyList(req.setFetchSize(0));
Map<String,Object> valueMap = new HashMap<String,Object>(); Map<String,Object> valueMap = new HashMap<String,Object>();
valueMap.put("업무구분", format.of("TASK_SE_NM").style(center)); valueMap.put("업무구분", format.of("TASK_SE_NM").style(center));
valueMap.put("회계연도", format.of("FYR").style(center)); valueMap.put("회계연도", format.of("FYR").style(center));
valueMap.put("회계코드", format.of("ACNTG_SE_CD").style(center)); valueMap.put("회계코드", format.of("ACNTG_SE_CD").style(center));
valueMap.put("세목코드", format.of("TXITM_CD").style(center)); valueMap.put("세목코드", format.of("TXITM_CD").style(center));
valueMap.put("세목명", format.of("TXITM_NM").style(center)); valueMap.put("세목명", format.of("TXITM_NM").style(center));
valueMap.put("부과번호", format.of("LEVY_NO").style(center)); valueMap.put("부과번호", format.of("LEVY_NO").style(center));
valueMap.put("분납순번", format.of("ISPY_SN").style(center)); valueMap.put("분납순번", format.of("ISPY_SN").style(center));
valueMap.put("부과구분", format.of("LEVY_SE_NM").style(center)); valueMap.put("부과구분", format.of("LEVY_SE_NM").style(center));
valueMap.put("통합구분", format.of("UNTY_SE_NM").style(center)); valueMap.put("통합구분", format.of("UNTY_SE_NM").style(center));
valueMap.put("감경구분", format.of("RDCT_SE_NM").style(center)); valueMap.put("감경구분", format.of("RDCT_SE_NM").style(center));
valueMap.put("부과일자", FormatMaker.yyyy_mm_dd(format, "LEVY_YMD").style(dateYMD)); valueMap.put("부과일자", FormatMaker.yyyy_mm_dd(format, "LEVY_YMD").style(dateYMD));
valueMap.put("최초납기일자", FormatMaker.yyyy_mm_dd(format, "FRST_DUDT_YMD").style(dateYMD)); valueMap.put("최초납기일자", FormatMaker.yyyy_mm_dd(format, "FRST_DUDT_YMD").style(dateYMD));
valueMap.put("납기일자", FormatMaker.yyyy_mm_dd(format, "DUDT_YMD").style(dateYMD)); valueMap.put("납기일자", FormatMaker.yyyy_mm_dd(format, "DUDT_YMD").style(dateYMD));
valueMap.put("과태료금액", format.of("FFNLG_AMT").style(numeric)); valueMap.put("과태료금액", format.of("FFNLG_AMT").style(numeric));
valueMap.put("부과본세", format.of("LEVY_PCPTAX").style(numeric)); valueMap.put("부과본세", format.of("LEVY_PCPTAX").style(numeric));
valueMap.put("부과가산금", format.of("LEVY_ADAMT").style(numeric)); valueMap.put("부과가산금", format.of("LEVY_ADAMT").style(numeric));
valueMap.put("분납이자", format.of("ISPY_INT").style(numeric)); valueMap.put("분납이자", format.of("ISPY_INT").style(numeric));
valueMap.put("수납본세", format.of("RCVMT_PCPTAX").style(numeric)); valueMap.put("수납본세", format.of("RCVMT_PCPTAX").style(numeric));
valueMap.put("수납가산금", format.of("RCVMT_ADAMT").style(numeric)); valueMap.put("수납가산금", format.of("RCVMT_ADAMT").style(numeric));
valueMap.put("감액본세", format.of("RDAMT_PCPTAX").style(numeric)); valueMap.put("감액본세", format.of("RDAMT_PCPTAX").style(numeric));
valueMap.put("감액가산금", format.of("RDAMT_ADAMT").style(numeric)); valueMap.put("감액가산금", format.of("RDAMT_ADAMT").style(numeric));
valueMap.put("미납금액", format.of("SUM_AMT").style(numeric)); valueMap.put("미납금액", format.of("SUM_AMT").style(numeric));
valueMap.put("과세물건", format.of("TXTN_THING")); valueMap.put("과세물건", format.of("TXTN_THING"));
valueMap.put("체납사유", format.of("NPMNT_RSN_NM")); valueMap.put("체납사유", format.of("NPMNT_RSN_NM"));
valueMap.put("수납일자", FormatMaker.yyyy_mm_dd(format, "RCVMT_YMD").style(dateYMD)); valueMap.put("수납일자", FormatMaker.yyyy_mm_dd(format, "RCVMT_YMD").style(dateYMD));
valueMap.put("압류일자", FormatMaker.yyyy_mm_dd(format, "SZR_YMD").style(dateYMD)); valueMap.put("압류일자", FormatMaker.yyyy_mm_dd(format, "SZR_YMD").style(dateYMD));
valueMap.put("압류물건", format.of("SZR_THING")); valueMap.put("압류물건", format.of("SZR_THING"));
valueMap.put("대체압류차량", format.of("RPM_SZR_VHRNO")); valueMap.put("대체압류차량", format.of("RPM_SZR_VHRNO"));
valueMap.put("압류해제일자", FormatMaker.yyyy_mm_dd(format, "SZR_RMV_YMD").style(dateYMD)); valueMap.put("압류해제일자", FormatMaker.yyyy_mm_dd(format, "SZR_RMV_YMD").style(dateYMD));
valueMap.put("전자납부번호", format.of("EPAYNO_MASK")); valueMap.put("전자납부번호", format.of("EPAYNO_MASK"));
valueMap.put("은행명", format.of("BANK_NM")); valueMap.put("은행명", format.of("BANK_NM"));
valueMap.put("가상계좌번호", format.of("VR_ACTNO").style(center)); valueMap.put("가상계좌번호", format.of("VR_ACTNO").style(center));
valueMap.put("은행명2", format.of("BANK_NM2")); valueMap.put("은행명2", format.of("BANK_NM2"));
valueMap.put("가상계좌번호2", format.of("VR_ACTNO2").style(center)); valueMap.put("가상계좌번호2", format.of("VR_ACTNO2").style(center));
valueMap.put("은행명3", format.of("BANK_NM3")); valueMap.put("은행명3", format.of("BANK_NM3"));
valueMap.put("가상계좌번호3", format.of("VR_ACTNO3").style(center)); valueMap.put("가상계좌번호3", format.of("VR_ACTNO3").style(center));
valueMap.put("단속일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "CRDN_YMD_TM").style(dateDT)); valueMap.put("단속일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "CRDN_YMD_TM").style(dateDT));
valueMap.put("차량번호", format.of("VHRNO")); valueMap.put("차량번호", format.of("VHRNO"));
valueMap.put("법정동", format.of("CRDN_STDG_NM")); valueMap.put("법정동", format.of("CRDN_STDG_NM"));
valueMap.put("단속장소", format.of("CRDN_PLC")); valueMap.put("단속장소", format.of("CRDN_PLC"));
valueMap.put("위반항목", format.of("VLTN_ARTCL")); valueMap.put("위반항목", format.of("VLTN_ARTCL"));
valueMap.put("단속원금", format.of("FFNLG_CRDN_AMT").style(numeric)); valueMap.put("단속원금", format.of("FFNLG_CRDN_AMT").style(numeric));
valueMap.put("처리상태", format.of("CRDN_STTS_NM")); valueMap.put("처리상태", format.of("CRDN_STTS_NM"));
valueMap.put("납부자구분", format.of("RTPYR_SE_NM").style(center)); valueMap.put("납부자구분", format.of("RTPYR_SE_NM").style(center));
valueMap.put("납부자번호", format.of("RTPYR_NO").style(center)); valueMap.put("납부자번호", format.of("RTPYR_NO").style(center));
valueMap.put("납부자명", format.of("RTPYR_NM")); valueMap.put("납부자명", format.of("RTPYR_NM"));
valueMap.put("우편번호", format.of("ZIP").style(center)); valueMap.put("우편번호", format.of("ZIP").style(center));
valueMap.put("주소", format.of("ADDR")); valueMap.put("주소", format.of("ADDR"));
valueMap.put("상세주소", format.of("DTL_ADDR")); valueMap.put("상세주소", format.of("DTL_ADDR"));
valueMap.put("등록일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "REG_DT").style(dateDT)); valueMap.put("등록일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "REG_DT").style(dateDT));
valueMap.put("등록사용자", format.of("RGTR_NM").style(center)); valueMap.put("등록사용자", format.of("RGTR_NM").style(center));
valueMap.put("수정일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "MDFCN_DT").style(dateDT)); valueMap.put("수정일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "MDFCN_DT").style(dateDT));
valueMap.put("수정사용자", format.of("MDFR_NM").style(center)); valueMap.put("수정사용자", format.of("MDFR_NM").style(center));
CellDef.setValues(cellDefs, valueMap); CellDef.setValues(cellDefs, valueMap);
xlsx.cell(0, 0).value("부과").value(center).merge(0, cellDefs.size() - 1) xlsx.cell(0, 0).value("부과").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)))
.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList()));
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("부과" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("부과" + "_목록_" + dateTime + ".xlsx"));
} }
} }
} }

@ -36,7 +36,7 @@ import cokr.xit.foundation.data.DataObject;
* *
* <pre> * <pre>
* ============ ============ * ============ ============
* 2023-08-30 JoJH * 2023-08-30 JoJH
* ================================ * ================================
* </pre> * </pre>
*/ */
@ -44,248 +44,252 @@ import cokr.xit.foundation.data.DataObject;
@RequestMapping(name="과태료 감경 관리", value=Levy02Controller.CLASS_URL) @RequestMapping(name="과태료 감경 관리", value=Levy02Controller.CLASS_URL)
public class Levy02Controller extends ApplicationController { public class Levy02Controller extends ApplicationController {
public static final String CLASS_URL = "/levy/levy02"; public static final String CLASS_URL = "/levy/levy02";
public class METHOD_URL { public class METHOD_URL {
public static final String public static final String
reductionMain = "/010/main.do" // 과태료 감경 관리 메인 화면 reductionMain = "/010/main.do" // 과태료 감경 관리 메인 화면
, getReductionList = "/010/list.do" // 과태료 감경 대장 목록 조회 , getReductionList = "/010/list.do" // 과태료 감경 대장 목록 조회
, removeReduction = "/010/remove.do" // 과태료 감경 대장 삭제 , removeReduction = "/010/remove.do" // 과태료 감경 대장 삭제
, getReductionInfo = "/020/info.do" // 과태료 감경 정보 조회 , getReductionInfo = "/020/info.do" // 과태료 감경 정보 조회
, createReduction = "/020/create.do" // 과태료 감경 대장 등럭 , createReduction = "/020/create.do" // 과태료 감경 대장 등럭
, updateReduction = "/020/update.do" // 과태료 감경 대장 수정 , updateReduction = "/020/update.do" // 과태료 감경 대장 수정
; ;
} }
/**과태료 감경 대장 서비스*/ /**과태료 감경 대장 서비스*/
@Resource(name="rdctService") @Resource(name="rdctService")
private RdctService rdctService; private RdctService rdctService;
@Resource(name="stngBean") @Resource(name="stngBean")
private StngBean stngBean; private StngBean stngBean;
@Resource(name="userMapper") @Resource(name="userMapper")
protected UserMapper userMapper; protected UserMapper userMapper;
/** (levy/levy02010-main) . /** (levy/levy02010-main) .
* {@link #getRdctList(RdctQuery) } . * {@link #getRdctList(RdctQuery) } .
* @return /rdct/rdct-main * @return /rdct/rdct-main
*/ */
@RequestMapping(name="과태료 감경 관리 대장 메인", value=METHOD_URL.reductionMain) @RequestMapping(name="과태료 감경 관리 대장 메인", value=METHOD_URL.reductionMain)
public ModelAndView reductionMain() { public ModelAndView reductionMain() {
ModelAndView mav = new ModelAndView("fims/levy/levy02010-main"); ModelAndView mav = new ModelAndView("fims/levy/levy02010-main");
// 사용자 정보 // 사용자 정보
FimsUser fimsUser = (FimsUser)currentUser().getUser(); FimsUser fimsUser = (FimsUser)currentUser().getUser();
// View(jsp)에서 사용할 공통코드를 조회 // View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM010", "FIM019", "FIM054"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM019", "FIM054");
return mav return mav
.addObject("pageName", "levy02010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("pageName", "levy02010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "rdct") // prefix .addObject("prefixUrl", CLASS_URL) // prefixUrl
.addObject("infoPrefixUrl", CLASS_URL) // prefixUrl .addObject("sggCd", fimsUser.getOrgID()) // 시군구 코드(SGG_CD)
.addObject("sggCd", fimsUser.getOrgID()) // 시군구 코드(SGG_CD) .addObject("taskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054"))) // 업무 구분 코드(TASK_SE_CD)
.addObject("taskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054"))) // 업무 구분 코드(TASK_SE_CD) .addObject("FIM019List", commonCodes.get("FIM019")) // 감경 사유 구분 코드(RDCT_RSN_CD)
.addObject("FIM019List", commonCodes.get("FIM019")) // 감경 사유 구분 코드(RDCT_RSN_CD) ;
; }
}
/** .<br />
/** .<br /> * {@link RdctService#getRdctList(RdctQuery)}
* {@link RdctService#getRdctList(RdctQuery)} * @param req
* @param req * @return jsonView
* @return jsonView * <pre><code> {
* <pre><code> { * "rdctList": [ ]
* "rdctList": [ ] * "rdctStart":
* "rdctStart": * "rdctFetch":
* "rdctFetch": * "rdctTotal":
* "rdctTotal": * }</code></pre>
* }</code></pre> */
*/ @Task
@Task @RequestMapping(name="과태료 감경 대장 목록 조회", value=METHOD_URL.getReductionList)
@RequestMapping(name="과태료 감경 대장 목록 조회", value=METHOD_URL.getReductionList) public ModelAndView getRdctList(LevyQuery req) {
public ModelAndView getRdctList(LevyQuery req) { if (!"xls".equals(req.getDownload())) {
if (!"xls".equals(req.getDownload())) { List<?> result = rdctService.getRdctList(setFetchSize(req));
List<?> result = rdctService.getRdctList(setFetchSize(req)); return setPagingInfo(new ModelAndView("jsonView"), result, "");
return setCollectionInfo(new ModelAndView("jsonView"), result, "rdct"); } else {
} else { // 현재 날짜 구하기
// 현재 날짜 구하기 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis());
String dateTime = dateFormat.format(System.currentTimeMillis());
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType());
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType());
XLSWriter xlsx = new XLSWriter().worksheet(0);
XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx);
Format format = new Format(xlsx); CellStyle center = format.cellStyle(Style.CENTER);
CellStyle center = format.cellStyle(Style.CENTER); CellStyle numeric = format.n_nn0();
CellStyle numeric = format.n_nn0(); CellStyle dateYMD = format.yyyy_mm_dd();
CellStyle dateYMD = format.yyyy_mm_dd(); CellStyle dateDT = format.yyyy_mm_dd_hh_mm_ss();
CellStyle dateDT = format.yyyy_mm_dd_hh_mm_ss();
List<DataObject> list = rdctService.getRdctList(req.setFetchSize(0));
List<DataObject> list = rdctService.getRdctList(req.setFetchSize(0));
Map<String,Object> valueMap = new HashMap<String,Object>();
Map<String,Object> valueMap = new HashMap<String,Object>(); valueMap.put("업무구분", format.of("TASK_SE_NM").style(center));
valueMap.put("업무구분", format.of("TASK_SE_NM").style(center)); valueMap.put("감경일자", FormatMaker.yyyy_mm_dd(format, "RDCT_YMD").style(dateYMD));
valueMap.put("감경일자", FormatMaker.yyyy_mm_dd(format, "RDCT_YMD").style(dateYMD)); valueMap.put("감경사유", format.of("RDCT_RSN_NM"));
valueMap.put("감경사유", format.of("RDCT_RSN_NM")); valueMap.put("기타내용", format.of("ETC_CN"));
valueMap.put("기타내용", format.of("ETC_CN")); valueMap.put("단속일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "CRDN_YMD_TM").style(dateDT));
valueMap.put("단속일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "CRDN_YMD_TM").style(dateDT)); valueMap.put("차량번호", format.of("VHRNO"));
valueMap.put("차량번호", format.of("VHRNO")); valueMap.put("납부자구분", format.of("RTPYR_SE_NM").style(center));
valueMap.put("납부자구분", format.of("RTPYR_SE_NM").style(center)); valueMap.put("납부자번호", format.of("RTPYR_NO").style(center));
valueMap.put("납부자번호", format.of("RTPYR_NO").style(center)); valueMap.put("납부자명", format.of("RTPYR_NM"));
valueMap.put("납부자명", format.of("RTPYR_NM")); valueMap.put("단속법정동", format.of("CRDN_STDG_NM").style(center));
valueMap.put("단속법정동", format.of("CRDN_STDG_NM").style(center)); valueMap.put("단속장소", format.of("CRDN_PLC"));
valueMap.put("단속장소", format.of("CRDN_PLC")); valueMap.put("상세단속장소", format.of("DTL_CRDN_PLC"));
valueMap.put("상세단속장소", format.of("DTL_CRDN_PLC")); valueMap.put("단속원금", format.of("FFNLG_CRDN_AMT").style(numeric));
valueMap.put("단속원금", format.of("FFNLG_CRDN_AMT").style(numeric)); valueMap.put("감경금액", format.of("RDCT_AMT").style(numeric));
valueMap.put("감경금액", format.of("RDCT_AMT").style(numeric)); valueMap.put("과태료금액", format.of("FFNLG_AMT").style(numeric));
valueMap.put("과태료금액", format.of("FFNLG_AMT").style(numeric)); valueMap.put("미납금액", format.of("SUM_AMT").style(numeric));
valueMap.put("미납금액", format.of("SUM_AMT").style(numeric)); valueMap.put("처리상태", format.of("CRDN_STTS_NM"));
valueMap.put("처리상태", format.of("CRDN_STTS_NM")); valueMap.put("단속특별구역", format.of("CRDN_SPAREA_NM").style(center));
valueMap.put("단속특별구역", format.of("CRDN_SPAREA_NM").style(center)); valueMap.put("사용연료", format.of("USE_FUEL_NM").style(center));
valueMap.put("사용연료", format.of("USE_FUEL_NM").style(center)); valueMap.put("주차가능여부", format.of("PRK_PSBLTY_RSLT_NM").style(center));
valueMap.put("주차가능여부", format.of("PRK_PSBLTY_RSLT_NM").style(center)); valueMap.put("등록일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "REG_DT").style(dateDT));
valueMap.put("등록일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "REG_DT").style(dateDT)); valueMap.put("등록사용자", format.of("RGTR_NM").style(center));
valueMap.put("등록사용자", format.of("RGTR_NM").style(center)); valueMap.put("수정일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "MDFCN_DT").style(dateDT));
valueMap.put("수정일시", FormatMaker.yyyy_mm_dd_hh_mm_ss(format, "MDFCN_DT").style(dateDT)); valueMap.put("수정사용자", format.of("MDFR_NM").style(center));
valueMap.put("수정사용자", format.of("MDFR_NM").style(center));
CellDef.setValues(cellDefs, valueMap);
CellDef.setValues(cellDefs, valueMap);
xlsx.cell(0, 0).value("과태료감경").value(center).merge(0, cellDefs.size() - 1)
xlsx.cell(0, 0).value("과태료감경").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx)))
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList()));
.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList()));
return new ModelAndView("downloadView")
return new ModelAndView("downloadView") .addObject("download", xlsx.getDownloadable().setFilename("과태료감경" + "_목록_" + dateTime + ".xlsx"));
.addObject("download", xlsx.getDownloadable().setFilename("과태료감경" + "_목록_" + dateTime + ".xlsx")); }
} }
}
/** ID (info) .
/** ID (info) . * @param req
* @param req * @return fims/levy/levy02020-info jsonView
* @return fims/levy/levy02020-info jsonView * <pre>{
* <pre>{ * "rdctInfo":
* "rdctInfo": * }</pre>
* }</pre> */
*/ @Task
@Task @RequestMapping(name="과태료 감경 정보 조회", value=METHOD_URL.getReductionInfo)
@RequestMapping(name="과태료 감경 정보 조회", value=METHOD_URL.getReductionInfo) public ModelAndView getRdctInfo(HttpServletRequest hReq, LevyQuery req) {
public ModelAndView getRdctInfo(HttpServletRequest hReq, LevyQuery req) { // 상세 정보 조회
DataObject info = rdctService.getRdctInfo(req); DataObject rdctInfo = rdctService.getRdctInfo(req);
// 등록을 호출하였지만 등록된 감경 ID가 있는지 확인. if (req.getCallPurpose().equals("create")) { // 등록
if (req.getCallPurpose().equals("create") && !info.string("RDCT_ID").equals("")) { if (!rdctInfo.string("RDCT_ID").equals("")) {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");
return mav.addObject("rtnMsg", "이미 등록된 과태료 감경 정보가 있습니다.");
return mav.addObject("rtnMsg", "이미 등록된 과태료 감경 정보가 있습니다."); } else if (rdctInfo.string("RTPYR_ID").equals("")) {
} else if (req.getCallPurpose().equals("create") && info.string("RTPYR_ID").equals("")) { ModelAndView mav = new ModelAndView("jsonView");
ModelAndView mav = new ModelAndView("jsonView"); return mav.addObject("rtnMsg", "납부자 정보가 없습니다.");
}
return mav.addObject("rtnMsg", "납부자 정보가 없습니다."); } else if (req.getCallPurpose().equals("update")) { // 수정
} else { if (rdctInfo.string("RDCT_ID").equals("")) {
boolean json = jsonResponse(); ModelAndView mav = new ModelAndView("jsonView");
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/levy/levy02020-info"); return mav.addObject("rtnMsg", "조회된 과태료 감경 정보가 없습니다.");
}
// View(jsp)에서 사용할 공통코드를 조회 }
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM019");
boolean json = jsonResponse();
return mav ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/levy/levy02020-info");
.addObject("openerPageName", hReq.getParameter("openerPageName")) // 호출한 Jsp PageName
.addObject("callPurpose", req.getCallPurpose()) // 호출 용도 // View(jsp)에서 사용할 공통코드를 조회
.addObject("pageName", "levy02020") // jsp pageName Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM019");
.addObject("infoPrefix", "rdct") // prefix
.addObject("infoPrefixUrl", CLASS_URL) // prefixUrl return mav
.addObject("FIM019List", commonCodes.get("FIM019")) // 감경 사유 구분 코드(RDCT_RSN_CD) .addObject("callPurpose", req.getCallPurpose()) // 호출 용도
.addObject("rdctInfo", json ? info : toJson(info)) .addObject("pageName", "levy02020") // jsp pageName
; .addObject("prefixUrl", CLASS_URL) // prefixUrl
} .addObject("FIM019List", commonCodes.get("FIM019")) // 감경 사유 구분 코드(RDCT_RSN_CD)
} .addObject("Info", json ? rdctInfo : toJson(rdctInfo))
;
/** . }
* @param rdct
* @return jsonView /** .
* <pre><code> { * @param rdct
* "saved": true, false * @return jsonView
* }</code></pre> * <pre><code> {
*/ * "saved": true, false
@Task * }</code></pre>
@RequestMapping(name="과태료 감경 대장 등록", value=METHOD_URL.createReduction) */
public ModelAndView createRdct(Rdct rdct) { @Task
boolean saved = false; @RequestMapping(name="과태료 감경 대장 등록", value=METHOD_URL.createReduction)
String rtnMsg = rdctService.createRdct(rdct); public ModelAndView createRdct(Rdct rdct) {
boolean saved = false;
if (rtnMsg.contains("[S]")) { String rtnMsg = rdctService.createRdct(rdct);
saved = true;
} else { if (rtnMsg.contains("[S]")) {
saved = false; saved = true;
} } else {
saved = false;
return new ModelAndView("jsonView") }
.addObject("saved", saved)
.addObject("rtnMsg", rtnMsg); return new ModelAndView("jsonView")
} .addObject("saved", saved)
.addObject("rtnMsg", rtnMsg);
/** . }
* @param rdct
* @return jsonView /** .
* <pre><code> { * @param rdct
* "saved": true, false * @return jsonView
* }</code></pre> * <pre><code> {
*/ * "saved": true, false
@Task * }</code></pre>
@RequestMapping(name="과태료 감경 대장 수정", value=METHOD_URL.updateReduction) */
public ModelAndView updateRdct(Rdct rdct) { @Task
boolean saved = false; @RequestMapping(name="과태료 감경 대장 수정", value=METHOD_URL.updateReduction)
String rtnMsg = rdctService.updateRdct(rdct); public ModelAndView updateRdct(Rdct rdct) {
boolean saved = false;
if (rtnMsg.contains("[S]")) { String rtnMsg = rdctService.updateRdct(rdct);
saved = true;
} else { if (rtnMsg.contains("[S]")) {
saved = false; saved = true;
} } else {
saved = false;
return new ModelAndView("jsonView") }
.addObject("saved", saved)
.addObject("rtnMsg", rtnMsg); return new ModelAndView("jsonView")
} .addObject("saved", saved)
.addObject("rtnMsg", rtnMsg);
/** . }
* @param rdctId ID
* @return jsonView /** .
* <pre><code> { * @param rdctId ID
* "affected": * @return jsonView
* "saved": true, false * <pre><code> {
* }</code></pre> * "affected":
*/ * "saved": true, false
@Task * }</code></pre>
@RequestMapping(name="과태료 감경 대장 삭제", value=METHOD_URL.removeReduction) */
public ModelAndView removeRdct(Rdct rdct) { @Task
boolean saved = false; @RequestMapping(name="과태료 감경 대장 삭제", value=METHOD_URL.removeReduction)
String rtnMsg = ""; public ModelAndView removeRdct(Rdct rdct) {
boolean saved = false;
if (rdct.getRdctIds() == null || rdct.getRdctIds().length < 1) { String rtnMsg = "";
rtnMsg = rdctService.removeRdct(rdct);
} else { if (rdct.getRdctIds() == null || rdct.getRdctIds().length < 1) {
// 부과제외 Ids 만큼 반복.. rtnMsg = rdctService.removeRdct(rdct);
for (int iLoop = 0; iLoop < rdct.getRdctIds().length; iLoop++) { } else {
rdct.setRdctId(rdct.getRdctIds()[iLoop]); // 감경 ID 설정 // 감경 IDs 만큼 감경 삭제 반복..
for (String rdctId : rdct.getRdctIds()) {
// 부과제외 삭제 호출 Rdct deltRdct = new Rdct();
rtnMsg = rdctService.removeRdct(rdct); deltRdct.setRdctId(rdctId);
if (!rtnMsg.contains("[S]")) // 오류가 발생하였으면 종료.. deltRdct.setDelRsn(rdct.getDelRsn());
break;
} // 감경 삭제 호출
} rtnMsg = rdctService.removeRdct(deltRdct);
if (!rtnMsg.contains("[S]")) // 오류가 발생하였으면 종료..
if (rtnMsg.contains("[S]")) { break;
saved = true; }
} else { }
saved = false;
} if (rtnMsg.contains("[S]")) {
saved = true;
return new ModelAndView("jsonView") } else {
.addObject("saved", saved) saved = false;
.addObject("rtnMsg", rtnMsg); }
}
return new ModelAndView("jsonView")
.addObject("saved", saved)
.addObject("rtnMsg", rtnMsg);
}
} }

Loading…
Cancel
Save