diff --git a/src/main/java/cokr/xit/fims/crdn/Crdn.java b/src/main/java/cokr/xit/fims/crdn/Crdn.java index 3497e174..b2aa96bb 100644 --- a/src/main/java/cokr/xit/fims/crdn/Crdn.java +++ b/src/main/java/cokr/xit/fims/crdn/Crdn.java @@ -341,4 +341,25 @@ public class Crdn extends AbstractEntity { * 부과 제외 일자 */ private String levyExclYmd; + + /** + * 조원1 + */ + private String teamer1; + + /** + * 조원2 + */ + private String teamer2; + + /** + * 조원3 + */ + private String teamer3; + + /** + * 조원4 + */ + private String teamer4; + } diff --git a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java index d6e23790..de35bafe 100644 --- a/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java +++ b/src/main/java/cokr/xit/fims/crdn/CrdnQuery.java @@ -45,6 +45,7 @@ public class CrdnQuery extends CmmnQuery { private Integer schCrdnCntTo; //코드 + private String sggCd; private String amtDcsnCd; private String dtlAmtDcsnCd; private String crdnInptSeCd; @@ -295,6 +296,15 @@ public class CrdnQuery extends CmmnQuery { return self(); } + public String getSggCd() { + return ifEmpty(sggCd, () -> null); + } + + public T setSggCd(String sggCd) { + this.sggCd = sggCd; + return self(); + } + public String getAmtDcsnCd() { return ifEmpty(amtDcsnCd, () -> null); } diff --git a/src/main/java/cokr/xit/fims/crdn/dao/CrdnTeamMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/CrdnTeamMapper.java new file mode 100644 index 00000000..e39f7d00 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/dao/CrdnTeamMapper.java @@ -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 { + + /**단속팀 목록을 조회한다.
+ * @param query 단속팀 목록 조회 조건 + * @return 단속팀 목록 + */ + List selectTeamList(CrdnQuery query); +} diff --git a/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java b/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java new file mode 100644 index 00000000..01fbe529 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java @@ -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 getTeamList(CrdnQuery query); + +} diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java new file mode 100644 index 00000000..7c42e38c --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java @@ -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 selectTeamList(CrdnQuery query){ + return crdnTeamMapper.selectTeamList(query); + } + +} diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java new file mode 100644 index 00000000..17afe726 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java @@ -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 getTeamList(CrdnQuery query) { + return crdnStngBean.selectTeamList(query); + } + +} 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 6d91fb45..c5296f0a 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java @@ -19,7 +19,10 @@ 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.dao.Crdn05Mapper; import cokr.xit.fims.crdn.service.CrdnService; +import cokr.xit.fims.crdn.service.CrdnStngService; +import cokr.xit.foundation.data.DataObject; /**단속 자료 등록 서비스 웹 컨트롤러.
* {웹 컨텍스트}/crdn/crdn05 로 접근할 수 있다. @@ -30,6 +33,12 @@ public class Crdn05Controller extends ApplicationController { @Resource(name="crdnService") private CrdnService crdnService; + @Resource(name="crdnStngService") + private CrdnStngService crdnStngService; + + @Resource(name="crdn05Mapper") + private Crdn05Mapper crdn05Mapper; + /** 단속 자료 등록 메인화면을 연다. * @return fims/crdn/crdn05010-main */ @@ -96,17 +105,24 @@ public class Crdn05Controller extends ApplicationController { mav.addObject("LVS005List", commonCodes.get("LVS005")); mav.addObject("VLTNList", commonCodes.get(vltnByTask)); + CrdnQuery query = new CrdnQuery(); + query.setSggCd(crdn05Mapper.selectSggCdForCurrentUser()); + query.setTaskSeCd(urlTaskSeCd); + List teamList = crdnStngService.getTeamList(query); + switch(urlTaskSeCd) { case "PVS" -> { commonCodes = getCodesOf("FIM002","FIM007","FIM009"); mav.addObject("FIM002List", commonCodes.get("FIM002")); mav.addObject("FIM007List", commonCodes.get("FIM007")); mav.addObject("FIM009List", commonCodes.get("FIM009")); + mav.addObject("TeamList", teamList); } case "BPV" -> { commonCodes = getCodesOf("FIM002","FIM009"); mav.addObject("FIM002List", commonCodes.get("FIM002")); mav.addObject("FIM009List", commonCodes.get("FIM009")); + mav.addObject("TeamList", teamList); } case "DPV" -> { commonCodes = getCodesOf("FIM034"); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn06Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn06Controller.java index 4b3a7397..c0175cdc 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn06Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn06Controller.java @@ -12,6 +12,7 @@ import cokr.xit.base.code.CommonCode; import cokr.xit.base.web.ApplicationController; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.service.CrdnService; +import cokr.xit.fims.crdn.service.CrdnStngService; /**단속 관리 서비스 웹 컨트롤러.
* {웹 컨텍스트}/crdn/crdn06 로 접근할 수 있다. @@ -22,6 +23,9 @@ public class Crdn06Controller extends ApplicationController { @Resource(name="crdnService") private CrdnService crdnService; + @Resource(name="crdnStngService") + private CrdnStngService crdnStngService; + /** 단속 관리 메인화면을 연다. * @return fims/crdn/crdn06010-main */ diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-team-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-team-mapper.xml new file mode 100644 index 00000000..86d4c9b2 --- /dev/null +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-team-mapper.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file