From 6abc2068eaa482d8ce13ebd90d74ea7252d04de4 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 31 Jan 2023 17:40:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E6=96=B9=E6=A1=88=EF=BC=8C=E7=A6=8F=E5=88=A9=E6=96=B9?= =?UTF-8?q?=E6=A1=88=E6=96=B0=E5=A2=9E=E3=80=81=E7=BC=96=E8=BE=91=E3=80=81?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=96=B9=E6=B3=95=E6=94=B9=E8=BF=9B=EF=BC=8C?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A0=B8=E7=AE=97=E5=8A=A0=E5=85=A5=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E6=96=B9=E6=A1=88=E4=B8=AD=E7=9A=84=E7=BC=B4=E7=BA=B3?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E5=9B=A0=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIAccountBiz.java | 183 ++++++++++++++++-- src/com/engine/salary/biz/SISchemeBiz.java | 18 ++ .../entity/sischeme/bo/InsuranceSchemeBO.java | 3 + .../sischeme/InsuranceSchemeDetailMapper.xml | 12 ++ 4 files changed, 196 insertions(+), 20 deletions(-) diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index bda2fae67..12cfa2157 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -388,11 +388,11 @@ public class SIAccountBiz extends Service { insuranceAccountDetailPO.setPaymentOrganization(paymentOrganization); //核算社保 - accountSocial(insuranceAccountDetailPO, v, tenantKey); + accountSocial(insuranceAccountDetailPO, v, billMonth, tenantKey); //核算公积金 - accountFund(insuranceAccountDetailPO, v, tenantKey); + accountFund(insuranceAccountDetailPO, v, billMonth, tenantKey); //核算其他福利 - accountOther(insuranceAccountDetailPO, v, tenantKey); + accountOther(insuranceAccountDetailPO, v, billMonth, tenantKey); //计算合计 account(insuranceAccountDetailPO); //临时表PO @@ -524,7 +524,7 @@ public class SIAccountBiz extends Service { return insuranceAccountDetailPO; } - public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String tenantKey) { + public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) { if (accountPO.getOther() != null) { InsuranceArchivesOtherSchemePO otherPO = accountPO.getOther(); insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization()); @@ -536,8 +536,10 @@ public class SIAccountBiz extends Service { List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(otherPO.getOtherSchemeId()); encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); //方案中包含的需要缴纳其他的个人福利 + int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1; Map otherPerson = detailPOS.stream() - .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue()) + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 @@ -560,7 +562,29 @@ public class SIAccountBiz extends Service { BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesPerson.get(String.valueOf(e))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); - BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); +// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + BigDecimal result = new BigDecimal("0"); + if (po.getPaymentCycle() != null && po.getPaymentCycle() == 1) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } otherPerJsonMap.put(String.valueOf(e), result.toPlainString()); otherPer.add(result); }); @@ -574,7 +598,8 @@ public class SIAccountBiz extends Service { //方案中包含的需要缴纳公积金的单位福利 Map otherCom = detailPOS.stream() .filter( - item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && item.getPaymentScope() == PaymentScopeEnum.SCOPE_COMPANY.getValue()) + item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 @@ -597,7 +622,29 @@ public class SIAccountBiz extends Service { BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesCom.get(String.valueOf(e))) ? "0" : archivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); - BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); +// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } otherComJsonMap.put(String.valueOf(e), result.toPlainString()); otherComList.add(result); }); @@ -613,7 +660,7 @@ public class SIAccountBiz extends Service { } - public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String tenantKey) { + public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) { if (accountPO.getFund() != null) { InsuranceArchivesFundSchemePO fundPO = accountPO.getFund(); insuranceAccountDetailPO.setFundPayOrg(fundPO.getPaymentOrganization()); @@ -627,8 +674,10 @@ public class SIAccountBiz extends Service { List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(fundPO.getFundSchemeId()); encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); //方案中包含的需要缴纳社保的个人福利 + int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1; Map fundperson = detailPOS.stream() - .filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue()) + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 @@ -651,7 +700,29 @@ public class SIAccountBiz extends Service { BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesPerson.get(String.valueOf(e))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); - BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); +// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } fundPerJsonMap.put(String.valueOf(e), result.toPlainString()); fundPer.add(result); }); @@ -664,7 +735,8 @@ public class SIAccountBiz extends Service { //方案中包含的需要缴纳公积金的单位福利 Map fundCom = detailPOS.stream() - .filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_COMPANY.getValue()) + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue()) + && (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 @@ -687,8 +759,29 @@ public class SIAccountBiz extends Service { BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesCom.get(String.valueOf(e))) ? "0" : archivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); - BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); - ; +// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } fundComJsonMap.put(String.valueOf(e), result.toPlainString()); fundComList.add(result); }); @@ -705,7 +798,7 @@ public class SIAccountBiz extends Service { } - public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String tenantKey) { + public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) { if (accountPO.getSocial() != null) { InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial(); insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization()); @@ -718,8 +811,13 @@ public class SIAccountBiz extends Service { List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(socialPO.getSocialSchemeId()); encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class); //方案中包含的需要缴纳社保的个人福利 + int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1; Map schemeperson = detailPOS.stream() - .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue())) + .filter(item -> + Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && + Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()) && + (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1"))) + ) .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 @@ -736,13 +834,35 @@ public class SIAccountBiz extends Service { List socialPer = new ArrayList<>(); Map socialPerJsonMap = new HashMap<>(); - needArchivesPerson.stream().forEach(e -> { + needArchivesPerson.forEach(e -> { InsuranceSchemeDetailPO po = schemeperson.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesPerson.get(String.valueOf(e))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); - BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); +// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } socialPerJsonMap.put(String.valueOf(e), result.toPlainString()); socialPer.add(result); }); @@ -755,7 +875,8 @@ public class SIAccountBiz extends Service { //方案中包含的需要缴纳社保的单位福利 Map schemeCom = detailPOS.stream() - .filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_COMPANY.getValue()) + .filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue()) && + (item.getPaymentCycle() == null || item.getPaymentCycle() == 0 || (item.getPaymentCycle() == 1 && String.valueOf(item.getCycleSetting().charAt(monthIndex)).equals("1")))) .collect( Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity())); //档案中包含的基数信息 @@ -778,7 +899,29 @@ public class SIAccountBiz extends Service { BigDecimal paymentNum = new BigDecimal(StringUtils.isBlank(archivesCom.get(String.valueOf(e))) ? "0" : archivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); - BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); +// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + BigDecimal result = new BigDecimal("0"); + if (Objects.equals(po.getPaymentCycle(), 1)) { + int monthValue = 1; + for (int i = monthIndex - 1; i >= 0; i--) { + String cycleValue = po.getCycleSetting().charAt(i) + ""; + if (Integer.parseInt(cycleValue) == 1) { + break; + } + monthValue++; + } + if (po.getAccountType() == 1) { + paymentNum = paymentNum.multiply(new BigDecimal(monthValue)); + fixedCost = fixedCost.multiply(new BigDecimal(monthValue)); + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } else { + for (int i = 0; i < monthValue; i++) { + result = result.add(SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost))); + } + } + } else { + result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); + } sociaComJsonMap.put(String.valueOf(e), result.toPlainString()); socialCom.add(result); diff --git a/src/com/engine/salary/biz/SISchemeBiz.java b/src/com/engine/salary/biz/SISchemeBiz.java index b1596254f..2c0f21f65 100644 --- a/src/com/engine/salary/biz/SISchemeBiz.java +++ b/src/com/engine/salary/biz/SISchemeBiz.java @@ -79,6 +79,9 @@ public class SISchemeBiz { .insuranceName(item.getInsuranceName()) .paymentScope(e.getDefaultLabel()) .rententionRule(String.valueOf(RententionRuleEnum.ROUND.getValue())) + .cycleSetting("000000000000") + .paymentCycle("0") + .accountType("0") .build(); if (Objects.equals(item.getDataType(), DataTypeEnum.SYSTEM.getValue())) { insuranceSchemeDetailDTO.setIsPayment(true); @@ -98,6 +101,21 @@ public class SISchemeBiz { if (insuranceSchemeDetailPO.getIsPayment() != null) { insuranceSchemeDetailDTO.setIsPayment(Objects.equals(insuranceSchemeDetailPO.getIsPayment(), IsPaymentEnum.YES.getValue())); } + if (insuranceSchemeDetailPO.getPaymentCycle() != null) { + insuranceSchemeDetailDTO.setPaymentCycle(insuranceSchemeDetailPO.getPaymentCycle() + ""); + } else { + insuranceSchemeDetailDTO.setPaymentCycle("0"); + } + if (insuranceSchemeDetailPO.getAccountType() != null) { + insuranceSchemeDetailDTO.setAccountType(insuranceSchemeDetailPO.getAccountType() + ""); + } else { + insuranceSchemeDetailDTO.setAccountType("0"); + } + if (insuranceSchemeDetailPO.getCycleSetting() == null) { + insuranceSchemeDetailDTO.setCycleSetting("000000000000"); + } else { + insuranceSchemeDetailDTO.setCycleSetting(insuranceSchemeDetailPO.getCycleSetting()); + } if (StringUtils.isNotBlank(insuranceSchemeDetailPO.getUpperLimit())) { BigDecimal bigDecimal = new BigDecimal(insuranceSchemeDetailPO.getUpperLimit()); insuranceSchemeDetailDTO.setUpperLimit(numberCheck(bigDecimal.toPlainString()) ? null : bigDecimal); diff --git a/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java b/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java index 1a6cdd3d5..4b24e4021 100644 --- a/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java +++ b/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java @@ -72,6 +72,9 @@ public class InsuranceSchemeBO { .upperLimit(item.getUpperLimit() != null ? item.getUpperLimit().toString() : "0.000") .paymentProportion(item.getPaymentProportion() != null ? item.getPaymentProportion().toString() : "0.0000") .rententionRule(item.getRententionRule() != null ? Integer.valueOf(item.getRententionRule()) : null) + .paymentCycle(Integer.parseInt(item.getPaymentCycle())) + .cycleSetting(item.getCycleSetting()) + .accountType(Integer.parseInt(item.getAccountType())) .updateTime(new Date()) .validNum(item.getValidNum()) .build() diff --git a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.xml b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.xml index 27e8b6072..fc81b31f1 100644 --- a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.xml +++ b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeDetailMapper.xml @@ -128,6 +128,9 @@ fixed_cost, valid_num, rentention_rule, + payment_cycle, + account_type, + cycle_setting, create_time, update_time, creator, @@ -147,6 +150,9 @@ #{fixedCost}, #{validNum}, #{rententionRule}, + #{paymentCycle}, + #{accountType}, + #{cycleSetting}, #{createTime}, #{updateTime}, #{creator}, @@ -174,6 +180,9 @@ fixed_cost, valid_num, rentention_rule, + payment_cycle, + account_type, + cycle_setting, create_time, update_time, creator, @@ -193,6 +202,9 @@ #{fixedCost}, #{validNum}, #{rententionRule}, + #{paymentCycle}, + #{accountType}, + #{cycleSetting}, #{createTime}, #{updateTime}, #{creator},