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

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

@ -17,6 +17,8 @@ public class CrdnQuery extends QueryRequest {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String grid; private String grid;
private String thisDay;
private String currentUserId;
private String inspectionDataType; private String inspectionDataType;
private String crdnId; private String crdnId;
private String[] crdnIDs; private String[] crdnIDs;
@ -46,6 +48,24 @@ public class CrdnQuery extends QueryRequest {
return self(); 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() { public String getInspectionDataType() {
return ifEmpty(inspectionDataType, () -> null); return ifEmpty(inspectionDataType, () -> null);
} }

@ -1,11 +1,14 @@
package cokr.xit.fims.crdn.dao; package cokr.xit.fims.crdn.dao;
import java.util.List;
import java.util.Map; import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
/** DAO /** DAO
* @author leebj * @author leebj
@ -13,6 +16,13 @@ import cokr.xit.foundation.component.AbstractMapper;
@Mapper("crdn05Mapper") @Mapper("crdn05Mapper")
public interface Crdn05Mapper extends AbstractMapper { 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 * @param params
* <ul><li>"crdn" - </li> * <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.base.file.service.bean.FileBean;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.Crdn05Mapper;
import cokr.xit.fims.crdn.service.Crdn05Service; import cokr.xit.fims.crdn.service.Crdn05Service;
import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -20,15 +21,22 @@ import cokr.xit.foundation.data.DataObject;
@Service("crdn05Service") @Service("crdn05Service")
public class Crdn05ServiceBean extends AbstractServiceBean implements Crdn05Service { public class Crdn05ServiceBean extends AbstractServiceBean implements Crdn05Service {
@Resource(name="crdn05Mapper")
protected Crdn05Mapper crdn05Mapper;
/** 단속 자료 등록 Bean */ /** 단속 자료 등록 Bean */
@Resource(name="crdn05Bean") @Resource(name="crdn05Bean")
protected Crdn05Bean crdn05Bean; protected Crdn05Bean crdn05Bean;
@Resource(name="fileBean") @Resource(name="fileBean")
private FileBean fileBean; private FileBean fileBean;
@Override @Override
public List<DataObject> getCrackdownList(CrdnQuery req) { public List<DataObject> getCrackdownList(CrdnQuery req) {
return null; //crdn05Mapper. req.setThisDay("");
req.setCurrentUserId(currentUser().getId());
req.setOrderBy("CRDN_ID");
return crdn05Mapper.selectCrackdownList(req);
} }
@Override @Override

@ -16,6 +16,7 @@ import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.web.FileInfoFactory; import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.Crdn05Service; import cokr.xit.fims.crdn.service.Crdn05Service;
/** .<br /> /** .<br />
@ -35,8 +36,9 @@ public class Crdn05Controller extends ApplicationController {
mav.setViewName("fims/crdn/crdn05010-main"); mav.setViewName("fims/crdn/crdn05010-main");
mav.addObject("pageName", "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")); mav.addObject("FIM054List", commonCodes.get("FIM054"));
addCodes(commonCodes, mav, "FIM003", "FIM026");
return mav; return mav;
} }
@ -49,6 +51,27 @@ public class Crdn05Controller extends ApplicationController {
return new ModelAndView("fims/crdn/crdn05020-info"); 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 * @param
* @return fims/crdn/crdn05030-info * @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"> <!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"> <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"> <insert id="insertCrdn" parameterType="map">
/* 단속 대장 등록(crdn05Mapper.insertCrdn) */ /* 단속 대장 등록(crdn05Mapper.insertCrdn) */
<selectKey resultType="string" keyProperty="crdn.crdnId" keyColumn="NEW_ID" order="BEFORE"> <selectKey resultType="string" keyProperty="crdn.crdnId" keyColumn="NEW_ID" order="BEFORE">

@ -58,20 +58,30 @@
class="datatables-ajax table table-bordered dataTable no-footer"> class="datatables-ajax table table-bordered dataTable no-footer">
<thead> <thead>
<tr id="crdnTheadTr--${pageName}"> <tr id="crdnTheadTr--${pageName}">
<th width="80">No.</th> <th width="50">No.</th>
<th width="80">temp</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> </tr>
</thead> </thead>
<tbody id="crdnTbody--${pageName}"></tbody> <tbody id="crdnTbody--${pageName}"></tbody>
<template id="crdnRow--${pageName}"> <template id="crdnRow--${pageName}">
<tr data-key="{CRDN_ID}"> <tr data-key="{CRDN_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td> <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> </tr>
</template> </template>
<template id="crdnNotFound--${pageName}"> <template id="crdnNotFound--${pageName}">
<tr> <tr>
<td valign="top" colspan="2" class="dataTables_empty text-center">단속 정보를 찾지 못했습니다.</td> <td valign="top" colspan="7" class="dataTables_empty text-center">단속 정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
</table> </table>
@ -91,6 +101,9 @@
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
var FIM003 = new CommonCodes(${FIM003});
var FIM026 = new CommonCodes(${FIM026});
pageObject["${pageName}"] = {}; pageObject["${pageName}"] = {};
@ -108,7 +121,9 @@ $(document).ready(function(){
dataGetter:obj => obj.crdnList, dataGetter:obj => obj.crdnList,
appendData:true, appendData:true,
formats: { formats: {
CRDN_INPT_SE_CD : FIM003,
CRDN_REG_SE_CD : FIM026,
CRDN_YMD_TM : datetimeFormat
} }
}); });
$P.crdnControl.urls.newInfoByFile = ""; $P.crdnControl.urls.newInfoByFile = "";
@ -146,7 +161,7 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* DatasetControl.on * DatasetControl.on
**************************************************************************/ **************************************************************************/
$P.crdnControl.onDatasetChange = obj => { $P.crdnControl.onDatasetChange = (obj) => {
$P.renderCrdnList(); $P.renderCrdnList();
@ -176,6 +191,13 @@ $(document).ready(function(){
$P.crdnControl.setData([]); $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.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams(); $P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1); $P.crdnControl.load(1);
@ -201,10 +223,6 @@ $(document).ready(function(){
$("#crdnTbody--${pageName}").setCurrentRow(dataKey); $("#crdnTbody--${pageName}").setCurrentRow(dataKey);
} }
$P.dblclickCrdnList = (dataKey) => {
$P.crdnControl.getInfo(dataKey);
}
$P.renderCrdnList = () => { $P.renderCrdnList = () => {
var crdnList = $P.crdnControl.dataset; var crdnList = $P.crdnControl.dataset;
@ -213,7 +231,7 @@ $(document).ready(function(){
var found = document.getElementById("crdnRow--${pageName}").innerHTML; var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');"); .replace(/{ondblclick}/gi, "");
var trs = empty ? notFound : crdnList.inStrings(found,replacer); var trs = empty ? notFound : crdnList.inStrings(found,replacer);
@ -230,16 +248,11 @@ $(document).ready(function(){
return data; 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 * element.on
**************************************************************************/ **************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
$("#btnSearch--${pageName}").on("click", () => $P.searchCrdnList());
$("#btnInsertByFile--${pageName}").on('click', () => { $P.crdnControl.newInfo("file"); }); $("#btnInsertByFile--${pageName}").on('click', () => { $P.crdnControl.newInfo("file"); });
$("#btnInsertByHand--${pageName}").on('click', () => { $P.crdnControl.newInfo("hand"); }); $("#btnInsertByHand--${pageName}").on('click', () => { $P.crdnControl.newInfo("hand"); });
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); }); $("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });

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

Loading…
Cancel
Save