단속 관련 컨트롤러, 매퍼, 빈, 엔티티 추가

main
이범준 1 year ago
parent 3423b88ee7
commit 495e76d824

@ -0,0 +1,16 @@
package cokr.xit.fims.crdn;
import cokr.xit.foundation.AbstractEntity;
import lombok.Getter;
import lombok.Setter;
/**
* @author leebj
*/
@Getter
@Setter
public class CrdnEntity extends AbstractEntity {
}

@ -0,0 +1,27 @@
package cokr.xit.fims.crdn.dao;
import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.CrdnEntity;
import cokr.xit.fims.crdn.service.CrdnQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
/** DAO
* @author leebj
*/
@Mapper("crdnMapper")
public interface CrdnMapper extends AbstractMapper {
/** .<br />
* {@link cokr.xit.fims.crdn.service.CrdnService#getCrdnList(CrdnQuery)}
* @param req
* @return
*/
List<DataObject> getCrdnList(CrdnQuery req);
List<DataObject> getCrdns(CrdnQuery req);
}

@ -0,0 +1,20 @@
package cokr.xit.fims.crdn.service;
import cokr.xit.foundation.component.QueryRequest;
public class CrdnQuery extends QueryRequest {
private static final long serialVersionUID = 1L;
private String schVhrno;
public String getSchVhrno() {
return ifEmpty(schVhrno, () -> null);
}
public <T extends CrdnQuery> T setSchVhrno(String schVhrno) {
this.schVhrno = schVhrno;
return self();
}
}

@ -0,0 +1,24 @@
package cokr.xit.fims.crdn.service;
import java.util.List;
import cokr.xit.fims.crdn.CrdnEntity;
import cokr.xit.foundation.data.DataObject;
/** .
* <ul><li>{@link #getCrdnList(CrdnQuery) }</li>
* </ul>
* @author leebj
*/
public interface CrdnService {
/** .
* @param req
* <ul><li>pageNum: </li>
* <li>fetchSize: </li>
* </ul>
* @return
*/
List<DataObject> getCrdnList(CrdnQuery req);
}

@ -0,0 +1,32 @@
package cokr.xit.fims.crdn.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.fims.crdn.CrdnEntity;
import cokr.xit.fims.crdn.dao.CrdnMapper;
import cokr.xit.fims.crdn.service.CrdnQuery;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.data.DataObject;
/** Bean
* @author leebj
*/
@Component("crdnBean")
public class CrdnBean extends AbstractComponent {
@Resource(name = "crdnMapper")
private CrdnMapper crdnMapper;
/** .<br />
* {@link cokr.xit.fims.crdn.service.CrdnService#getCrdnList(CrdnQuery)}
* @param req
* @return
*/
public List<DataObject> getCrdnList(CrdnQuery req) {
return crdnMapper.getCrdnList(req.setOrderBy("CRDN_ID"));
}
}

@ -0,0 +1,30 @@
package cokr.xit.fims.crdn.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.fims.crdn.CrdnEntity;
import cokr.xit.fims.crdn.service.CrdnQuery;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
/**
* @author leebj
*/
@Service("crdnService")
public class CrdnServiceBean extends AbstractServiceBean implements CrdnService {
/** 단속관리 Bean */
@Resource(name="crdnBean")
protected CrdnBean crdnBean;
@Override
public List<DataObject> getCrdnList(CrdnQuery req) {
return crdnBean.getCrdnList(req);
}
}

@ -0,0 +1,58 @@
package cokr.xit.fims.crdn.web;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.crdn.service.CrdnQuery;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.foundation.web.AbstractController;
/** .<br />
* { }/{}/crdn/* .
* @author leebj
*/
@Controller
@RequestMapping(name="단속관리", value="/{biz}/crdn")
public class CrdnController extends AbstractController {
@Resource(name="crdnService")
private CrdnService crdnService;
/** .
* @return fims/crdn/initData-main
*/
@RequestMapping(name="단속 초기자료 메인", value="/initData/main.do")
public ModelAndView initDataMain(@PathVariable(value = "biz") String biz) {
System.out.println(biz);
ModelAndView mav = this.getCrdnList(new CrdnQuery().setPageNum(1));
mav.setViewName("fims/crdn/initData-main");
return mav.addObject("crdnList", toJson(mav.getModel().remove("crdnList"))).addObject("curBiz", biz);
}
/** .<br />
* {@link CrdnService#getCrdnList(CrdnQuery)}
* @param req
* @return jsonView
* <pre><code> {
* "crdnList": [ ],
* "crdnStart": ,
* "crdnFetchTotal": ,
* "crdnTotal":
* }</code></pre>
*/
@RequestMapping(name="코드 그룹 목록", value="/list.do")
public ModelAndView getCrdnList(CrdnQuery req) {
setFetchSize(req);
return setCollectionInfo(
new ModelAndView("jsonView"),
crdnService.getCrdnList(req),
"crdn"
);
}
}

