diff --git a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java index fc8185a7..ea532709 100644 --- a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java +++ b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java @@ -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 setThisDay(String thisDay) { + this.thisDay = thisDay; + return self(); + } + + public String getCurrentUserId() { + return ifEmpty(currentUserId, () -> null); + } + + public T setCurrentUserId(String currentUserId) { + this.currentUserId = currentUserId; + return self(); + } + public String getInspectionDataType() { return ifEmpty(inspectionDataType, () -> null); } diff --git a/src/main/java/cokr/xit/fims/crdn/dao/Crdn05Mapper.java b/src/main/java/cokr/xit/fims/crdn/dao/Crdn05Mapper.java index 464d6b70..4bbf4446 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/Crdn05Mapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/Crdn05Mapper.java @@ -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 { + /**단속자료 목록을 조회한다.
+ * {@link cokr.xit.fims.crdn.service.Crdn05Service#getCrackdownList(CrdnQuery)} 참고 + * @param req 단속자료 목록 조회 조건 + * @return 단속자료 목록 + */ + List selectCrackdownList(CrdnQuery req); + /**단속 대장 정보를 등록한다. * @param params 파라미터 *
  • "crdn" - 단속 대장
  • diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java index 15caa565..f7fa64cb 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java @@ -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 getCrackdownList(CrdnQuery req) { - return null; //crdn05Mapper. + req.setThisDay(""); + req.setCurrentUserId(currentUser().getId()); + req.setOrderBy("CRDN_ID"); + return crdn05Mapper.selectCrackdownList(req); } @Override diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java index 3f473b91..fd9600be 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java @@ -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; /**단속 자료 등록 서비스 웹 컨트롤러.
    @@ -35,8 +36,9 @@ public class Crdn05Controller extends ApplicationController { mav.setViewName("fims/crdn/crdn05010-main"); mav.addObject("pageName", "crdn05010-main"); - Map> commonCodes = getCodesOf("FIM054"); + Map> 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 + *
     {
    +	 *     "crdnList": [조회결과 목록],
    +	 *     "crdnStart": 현재 페이지의 시작 자료 인덱스,
    +	 *     "crdnFetchTotal": 한 페이지에 가져오는 자료 건 수,
    +	 *     "crdnTotal": 조회 결과 찾은 전체 건 수
    +	 * }
    + */ + @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 diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn05-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn05-mapper.xml index 25e23a59..82558d86 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn05-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn05-mapper.xml @@ -2,6 +2,33 @@ + + /* 단속 대장 등록(crdn05Mapper.insertCrdn) */ diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp index 14977d77..4f0a5009 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp @@ -58,20 +58,30 @@ class="datatables-ajax table table-bordered dataTable no-footer"> - No. - temp + No. + 등록구분 + 자료출처 + 위반일시 + 차량번호 + 위반장소 + 위반내용 @@ -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); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp index 6c8c3d23..c81c746b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp @@ -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");