단속팀 삭제 기능 추가

main
이범준 1 year ago
parent 2bf4af2a40
commit e8b12de7b4

@ -4,6 +4,9 @@ import cokr.xit.foundation.AbstractEntity;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
/**
* @author leebj
*/
@Getter @Getter
@Setter @Setter
public class ExmptnVhcl extends AbstractEntity { public class ExmptnVhcl extends AbstractEntity {

@ -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;
}

@ -5,6 +5,7 @@ import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.Team;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -23,6 +24,12 @@ public interface CrdnTeamMapper extends AbstractMapper {
*/ */
List<DataObject> selectRemovedTeamList(CrdnQuery query); List<DataObject> selectRemovedTeamList(CrdnQuery query);
/** .<br />
* @param team
* @return
*/
int removeTeamInfo(Team team);
/** .<br /> /** .<br />
* @param teamId ID * @param teamId ID
* @return * @return

@ -27,6 +27,12 @@ public interface CrdnStngService {
*/ */
List<DataObject> getRemovedTeamList(CrdnQuery query); List<DataObject> getRemovedTeamList(CrdnQuery query);
/** .
* @param teamId ID
* @return
*/
boolean removeTeamInfo(String teamId);
/** . /** .
* @param teamId ID * @param teamId ID
* @return * @return

@ -10,6 +10,7 @@ import org.springframework.stereotype.Component;
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.ExmptnVhcl; 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.CrdnTeamMapper;
import cokr.xit.fims.crdn.dao.ExmptnVhclMapper; import cokr.xit.fims.crdn.dao.ExmptnVhclMapper;
import cokr.xit.fims.crdn.dao.GlobalStngMapper; import cokr.xit.fims.crdn.dao.GlobalStngMapper;
@ -233,6 +234,21 @@ public class CrdnStngBean extends AbstractComponent {
return crdnTeamMapper.selectRemovedTeamList(query); return crdnTeamMapper.selectRemovedTeamList(query);
} }
/** .
* @param teamId ID
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
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 * @param teamId ID
* @return * @return
@ -307,5 +323,4 @@ public class CrdnStngBean extends AbstractComponent {
return exmptnVhclMapper.selectExemptionVehicleHistoryList(exmptnVhclId); return exmptnVhclMapper.selectExemptionVehicleHistoryList(exmptnVhclId);
} }
} }

@ -39,6 +39,11 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng
return crdnStngBean.selectRemovedTeamList(query); return crdnStngBean.selectRemovedTeamList(query);
} }
@Override
public boolean removeTeamInfo(String teamId) {
return crdnStngBean.removeTeamInfo(teamId);
}
@Override @Override
public DataObject getTeamInfo(String teamId) { public DataObject getTeamInfo(String teamId) {
return crdnStngBean.selectTeamInfo(teamId); return crdnStngBean.selectTeamInfo(teamId);

@ -28,6 +28,7 @@ public class Crdn07Controller extends ApplicationController {
crackdownTeamManagementMain = "/010/main.do" crackdownTeamManagementMain = "/010/main.do"
, getTeamList = "/010/list.do" , getTeamList = "/010/list.do"
, getRemovedTeamList = "/010/removedTeamList.do" , getRemovedTeamList = "/010/removedTeamList.do"
, removeTeamInfo = "/010/remove.do"
, getTeamInfo = "/010/info.do" , getTeamInfo = "/010/info.do"
; ;
} }
@ -90,6 +91,25 @@ public class Crdn07Controller extends ApplicationController {
return setCollectionInfo(new ModelAndView("jsonView"), crdnStngService.getRemovedTeamList(query),""); return setCollectionInfo(new ModelAndView("jsonView"), crdnStngService.getRemovedTeamList(query),"");
} }
/** .
* {@link CrdnStngService#removeTeamInfo(exmptnVhclId)}
* @param teamId ID
* @return jsonView
* <pre><code> {
* "saved": true, false
* }</code></pre>
*/
public ModelAndView removeTeamInfo(String teamId) {
boolean saved = false;
saved = crdnStngService.removeTeamInfo(teamId);
return new ModelAndView("jsonView")
.addObject("saved", saved);
}
/** .<br /> /** .<br />
* {@link CrdnStngService#getTeamInfo(String)} * {@link CrdnStngService#getTeamInfo(String)}
* @param crdn * @param crdn

@ -313,6 +313,12 @@ public class BpvController {
return super.getRemovedTeamList(query); return super.getRemovedTeamList(query);
} }
@Override
@RequestMapping(name="전용차로과태료업무 단속팀 정보 삭제", value=METHOD_URL.removeTeamInfo)
public ModelAndView removeTeamInfo(String teamId) {
return super.removeTeamInfo(teamId);
}
@Override @Override
@RequestMapping(name="전용차로과태료업무 단속팀 정보 조회", value=METHOD_URL.getTeamInfo) @RequestMapping(name="전용차로과태료업무 단속팀 정보 조회", value=METHOD_URL.getTeamInfo)
public ModelAndView getTeamInfo(String teamId) { public ModelAndView getTeamInfo(String teamId) {

@ -325,6 +325,12 @@ public class PvsController {
return super.getRemovedTeamList(query); return super.getRemovedTeamList(query);
} }
@Override
@RequestMapping(name="전용차로과태료업무 단속팀 정보 삭제", value=METHOD_URL.removeTeamInfo)
public ModelAndView removeTeamInfo(String teamId) {
return super.removeTeamInfo(teamId);
}
@Override @Override
@RequestMapping(name="주정차과태료업무 단속팀 정보 조회", value=METHOD_URL.getTeamInfo) @RequestMapping(name="주정차과태료업무 단속팀 정보 조회", value=METHOD_URL.getTeamInfo)
public ModelAndView getTeamInfo(String teamId) { public ModelAndView getTeamInfo(String teamId) {

@ -40,6 +40,15 @@ SELECT A.TEAM_ID
ORDER BY A.MDFCN_DT ORDER BY A.MDFCN_DT
</select> </select>
<update id="removeTeamInfo" parameterType="cokr.xit.fims.crdn.Team">
/* 단속팀 정보 삭제(crdnTeamMapper.removeTeamInfo) */
UPDATE TB_TEAM_INFO
SET USE_YN = 'N'
, MDFCN_DT = <include refid="utility.now" />
, MDFR = #{removedBy}
WHERE TEAM_ID = #{teamId}
</update>
<select id="selectTeamInfo" parameterType="string" resultType="dataobject"> <select id="selectTeamInfo" parameterType="string" resultType="dataobject">
/* 단속팀 정보 조회(crdnTeamMapper.selectTeamInfo) */ /* 단속팀 정보 조회(crdnTeamMapper.selectTeamInfo) */
SELECT TEAM_ID SELECT TEAM_ID

@ -294,6 +294,13 @@ $(document).ready(function(){
$P.useTeamControl.onCurrentChange = (item) => { $P.useTeamControl.onCurrentChange = (item) => {
if(!item){ if(!item){
$("#teamNm--${pageName}").val("");
$("#crdnSeCd--${pageName}").val("");
$("#teamer1--${pageName}").val("");
$("#teamer2--${pageName}").val("");
$("#teamer3--${pageName}").val("");
$("#teamer4--${pageName}").val("");
$("#etcCn--${pageName}").val("");
return; return;
} }

Loading…
Cancel
Save