당일 등록 자료 조회 쿼리 추가

main
이범준 1 year ago
parent c4afe58153
commit 7df1ab9b49

@ -17,6 +17,8 @@ public class CrdnQuery extends QueryRequest {
private static final long serialVersionUID = 1L;
private String grid;
private String thisDay;
private String currentUserId;
private String inspectionDataType;
private String crdnId;
private String[] crdnIDs;
@ -46,6 +48,24 @@ public class CrdnQuery extends QueryRequest {
return self();
}
public String getThisDay() {
return ifEmpty(thisDay, () -> null);
}
public <T extends CrdnQuery> T setThisDay(String thisDay) {
this.thisDay = thisDay;
return self();
}
public String getCurrentUserId() {
return ifEmpty(currentUserId, () -> null);
}
public <T extends CrdnQuery> T setCurrentUserId(String currentUserId) {
this.currentUserId = currentUserId;
return self();
}
public String getInspectionDataType() {
return ifEmpty(inspectionDataType, () -> null);
}

@ -1,11 +1,14 @@
package cokr.xit.fims.crdn.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
/** DAO
* @author leebj
@ -13,6 +16,13 @@ import cokr.xit.foundation.component.AbstractMapper;
@Mapper("crdn05Mapper")
public interface Crdn05Mapper extends AbstractMapper {
/** .<br />
* {@link cokr.xit.fims.crdn.service.Crdn05Service#getCrackdownList(CrdnQuery)}
* @param req
* @return
*/
List<DataObject> selectCrackdownList(CrdnQuery req);
/** .
* @param params
* <ul><li>"crdn" - </li>

@ -10,6 +10,7 @@ import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.Crdn05Mapper;
import cokr.xit.fims.crdn.service.Crdn05Service;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
@ -20,15 +21,22 @@ import cokr.xit.foundation.data.DataObject;
@Service("crdn05Service")
public class Crdn05ServiceBean extends AbstractServiceBean implements Crdn05Service {
@Resource(name="crdn05Mapper")
protected Crdn05Mapper crdn05Mapper;
/** 단속 자료 등록 Bean */
@Resource(name="crdn05Bean")
protected Crdn05Bean crdn05Bean;
@Resource(name="fileBean")
private FileBean fileBean;
@Override
public List<DataObject> getCrackdownList(CrdnQuery req) {
return null; //crdn05Mapper.
req.setThisDay("");
req.setCurrentUserId(currentUser().getId());
req.setOrderBy("CRDN_ID");
return crdn05Mapper.selectCrackdownList(req);
}
@Override

@ -16,6 +16,7 @@ import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.Crdn05Service;
/** .<br />
@ -35,8 +36,9 @@ public class Crdn05Controller extends ApplicationController {
mav.setViewName("fims/crdn/crdn05010-main");
mav.addObject("pageName", "crdn05010-main");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM003", "FIM026", "FIM054");
mav.addObject("FIM054List", commonCodes.get("FIM054"));
addCodes(commonCodes, mav, "FIM003", "FIM026");
return mav;
}
@ -49,6 +51,27 @@ public class Crdn05Controller extends ApplicationController {
return new ModelAndView("fims/crdn/crdn05020-info");
}
/** .
* {@link Crdn05Service#getCrackdownList(CrdnQuery)}
* @param req
* @return jsonView
* <pre><code> {
* "crdnList": [ ],
* "crdnStart": ,
* "crdnFetchTotal": ,
* "crdnTotal":
* }</code></pre>
*/
@RequestMapping(name="당일 입력 단속자료 목록 조회", value="/010/list.do")
public ModelAndView getTodayCrdnDataList(CrdnQuery req) {
setFetchSize(req);
return setCollectionInfo(
new ModelAndView("jsonView"),
crdn05Service.getCrackdownList(req),
"crdn"
);
}
/** .
* @param
* @return fims/crdn/crdn05030-info

@ -2,6 +2,33 @@
<!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.Crdn05Mapper">
<select id="selectCrackdownList" parameterType="map" resultType="dataobject">
/* 단속자료 목록 조회(crdn05Mapper.selectCrackdownList) */
<include refid="utility.paging-prefix"/>
SELECT C.CRDN_ID <!-- 단속 ID -->
, C.CRDN_REG_SE_CD <!-- 단속 등록 구분 코드 -->
, C.CRDN_INPT_SE_CD <!-- 단속 입력 구분 코드 -->
, CONCAT(C.CRDN_YMD,'',C.CRDN_TM) AS CRDN_YMD_TM <!-- 단속 일시 -->
, C.VHRNO <!-- 차량번호 -->
, C.CRDN_PLC <!-- 단속 장소 -->
, (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) ASVLTN_ARTCL
, C.DEL_YN
, C.RGTR
, C.REG_DT
, C.MDFR
, C.MDFCN_DT
, C.DLTR
, C.DEL_DT
, C.DEL_RSN
FROM TB_CRDN C
WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd}
AND C.RGTR = #{currentUserId}
AND SUBSTR(C.REG_DT,1,8) = <include refid="utility.thisDay" />
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix"/>
</select>
<insert id="insertCrdn" parameterType="map">
/* 단속 대장 등록(crdn05Mapper.insertCrdn) */
<selectKey resultType="string" keyProperty="crdn.crdnId" keyColumn="NEW_ID" order="BEFORE">

