면제차량 목록 조회 추가

main
이범준 1 year ago
parent db8d98fae6
commit afc95a70dc

@ -38,6 +38,7 @@ public class CrdnQuery extends CmmnQuery {
private String schCvlcptRcptYmdTo; private String schCvlcptRcptYmdTo;
private String schRductYmdFrom; private String schRductYmdFrom;
private String schRductYmdTo; private String schRductYmdTo;
private String crdnYmd;
private String schCrdnYmdFrom; private String schCrdnYmdFrom;
private String schCrdnYmdTo; private String schCrdnYmdTo;
private String schDmndYmdFrom; private String schDmndYmdFrom;
@ -67,6 +68,7 @@ public class CrdnQuery extends CmmnQuery {
//YN //YN
private String dstrbncYn; private String dstrbncYn;
private String towngYn; private String towngYn;
private String delYn;
//기타 //기타
private String vhrno; private String vhrno;
@ -154,6 +156,15 @@ public class CrdnQuery extends CmmnQuery {
return self(); return self();
} }
public String getDelYn() {
return ifEmpty(delYn, () -> null);
}
public <T extends CrdnQuery> T setDelYn(String delYn) {
this.delYn = delYn;
return self();
}
public String getVhrno() { public String getVhrno() {
return ifEmpty(vhrno, () -> null); return ifEmpty(vhrno, () -> null);
} }
@ -208,6 +219,15 @@ public class CrdnQuery extends CmmnQuery {
return self(); return self();
} }
public String getCrdnYmd() {
return ifEmpty(crdnYmd, () -> null);
}
public <T extends CrdnQuery> T setCrdnYmd(String crdnYmd) {
this.crdnYmd = crdnYmd;
return self();
}
public String getSchCrdnYmdFrom() { public String getSchCrdnYmdFrom() {
return ifEmpty(schCrdnYmdFrom, () -> null); return ifEmpty(schCrdnYmdFrom, () -> null);
} }

@ -1,10 +1,20 @@
package cokr.xit.fims.crdn.dao; package cokr.xit.fims.crdn.dao;
import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@Mapper("exmptnVhclMapper") @Mapper("exmptnVhclMapper")
public interface ExmptnVhclMapper extends AbstractMapper { public interface ExmptnVhclMapper extends AbstractMapper {
/** .<br />
* @param query
* @return
*/
List<DataObject> selectExemptionVehicleList(CrdnQuery query);
} }

@ -26,5 +26,9 @@ public interface CrdnStngService {
*/ */
DataObject getTeamInfo(String teamId); DataObject getTeamInfo(String teamId);
/** .
* @param query
* @return
*/
List<DataObject> getExemptionVehicleList(CrdnQuery query);
} }

@ -232,4 +232,12 @@ public class CrdnStngBean extends AbstractComponent {
return crdnTeamMapper.selectTeamInfo(teamId); return crdnTeamMapper.selectTeamInfo(teamId);
} }
/** .
* @param query
* @return
*/
public List<DataObject> selectExemptionVehicleList(CrdnQuery query) {
return exmptnVhclMapper.selectExemptionVehicleList(query);
}
} }

@ -38,4 +38,9 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng
return crdnStngBean.selectTeamInfo(teamId); return crdnStngBean.selectTeamInfo(teamId);
} }
@Override
public List<DataObject> getExemptionVehicleList(CrdnQuery query) {
return crdnStngBean.selectExemptionVehicleList(query);
}
} }

