주정차 2시간 초과 처리 메소드 추가

main
이범준 1 year ago
parent d3a8a1ca98
commit 00ea9180c8

@ -19,6 +19,18 @@ public interface CrdnUpdtMapper extends AbstractMapper {
*/ */
int updateTagInfo(Crdn crdn); int updateTagInfo(Crdn crdn);
/** 2 .
* @param crdn
* @return
*/
int updateOverTimeInfo(Crdn crdn);
/** .
* @param crdn
* @return
*/
int updateCrdnAmt(Crdn crdn);
/** .<br /> /** .<br />
* {@link cokr.xit.fims.crdn.service.bean.CrdnBean#update(Crdn)} * {@link cokr.xit.fims.crdn.service.bean.CrdnBean#update(Crdn)}
* @param crdn * @param crdn

@ -37,4 +37,16 @@ public interface CrdnService {
*/ */
boolean update(Map<String,Object> nonQueryRequest, Crdn crdn, List<FileInfo> newFileInfoList); boolean update(Map<String,Object> nonQueryRequest, Crdn crdn, List<FileInfo> newFileInfoList);
/** , .
* @param crdn
* @return
*/
boolean updateOverTimeInfo(Crdn crdn);
/** .
* @param crdn
* @return
*/
boolean updateTagInfo(Crdn crdn);
} }

@ -61,8 +61,6 @@ public class CrdnBean extends AbstractComponent {
String updateInfomationType = (String)ifEmpty(nonQueryRequest.get("updateInfomationType"), "") ; String updateInfomationType = (String)ifEmpty(nonQueryRequest.get("updateInfomationType"), "") ;
switch (ifEmpty(updateInfomationType, () -> "")) { switch (ifEmpty(updateInfomationType, () -> "")) {
case "tagInformationUndefinedData":
return crdnUpdtMapper.updateTagInfo(crdn) == 1 ? true : false;
default: default:
if(crdnUpdtMapper.updateCrdnAddition(crdn) != 1) { if(crdnUpdtMapper.updateCrdnAddition(crdn) != 1) {
return false; return false;

@ -226,13 +226,32 @@ 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) {
if(crdnBean.update(nonQueryRequest, crdn) == false) { boolean result = crdnBean.update(nonQueryRequest, crdn);
if(!result) {
throw new RuntimeException("단속 정보 수정 중 오류가 발생하였습니다."); throw new RuntimeException("단속 정보 수정 중 오류가 발생하였습니다.");
} }
return true; return true;
}
@Override
public boolean updateOverTimeInfo(Crdn crdn) {
if(crdnUpdtMapper.updateOverTimeInfo(crdn) != 1) {
return false;
} }
int[] basicAmt = crdnStngBean.getBasicAmt(crdn);
crdn.setFfnlgAmt(basicAmt[0]);
crdn.setLevyAmt(basicAmt[0]);
crdn.setAdvntceLevyAmt(basicAmt[1]);
return crdnUpdtMapper.updateCrdnAmt(crdn) == 1 ? true : false;
}
@Override
public boolean updateTagInfo(Crdn crdn) {
return crdnUpdtMapper.updateTagInfo(crdn) == 1 ? true : false;
}
} }

@ -64,7 +64,7 @@ public class DpvController {
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("updateInfomationType", "tagInformationUndefinedData"); nonQueryRequest.put("updateInfomationType", "tagInformationUndefinedData");
boolean saved = crdnService.update(nonQueryRequest, crdn, null); boolean saved = crdnService.updateTagInfo(crdn);
return new ModelAndView("jsonView") return new ModelAndView("jsonView")
.addObject("saved", saved); .addObject("saved", saved);
} }

@ -81,6 +81,27 @@
, MDFR = #{modifiedBy} /* 수정자 */ , MDFR = #{modifiedBy} /* 수정자 */
WHERE CRDN_ID = #{crdnId} /* 단속 ID */ WHERE CRDN_ID = #{crdnId} /* 단속 ID */
</update> </update>
<update id="updateOverTimeInfo" parameterType="cokr.xit.fims.crdn.Crdn">
/* 시간초과 여부 수정(crdnUpdtMapper.overTimeInfo) */
UPDATE TB_CRDN_ADI
SET OVTIME_YN = #{ovtimeYn}
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CRDN_ID = #{crdnId} /* 단속 ID */
</update>
<update id="updateCrdnAmt" parameterType="cokr.xit.fims.crdn.Crdn">
/* 단속 금액 수정(crdnUpdtMapper.updateCrdnAmt) */
UPDATE TB_CRDN
SET MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
, FFNLG_AMT = #{ffnlgAmt}
, LEVY_AMT = #{levyAmt}
, ADVNTCE_LEVY_AMT = #{advntceLevyAmt}
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