diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java index 5613b6c2..4d17a269 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java @@ -28,6 +28,7 @@ import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.Crdn05Mapper; import cokr.xit.fims.crdn.dao.Crdn06Mapper; import cokr.xit.fims.crdn.dao.CrdnInfoMapper; +import cokr.xit.fims.crdn.service.bean.Crdn05Bean; import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; import cokr.xit.fims.cvlc.service.CrdnCvlcptService; @@ -51,6 +52,9 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv @Resource(name="crdnCvlcptBean") protected CrdnCvlcptBean crdnCvlcptBean; + @Resource(name="crdn05Bean") + private Crdn05Bean crdn05Bean; + @Resource(name="excl01Bean") private Excl01Bean excl01Bean; @@ -350,11 +354,18 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv int changeFileCnt = (fileInsertEffected - fileDeleteEffected); nonQueryRequest.put("changeFileCnt", changeFileCnt); - //TODO : 금액 변경 - nonQueryRequest.put("changeAmountYn","N"); - //if(){ - //nonQueryRequest.put("changeAmountYn","Y"); - //} + //금액 변경 + int[] basicAmt = crdn05Bean.getBasicAmt(crdn); + int ffnlgAmt = crdnInfo.number("FFNLG_AMT").intValue(); + if(ffnlgAmt != basicAmt[0]){ + nonQueryRequest.put("changeAmountYn","Y"); + crdn.setFfnlgAmt(basicAmt[0]); + crdn.setLevyAmt(basicAmt[0]); + crdn.setAdvntceLevyAmt(basicAmt[1]); + crdn.setFfnlgRductRt("0"); + } else { + nonQueryRequest.put("changeAmountYn","N"); + } //단속상태값 변경 nonQueryRequest.put("changeStatusYn","Y"); diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml index 13172e5d..405151c8 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-info-mapper.xml @@ -93,6 +93,7 @@ SELECT C.CRDN_ID , C.CRDN_STTS_CHG_DT , C.LINK_TBL_NM , C.LINK_ID + , C.FFNLG_AMT , CC.CVLCPT_LINK_ID , CC.CVLCPT_TRSM_CD FROM TB_CRDN C