diff --git a/src/main/java/cokr/xit/fims/crdn/CrdnEntity.java b/src/main/java/cokr/xit/fims/crdn/CrdnEntity.java new file mode 100644 index 00000000..e8984e98 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/CrdnEntity.java @@ -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 { + + + +} diff --git a/src/main/java/cokr/xit/fims/crdn/dao/CrdnMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/CrdnMapper.java new file mode 100644 index 00000000..f1e202c4 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/dao/CrdnMapper.java @@ -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 { + + /**단속자료 목록을 조회한다.
+ * {@link cokr.xit.fims.crdn.service.CrdnService#getCrdnList(CrdnQuery)} 참고 + * @param req 단속자료 목록 조회 조건 + * @return 단속자료 목록 + */ + List getCrdnList(CrdnQuery req); + + List getCrdns(CrdnQuery req); + +} diff --git a/src/main/java/cokr/xit/fims/crdn/service/CrdnQuery.java b/src/main/java/cokr/xit/fims/crdn/service/CrdnQuery.java new file mode 100644 index 00000000..95e5a65c --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnQuery.java @@ -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 setSchVhrno(String schVhrno) { + this.schVhrno = schVhrno; + return self(); + } + +} diff --git a/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java b/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java new file mode 100644 index 00000000..cefdea88 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnService.java @@ -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; + +/**단속관리 서비스를 제공한다. + *
  • {@link #getCrdnList(CrdnQuery) 단속자료 목록 조회}
  • + *
+ * @author leebj + */ +public interface CrdnService { + + /** 단속자료 목록을 조회한다. + * @param req 단속자료 목록 조회 조건 + *
  • pageNum: 페이지 번호
  • + *
  • fetchSize: 페이지 목록 건수
  • + *
+ * @return 단속자료 목록 + */ + List getCrdnList(CrdnQuery req); + +} diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java new file mode 100644 index 00000000..856dd62e --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java @@ -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; + + /** 단속자료 목록을 조회한다.
+ * {@link cokr.xit.fims.crdn.service.CrdnService#getCrdnList(CrdnQuery)} 참고 + * @param req 단속자료 목록 조회 조건 + * @return 단속자료 목록 + */ + public List getCrdnList(CrdnQuery req) { + return crdnMapper.getCrdnList(req.setOrderBy("CRDN_ID")); + } +} diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java new file mode 100644 index 00000000..f9c3c8b5 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java @@ -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 getCrdnList(CrdnQuery req) { + return crdnBean.getCrdnList(req); + } + +} diff --git a/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java b/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java new file mode 100644 index 00000000..bb5f2168 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java @@ -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; + +/**단속관리 서비스 웹 컨트롤러.
+ * {웹 컨텍스트}/{과태료시스템구분}/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); + } + + /**단속자료 목록을 조회한다.
+ * {@link CrdnService#getCrdnList(CrdnQuery)} 참고 + * @param req 단속자료 목록 조회 조건 + * @return jsonView + *
 {
+	 *     "crdnList": [조회결과 목록],
+	 *     "crdnStart": 현재 페이지의 시작 자료 인덱스,
+	 *     "crdnFetchTotal": 한 페이지에 가져오는 자료 건 수,
+	 *     "crdnTotal": 조회 결과 찾은 전체 건 수
+	 * }
+ */ + @RequestMapping(name="코드 그룹 목록", value="/list.do") + public ModelAndView getCrdnList(CrdnQuery req) { + setFetchSize(req); + return setCollectionInfo( + new ModelAndView("jsonView"), + crdnService.getCrdnList(req), + "crdn" + ); + } +} diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-mapper.xml new file mode 100644 index 00000000..4704ffc8 --- /dev/null +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-mapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + 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' + AND A.${by} LIKE CONCAT('%', #{term}, '%') + AND A.VHRNO LIKE CONCAT('%', #{schVhrno}, '%') + + + + + + + + + \ No newline at end of file