@ -1,10 +1,18 @@
package cokr.xit.fims.crdn.web; package cokr.xit.fims.crdn.web;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.crdn.service.CrdnStngService; import cokr.xit.fims.crdn.service.CrdnStngService;
/** .<br /> /** .<br />
@ -17,13 +25,20 @@ public class Crdn08Controller extends ApplicationController {
public class METHOD_URL { public class METHOD_URL {
public static final String public static final String
exemptionVehicleManagementMain = "/010/main.do" exemptionVehicleManagementMain = "/010/main.do"
, getExemptionVehicleList = "/010/list.do"
; ;
} }
@Resource(name="crdnStngService") @Resource(name="crdnStngService")
private CrdnStngService crdnStngService; private CrdnStngService crdnStngService;
@Resource(name="userMapper")
private UserMapper userMapper;
@Resource(name="globalStngMapper")
private GlobalStngMapper globalStngMapper;
/** . /** .
* @return fims/crdn/crdn08010-main * @return fims/crdn/crdn08010-main
*/ */
@ -32,7 +47,25 @@ public class Crdn08Controller extends ApplicationController {
mav.setViewName("fims/crdn/crdn08010-main"); mav.setViewName("fims/crdn/crdn08010-main");
mav.addObject("pageName", "crdn08010-main"); mav.addObject("pageName", "crdn08010-main");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054");
mav.addObject("FIM054List", commonCodes.get("FIM054"));
return mav; return mav;
} }
/** .<br />
* {@link CrdnStngService#getExemptionVehicleList(CrdnQuery)}
* @param query
* @return jsonView
*/
public ModelAndView getExemptionVehicleList(CrdnQuery query) {
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String curDeptCode = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(curDeptCode);
query.setSggCd(sggCd);
setFetchSize(query);
return setCollectionInfo(new ModelAndView("jsonView"), crdnStngService.getExemptionVehicleList(query),"");
}
} }

