단속팀 목록 조회 쿼리 추가

main
이범준 1 year ago
parent 49d7883769
commit 7fb3172a81

@ -341,4 +341,25 @@ public class Crdn extends AbstractEntity {
* *
*/ */
private String levyExclYmd; private String levyExclYmd;
/**
* 1
*/
private String teamer1;
/**
* 2
*/
private String teamer2;
/**
* 3
*/
private String teamer3;
/**
* 4
*/
private String teamer4;
} }

@ -45,6 +45,7 @@ public class CrdnQuery extends CmmnQuery {
private Integer schCrdnCntTo; private Integer schCrdnCntTo;
//코드 //코드
private String sggCd;
private String amtDcsnCd; private String amtDcsnCd;
private String dtlAmtDcsnCd; private String dtlAmtDcsnCd;
private String crdnInptSeCd; private String crdnInptSeCd;
@ -295,6 +296,15 @@ public class CrdnQuery extends CmmnQuery {
return self(); return self();
} }
public String getSggCd() {
return ifEmpty(sggCd, () -> null);
}
public <T extends CrdnQuery> T setSggCd(String sggCd) {
this.sggCd = sggCd;
return self();
}
public String getAmtDcsnCd() { public String getAmtDcsnCd() {
return ifEmpty(amtDcsnCd, () -> null); return ifEmpty(amtDcsnCd, () -> null);
} }

@ -0,0 +1,19 @@
package cokr.xit.fims.crdn.dao;
import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@Mapper("crdnTeamMapper")
public interface CrdnTeamMapper extends AbstractMapper {
/** .<br />
* @param query
* @return
*/
List<DataObject> selectTeamList(CrdnQuery query);
}

@ -0,0 +1,16 @@
package cokr.xit.fims.crdn.service;
import java.util.List;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.foundation.data.DataObject;
public interface CrdnStngService {
/** .
* @param query
* @return
*/
List<DataObject> getTeamList(CrdnQuery query);
}

@ -0,0 +1,31 @@
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.CrdnQuery;
import cokr.xit.fims.crdn.dao.CrdnTeamMapper;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.data.DataObject;
/** Bean
* @author leebj
*/
@Component("crdnStngBean")
public class CrdnStngBean extends AbstractComponent {
@Resource(name = "crdnTeamMapper")
private CrdnTeamMapper crdnTeamMapper;
/** .
* @param query
* @return
*/
public List<DataObject> selectTeamList(CrdnQuery query){
return crdnTeamMapper.selectTeamList(query);
}
}

@ -0,0 +1,25 @@
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.CrdnQuery;
import cokr.xit.fims.crdn.service.CrdnStngService;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
@Service("crdnStngService")
public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStngService {
@Resource(name="crdnStngBean")
protected CrdnStngBean crdnStngBean;
@Override
public List<DataObject> getTeamList(CrdnQuery query) {
return crdnStngBean.selectTeamList(query);
}
}

@ -19,7 +19,10 @@ 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.CrdnQuery;
import cokr.xit.fims.crdn.dao.Crdn05Mapper;
import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.crdn.service.CrdnStngService;
import cokr.xit.foundation.data.DataObject;
/** .<br /> /** .<br />
* { }/crdn/crdn05 . * { }/crdn/crdn05 .
@ -30,6 +33,12 @@ public class Crdn05Controller extends ApplicationController {
@Resource(name="crdnService") @Resource(name="crdnService")
private CrdnService crdnService; private CrdnService crdnService;
@Resource(name="crdnStngService")
private CrdnStngService crdnStngService;
@Resource(name="crdn05Mapper")
private Crdn05Mapper crdn05Mapper;
/** . /** .
* @return fims/crdn/crdn05010-main * @return fims/crdn/crdn05010-main
*/ */
@ -96,17 +105,24 @@ public class Crdn05Controller extends ApplicationController {
mav.addObject("LVS005List", commonCodes.get("LVS005")); mav.addObject("LVS005List", commonCodes.get("LVS005"));
mav.addObject("VLTNList", commonCodes.get(vltnByTask)); mav.addObject("VLTNList", commonCodes.get(vltnByTask));
CrdnQuery query = new CrdnQuery();
query.setSggCd(crdn05Mapper.selectSggCdForCurrentUser());
query.setTaskSeCd(urlTaskSeCd);
List<DataObject> teamList = crdnStngService.getTeamList(query);
switch(urlTaskSeCd) { switch(urlTaskSeCd) {
case "PVS" -> { case "PVS" -> {
commonCodes = getCodesOf("FIM002","FIM007","FIM009"); commonCodes = getCodesOf("FIM002","FIM007","FIM009");
mav.addObject("FIM002List", commonCodes.get("FIM002")); mav.addObject("FIM002List", commonCodes.get("FIM002"));
mav.addObject("FIM007List", commonCodes.get("FIM007")); mav.addObject("FIM007List", commonCodes.get("FIM007"));
mav.addObject("FIM009List", commonCodes.get("FIM009")); mav.addObject("FIM009List", commonCodes.get("FIM009"));
mav.addObject("TeamList", teamList);
} }
case "BPV" -> { case "BPV" -> {
commonCodes = getCodesOf("FIM002","FIM009"); commonCodes = getCodesOf("FIM002","FIM009");
mav.addObject("FIM002List", commonCodes.get("FIM002")); mav.addObject("FIM002List", commonCodes.get("FIM002"));
mav.addObject("FIM009List", commonCodes.get("FIM009")); mav.addObject("FIM009List", commonCodes.get("FIM009"));
mav.addObject("TeamList", teamList);
} }
case "DPV" -> { case "DPV" -> {
commonCodes = getCodesOf("FIM034"); commonCodes = getCodesOf("FIM034");

@ -12,6 +12,7 @@ import cokr.xit.base.code.CommonCode;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.crdn.service.CrdnStngService;
/** .<br /> /** .<br />
* { }/crdn/crdn06 . * { }/crdn/crdn06 .
@ -22,6 +23,9 @@ public class Crdn06Controller extends ApplicationController {
@Resource(name="crdnService") @Resource(name="crdnService")
private CrdnService crdnService; private CrdnService crdnService;
@Resource(name="crdnStngService")
private CrdnStngService crdnStngService;
/** . /** .
* @return fims/crdn/crdn06010-main * @return fims/crdn/crdn06010-main
*/ */

@ -0,0 +1,18 @@
<?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.CrdnTeamMapper">
<select id="selectTeamList" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 단속팀 목록 조회(crdnTeamMapper.selectTeamList) */
SELECT TEAM_ID
, TEAM_NM
, TEAMER_1
, TEAMER_2
, TEAMER_3
, TEAMER_4
FROM TB_TEAM_INFO
WHERE SGG_CD = #{sggCd}
AND TASK_SE_CD = #{taskSeCd}
</select>
</mapper>
Loading…
Cancel
Save