From 09b358f5b2f9d1d2549afd5ec4b81a0e871e436f Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 13 Feb 2025 13:34:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=B1=E6=99=BA=20=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/siaccount/po/UfTsrysjsbfldaPO.java | 13 ++ .../siarchives/dto/QzSocialInfoDTO.java | 36 +++++ .../param/InsuranceArchivesListParam.java | 3 + .../mapper/siaccount/UfTsrysjsbfldaMapper.xml | 6 + .../siarchives/InsuranceBaseInfoMapper.java | 2 + .../siarchives/InsuranceBaseInfoMapper.xml | 7 + .../salary/service/SIArchivesService.java | 2 + .../salary/service/SISchemeService.java | 3 + .../service/impl/ColumnBuildServiceImpl.java | 22 +-- .../service/impl/RecordsBuildServiceImpl.java | 26 ++-- .../service/impl/SIAccountServiceImpl.java | 140 +++++++++++++----- .../service/impl/SIArchivesServiceImpl.java | 78 ++++++++++ .../service/impl/SIExportServiceImpl.java | 50 +++---- .../salary/web/SIArchivesController.java | 18 +++ 14 files changed, 322 insertions(+), 84 deletions(-) create mode 100644 src/com/engine/salary/entity/siarchives/dto/QzSocialInfoDTO.java diff --git a/src/com/engine/salary/entity/siaccount/po/UfTsrysjsbfldaPO.java b/src/com/engine/salary/entity/siaccount/po/UfTsrysjsbfldaPO.java index 6106b1317..f355cc59b 100644 --- a/src/com/engine/salary/entity/siaccount/po/UfTsrysjsbfldaPO.java +++ b/src/com/engine/salary/entity/siaccount/po/UfTsrysjsbfldaPO.java @@ -28,9 +28,22 @@ public class UfTsrysjsbfldaPO { private String toSxyf; private BigDecimal dyjs; + + // 单位比例 private BigDecimal dybl; + + // 个人比例 + private BigDecimal grbl; + + // 社保福利项目 private String sbflxm; + // 个人固定值 + private BigDecimal grgdz; + + // 单位固定值 + private BigDecimal dwgdz; + private List ygs; } diff --git a/src/com/engine/salary/entity/siarchives/dto/QzSocialInfoDTO.java b/src/com/engine/salary/entity/siarchives/dto/QzSocialInfoDTO.java new file mode 100644 index 000000000..e5145ad27 --- /dev/null +++ b/src/com/engine/salary/entity/siarchives/dto/QzSocialInfoDTO.java @@ -0,0 +1,36 @@ +package com.engine.salary.entity.siarchives.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * @author Harryxzy + * @ClassName QzSocialInfoDTO + * @date 2025/02/12 10:55 + * @description 钱智 - 特殊人员社保信息 + */ + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class QzSocialInfoDTO { + + // 社保福利项目id + private Long insuranceId; + + private String insuranceName; + + // 基数 + private BigDecimal paymentBase; + + // 个人比例 + private BigDecimal paymentProportion; + + // 公司比例 + private BigDecimal comPaymentProportion; +} diff --git a/src/com/engine/salary/entity/siarchives/param/InsuranceArchivesListParam.java b/src/com/engine/salary/entity/siarchives/param/InsuranceArchivesListParam.java index ab15e4b6a..5414f63f3 100644 --- a/src/com/engine/salary/entity/siarchives/param/InsuranceArchivesListParam.java +++ b/src/com/engine/salary/entity/siarchives/param/InsuranceArchivesListParam.java @@ -21,6 +21,9 @@ import java.util.List; @NoArgsConstructor @AllArgsConstructor public class InsuranceArchivesListParam extends BaseQueryParam { + + private Long employeeId; + //姓名 private String userName; diff --git a/src/com/engine/salary/mapper/siaccount/UfTsrysjsbfldaMapper.xml b/src/com/engine/salary/mapper/siaccount/UfTsrysjsbfldaMapper.xml index 604a3aa4e..09906bf69 100644 --- a/src/com/engine/salary/mapper/siaccount/UfTsrysjsbfldaMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/UfTsrysjsbfldaMapper.xml @@ -8,6 +8,9 @@ + + + @@ -18,6 +21,9 @@ , dt1.dyjs , dt1.dybl , dt1.sbflxm + , dt1.grbl + , dt1.grgdz + , dt1.dwgdz diff --git a/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.java b/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.java index 898d55471..03712fb9c 100644 --- a/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.java +++ b/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.java @@ -27,6 +27,8 @@ public interface InsuranceBaseInfoMapper { */ List listByIds(@Param("ids")Collection ids); + List listByEmployeeId(@Param("employeeId")Long employeeId); + /** * 查询对应id的记录 */ diff --git a/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.xml b/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.xml index 33ceb8af1..7793722bb 100644 --- a/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/InsuranceBaseInfoMapper.xml @@ -332,6 +332,13 @@ + UPDATE hrsa_insurance_base_info diff --git a/src/com/engine/salary/service/SIArchivesService.java b/src/com/engine/salary/service/SIArchivesService.java index dd13f472a..1a224e95d 100644 --- a/src/com/engine/salary/service/SIArchivesService.java +++ b/src/com/engine/salary/service/SIArchivesService.java @@ -164,4 +164,6 @@ public interface SIArchivesService { List listInsuranceArchivesOtherSchemeByIds(List ids); List listAll(); + + Map getSIInfo4Qz(Long employeeId); } diff --git a/src/com/engine/salary/service/SISchemeService.java b/src/com/engine/salary/service/SISchemeService.java index 86eb024ee..93e0eaaaf 100644 --- a/src/com/engine/salary/service/SISchemeService.java +++ b/src/com/engine/salary/service/SISchemeService.java @@ -12,6 +12,7 @@ import com.engine.salary.entity.sischeme.po.InsuranceSchemePO; import com.engine.salary.util.page.PageInfo; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import java.util.Collection; import java.util.List; import java.util.Map; @@ -56,6 +57,8 @@ public interface SISchemeService { XSSFWorkbook export(InsuranceArchivesListParam param); + Collection queryInsuranceSchemeDetailList(Long id); + /** * 获取方案名称 * diff --git a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java index 7a2b758e6..5680ebbc7 100644 --- a/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/ColumnBuildServiceImpl.java @@ -104,20 +104,10 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100388, "社保个人合计") + "", "socialPerSum")); - // 钱智 二开 - specialColumns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> { - list.add(new WeaTableColumn("150px",k, v)); - }); - list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 0, "单位超额-社保合计") + "", "socialSpecialSum")); personColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100390, "公积金个人合计") + "", "fundPerSum")); - // 钱智 二开 - specialColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { - list.add(new WeaTableColumn("150px",k, v)); - }); - list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 0, "单位超额-公积金合计") + "", "fundSpecialSum")); personColumns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); @@ -127,19 +117,29 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100394, "社保单位合计") + "", "socialComSum")); + // 钱智 二开 + specialColumns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> { + list.add(new WeaTableColumn("150px",k, v)); + }); + list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 0, "单位超额-社保合计") + "", "socialSpecialSum")); comColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100395, "公积金单位合计") + "", "fundComSum")); + // 钱智 二开 + specialColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { + list.add(new WeaTableColumn("150px",k, v)); + }); + list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 0, "单位超额-公积金合计") + "", "fundSpecialSum")); comColumns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100396, "其他福利单位合计") + "", "otherComSum")); - list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 0, "单位超额-合计") + "", "specialSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100397, "单位合计") + "", "comSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100398, "社保合计") + "", "socialSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100399, "公积金合计") + "", "fundSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100400, "其他福利合计") + "", "otherSum")); + list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 0, "单位超额-合计") + "", "specialSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 93278, "合计") + "", "total")); return list; } diff --git a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java index efd1666a5..51fd19482 100644 --- a/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java +++ b/src/com/engine/salary/service/impl/RecordsBuildServiceImpl.java @@ -377,17 +377,18 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ Map socialSpecialJson = JSON.parseObject(item.getSocialSpecialJson(), new HashMap().getClass()); if(socialSpecialJson!=null){ socialSpecialJson.forEach((k, v) -> { - String standardSocialPer = Util.null2String(record.get(k + "socialPer")); - BigDecimal standardSocialPerVal = new BigDecimal(0); - if (NumberUtils.isCreatable(standardSocialPer)) { - standardSocialPerVal = new BigDecimal(standardSocialPer); - } + // String standardSocialPer = Util.null2String(record.get(k + "socialPer")); + // BigDecimal standardSocialPerVal = new BigDecimal(0); + // if (NumberUtils.isCreatable(standardSocialPer)) { + // standardSocialPerVal = new BigDecimal(standardSocialPer); + // } + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); String standardSocialCom = Util.null2String(record.get(k + "socialCom")); BigDecimal standardComPerVal = new BigDecimal(0); if (NumberUtils.isCreatable(standardSocialCom)) { standardComPerVal = new BigDecimal(standardSocialCom); } - BigDecimal subtract = standardSocialPerVal.subtract(standardComPerVal); + BigDecimal subtract = specialComVal.subtract(standardComPerVal); socialSpecialSum[0] = socialSpecialSum[0].add(subtract); record.put(k + "socialSpecial", subtract.toString()); }); @@ -400,17 +401,18 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ Map fundSpecialJson = JSON.parseObject(item.getFundSpecialJson(), new HashMap().getClass()); if(fundSpecialJson!=null){ fundSpecialJson.forEach((k, v) -> { - String standardFundPer = Util.null2String(record.get(k + "fundPer")); - BigDecimal standardFundPerVal = new BigDecimal(0); - if (NumberUtils.isCreatable(standardFundPer)) { - standardFundPerVal = new BigDecimal(standardFundPer); - } + // String standardFundPer = Util.null2String(record.get(k + "fundPer")); + // BigDecimal standardFundPerVal = new BigDecimal(0); + // if (NumberUtils.isCreatable(standardFundPer)) { + // standardFundPerVal = new BigDecimal(standardFundPer); + // } + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); String standardFundCom = Util.null2String(record.get(k + "fundCom")); BigDecimal standardFundComVal = new BigDecimal(0); if (NumberUtils.isCreatable(standardFundCom)) { standardFundComVal = new BigDecimal(standardFundCom); } - BigDecimal subtract = standardFundPerVal.subtract(standardFundComVal); + BigDecimal subtract = specialComVal.subtract(standardFundComVal); fundSpecialSum[0] = fundSpecialSum[0].add(subtract); record.put(k + "fundSpecial", subtract.toString()); }); diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 102dbf09c..ba60f266c 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -1103,17 +1103,18 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { Map socialSpecialJson = JSON.parseObject(item.getSocialSpecialJson(), new HashMap().getClass()); if(socialSpecialJson!=null){ socialSpecialJson.forEach((k, v) -> { - String standardSocialPer = Util.null2String(record.get(k + "socialCommonPer")); - BigDecimal standardSocialPerVal = new BigDecimal(0); - if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardSocialPer)) { - standardSocialPerVal = new BigDecimal(standardSocialPer); - } + // String standardSocialPer = Util.null2String(record.get(k + "socialCommonPer")); + // BigDecimal standardSocialPerVal = new BigDecimal(0); + // if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardSocialPer)) { + // standardSocialPerVal = new BigDecimal(standardSocialPer); + // } + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); String standardSocialCom = Util.null2String(record.get(k + "socialCommonCom")); BigDecimal standardComPerVal = new BigDecimal(0); if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardSocialCom)) { standardComPerVal = new BigDecimal(standardSocialCom); } - BigDecimal subtract = standardSocialPerVal.subtract(standardComPerVal); + BigDecimal subtract = specialComVal.subtract(standardComPerVal); socialSpecialSum[0] = socialSpecialSum[0].add(subtract); record.put(k + "socialSpecial", subtract.toString()); }); @@ -1172,17 +1173,18 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { Map fundSpecialJson = JSON.parseObject(item.getFundSpecialJson(), new HashMap().getClass()); if(fundSpecialJson!=null){ fundSpecialJson.forEach((k, v) -> { - String standardFundPer = Util.null2String(record.get(k + "fundCommonPer")); - BigDecimal standardFundPerVal = new BigDecimal(0); - if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardFundPer)) { - standardFundPerVal = new BigDecimal(standardFundPer); - } + // String standardFundPer = Util.null2String(record.get(k + "fundCommonPer")); + // BigDecimal standardFundPerVal = new BigDecimal(0); + // if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardFundPer)) { + // standardFundPerVal = new BigDecimal(standardFundPer); + // } + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); String standardFundCom = Util.null2String(record.get(k + "fundCommonCom")); BigDecimal standardFundComVal = new BigDecimal(0); if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardFundCom)) { standardFundComVal = new BigDecimal(standardFundCom); } - BigDecimal subtract = standardFundPerVal.subtract(standardFundComVal); + BigDecimal subtract = specialComVal.subtract(standardFundComVal); fundSpecialSum[0] = fundSpecialSum[0].add(subtract); record.put(k + "fundSpecial", subtract.toString()); }); @@ -5489,7 +5491,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // 获取特殊人员缴纳的福利项 List xmidList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(ufTsrysjsbfldaList)) { - xmidList = ufTsrysjsbfldaList.stream().map(UfTsrysjsbfldaPO::getSbflxm) + xmidList = ufTsrysjsbfldaList.stream() + .filter(po -> po.getGrbl() != null) + .map(UfTsrysjsbfldaPO::getSbflxm) .filter(xmid -> NumberUtils.isNumber(xmid)) .map(Long::valueOf) .collect(Collectors.toList()); @@ -5530,7 +5534,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List fundPer = new ArrayList<>(); Map fundPerJsonMap = new HashMap<>(); Map ufTsrysjsbfldaPOMap = SalaryEntityUtil.convert2Map(ufTsrysjsbfldaList, po -> Long.valueOf(po.getSbflxm())); - Map specialFundJsonMap = new HashMap<>(); needArchivesPerson.stream().forEach(e -> { // 获取特殊台账数据 UfTsrysjsbfldaPO ufTsrysjsbfldaPO = ufTsrysjsbfldaPOMap.get(e); @@ -5540,7 +5543,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); BigDecimal result = new BigDecimal("0"); - BigDecimal specialResult = new BigDecimal("0"); + BigDecimal specialPerResult = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { int monthValue = 1; for (int i = monthIndex - 1; i >= 0; i--) { @@ -5562,12 +5565,16 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } else { result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); } - if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getDybl() != null && ufTsrysjsbfldaPO.getDyjs() != null) { - BigDecimal specialProportion = ufTsrysjsbfldaPO.getDybl().divide(new BigDecimal("100")); - specialResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); - specialFundJsonMap.put(String.valueOf(e), specialResult.toPlainString()); + + if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getGrbl() == null && ufTsrysjsbfldaPO.getGrgdz() != null) { + // 个人固定值 + result = ufTsrysjsbfldaPO.getGrgdz(); + } + if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getGrbl() != null && ufTsrysjsbfldaPO.getDyjs() != null && ufTsrysjsbfldaPO.getGrgdz() == null) { + BigDecimal specialProportion = ufTsrysjsbfldaPO.getGrbl().divide(new BigDecimal("100")); + specialPerResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); // 覆盖至个人部分 - result = specialResult; + result = specialPerResult; // 基数也要覆盖 if (fundBaseMap.containsKey(String.valueOf(e))) { fundBaseMap.put(String.valueOf(e), ufTsrysjsbfldaPO.getDyjs().toPlainString()); @@ -5577,7 +5584,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { fundPer.add(result); }); insuranceAccountDetailPO.setFundPerJson(JSON.toJSONString(fundPerJsonMap)); - insuranceAccountDetailPO.setFundSpecialJson(JSON.toJSONString(specialFundJsonMap)); insuranceAccountDetailPO.setFundPaymentBaseString(JSON.toJSONString(fundBaseMap)); BigDecimal funPerSum = new BigDecimal("0"); for (BigDecimal bigDecimal : fundPer) { @@ -5585,10 +5591,24 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } insuranceAccountDetailPO.setFundPerSum(funPerSum.toPlainString()); + // 单位 + // 获取特殊人员缴纳的福利项 + List comXmidList = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(ufTsrysjsbfldaList)) { + comXmidList = ufTsrysjsbfldaList.stream() + .filter(po -> po.getGrbl() != null) + .map(UfTsrysjsbfldaPO::getSbflxm) + .filter(xmid -> NumberUtils.isNumber(xmid)) + .map(Long::valueOf) + .collect(Collectors.toList()); + } + List finalComXmidList = comXmidList; //方案中包含的需要缴纳公积金的单位福利 Map fundCom = detailPOS.stream() - .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")))) + .filter(item -> + (finalComXmidList.contains(item.getInsuranceId()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) || + (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())); //档案中包含的基数信息 @@ -5621,13 +5641,17 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List fundComList = new ArrayList<>(); Map fundComJsonMap = new HashMap<>(); HashMap finalArchivesCom = archivesCom; + Map specialFundJsonMap = new HashMap<>(); needArchivesCom.stream().forEach(e -> { + // 获取特殊台账数据 + UfTsrysjsbfldaPO ufTsrysjsbfldaPO = ufTsrysjsbfldaPOMap.get(e); InsuranceSchemeDetailPO po = fundCom.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.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 = new BigDecimal("0"); + BigDecimal specialComResult = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { int monthValue = 1; for (int i = monthIndex - 1; i >= 0; i--) { @@ -5649,10 +5673,21 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } else { result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); } + + if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getDybl() == null && ufTsrysjsbfldaPO.getDwgdz() != null) { + // 单位固定值 + specialFundJsonMap.put(String.valueOf(e), ufTsrysjsbfldaPO.getDwgdz().toPlainString()); + } + if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getDybl() != null && ufTsrysjsbfldaPO.getDyjs() != null && ufTsrysjsbfldaPO.getDwgdz() == null) { + BigDecimal specialProportion = ufTsrysjsbfldaPO.getDybl().divide(new BigDecimal("100")); + specialComResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); + specialFundJsonMap.put(String.valueOf(e), specialComResult.toPlainString()); + } fundComJsonMap.put(String.valueOf(e), result.toPlainString()); fundComList.add(result); }); insuranceAccountDetailPO.setFundComJson(JSON.toJSONString(fundComJsonMap)); + insuranceAccountDetailPO.setFundSpecialJson(JSON.toJSONString(specialFundJsonMap)); BigDecimal fundComSum = new BigDecimal("0"); for (BigDecimal bigDecimal : fundComList) { fundComSum = fundComSum.add(bigDecimal); @@ -5684,14 +5719,16 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { //方案中包含的需要缴纳社保的个人福利 int monthIndex = Integer.parseInt(billMonth.split("-")[1]) - 1; // 获取特殊人员缴纳的福利项 - List xmidList = new ArrayList<>(); + List perXmidList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(ufTsrysjsbfldaList)) { - xmidList = ufTsrysjsbfldaList.stream().map(UfTsrysjsbfldaPO::getSbflxm) + perXmidList = ufTsrysjsbfldaList.stream() + .filter(data -> data.getGrbl() != null) + .map(UfTsrysjsbfldaPO::getSbflxm) .filter(xmid -> NumberUtils.isNumber(xmid)) .map(Long::valueOf) .collect(Collectors.toList()); } - List finalXmidList = xmidList; + List finalXmidList = perXmidList; Map schemeperson = detailPOS.stream() .filter(item -> (finalXmidList.contains(item.getInsuranceId()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue())) || @@ -5726,7 +5763,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List socialPer = new ArrayList<>(); Map socialPerJsonMap = new HashMap<>(); Map ufTsrysjsbfldaPOMap = SalaryEntityUtil.convert2Map(ufTsrysjsbfldaList, po -> Long.valueOf(po.getSbflxm())); - Map specialSocialJsonMap = new HashMap<>(); + needArchivesPerson.forEach(e -> { // 获取特殊台账数据 UfTsrysjsbfldaPO ufTsrysjsbfldaPO = ufTsrysjsbfldaPOMap.get(e); @@ -5736,7 +5773,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); BigDecimal result = new BigDecimal("0"); - BigDecimal specialResult = new BigDecimal("0"); + // 特殊个人值 + BigDecimal specialPerResult = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { int monthValue = 1; for (int i = monthIndex - 1; i >= 0; i--) { @@ -5758,12 +5796,15 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } else { result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); } - if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getDybl() != null && ufTsrysjsbfldaPO.getDyjs() != null) { - BigDecimal specialProportion = ufTsrysjsbfldaPO.getDybl().divide(new BigDecimal("100")); - specialResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); - specialSocialJsonMap.put(String.valueOf(e), specialResult.toPlainString()); + if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getGrbl() == null && ufTsrysjsbfldaPO.getGrgdz() != null) { + // 个人固定值 + result = ufTsrysjsbfldaPO.getGrgdz(); + } + if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getGrbl() != null && ufTsrysjsbfldaPO.getDyjs() != null && ufTsrysjsbfldaPO.getGrgdz() == null) { + BigDecimal specialProportion = ufTsrysjsbfldaPO.getGrbl().divide(new BigDecimal("100")); + specialPerResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); // 覆盖至个人部分 - result = specialResult; + result = specialPerResult; // 基数也要覆盖 if (socialBaseMap.containsKey(String.valueOf(e))) { socialBaseMap.put(String.valueOf(e), ufTsrysjsbfldaPO.getDyjs().toPlainString()); @@ -5773,7 +5814,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { socialPer.add(result); }); insuranceAccountDetailPO.setSocialPerJson(JSON.toJSONString(socialPerJsonMap)); - insuranceAccountDetailPO.setSocialSpecialJson(JSON.toJSONString(specialSocialJsonMap)); insuranceAccountDetailPO.setSocialPaymentBaseString(JSON.toJSONString(socialBaseMap)); BigDecimal socialPerSum = new BigDecimal("0"); for (BigDecimal bigDecimal : socialPer) { @@ -5781,9 +5821,21 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } insuranceAccountDetailPO.setSocialPerSum(socialPerSum.toPlainString()); //方案中包含的需要缴纳社保的单位福利 + // 获取特殊人员缴纳的福利项 + List comXmidList = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(ufTsrysjsbfldaList)) { + comXmidList = ufTsrysjsbfldaList.stream() + .filter(data -> data.getDybl() != null) + .map(UfTsrysjsbfldaPO::getSbflxm) + .filter(xmid -> NumberUtils.isNumber(xmid)) + .map(Long::valueOf) + .collect(Collectors.toList()); + } + List finalComXmidList = comXmidList; Map schemeCom = detailPOS.stream() - .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")))) + .filter(item -> (finalComXmidList.contains(item.getInsuranceId()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) || + (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())); //档案中包含的基数信息 @@ -5816,13 +5868,18 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List socialCom = new ArrayList<>(); Map sociaComJsonMap = new HashMap<>(); HashMap finalArchivesCom = archivesCom; + Map specialSocialJsonMap = new HashMap<>(); needArchivesCom.stream().forEach(e -> { + // 获取特殊台账数据 + UfTsrysjsbfldaPO ufTsrysjsbfldaPO = ufTsrysjsbfldaPOMap.get(e); InsuranceSchemeDetailPO po = schemeCom.get(e); BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.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 = new BigDecimal("0"); + // 特殊个人值 + BigDecimal specialComResult = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { int monthValue = 1; for (int i = monthIndex - 1; i >= 0; i--) { @@ -5844,6 +5901,17 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } else { result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); } + + if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getGrbl() == null && ufTsrysjsbfldaPO.getGrgdz() != null) { + // 个人固定值 + specialSocialJsonMap.put(String.valueOf(e), ufTsrysjsbfldaPO.getGrgdz().toString()); + } + if (ufTsrysjsbfldaPO != null && ufTsrysjsbfldaPO.getDybl() != null && ufTsrysjsbfldaPO.getDyjs() != null && ufTsrysjsbfldaPO.getDwgdz() == null) { + BigDecimal specialProportion = ufTsrysjsbfldaPO.getDybl().divide(new BigDecimal("100")); + specialComResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); + specialSocialJsonMap.put(String.valueOf(e), specialComResult.toPlainString()); + } + insuranceAccountDetailPO.setSocialSpecialJson(JSON.toJSONString(specialSocialJsonMap)); sociaComJsonMap.put(String.valueOf(e), result.toPlainString()); socialCom.add(result); diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 6d45abc1f..3d234a94a 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -67,6 +67,7 @@ import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.math.NumberUtils; import org.apache.ibatis.session.SqlSession; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.beans.BeanUtils; @@ -4226,4 +4227,81 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService public List listAll() { return getInsuranceBaseInfoMapper().listAll(); } + + /** + * 根据员工查询社保福利基数、缴纳比例信息 + * @param employeeId + * @return + */ + @Override + public Map getSIInfo4Qz(Long employeeId) { + Map resultMap = new HashMap<>(); + // 查询社保福利档案 + List insuranceArchivesBaseInfoList = getInsuranceBaseInfoMapper().listByEmployeeId(employeeId); + insuranceArchivesBaseInfoList = insuranceArchivesBaseInfoList.stream().filter(po -> (po.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()) || po.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue()))).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(insuranceArchivesBaseInfoList)) { + return resultMap; + } + if (insuranceArchivesBaseInfoList.size() > 1) { + resultMap.put("msg", "该员工在社保福利档案中存在"+insuranceArchivesBaseInfoList.size()+"条档案,请检查后保存"); + } + InsuranceArchivesBaseInfoPO archivesBaseInfoPO = insuranceArchivesBaseInfoList.get(0); + InsuranceArchivesSocialSchemePO socialArchive = getSocialSchemeMapper().getOneById(archivesBaseInfoPO.getSocialArchivesId()); + List infoList = new ArrayList<>(); + if (socialArchive != null && socialArchive.getSocialSchemeId() != null) { + // 获取社保方案信息 + List insuranceSchemeDetailList = getSISchemeService(user).queryInsuranceSchemeDetailList(socialArchive.getSocialSchemeId()).stream().collect(Collectors.toList()); + Map> insuranceSchemeDetailMap = SalaryEntityUtil.group2Map(insuranceSchemeDetailList, InsuranceSchemeDetailPO::getInsuranceId); + + Map iCategoryMap = SalaryEntityUtil.convert2Map(getICategoryMapper().listAll(), ICategoryPO::getId, ICategoryPO::getInsuranceName); + Map socialJson = JSON.parseObject(socialArchive.getSocialPaymentBaseString(), new TypeReference>() {}); + insuranceSchemeDetailMap.forEach((insuranceId, detailList) -> { + Map paymentProportionMap = SalaryEntityUtil.convert2Map(detailList, detail -> detail.getPaymentScope(), detail -> detail.getPaymentProportion()); + // 个人缴纳比例 + String paymentProportionStr = paymentProportionMap.get(PaymentScopeEnum.SCOPE_PERSON.getValue()); + BigDecimal paymentProportion = NumberUtils.isCreatable(paymentProportionStr) ? new BigDecimal(paymentProportionStr) : null; + // 公司缴纳比例 + String paymentProportionComStr = paymentProportionMap.get(PaymentScopeEnum.SCOPE_COMPANY.getValue()); + BigDecimal paymentProportionCom = NumberUtils.isCreatable(paymentProportionComStr) ? new BigDecimal(paymentProportionComStr) : null; + // 缴纳基数 + String paymentBaseStr = socialJson.get(insuranceId.toString()) == null ? "" : socialJson.get(insuranceId.toString()).toString(); + BigDecimal paymentBase = NumberUtils.isCreatable(paymentBaseStr) ? new BigDecimal(paymentBaseStr) : null; + infoList.add(QzSocialInfoDTO.builder() + .insuranceId(insuranceId) + .insuranceName(iCategoryMap.getOrDefault(insuranceId, "")) + .paymentBase(paymentBase) + .paymentProportion(paymentProportion) + .comPaymentProportion(paymentProportionCom) + .build()); + }); + } + // 获取公积金方案 + InsuranceArchivesFundSchemePO fundArchive = getFundSchemeMapper().getOneById(archivesBaseInfoPO.getFundArchivesId()); + if (fundArchive != null && fundArchive.getFundSchemeId() != null) { + // 获取社保方案信息 + List insuranceSchemeDetailList = getSISchemeService(user).queryInsuranceSchemeDetailList(fundArchive.getFundSchemeId()).stream().collect(Collectors.toList()); + Map> insuranceSchemeDetailMap = SalaryEntityUtil.group2Map(insuranceSchemeDetailList, InsuranceSchemeDetailPO::getInsuranceId); + Map fundJson = JSON.parseObject(fundArchive.getFundPaymentBaseString(), new TypeReference>() {}); + insuranceSchemeDetailMap.forEach((insuranceId, detailList) -> { + Map paymentProportionMap = SalaryEntityUtil.convert2Map(detailList, detail -> detail.getPaymentScope(), detail -> detail.getPaymentProportion()); + // 个人缴纳比例 + String paymentProportionStr = paymentProportionMap.get(PaymentScopeEnum.SCOPE_PERSON.getValue()); + BigDecimal paymentProportion = NumberUtils.isCreatable(paymentProportionStr) ? new BigDecimal(paymentProportionStr) : null; + // 公司缴纳比例 + String paymentProportionComStr = paymentProportionMap.get(PaymentScopeEnum.SCOPE_COMPANY.getValue()); + BigDecimal paymentProportionCom = NumberUtils.isCreatable(paymentProportionComStr) ? new BigDecimal(paymentProportionComStr) : null; + // 缴纳基数 + String paymentBaseStr = fundJson.get(insuranceId.toString()) == null ? "" : fundJson.get(insuranceId.toString()).toString(); + BigDecimal paymentBase = NumberUtils.isCreatable(paymentBaseStr) ? new BigDecimal(paymentBaseStr) : null; + infoList.add(QzSocialInfoDTO.builder() + .insuranceId(insuranceId) + .paymentBase(paymentBase) + .paymentProportion(paymentProportion) + .paymentProportion(paymentProportionCom) + .build()); + }); + } + resultMap.put("dataList",infoList); + return resultMap; + } } diff --git a/src/com/engine/salary/service/impl/SIExportServiceImpl.java b/src/com/engine/salary/service/impl/SIExportServiceImpl.java index 500d33e44..0aa048708 100644 --- a/src/com/engine/salary/service/impl/SIExportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIExportServiceImpl.java @@ -565,17 +565,18 @@ public class SIExportServiceImpl extends Service implements SIExportService { Map socialSpecialJson = JSON.parseObject(item.getSocialSpecialJson(), new HashMap().getClass()); if(socialSpecialJson!=null){ socialSpecialJson.forEach((k, v) -> { - String standardSocialPer = Util.null2String(record.get(k + "socialPer")); - BigDecimal standardSocialPerVal = new BigDecimal(0); - if (NumberUtils.isCreatable(standardSocialPer)) { - standardSocialPerVal = new BigDecimal(standardSocialPer); - } + // String standardSocialPer = Util.null2String(record.get(k + "socialPer")); + // BigDecimal standardSocialPerVal = new BigDecimal(0); + // if (NumberUtils.isCreatable(standardSocialPer)) { + // standardSocialPerVal = new BigDecimal(standardSocialPer); + // } + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); String standardSocialCom = Util.null2String(record.get(k + "socialCom")); BigDecimal standardComPerVal = new BigDecimal(0); if (NumberUtils.isCreatable(standardSocialCom)) { standardComPerVal = new BigDecimal(standardSocialCom); } - BigDecimal subtract = standardSocialPerVal.subtract(standardComPerVal); + BigDecimal subtract = specialComVal.subtract(standardComPerVal); socialSpecialSum[0] = socialSpecialSum[0].add(subtract); record.put(k + "socialSpecial", subtract.toString()); }); @@ -588,17 +589,18 @@ public class SIExportServiceImpl extends Service implements SIExportService { Map fundSpecialJson = JSON.parseObject(item.getFundSpecialJson(), new HashMap().getClass()); if(fundSpecialJson!=null){ fundSpecialJson.forEach((k, v) -> { - String standardFundPer = Util.null2String(record.get(k + "fundPer")); - BigDecimal standardFundPerVal = new BigDecimal(0); - if (NumberUtils.isCreatable(standardFundPer)) { - standardFundPerVal = new BigDecimal(standardFundPer); - } + // String standardFundPer = Util.null2String(record.get(k + "fundPer")); + // BigDecimal standardFundPerVal = new BigDecimal(0); + // if (NumberUtils.isCreatable(standardFundPer)) { + // standardFundPerVal = new BigDecimal(standardFundPer); + // } + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); String standardFundCom = Util.null2String(record.get(k + "fundCom")); BigDecimal standardFundComVal = new BigDecimal(0); if (NumberUtils.isCreatable(standardFundCom)) { standardFundComVal = new BigDecimal(standardFundCom); } - BigDecimal subtract = standardFundPerVal.subtract(standardFundComVal); + BigDecimal subtract = specialComVal.subtract(standardFundComVal); fundSpecialSum[0] = fundSpecialSum[0].add(subtract); record.put(k + "fundSpecial", subtract.toString()); }); @@ -873,22 +875,10 @@ public class SIExportServiceImpl extends Service implements SIExportService { list.add(new WeaTableColumn("150px", k, v)); }); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100388, "社保个人合计"), "socialPerSum")); - // 钱智 二开 - specialColumns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> { - list.add(new WeaTableColumn("150px",k, v)); - }); - list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 0, "单位超额-社保合计"), "socialSpecialSum")); - personColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px", k, v)); }); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100390, "公积金个人合计"), "fundPerSum")); - // 钱智 二开 - specialColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { - list.add(new WeaTableColumn("150px",k, v)); - }); - list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 0, "单位超额-公积金合计"), "fundSpecialSum")); - personColumns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px", k, v)); }); @@ -898,19 +888,29 @@ public class SIExportServiceImpl extends Service implements SIExportService { list.add(new WeaTableColumn("150px", k, v)); }); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100394, "社保单位合计"), "socialComSum")); + // 钱智 二开 + specialColumns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> { + list.add(new WeaTableColumn("150px",k, v)); + }); + list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 0, "单位超额-社保合计"), "socialSpecialSum")); comColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px", k, v)); }); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100395, "公积金单位合计"), "fundComSum")); + // 钱智 二开 + specialColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { + list.add(new WeaTableColumn("150px",k, v)); + }); + list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 0, "单位超额-公积金合计"), "fundSpecialSum")); comColumns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px", k, v)); }); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100396, "其他福利单位合计"), "otherComSum")); - list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "单位超额-合计"), "specialSum")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100397, "单位合计"), "comSum")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100398, "社保合计"), "socialSum")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100399, "公积金合计"), "fundSum")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100400, "其他福利合计"), "otherSum")); + list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "单位超额-合计"), "specialSum")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(93278, "合计"), "total")); return list; } diff --git a/src/com/engine/salary/web/SIArchivesController.java b/src/com/engine/salary/web/SIArchivesController.java index e0b3bfe89..a67ae30bb 100644 --- a/src/com/engine/salary/web/SIArchivesController.java +++ b/src/com/engine/salary/web/SIArchivesController.java @@ -265,4 +265,22 @@ public class SIArchivesController { User user = HrmUserVarify.getUser(request, response); return new ResponseResult>(user).run(getService(user)::historyListByEmployeeIdAndOperator, param); } + + + + /** + * 根据员工查询社保福利基数、缴纳比例信息 + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/getSIInfo4Qz") + @Produces(MediaType.APPLICATION_JSON) + public String getSIInfo4Qz(@Context HttpServletRequest request, @Context HttpServletResponse response,@RequestBody InsuranceArchivesListParam param) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult>(user).run(getService(user)::getSIInfo4Qz, param.getEmployeeId()); + } + }