단속 관리 수정

main
이범준 1 year ago
parent 7caca58358
commit ffc4d7b855

@ -17,7 +17,7 @@ public interface CrdnUpdtMapper extends AbstractMapper {
* @param crdn * @param crdn
* @return * @return
*/ */
int updateTagInformation(Crdn crdn); int updateTagInfo(Crdn crdn);
/** .<br /> /** .<br />
* {@link cokr.xit.fims.crdn.service.bean.CrdnBean#update(Crdn)} * {@link cokr.xit.fims.crdn.service.bean.CrdnBean#update(Crdn)}
@ -26,9 +26,19 @@ public interface CrdnUpdtMapper extends AbstractMapper {
*/ */
int updateCrdn(Crdn crdn); int updateCrdn(Crdn crdn);
/** .<br />
* {@link cokr.xit.fims.crdn.service.bean.CrdnBean#update(Crdn)}
* @param crdn
* @return
*/
int updateCrdnAddition(Crdn crdn);
/** . /** .
* @param params * @param params
* @return * @return
*/ */
int removeCrdn(Map<String, Object> map); int removeCrdn(Map<String, Object> map);
} }

@ -58,12 +58,15 @@ public class CrdnBean extends AbstractComponent {
* </ul> * </ul>
*/ */
public boolean update(Map<String,Object> nonQueryRequest, Crdn crdn) { public boolean update(Map<String,Object> nonQueryRequest, Crdn crdn) {
String updateInfomation = (String)ifEmpty(nonQueryRequest.get("updateInfomation"), "") ; String updateInfomationType = (String)ifEmpty(nonQueryRequest.get("updateInfomationType"), "") ;
switch (ifEmpty(updateInfomation, () -> "")) { switch (ifEmpty(updateInfomationType, () -> "")) {
case "tagInformationUndefinedData": case "tagInformationUndefinedData":
return crdnUpdtMapper.updateTagInformation(crdn) == 1 ? true : false; return crdnUpdtMapper.updateTagInfo(crdn) == 1 ? true : false;
default: default:
if(crdnUpdtMapper.updateCrdnAddition(crdn) != 1) {
return false;
}
return crdnUpdtMapper.updateCrdn(crdn) == 1 ? true : false; return crdnUpdtMapper.updateCrdn(crdn) == 1 ? true : false;
} }
} }

@ -226,7 +226,11 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService
@Override @Override
public boolean update(Map<String, Object> nonQueryRequest, Crdn crdn, List<FileInfo> newFileInfoList) { public boolean update(Map<String, Object> nonQueryRequest, Crdn crdn, List<FileInfo> newFileInfoList) {
return crdnBean.update(nonQueryRequest, crdn); if(crdnBean.update(nonQueryRequest, crdn) == false) {
throw new RuntimeException("단속 정보 수정 중 오류가 발생하였습니다.");
}
return true;
} }

@ -63,7 +63,7 @@ public class DpvController {
@PostMapping(name = "표지정보 미확인 자료 수정", value = "/030/update.do") @PostMapping(name = "표지정보 미확인 자료 수정", value = "/030/update.do")
public ModelAndView update(Crdn crdn) { public ModelAndView update(Crdn crdn) {
Map<String, Object> nonQueryRequest = new HashMap<String, Object>(); Map<String, Object> nonQueryRequest = new HashMap<String, Object>();
nonQueryRequest.put("updateInfomation", "tagInformationUndefinedData"); nonQueryRequest.put("updateInfomationType", "tagInformationUndefinedData");
boolean saved = crdnService.update(nonQueryRequest, crdn, null); boolean saved = crdnService.update(nonQueryRequest, crdn, null);
return new ModelAndView("jsonView") return new ModelAndView("jsonView")
.addObject("saved", saved); .addObject("saved", saved);

@ -2,15 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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.CrdnUpdtMapper"> <mapper namespace="cokr.xit.fims.crdn.dao.CrdnUpdtMapper">
<update id="updateTagInformation" parameterType="cokr.xit.fims.crdn.Crdn">
/* 표지정보확인 수정(crdnUpdtMapper.updateTagInformation) */
UPDATE TB_CRDN_ADI
SET PARKNG_PSBLTY_RSLT_CD = '1'
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CRDN_ID = #{crdnId} /* 단속 ID */
</update>
<update id="updateCrdn" parameterType="cokr.xit.fims.crdn.Crdn"> <update id="updateCrdn" parameterType="cokr.xit.fims.crdn.Crdn">
/* 단속정보 수정(crdnUpdtMapper.updateCrdn) */ /* 단속정보 수정(crdnUpdtMapper.updateCrdn) */
UPDATE TB_CRDN UPDATE TB_CRDN
@ -46,6 +37,50 @@
WHERE CRDN_ID = #{crdnId} /* 단속 ID */ WHERE CRDN_ID = #{crdnId} /* 단속 ID */
</update> </update>
<update id="updateCrdnAddition" parameterType="cokr.xit.fims.crdn.Crdn">
/* 단속 부가정보 수정(crdnUpdtMapper.updateCrdnAddition) */
UPDATE TB_CRDN_ADI
SET MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
<if test="taskSeCd == 'PVS'">
, OVTIME_YN = #{ovtimeYn} <!-- 시간외 여부 -->
, CRDN_SPAREA_CD = #{crdnSpareaCd} <!-- 단속 특별구역 코드 -->
</if>
<if test="taskSeCd == 'BPV'">
, DTL_CRDN_PLC = #{dtlCrdnPlc} <!-- 상세 단속 장소 -->
, MOSC_X = #{moscX} <!-- 모자이크 X -->
, MOSC_Y = #{moscY} <!-- 모자이크 Y -->
</if>
<if test="taskSeCd == 'ECA'">
, USE_FUEL_CD = #{useFuelCd} <!-- 사용 연료 코드 -->
</if>
<if test="taskSeCd == 'DPV'">
, PARKNG_PSBLTY_RSLT_CD = #{parkngBsbltyRsltCd}<!-- 주차 가능 결과 코드 -->
</if>
<if test="taskSeCd == 'TPV'">
, VLTN_NMTM = #{vltnNmtm} <!-- 위반 횟수 -->
</if>
<if test="taskSeCd == 'PVS' or taskSeCd == 'BPV'">
, CRDN_SE_CD = #{crdnSeCd} <!-- 단속 구분 코드 -->
, CRDN_BGNG_TM = #{crdnBgngTm} <!-- 단속 시작 시각 -->
, CRDN_END_TM = #{crdnEndTm} <!-- 단속 종료 시간 -->
, FFNLG_CARMDL_CD = #{ffnlglCarmdlCd} <!-- 과태료 차종 코드 -->
</if>
<if test="taskSeCd == 'DPV' or taskSeCd == 'ECA' or taskSeCd == 'PVS'">
, CRDN_SN = #{crdnSn} <!-- 단속 일련번호 -->
, TOWNG_YN = #{towngYn} <!-- 견인 여부 -->
</if>
WHERE CRDN_ID = #{crdn.crdnId} /* 단속 ID */
</update>
<update id="updateTagInfo" parameterType="cokr.xit.fims.crdn.Crdn">
/* 표지정보확인 수정(crdnUpdtMapper.updateTagInfo) */
UPDATE TB_CRDN_ADI
SET PARKNG_PSBLTY_RSLT_CD = '1'
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CRDN_ID = #{crdnId} /* 단속 ID */
</update>
<update id="removeCrdn" parameterType="map"> <update id="removeCrdn" parameterType="map">
/* 단속자료 삭제(crdnUpdtMapper.removeCrdn) */ /* 단속자료 삭제(crdnUpdtMapper.removeCrdn) */
UPDATE TB_CRDN UPDATE TB_CRDN

Loading…
Cancel
Save