@ -0,0 +1,101 @@
<?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">
<mapper namespace="cokr.xit.fims.crdn.dao.CrdnMapper">
<resultMap id="crdnEntity" type="cokr.xit.fims.crdn.CrdnEntity">
<!-- TODO -->
<result property="createdAt" column="REG_DT"/>
<result property="createdBy" column="RGTR"/>
<result property="lastModified" column="MDFCN_DT"/>
<result property="modifiedBy" column="MDFR"/>
</resultMap>
<sql id="selectCrdns">
<include refid="utility.paging-prefix"/>
SELECT A.CRDN_ID
, A.SGG_CD
, A.SYS_SE_CD
, A.CRDN_REG_SE_CD
, A.CRDN_INPT_SE_CD
, A.LINK_ID
, A.CRDN_SE_CD
, A.RTPYR_ID
, A.CRDN_YMD
, A.CRDN_TM
, (CONCAT(A.CRDN_YMD,'',A.CRDN_TM)) AS CRDN_YMD_TM
, A.VHRNO
, A.CRDN_STDG_NM
, A.CRDN_ROAD_NM
, A.CRDN_PLC
, A.DTL_CRDN_PLC
, A.TEAM_ID
, A.VLTN_ID
, A.CRDN_SPAREA_CD
, A.CRDN_BGNG_TM
, A.CRDN_END_HR
, A.CRDN_SN
, A.GPS_X
, A.GPS_Y
, A.MOSC_X
, A.MOSC_Y
, A.TOWNG_YN
, A.ATCH_FILE_CNT
, A.VIN
, A.VHCL_NM
, A.VHCL_COLOR
, A.USE_FUEL_CD
, A.USG_SE_CD
, A.MXMM_LOAD_QY
, A.TKCAR_PSNCPA_CNT
, A.CARMDL_ASORT_NM
, A.CARMDL_TYPE_NM
, A.CARMDL_CLSF_NM
, A.ERSR_YMD
, A.FFNLG_CARMDL_CD
, A.PARKNG_PSBLTY_RSLT_CD
, A.VLTN_NMTM
, A.OVTIME_YN
, A.RVW_SE_CD
, A.RVW_PRCS_SCRN_NM
, A.RVW_DT
, A.RVWR
, A.FFNLG_AMT
, A.FFNLG_RDUCT_RT
, A.LEVY_AMT
, A.ADVNTCE_BGNG_YMD
, A.ADVNTCE_DUDT_YMD
, A.ADVNTCE_LEVY_AMT
, A.OPNN_SBMSN_YN
, A.ETC_CN
, A.LEVY_ID
, A.CRDN_STTS_CD
, A.CRDN_STTS_CHG_DT
, A.ADTN_AMT
, A.MINUS_AMT
, A.RCVMT_AMT
, A.BFR_CRDN_ID
, A.DEL_YN
, A.RGTR
, A.REG_DT
, A.MDFR
, A.MDFCN_DT
, A.DLTR
, A.DEL_DT
, A.DEL_RSN
FROM TB_CRDN A
WHERE DEL_YN = 'N'
<if test="term != null">AND A.${by} LIKE CONCAT('%', #{term}, '%')</if>
<if test="schVhrno != null">AND A.VHRNO LIKE CONCAT('%', #{schVhrno}, '%')</if>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix"/>
</sql>
<select id="getCrdnList" parameterType="map" resultType="dataobject">
<include refid="selectCrdns"/>
</select>
<select id="getCrdns" parameterType="map" resultMap="crdnEntity">
<include refid="selectCrdns"/>
</select>
</mapper>
Loading…
Cancel
Save