@ -58,20 +58,30 @@
class="datatables-ajax table table-bordered dataTable no-footer">
<thead>
<tr id="crdnTheadTr--${pageName}">
<th width="80">No.</th>
<th width="80">temp</th>
<th width="50">No.</th>
<th width="80">등록구분</th>
<th width="80">자료출처</th>
<th width="80">위반일시</th>
<th width="80">차량번호</th>
<th width="200">위반장소</th>
<th width="80">위반내용</th>
</tr>
</thead>
<tbody id="crdnTbody--${pageName}"></tbody>
<template id="crdnRow--${pageName}">
<tr data-key="{CRDN_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{temp}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_REG_SE_CD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_INPT_SE_CD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_YMD_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{VHRNO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_PLC}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{ASVLTN_ARTCL}</td>
</tr>
</template>
<template id="crdnNotFound--${pageName}">
<tr>
<td valign="top" colspan="2" class="dataTables_empty text-center">단속 정보를 찾지 못했습니다.</td>
<td valign="top" colspan="7" class="dataTables_empty text-center">단속 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
@ -91,6 +101,9 @@
/**************************************************************************
* Global Variable
**************************************************************************/
var FIM003 = new CommonCodes(${FIM003});
var FIM026 = new CommonCodes(${FIM026});
pageObject["${pageName}"] = {};
@ -108,7 +121,9 @@ $(document).ready(function(){
dataGetter:obj => obj.crdnList,
appendData:true,
formats: {
CRDN_INPT_SE_CD : FIM003,
CRDN_REG_SE_CD : FIM026,
CRDN_YMD_TM : datetimeFormat
}
});
$P.crdnControl.urls.newInfoByFile = "";
@ -146,7 +161,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.crdnControl.onDatasetChange = obj => {
$P.crdnControl.onDatasetChange = (obj) => {
$P.renderCrdnList();
@ -175,7 +190,14 @@ $(document).ready(function(){
$("#regDt--${pageName}").datepicker('setDate', new Date());
$P.crdnControl.setData([]);
}
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn05/010/list.do");
$P.crdnControl.urls.newInfoByFile = wctx.url("/"+taskSeCd+"/crdn/crdn05/020/info.do");
$P.crdnControl.urls.newInfoByHand = wctx.url("/"+taskSeCd+"/crdn/crdn05/030/info.do");
}
$P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1);
@ -201,10 +223,6 @@ $(document).ready(function(){
$("#crdnTbody--${pageName}").setCurrentRow(dataKey);
}
$P.dblclickCrdnList = (dataKey) => {
$P.crdnControl.getInfo(dataKey);
}
$P.renderCrdnList = () => {
var crdnList = $P.crdnControl.dataset;
@ -212,8 +230,8 @@ $(document).ready(function(){
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "");
var trs = empty ? notFound : crdnList.inStrings(found,replacer);
@ -230,16 +248,11 @@ $(document).ready(function(){
return data;
}
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.crdnControl.urls.newInfoByFile = wctx.url("/"+taskSeCd+"/crdn/crdn05/020/info.do");
$P.crdnControl.urls.newInfoByHand = wctx.url("/"+taskSeCd+"/crdn/crdn05/030/info.do");
}
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$("#btnSearch--${pageName}").on("click", () => $P.searchCrdnList());
$("#btnInsertByFile--${pageName}").on('click', () => { $P.crdnControl.newInfo("file"); });
$("#btnInsertByHand--${pageName}").on('click', () => { $P.crdnControl.newInfo("hand"); });
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });

@ -291,7 +291,7 @@ $(document).ready(function(){
$P.crdnControl.setData([]);
}
$P.fnResetAndChangeBiz = taskSeCd => {
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn06/010/list.do");
$P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/sprt/sprt01/020/info.do");

Loading…
Cancel
Save