From e8b12de7b40a4b0c6dee239654135fcdd2e1068f Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 23 Oct 2023 09:09:22 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A8=EC=86=8D=ED=8C=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/crdn/ExmptnVhcl.java | 3 + src/main/java/cokr/xit/fims/crdn/Team.java | 93 +++++++++++++++++++ .../xit/fims/crdn/dao/CrdnTeamMapper.java | 7 ++ .../fims/crdn/service/CrdnStngService.java | 6 ++ .../fims/crdn/service/bean/CrdnStngBean.java | 17 +++- .../service/bean/CrdnStngServiceBean.java | 5 + .../xit/fims/crdn/web/Crdn07Controller.java | 20 ++++ .../cokr/xit/fims/task/web/BpvController.java | 6 ++ .../cokr/xit/fims/task/web/PvsController.java | 6 ++ .../sql/mapper/fims/crdn/crdn-team-mapper.xml | 9 ++ .../WEB-INF/jsp/fims/crdn/crdn07010-main.jsp | 7 ++ 11 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 src/main/java/cokr/xit/fims/crdn/Team.java diff --git a/src/main/java/cokr/xit/fims/crdn/ExmptnVhcl.java b/src/main/java/cokr/xit/fims/crdn/ExmptnVhcl.java index d3bbc0ef..40678bef 100644 --- a/src/main/java/cokr/xit/fims/crdn/ExmptnVhcl.java +++ b/src/main/java/cokr/xit/fims/crdn/ExmptnVhcl.java @@ -4,6 +4,9 @@ import cokr.xit.foundation.AbstractEntity; import lombok.Getter; import lombok.Setter; +/**면제차량 정보 + * @author leebj + */ @Getter @Setter public class ExmptnVhcl extends AbstractEntity { diff --git a/src/main/java/cokr/xit/fims/crdn/Team.java b/src/main/java/cokr/xit/fims/crdn/Team.java new file mode 100644 index 00000000..d757875f --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/Team.java @@ -0,0 +1,93 @@ +package cokr.xit.fims.crdn; + +import cokr.xit.foundation.AbstractEntity; +import lombok.Getter; +import lombok.Setter; + +/**단속팀 정보 + * @author leebj + */ +@Getter +@Setter +public class Team extends AbstractEntity { + + /** + * 단속팀 ID + */ + private String teamId; + + /** + * 시군구 코드 + */ + private String sggCd; + + /** + * 업무 구분 코드 + */ + private String taskSeCd; + + /** + * 소속 구분 코드 + */ + private String ogdpSeCd; + + /** + * 단속 구분 코드 + */ + private String crdnSeCd; + + /** + * 조 명 + */ + private String teamNm; + + /** + * 조원1 + */ + private String teamer1; + + /** + * 조원2 + */ + private String teamer2; + + /** + * 조원3 + */ + private String teamer3; + + /** + * 조원4 + */ + private String teamer4; + + /** + * 기타 내용 + */ + private String etcCn; + + /** + * 사용 여부 + */ + private String useYn; + + /** + * 등록일시 + */ + private String regDt; + + /** + * 등록자 + */ + private String rgtr; + + /** + * 수정일시 + */ + private String mdfcnDt; + + /** + * 수정자 + */ + private String mdfr; +} diff --git a/src/main/java/cokr/xit/fims/crdn/dao/CrdnTeamMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/CrdnTeamMapper.java index 907d9b03..1cdda9c4 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/CrdnTeamMapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/CrdnTeamMapper.java @@ -5,6 +5,7 @@ import java.util.List; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.crdn.Team; import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.data.DataObject; @@ -23,6 +24,12 @@ public interface CrdnTeamMapper extends AbstractMapper { */ List selectRemovedTeamList(CrdnQuery query); + /**단속팀 정보를 삭제한다.
+ * @param team 단속팀 정보 + * @return 저장된 정보 수 + */ + int removeTeamInfo(Team team); + /**단속팀 정보를 조회한다.
* @param teamId 단속팀 ID * @return 단속팀 정보 diff --git a/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java b/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java index 08350373..ce4b69c1 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java @@ -27,6 +27,12 @@ public interface CrdnStngService { */ List getRemovedTeamList(CrdnQuery query); + /** 단속팀 정보를 삭제한다. + * @param teamId 단속팀 ID + * @return 저장여부 + */ + boolean removeTeamInfo(String teamId); + /** 단속팀 정보을 조회한다. * @param teamId 단속팀 ID * @return 단속팀 정보 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 index 44e23d52..8370f0d3 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java @@ -10,6 +10,7 @@ import org.springframework.stereotype.Component; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.ExmptnVhcl; +import cokr.xit.fims.crdn.Team; import cokr.xit.fims.crdn.dao.CrdnTeamMapper; import cokr.xit.fims.crdn.dao.ExmptnVhclMapper; import cokr.xit.fims.crdn.dao.GlobalStngMapper; @@ -233,6 +234,21 @@ public class CrdnStngBean extends AbstractComponent { return crdnTeamMapper.selectRemovedTeamList(query); } + /**단속팀 정보를 등록한다. + * @param teamId 단속팀 ID + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + public boolean removeTeamInfo(String teamId) { + + Team team = new Team(); + team.setTeamId(teamId); + team.setRemovedBy(currentUser().getId()); + return crdnTeamMapper.removeTeamInfo(team) == 1 ? true : false; + } + /**단속팀 정보를 조회한다. * @param teamId 단속팀 ID * @return 단속팀 정보 @@ -307,5 +323,4 @@ public class CrdnStngBean extends AbstractComponent { return exmptnVhclMapper.selectExemptionVehicleHistoryList(exmptnVhclId); } - } 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 index ce082c0d..9773ccc4 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java @@ -39,6 +39,11 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng return crdnStngBean.selectRemovedTeamList(query); } + @Override + public boolean removeTeamInfo(String teamId) { + return crdnStngBean.removeTeamInfo(teamId); + } + @Override public DataObject getTeamInfo(String teamId) { return crdnStngBean.selectTeamInfo(teamId); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn07Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn07Controller.java index a45f097c..fa1344b7 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn07Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn07Controller.java @@ -28,6 +28,7 @@ public class Crdn07Controller extends ApplicationController { crackdownTeamManagementMain = "/010/main.do" , getTeamList = "/010/list.do" , getRemovedTeamList = "/010/removedTeamList.do" + , removeTeamInfo = "/010/remove.do" , getTeamInfo = "/010/info.do" ; } @@ -90,6 +91,25 @@ public class Crdn07Controller extends ApplicationController { return setCollectionInfo(new ModelAndView("jsonView"), crdnStngService.getRemovedTeamList(query),""); } + /** 단속팀 정보를 삭제한다. + * {@link CrdnStngService#removeTeamInfo(exmptnVhclId)} 참고 + * @param teamId 단속팀 ID + * @return jsonView + *
 {
+	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + public ModelAndView removeTeamInfo(String teamId) { + + boolean saved = false; + + saved = crdnStngService.removeTeamInfo(teamId); + + return new ModelAndView("jsonView") + .addObject("saved", saved); + + } + /**단속팀 정보를 조회한다.
* {@link CrdnStngService#getTeamInfo(String)} 참고 * @param crdn 단속 diff --git a/src/main/java/cokr/xit/fims/task/web/BpvController.java b/src/main/java/cokr/xit/fims/task/web/BpvController.java index 47ec16b7..6a5ebbe4 100644 --- a/src/main/java/cokr/xit/fims/task/web/BpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/BpvController.java @@ -313,6 +313,12 @@ public class BpvController { return super.getRemovedTeamList(query); } + @Override + @RequestMapping(name="전용차로과태료업무 단속팀 정보 삭제", value=METHOD_URL.removeTeamInfo) + public ModelAndView removeTeamInfo(String teamId) { + return super.removeTeamInfo(teamId); + } + @Override @RequestMapping(name="전용차로과태료업무 단속팀 정보 조회", value=METHOD_URL.getTeamInfo) public ModelAndView getTeamInfo(String teamId) { diff --git a/src/main/java/cokr/xit/fims/task/web/PvsController.java b/src/main/java/cokr/xit/fims/task/web/PvsController.java index 0fbfcb47..adba1918 100644 --- a/src/main/java/cokr/xit/fims/task/web/PvsController.java +++ b/src/main/java/cokr/xit/fims/task/web/PvsController.java @@ -325,6 +325,12 @@ public class PvsController { return super.getRemovedTeamList(query); } + @Override + @RequestMapping(name="전용차로과태료업무 단속팀 정보 삭제", value=METHOD_URL.removeTeamInfo) + public ModelAndView removeTeamInfo(String teamId) { + return super.removeTeamInfo(teamId); + } + @Override @RequestMapping(name="주정차과태료업무 단속팀 정보 조회", value=METHOD_URL.getTeamInfo) public ModelAndView getTeamInfo(String teamId) { 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 index 59bd3027..ddbef6db 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn-team-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-team-mapper.xml @@ -40,6 +40,15 @@ SELECT A.TEAM_ID ORDER BY A.MDFCN_DT + +/* 단속팀 정보 삭제(crdnTeamMapper.removeTeamInfo) */ +UPDATE TB_TEAM_INFO + SET USE_YN = 'N' + , MDFCN_DT = + , MDFR = #{removedBy} + WHERE TEAM_ID = #{teamId} + +