@ -308,6 +308,18 @@ public class BpvController {
} }
@Controller
@RequestMapping(name="전용차로과태료업무 면제차량 관리", value=CLASS_URL+Crdn08Controller.CLASS_URL)
class Crdn08Controller extends cokr.xit.fims.crdn.web.Crdn08Controller {
@Override
@RequestMapping(name="전용차로과태료업무 면제차량 목록 조회", value=METHOD_URL.getExemptionVehicleList)
public ModelAndView getExemptionVehicleList(CrdnQuery query) {
return super.getExemptionVehicleList(query);
}
}
@Controller @Controller
@RequestMapping(name="전용차로과태료업무 부과제외_부과제외관리", value=CLASS_URL+Excl01Controller.CLASS_URL) @RequestMapping(name="전용차로과태료업무 부과제외_부과제외관리", value=CLASS_URL+Excl01Controller.CLASS_URL)
class Excl01Controller extends cokr.xit.fims.excl.web.Excl01Controller { class Excl01Controller extends cokr.xit.fims.excl.web.Excl01Controller {

@ -1,4 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.crdn.dao.ExmptnVhclMapper"> <mapper namespace="cokr.xit.fims.crdn.dao.ExmptnVhclMapper">
<select id="selectExemptionVehicleList" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 면제차량 목록 조회(exmptnVhclMapper.selectExemptionVehicleList) */
<include refid="utility.paging-prefix"/>
SELECT A.EXMPTN_VHCL_ID
, A.VHRNO
, A.EXMPTN_RSN
, A.DOC_NO
, A.OWNR_NM
, A.EXMPTN_BGNG_YMD
, A.EXMPTN_END_YMD
, (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = A.RGTR) AS RGTR_NM
, A.REG_DT
, (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = A.MDFR) AS MDFR_NM
, A.MDFCN_DT
, (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = A.DLTR) AS DLTR_NM
, A.DEL_RSN
, A.DEL_DT
FROM TB_EXMPTN_VHCL A
WHERE A.SGG_CD = #{sggCd}
<if test="vhrno != null and vhrno != ''">
AND A.VHRNO = #{vhrno}
</if>
<if test="delYn != null and delYn != ''">
AND A.DEL_YN = #{delYn}
</if>
<if test="crdnYmd != null and crdnYmd !=''">
AND A.EXMPTN_BGNG_YMD <![CDATA[ <= ]]> #{crdnYmd}
AND A.EXMPTN_END_YMD <![CDATA[ >= ]]> #{crdnYmd}
</if>
<include refid="utility.sortBy" />
<include refid="utility.paging-suffix"/>
</select>
</mapper> </mapper>

@ -1,14 +1,320 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
pageEncoding="UTF-8"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!DOCTYPE html> <div class="content-wrapper">
<html> <div class="container-xxl flex-grow-1 px-0">
<head> <c:set var="pageKorName" scope="request">면제차량 관리</c:set>
<meta charset="UTF-8"> <div class="card">
<title>Insert title here</title> <div class="wrapper-list">
</head> <div>
<body> <div class="container-page-btn">
전용차로과태료 기능 준비중... <button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark" title="초기화">초기화</button>
<!-- 차량번호,사유,공문번호,소유주명,단속동,면제시작일,면제종료일, 입력자,입력일시,수정자,수정일시,삭제자,삭제사유,삭제일시 --> <span class="container-window-btn-right">
<!-- 조회,등록,수정,삭제,이력 조회 --> <button type="button" id="btnSearch--${pageName}" class="btn btn-search" title="검색">검색</button>
</body> </span>
</html> </div>
<form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="vhrno--${pageName}">차량번호</label>
<input type="text" id="vhrno--${pageName}" name="vhrno" class="form-control" />
</div>
<div class="col-6">
<label class="form-label fw-bold form-search-title" for="delYn--${pageName}">삭제여부</label>
<select id="delYn--${pageName}" name="denYn" class="form-select">
<option value="">전체</option>
<option value="N">정상자료</option>
<option value="Y">삭제자료</option>
</select>
</div>
</div>
</div>
</form>
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<label id="exmptnVhclPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></label>
<ul id="exmptnVhclPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<button type="button" id="btnCreate--${pageName}"
class="btn btn-primary" title="면제차량 등록">면제차량 등록</button>
<button type="button" id="btnRemove--${pageName}"
class="btn btn-primary" title="면제차량 삭제">면제차량 삭제</button>
<button type="button" id="btnHistory--${pageName}"
class="btn btn-primary" title="면제차량 수정이력">면제차량 수정이력</button>
</span>
</span>
</div>
<div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:550px;overflow-y: scroll;">
<table id="DataTables_Table_0--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr id="exmptnVhclTheadTr--${pageName}">
<th style="width: 80px;">No.</th>
<th style="width: 200px;">차량번호</th>
<th style="width: 200px;">사유</th>
<th style="width: 200px;">공문번호</th>
<th style="width: 200px;">소유주명</th>
<th style="width: 200px;">면제시작일</th>
<th style="width: 200px;">면제종료일</th>
<th style="width: 200px;">입력자</th>
<th style="width: 200px;">입력일시</th>
<th style="width: 200px;">수정자</th>
<th style="width: 200px;">수정일시</th>
<th style="width: 200px;">삭제자</th>
<th style="width: 200px;">삭제사유</th>
<th style="width: 200px;">삭제일시</th>
<th class="dummy-th"></th>
</tr>
</thead>
<tbody id="exmptnVhclTbody--${pageName}"></tbody>
<template id="exmptnVhclRow--${pageName}">
<tr data-key="{EXMPTN_VHCL_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{VHRNO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{EXMPTN_RSN}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{DOC_NO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{OWNR_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{EXMPTN_BGNG_YMD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{EXMPTN_END_YMD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{RGTR_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{REG_DT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{MDFR_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{MDFCN_DT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{DLTR_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{DEL_RSN}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{DEL_DT}</td>
<td class="dummy-td"></td>
</tr>
</template>
<template id="exmptnVhclNotFound--${pageName}">
<tr>
<td valign="top" colspan="15" class="dataTables_empty text-center">면제차량 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
<div class="content-backdrop fade"></div>
</div>
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
$(document).ready(function(){
var $P = pageObject["${pageName}"];
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.exmptnVhclControl = new DatasetControl({
urls : {
load : wctx.url("/BPV/crdn/crdn08/010/list.do"),
newInfo : wctx.url("/BPV/crdn/crdn08/020/info.do")
},
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.EXMPTN_VHCL_ID : "",
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
DEL_DT : datetimeFormat
}
});
$P.exmptnVhclControl.defaultFetchSize = FETCH_XS;
$P.exmptnVhclControl.untilPageNum = 0;
$P.exmptnVhclControl.beforeCurrent = null;
$P.exmptnVhclControl.tableRenderComplete = false;
$P.exmptnVhclControl.newInfo = () => {
ajax.get({
url : $P.exmptnVhclControl.urls.newInfo,
data: {},
success:resp => {
dialog.open({
id: "exmptnvhcldialog",
title: "면제차량등록",
content:resp,
size: "xl",
init:() => {}
});
}
});
};
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.exmptnVhclControl.onDatasetChange = (obj) => {
$P.renderExmptnVhclList(obj["Total"]);
$("#exmptnVhclPaging--${pageName}").setPagingInfo({
list: $P.exmptnVhclControl.dataset,
prefix: "exmptnVhclPaging--${pageName}",
start: obj["Start"],
totalSize: obj["Total"],
fetchSize: obj["Fetch"],
func: "pageObject['${pageName}'].exmptnVhclControl.load({index})"
});
$P.exmptnVhclControl.tableRenderComplete = true;
};
$P.exmptnVhclControl.onCurrentChange = (item) => {
if(!$P.exmptnVhclControl.tableRenderComplete){
return;
}
$P.exmptnVhclControl.tableRenderComplete = false;
if(!item){
$P.clickExmptnVhclList("", true);
} else {
$P.clickExmptnVhclList($P.exmptnVhclControl.getCurrent()["EXMPTN_VHCL_ID"], true);
}
}
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => {
var searchForm = $("#frmSearch--${pageName}");
searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val("");
$P.exmptnVhclControl.setData([]);
}
$P.refreshExmptnVhclList = () => {
$P.exmptnVhclControl.untilPageNum = $P.exmptnVhclControl.query.pageNum;
$P.exmptnVhclControl.query.fetchSize = $P.exmptnVhclControl.defaultFetchSize * $P.exmptnVhclControl.query.pageNum;
$P.exmptnVhclControl.load(1);
}
$P.searchExmptnVhclList = () => {
$P.exmptnVhclControl.query = $P.getParams();
$P.exmptnVhclControl.load(1);
}
$P.scrollEnd = (obj) => {
if(obj.dataset.scrollStatus){
return;
}
var el = $(obj);
if(el.scrollTop() == 0){
return;
}
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()){
obj.dataset.scrollStatus = "waiting";
$P.scrollExmptnVhclList();
}
}
$P.scrollExmptnVhclList = () => {
$P.exmptnVhclControl.load($P.exmptnVhclControl.query.pageNum + 1);
}
$P.clickExmptnVhclList = (dataKey, auto) => {
if(dataKey == ""){
return;
}
$("#exmptnVhclTbody--${pageName}").setCurrentRow(dataKey);
if(!auto) {
$P.exmptnVhclControl.setCurrent(dataKey);
}
}
$P.dblclickExmptnVhclList = (dataKey) => {
if(dataKey == ""){
return;
}
// TODO :
}
$P.renderExmptnVhclList = (total) => {
var exmptnVhclList = $P.exmptnVhclControl.dataset;
var empty = exmptnVhclList.empty;
var notFound = [document.getElementById("exmptnVhclNotFound--${pageName}").innerHTML];
var found = document.getElementById("exmptnVhclRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickExmptnVhclList('" + dataItem.getValue("EXMPTN_VHCL_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickExmptnVhclList('" + dataItem.getValue("EXMPTN_VHCL_ID") + "');");
var trs = empty ? notFound : exmptnVhclList.inStrings(found,replacer);
$("#exmptnVhclTbody--${pageName}").html(trs.join());
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
if(total == exmptnVhclList.length){
$("#table-responsive--${pageName}").attr("data-scroll-status", "complete");
} else {
$("#table-responsive--${pageName}").removeAttr("data-scroll-status");
}
if($P.exmptnVhclControl.untilPageNum != 0){
$P.exmptnVhclControl.query.fetchSize = $P.exmptnVhclControl.defaultFetchSize;
$P.exmptnVhclControl.query.pageNum = $P.exmptnVhclControl.untilPageNum;
$P.exmptnVhclControl.untilPageNum = 0;
}
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.taskSeCd = "BPV";
data.fetchSize = $P.exmptnVhclControl.defaultFetchSize;
return data;
}
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$("#btnSearch--${pageName}").on("click", () => $P.searchExmptnVhclList());
//$("#btnCreate--${pageName}").on('click', () => { ; });
//$("#btnRemove--${pageName}").on('click', () => { ; });
//$("#btnHistory--${pageName}").on('click', () => { ; });
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
$("#DataTables_Table_0--${pageName}").find("th").resizable({handles : "e"});
/**************************************************************************
* 초기화
**************************************************************************/
initDatepicker("frmSearch--${pageName}"); //달력 초기화
$P.fnReset();
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
});
</script>
Loading…
Cancel
Save