From 553564a6b6cdd3618dbc00dbb68a2e315aa33a14 Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 2 Nov 2022 19:28:56 +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=A8=A1=E5=9D=97=E6=A1=A3=E6=A1=88=E4=B8=80=E5=AF=B9?= =?UTF-8?q?=E5=A4=9A-=E5=85=AC=E7=A7=AF=E9=87=91/=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E4=B8=AA=E7=A8=8E=E6=89=A3?= =?UTF-8?q?=E7=BC=B4=E4=B9=89=E5=8A=A1=E4=BA=BA=E9=BB=98=E8=AE=A4=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index d20ce0ab0..0b3b52ca9 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -92,6 +92,18 @@ public class SIArchivesBiz { return MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class); } + private SocialSchemeMapper getSocialSchemeMapper() { + return MapperProxyFactory.getProxy(SocialSchemeMapper.class); + } + + private FundSchemeMapper getFundSchemeMapper() { + return MapperProxyFactory.getProxy(FundSchemeMapper.class); + } + + private OtherSchemeMapper getOtherSchemeMapper() { + return MapperProxyFactory.getProxy(OtherSchemeMapper.class); + } + /** * @param welfareType * @param employeeId @@ -1412,6 +1424,36 @@ public class SIArchivesBiz { public void createOldInsuranceBaseInfo(Long creator) { List nowBaseInfoList = getInsuranceBaseInfoMapper().getInsuranceBaseInfoList(); if (nowBaseInfoList.size() == 0) { + //处理公积金、其他福利档案中个税扣缴义务人为空的情况 + List socialList = getSocialSchemeMapper().listAll(); + List fundList = getFundSchemeMapper().listAll(); + List otherList = getOtherSchemeMapper().listAll(); + + List updateFundList = new ArrayList<>(); + List updateOtherList = new ArrayList<>(); + for (InsuranceArchivesSocialSchemePO socialSchemePO : socialList) { + List toDealFundList = fundList.stream().filter(f -> f.getEmployeeId().equals(socialSchemePO.getEmployeeId()) && f.getPaymentOrganization() == null).collect(Collectors.toList()); + if (toDealFundList.size() > 0) { + for (InsuranceArchivesFundSchemePO toDealFundPO : toDealFundList) { + toDealFundPO.setPaymentOrganization(socialSchemePO.getPaymentOrganization()); + updateFundList.add(toDealFundPO); + } + } + + List toDealOtherList = otherList.stream().filter(f -> f.getEmployeeId().equals(socialSchemePO.getEmployeeId()) && f.getPaymentOrganization() == null).collect(Collectors.toList()); + if (toDealOtherList.size() > 0) { + for (InsuranceArchivesOtherSchemePO toDealOtherPO : toDealOtherList) { + toDealOtherPO.setPaymentOrganization(socialSchemePO.getPaymentOrganization()); + updateOtherList.add(toDealOtherPO); + } + } + //更新公积金和其他福利档案 + updateFundList.forEach(getFundSchemeMapper()::updateById); + updateOtherList.forEach(getOtherSchemeMapper()::updateById); + } + + + // List addBaseInfoList = new ArrayList<>(); List oldBaseInfoList = getInsuranceBaseInfoMapper().getInsuranceBaseInfoListByInsuranceDetail(null); if (oldBaseInfoList.size() > 0) {