From 12fadbea71c0d707d931b4b88a4f0c60edc595d6 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Wed, 16 Aug 2023 16:03:56 +0900 Subject: [PATCH] no message --- .../crdn/service/bean/CrdnServiceBean.java | 21 +++++++----- .../service/bean/CrdnCvlcptServiceBean.java | 32 ++++++++++++++++--- 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java index c6d8c89a..7d080db6 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnServiceBean.java @@ -146,23 +146,28 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService crdn.setAtchFileCnt(0); } + //금액 계산 int[] basicAmt = crdn05Bean.getBasicAmt(crdn); - crdn.setFfnlgAmt(basicAmt[0]); crdn.setLevyAmt(basicAmt[0]); crdn.setAdvntceLevyAmt(basicAmt[1]); - if(ifEmpty(crdn.getCrdnSttsCd(), () -> "").equals("")){ + //TODO : 납부자 저장 + //pyrId = 납부자Bean.save(pyrInfoMap); + //crdn.setRtpyrId(pyrId); - //if(납부자정보) { - //crdn.setCrdnSttsCd("21"); - //} else { - crdn.setCrdnSttsCd("01"); - //} + //TODO : 단속팀 저장 + //if(!ifEmpty(crdn.getTeamId(), () -> "").equals("")) { + //} + if(ifEmpty(crdn.getCrdnSttsCd(), () -> "").equals("")){ + if(!ifEmpty(crdn.getRtpyrId(), () -> "").equals("")) { + crdn.setCrdnSttsCd("21"); + } else { + crdn.setCrdnSttsCd("01"); + } } - String currentSggCd = crdn05Mapper.selectSggCdForCurrentUser(); crdn.setSggCd(currentSggCd); boolean result = crdn05Bean.insertCrdn(crdn); 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 4d17a269..5f973d1c 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 @@ -18,11 +18,12 @@ import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.file.service.bean.FileBean; import cokr.xit.fims.cmmn.CmmnUtil; +import cokr.xit.fims.cmmn.CrdnPayerHstry; import cokr.xit.fims.cmmn.CrdnSttsHstry; +import cokr.xit.fims.cmmn.dao.CrdnPayerHstryMapper; import cokr.xit.fims.cmmn.dao.CrdnSttsHstryMapper; import cokr.xit.fims.cmmn.hwp.AddingParagraphBetweenHWPFile; import cokr.xit.fims.cmmn.hwp.InsertingImageCell; -import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.Crdn05Mapper; @@ -58,15 +59,15 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv @Resource(name="excl01Bean") private Excl01Bean excl01Bean; - @Resource(name="crdnSttsHstryBean") - private CrdnSttsHstryBean crdnSttsHstryBean; - @Resource(name = "crdnCvlcptMapper") private CrdnCvlcptMapper crdnCvlcptMapper; @Resource(name = "crdnSttsHstryMapper") private CrdnSttsHstryMapper crdnSttsHstryMapper; + @Resource(name = "crdnPayerHstryMapper") + private CrdnPayerHstryMapper crdnPayerHstryMapper; + @Resource(name="crdnInfoMapper") private CrdnInfoMapper crdnInfoMapper; @@ -367,6 +368,16 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv nonQueryRequest.put("changeAmountYn","N"); } + + //TODO : 납부자 저장 + //String pyrId = ""; + + //if(!crdnInfo.string("RTPYR_ID").equals(crdn.getRtpyrId())) { + //nonQueryRequest.put("changePayerYn","Y"); + //} else { + nonQueryRequest.put("changePayerYn","N"); + //} + //단속상태값 변경 nonQueryRequest.put("changeStatusYn","Y"); if(acceptType.equals("accept")) { @@ -416,6 +427,19 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv throw new RuntimeException("단속민원답변 수정 중 단속정보변경에 실패하였습니다."); } + //단속 납부자 변경 이력 등록 + if(((String)nonQueryRequest.get("changePayerYn")).equals("Y")) { + CrdnPayerHstry crdnPayerHstry = new CrdnPayerHstry(); + + crdnPayerHstry.setCrdnId(crdn.getCrdnId()); + crdnPayerHstry.setRtpyrId(crdn.getRtpyrId()); + + boolean retSuccess = crdnPayerHstryMapper.insert(crdnPayerHstry); + if(!retSuccess) { + throw new RuntimeException("단속민원답변 수정 중 단속납부자변경 이력 등록에 실패하였습니다."); + } + } + //단속상태 변경 이력 등록 if(((String)nonQueryRequest.get("changeStatusYn")).equals("Y")) { CrdnSttsHstry crdnSttsHstry = new CrdnSttsHstry();