Merge remote-tracking branch 'origin/release/2.9.10.2312.02' into release/2.9.10.2312.02
This commit is contained in:
commit
5f7c1c641b
|
|
@ -0,0 +1,39 @@
|
|||
ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
ALTER TABLE hrsa_social_archives ADD COLUMN social_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_fund_archives ADD COLUMN fund_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_other_archives ADD COLUMN other_payment_com_base_string varchar(4000) NULL;
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL;
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD COLUMN social_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD COLUMN fund_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD COLUMN other_payment_com_base_string varchar(4000) NULL;
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL;
|
||||
|
||||
ALTER TABLE hrsa_insurance_base_history ADD COLUMN payment_scope varchar(10) NULL;
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL
|
||||
/
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
ALTER TABLE hrsa_social_archives ADD COLUMN social_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_fund_archives ADD COLUMN fund_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_other_archives ADD COLUMN other_payment_com_base_string varchar(4000) NULL;
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL;
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD COLUMN social_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD COLUMN fund_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD COLUMN other_payment_com_base_string varchar(4000) NULL;
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD COLUMN social_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD COLUMN fund_payment_com_base_string varchar(4000) NULL;
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD COLUMN other_payment_com_base_string varchar(4000) NULL;
|
||||
|
||||
ALTER TABLE hrsa_insurance_base_history ADD COLUMN payment_scope varchar(10) NULL;
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar(4000) NULL
|
||||
GO
|
||||
|
||||
ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar(10) NULL
|
||||
GO
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
ALTER TABLE hrsa_social_archives ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_fund_archives ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_other_archives ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_bill_detail_temp ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD social_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD fund_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_excel_bill_detail ADD other_payment_com_base_string varchar2(4000) NULL;
|
||||
/
|
||||
|
||||
ALTER TABLE hrsa_insurance_base_history ADD payment_scope varchar2(10) NULL;
|
||||
/
|
||||
|
||||
|
|
@ -631,11 +631,13 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
|
||||
public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (accountPO.getOther() != null) {
|
||||
InsuranceArchivesOtherSchemePO otherPO = accountPO.getOther();
|
||||
insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization());
|
||||
insuranceAccountDetailPO.setOtherSchemeId(otherPO.getOtherSchemeId());
|
||||
insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString());
|
||||
insuranceAccountDetailPO.setOtherPaymentComBaseString(otherPO.getOtherPaymentComBaseString());
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), otherPO.getOtherStartTime(), otherPO.getOtherEndTime());
|
||||
if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) {
|
||||
|
|
@ -719,7 +721,13 @@ public class SIAccountBiz extends Service {
|
|||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
HashMap<String, String> archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
// HashMap<String, String> archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> archivesCom = new HashMap<>();
|
||||
if (welBaseDiffSign) {
|
||||
archivesCom = JSON.parseObject(otherPO.getOtherPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
} else {
|
||||
archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
//需要核算其他的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
if (archivesCom != null) {
|
||||
|
|
@ -742,10 +750,11 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
List<BigDecimal> otherComList = new ArrayList<>();
|
||||
Map<String, String> otherComJsonMap = new HashMap<>();
|
||||
HashMap<String, String> finalArchivesCom = archivesCom;
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = otherCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.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 = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -787,6 +796,7 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
|
||||
public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (accountPO.getFund() != null) {
|
||||
InsuranceArchivesFundSchemePO fundPO = accountPO.getFund();
|
||||
insuranceAccountDetailPO.setFundPayOrg(fundPO.getPaymentOrganization());
|
||||
|
|
@ -794,6 +804,7 @@ public class SIAccountBiz extends Service {
|
|||
insuranceAccountDetailPO.setSupplementFundAccount(fundPO.getSupplementFundAccount());
|
||||
insuranceAccountDetailPO.setFundSchemeId(fundPO.getFundSchemeId());
|
||||
insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString());
|
||||
insuranceAccountDetailPO.setFundPaymentComBaseString(fundPO.getFundPaymentComBaseString());
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), fundPO.getFundStartTime(), fundPO.getFundEndTime());
|
||||
if ((NonPaymentEnum.YES.getValue() == fundPO.getNonPayment() || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) {
|
||||
|
|
@ -876,7 +887,13 @@ public class SIAccountBiz extends Service {
|
|||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
HashMap<String, String> archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
// HashMap<String, String> archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> archivesCom = new HashMap<>();
|
||||
if (welBaseDiffSign) {
|
||||
archivesCom = JSON.parseObject(fundPO.getFundPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
} else {
|
||||
archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
//需要核算公积金的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
if (archivesCom != null) {
|
||||
|
|
@ -899,10 +916,11 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
List<BigDecimal> fundComList = new ArrayList<>();
|
||||
Map<String, String> fundComJsonMap = new HashMap<>();
|
||||
HashMap<String, String> finalArchivesCom = archivesCom;
|
||||
needArchivesCom.stream().forEach(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((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.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 = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -945,12 +963,14 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
|
||||
public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth, String tenantKey) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (accountPO.getSocial() != null) {
|
||||
InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial();
|
||||
insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization());
|
||||
insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount());
|
||||
insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId());
|
||||
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
|
||||
insuranceAccountDetailPO.setSocialPaymentComBaseString(socialPO.getSocialPaymentComBaseString());
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), socialPO.getSocialStartTime(), socialPO.getSocialEndTime());
|
||||
if ((NonPaymentEnum.YES.getValue().equals(socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) {
|
||||
|
|
@ -1036,7 +1056,13 @@ public class SIAccountBiz extends Service {
|
|||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
HashMap<String, String> archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
// HashMap<String, String> archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> archivesCom = new HashMap<>();
|
||||
if (welBaseDiffSign) {
|
||||
archivesCom = JSON.parseObject(socialPO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
} else {
|
||||
archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
//需要核算社保的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
if (archivesCom != null) {
|
||||
|
|
@ -1059,10 +1085,11 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
List<BigDecimal> socialCom = new ArrayList<>();
|
||||
Map<String, String> sociaComJsonMap = new HashMap<>();
|
||||
HashMap<String, String> finalArchivesCom = archivesCom;
|
||||
needArchivesCom.stream().forEach(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((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.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 = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1510,7 +1537,6 @@ public class SIAccountBiz extends Service {
|
|||
} else {
|
||||
accountFund(insuranceAccountDetailPO, accountPO, baseParam.getSupplementaryMonth());
|
||||
}
|
||||
|
||||
}
|
||||
if (projects.contains(ProjectTypeEnum.OTHER.getValue())) {
|
||||
|
||||
|
|
@ -1532,11 +1558,13 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
|
||||
public InsuranceAccountDetailPO accountOther(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (accountPO.getOther() != null) {
|
||||
InsuranceArchivesOtherSchemePO otherPO = accountPO.getOther();
|
||||
insuranceAccountDetailPO.setOtherPayOrg(otherPO.getPaymentOrganization());
|
||||
insuranceAccountDetailPO.setOtherSchemeId(otherPO.getOtherSchemeId());
|
||||
insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString());
|
||||
insuranceAccountDetailPO.setOtherPaymentComBaseString(otherPO.getOtherPaymentComBaseString());
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, otherPO.getOtherStartTime(), otherPO.getOtherEndTime());
|
||||
if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) {
|
||||
|
|
@ -1611,7 +1639,13 @@ public class SIAccountBiz extends Service {
|
|||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
HashMap<String, String> archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
// HashMap<String, String> archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> archivesCom = new HashMap<>();
|
||||
if (welBaseDiffSign) {
|
||||
archivesCom = JSON.parseObject(otherPO.getOtherPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
} else {
|
||||
archivesCom = JSON.parseObject(otherPO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
//需要核算其他的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
if (archivesCom != null) {
|
||||
|
|
@ -1626,10 +1660,11 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
List<BigDecimal> otherComList = new ArrayList<>();
|
||||
Map<String, String> otherComJsonMap = new HashMap<>();
|
||||
HashMap<String, String> finalArchivesCom = archivesCom;
|
||||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = otherCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.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 = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1671,6 +1706,7 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
|
||||
public InsuranceAccountDetailPO accountFund(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (accountPO.getFund() != null) {
|
||||
InsuranceArchivesFundSchemePO fundPO = accountPO.getFund();
|
||||
insuranceAccountDetailPO.setFundPayOrg(fundPO.getPaymentOrganization());
|
||||
|
|
@ -1678,6 +1714,7 @@ public class SIAccountBiz extends Service {
|
|||
insuranceAccountDetailPO.setSupplementFundAccount(fundPO.getSupplementFundAccount());
|
||||
insuranceAccountDetailPO.setFundSchemeId(fundPO.getFundSchemeId());
|
||||
insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString());
|
||||
insuranceAccountDetailPO.setFundPaymentComBaseString(fundPO.getFundPaymentComBaseString());
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, fundPO.getFundStartTime(), fundPO.getFundEndTime());
|
||||
if ((Objects.equals(NonPaymentEnum.YES.getValue(), fundPO.getNonPayment()) || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) {
|
||||
|
|
@ -1751,7 +1788,13 @@ public class SIAccountBiz extends Service {
|
|||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
HashMap<String, String> archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
// HashMap<String, String> archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> archivesCom = new HashMap<>();
|
||||
if (welBaseDiffSign) {
|
||||
archivesCom = JSON.parseObject(fundPO.getFundPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
} else {
|
||||
archivesCom = JSON.parseObject(fundPO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
//需要核算公积金的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
if (archivesCom != null) {
|
||||
|
|
@ -1766,10 +1809,11 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
List<BigDecimal> fundComList = new ArrayList<>();
|
||||
Map<String, String> fundComJsonMap = new HashMap<>();
|
||||
HashMap<String, String> finalArchivesCom = archivesCom;
|
||||
needArchivesCom.stream().forEach(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((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.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 = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1812,12 +1856,14 @@ public class SIAccountBiz extends Service {
|
|||
}
|
||||
|
||||
public InsuranceAccountDetailPO accountSocial(InsuranceAccountDetailPO insuranceAccountDetailPO, InsuranceArchivesAccountPO accountPO, String billMonth) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (accountPO.getSocial() != null) {
|
||||
InsuranceArchivesSocialSchemePO socialPO = accountPO.getSocial();
|
||||
insuranceAccountDetailPO.setSocialPayOrg(socialPO.getPaymentOrganization());
|
||||
insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount());
|
||||
insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId());
|
||||
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
|
||||
insuranceAccountDetailPO.setSocialPaymentComBaseString(socialPO.getSocialPaymentComBaseString());
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime());
|
||||
if ((Objects.equals(NonPaymentEnum.YES.getValue(), socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) {
|
||||
|
|
@ -1896,7 +1942,13 @@ public class SIAccountBiz extends Service {
|
|||
.collect(
|
||||
Collectors.toMap(InsuranceSchemeDetailPO::getInsuranceId, Function.identity()));
|
||||
//档案中包含的基数信息
|
||||
HashMap<String, String> archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
// HashMap<String, String> archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
HashMap<String, String> archivesCom = new HashMap<>();
|
||||
if (welBaseDiffSign) {
|
||||
archivesCom = JSON.parseObject(socialPO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
} else {
|
||||
archivesCom = JSON.parseObject(socialPO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
//需要核算社保的福利id 单位
|
||||
List<Long> needArchivesCom = new ArrayList<>();
|
||||
if (archivesCom != null) {
|
||||
|
|
@ -1911,10 +1963,11 @@ public class SIAccountBiz extends Service {
|
|||
|
||||
List<BigDecimal> socialCom = new ArrayList<>();
|
||||
Map<String, String> sociaComJsonMap = new HashMap<>();
|
||||
HashMap<String, String> finalArchivesCom = archivesCom;
|
||||
needArchivesCom.stream().forEach(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((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.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 = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1964,6 +2017,7 @@ public class SIAccountBiz extends Service {
|
|||
insuranceAccountDetailPO.setSocialAccount(socialPO.getSocialAccount());
|
||||
insuranceAccountDetailPO.setSocialSchemeId(socialPO.getSocialSchemeId());
|
||||
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
|
||||
insuranceAccountDetailPO.setSocialPaymentComBaseString(socialPO.getSocialPaymentComBaseString());
|
||||
//判断是否在起始缴纳月和最后缴纳月之间
|
||||
Boolean inDataRange = SalaryDateUtil.monthInRange(billMonth, socialPO.getSocialStartTime(), socialPO.getSocialEndTime());
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
|||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.common.SalaryContext;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.encrypt.AESEncryptUtil;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBO;
|
||||
|
|
@ -37,6 +37,10 @@ import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
|
|||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.enums.OpenEnum;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryAssert;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryFormItemUtil;
|
||||
|
|
@ -65,6 +69,8 @@ import java.util.regex.Matcher;
|
|||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.engine.salary.sys.constant.SalarySysConstant.WEL_BASE_DIFF_BY_PER_AND_COM;
|
||||
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
|
|
@ -113,6 +119,10 @@ public class SIArchivesBiz {
|
|||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySysConfService getSalarySysConfService(User user) {
|
||||
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param welfareType
|
||||
* @param employeeId
|
||||
|
|
@ -266,15 +276,18 @@ public class SIArchivesBiz {
|
|||
*/
|
||||
public Map<String, Object> getPaymentForm(User user, WelfareTypeEnum welfareType, Long employeeId, long operateId, Long schemeId, Long paymentOrganization) {
|
||||
Map<String, Object> data = new HashMap<>(16);
|
||||
//判断是否要区分个人和单位福利基数
|
||||
SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM);
|
||||
boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue());
|
||||
switch (welfareType) {
|
||||
case SOCIAL_SECURITY:
|
||||
data = buildSocialPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization);
|
||||
data = buildSocialPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign);
|
||||
break;
|
||||
case ACCUMULATION_FUND:
|
||||
data = buildFundPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization);
|
||||
data = buildFundPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign);
|
||||
break;
|
||||
case OTHER:
|
||||
data = buildOtherPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization);
|
||||
data = buildOtherPaymentForm(user, employeeId, schemeId, operateId, welfareType.getValue(), paymentOrganization, welBaseDiffSign);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
|
@ -289,17 +302,27 @@ public class SIArchivesBiz {
|
|||
* @param operateId
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> buildOtherPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization) {
|
||||
public Map<String, Object> buildOtherPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) {
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
InsuranceArchivesOtherSchemeDTO data = buildOtherForm(employeeId, operateId, paymentOrganization);
|
||||
if (data != null) {
|
||||
dataMap.put("data", JSONObject.parseObject(data.getOtherPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
if (welBaseDiffSign) {
|
||||
dataMap.put("comData", JSONObject.parseObject(data.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
}
|
||||
}
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> inputItems = buildPaymentBase(user, schemeId, welfareType);
|
||||
addGroups.add(new SearchConditionGroup("其它福利缴纳基数", true, inputItems));
|
||||
dataMap.put("items", addGroups);
|
||||
if (welBaseDiffSign) {
|
||||
List<SearchConditionGroup> addComGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> inputComItems = buildPaymentComBase(user, schemeId, welfareType);
|
||||
addComGroups.add(new SearchConditionGroup("其它福利缴纳基数", true, inputComItems));
|
||||
dataMap.put("comItems", addComGroups);
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
|
|
@ -311,18 +334,28 @@ public class SIArchivesBiz {
|
|||
* @param operateId
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> buildFundPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization) {
|
||||
public Map<String, Object> buildFundPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) {
|
||||
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
InsuranceArchivesFundSchemeDTO data = buildFundForm(employeeId, operateId, paymentOrganization);
|
||||
if (data != null) {
|
||||
dataMap.put("data", JSONObject.parseObject(data.getFundPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
if (welBaseDiffSign) {
|
||||
dataMap.put("comData", JSONObject.parseObject(data.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
}
|
||||
}
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> inputItems = buildPaymentBase(user, schemeId, welfareType);
|
||||
addGroups.add(new SearchConditionGroup("公积金缴纳基数", true, inputItems));
|
||||
dataMap.put("items", addGroups);
|
||||
if (welBaseDiffSign) {
|
||||
List<SearchConditionGroup> addComGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> inputComItems = buildPaymentComBase(user, schemeId, welfareType);
|
||||
addComGroups.add(new SearchConditionGroup("公积金缴纳基数", true, inputComItems));
|
||||
dataMap.put("comItems", addComGroups);
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
|
|
@ -334,18 +367,28 @@ public class SIArchivesBiz {
|
|||
* @param operateId
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> buildSocialPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization) {
|
||||
public Map<String, Object> buildSocialPaymentForm(User user, Long employeeId, Long schemeId, long operateId, Integer welfareType, Long paymentOrganization, boolean welBaseDiffSign) {
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
InsuranceArchivesSocialSchemeDTO data = buildSocialForm(employeeId, operateId, paymentOrganization);
|
||||
if (data != null) {
|
||||
dataMap.put("data", JSONObject.parseObject(data.getSchemePaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
if (welBaseDiffSign) {
|
||||
dataMap.put("comData", JSONObject.parseObject(data.getSchemePaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> inputItems = buildPaymentBase(user, schemeId, welfareType);
|
||||
addGroups.add(new SearchConditionGroup("社保缴纳基数", true, inputItems));
|
||||
dataMap.put("items", addGroups);
|
||||
if (welBaseDiffSign) {
|
||||
List<SearchConditionGroup> addComGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> inputComItems = buildPaymentComBase(user, schemeId, welfareType);
|
||||
addComGroups.add(new SearchConditionGroup("社保缴纳基数", true, inputComItems));
|
||||
dataMap.put("comItems", addComGroups);
|
||||
}
|
||||
return dataMap;
|
||||
|
||||
}
|
||||
|
|
@ -361,9 +404,27 @@ public class SIArchivesBiz {
|
|||
if (schemeId == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<InsuranceSchemeDetailPO> list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream().collect(Collectors.collectingAndThen(
|
||||
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(InsuranceSchemeDetailPO::getInsuranceId))), ArrayList::new)
|
||||
);
|
||||
List<InsuranceSchemeDetailPO> list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream()
|
||||
.filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue())).collect(Collectors.toList());
|
||||
SICategoryBiz siCategoryBiz = new SICategoryBiz();
|
||||
list.forEach(insuranceSchemeDetail -> {
|
||||
ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId());
|
||||
if (iCategoryPO != null) {
|
||||
// inputItems.add(SalaryFormItemUtil.inputNumberItem(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId())));
|
||||
inputItems.add(SalaryFormItemUtil.inputNumberItemWithMaxAndMin(user, "precision:2", 2, 12, 2, iCategoryPO.getInsuranceName(), String.valueOf(insuranceSchemeDetail.getInsuranceId())
|
||||
, insuranceSchemeDetail.getUpperLimit(), insuranceSchemeDetail.getLowerLimit()));
|
||||
}
|
||||
});
|
||||
return inputItems;
|
||||
}
|
||||
|
||||
public List<SearchConditionItem> buildPaymentComBase(User user, Long schemeId, Integer welfareType) {
|
||||
List<SearchConditionItem> inputItems = new ArrayList<>();
|
||||
if (schemeId == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<InsuranceSchemeDetailPO> list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream()
|
||||
.filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue())).collect(Collectors.toList());
|
||||
SICategoryBiz siCategoryBiz = new SICategoryBiz();
|
||||
list.forEach(insuranceSchemeDetail -> {
|
||||
ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId());
|
||||
|
|
@ -621,17 +682,20 @@ public class SIArchivesBiz {
|
|||
* @param param
|
||||
* @param employeeId
|
||||
*/
|
||||
public void insert(InsuranceArchivesSaveParam param, long employeeId) {
|
||||
public void insert(InsuranceArchivesSaveParam param, User user) {
|
||||
SalaryAssert.notNull(param.getWelfareType(), "福利类型为空");
|
||||
//判断是否要区分个人和单位福利基数
|
||||
SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM);
|
||||
boolean welBaseDiffSign = welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue());
|
||||
switch (param.getWelfareType()) {
|
||||
case SOCIAL_SECURITY:
|
||||
socialSave(param, employeeId);
|
||||
socialSave(param, user, welBaseDiffSign);
|
||||
break;
|
||||
case ACCUMULATION_FUND:
|
||||
fundSave(param, employeeId);
|
||||
fundSave(param, user, welBaseDiffSign);
|
||||
break;
|
||||
case OTHER:
|
||||
otherSave(param, employeeId);
|
||||
otherSave(param, user, welBaseDiffSign);
|
||||
break;
|
||||
default:
|
||||
throw new SalaryRunTimeException("福利类型不存在");
|
||||
|
|
@ -641,9 +705,10 @@ public class SIArchivesBiz {
|
|||
|
||||
/**
|
||||
* @param paramReq
|
||||
* @param employeeId
|
||||
* @param
|
||||
*/
|
||||
public void otherSave(InsuranceArchivesSaveParam paramReq, long employeeId) {
|
||||
public void otherSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) {
|
||||
long employeeId = user.getUID();
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class);
|
||||
|
|
@ -666,6 +731,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder()
|
||||
.adjustAfterSchemeId(param.getOtherSchemeId())
|
||||
.adjustAfterBaseJson(paramReq.getPaymentForm())
|
||||
.adjustAfterComBaseJson(paramReq.getPaymentComForm())
|
||||
.welfareType(paramReq.getWelfareType().getValue())
|
||||
.employeeId(param.getEmployeeId())
|
||||
.paymentOrganization(param.getPaymentOrganization())
|
||||
|
|
@ -677,6 +743,7 @@ public class SIArchivesBiz {
|
|||
encryptUtil.decrypt(oldOtherInfo, InsuranceArchivesOtherSchemePO.class);
|
||||
adjustInfo.setAdjustBeforeBaseJson(oldOtherInfo.getOtherPaymentBaseString());
|
||||
adjustInfo.setAdjustBeforeSchemeId(oldOtherInfo.getOtherSchemeId());
|
||||
adjustInfo.setAdjustBeforeComBaseJson(oldOtherInfo.getOtherPaymentComBaseString());
|
||||
//新数据
|
||||
InsuranceArchivesOtherSchemePO updateOtherInfo =
|
||||
InsuranceArchivesOtherSchemePO.builder()
|
||||
|
|
@ -696,9 +763,17 @@ public class SIArchivesBiz {
|
|||
.otherPaymentBaseString(paramReq.getPaymentForm())
|
||||
.build();
|
||||
//校验福利基数是否符合上下限要求,
|
||||
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString())) {
|
||||
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
|
||||
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
updateOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm());
|
||||
//校验福利基数是否符合上下限要求
|
||||
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
}
|
||||
encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class);
|
||||
otherSchemeMapper.updateById(updateOtherInfo);
|
||||
//更新base_info表状态
|
||||
|
|
@ -706,8 +781,9 @@ public class SIArchivesBiz {
|
|||
if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
|
||||
//对于非系统人员,编辑后状态切换为正在缴纳
|
||||
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
|
||||
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
|
||||
}
|
||||
baseInfoPO.setOtherArchivesId(updateOtherInfo.getId());
|
||||
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
|
||||
sqlSession.commit();
|
||||
} else {
|
||||
otherSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesOtherSchemePO.builder()
|
||||
|
|
@ -732,9 +808,17 @@ public class SIArchivesBiz {
|
|||
.otherPaymentBaseString(paramReq.getPaymentForm())
|
||||
.build();
|
||||
//校验福利基数是否符合上下限要求,
|
||||
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString())) {
|
||||
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
|
||||
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
insertOtherInfo.setOtherPaymentComBaseString(paramReq.getPaymentComForm());
|
||||
//校验福利基数是否符合上下限要求
|
||||
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
}
|
||||
encryptUtil.encrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class);
|
||||
otherSchemeMapper.insert(insertOtherInfo);
|
||||
sqlSession.commit();
|
||||
|
|
@ -768,9 +852,10 @@ public class SIArchivesBiz {
|
|||
|
||||
/**
|
||||
* @param paramReq
|
||||
* @param employeeId
|
||||
* @param
|
||||
*/
|
||||
public void fundSave(InsuranceArchivesSaveParam paramReq, long employeeId) {
|
||||
public void fundSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) {
|
||||
long employeeId = user.getUID();
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class);
|
||||
|
|
@ -792,6 +877,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder()
|
||||
.adjustAfterSchemeId(param.getFundSchemeId())
|
||||
.adjustAfterBaseJson(paramReq.getPaymentForm())
|
||||
.adjustAfterComBaseJson(paramReq.getPaymentComForm())
|
||||
.welfareType(paramReq.getWelfareType().getValue())
|
||||
.employeeId(param.getEmployeeId())
|
||||
.paymentOrganization(param.getPaymentOrganization())
|
||||
|
|
@ -803,6 +889,7 @@ public class SIArchivesBiz {
|
|||
encryptUtil.decrypt(oldFundInfo, InsuranceArchivesFundSchemePO.class);
|
||||
adjustInfo.setAdjustBeforeBaseJson(oldFundInfo.getFundPaymentBaseString());
|
||||
adjustInfo.setAdjustBeforeSchemeId(oldFundInfo.getFundSchemeId());
|
||||
adjustInfo.setAdjustBeforeComBaseJson(oldFundInfo.getFundPaymentComBaseString());
|
||||
//新数据
|
||||
InsuranceArchivesFundSchemePO updateFundInfo = InsuranceArchivesFundSchemePO.builder()
|
||||
.id(oldFundInfo.getId())
|
||||
|
|
@ -823,9 +910,17 @@ public class SIArchivesBiz {
|
|||
.employeeId(param.getEmployeeId())
|
||||
.build();
|
||||
//校验福利基数是否符合上下限要求,
|
||||
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString())) {
|
||||
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
|
||||
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
updateFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm());
|
||||
//校验福利基数是否符合上下限要求
|
||||
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
}
|
||||
encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class);
|
||||
fundSchemeMapper.updateById(updateFundInfo);
|
||||
//更新base_info表状态
|
||||
|
|
@ -833,8 +928,9 @@ public class SIArchivesBiz {
|
|||
if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
|
||||
//对于非系统人员,编辑后状态切换为正在缴纳
|
||||
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
|
||||
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
|
||||
}
|
||||
baseInfoPO.setFundArchivesId(updateFundInfo.getId());
|
||||
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
|
||||
sqlSession.commit();
|
||||
} else {
|
||||
fundSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesFundSchemePO.builder()
|
||||
|
|
@ -861,9 +957,17 @@ public class SIArchivesBiz {
|
|||
.employeeId(param.getEmployeeId())
|
||||
.build();
|
||||
//校验福利基数是否符合上下限要求,
|
||||
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString())) {
|
||||
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
|
||||
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
insertFundInfo.setFundPaymentComBaseString(paramReq.getPaymentComForm());
|
||||
//校验福利基数是否符合上下限要求
|
||||
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
}
|
||||
encryptUtil.encrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class);
|
||||
fundSchemeMapper.insert(insertFundInfo);
|
||||
sqlSession.commit();
|
||||
|
|
@ -899,10 +1003,10 @@ public class SIArchivesBiz {
|
|||
|
||||
/**
|
||||
* @param paramReq
|
||||
* @param employeeId
|
||||
* @param
|
||||
*/
|
||||
public void socialSave(InsuranceArchivesSaveParam paramReq, long employeeId) {
|
||||
|
||||
public void socialSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) {
|
||||
long employeeId = user.getUID();
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class);
|
||||
|
|
@ -929,6 +1033,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder()
|
||||
.adjustAfterSchemeId(param.getSocialSchemeId())
|
||||
.adjustAfterBaseJson(paramReq.getPaymentForm())
|
||||
.adjustAfterComBaseJson(paramReq.getPaymentComForm())
|
||||
.welfareType(paramReq.getWelfareType().getValue())
|
||||
.employeeId(param.getEmployeeId())
|
||||
.paymentOrganization(param.getPaymentOrganization())
|
||||
|
|
@ -942,6 +1047,7 @@ public class SIArchivesBiz {
|
|||
encryptUtil.decrypt(oldSocialInfo, InsuranceArchivesSocialSchemePO.class);
|
||||
adjustInfo.setAdjustBeforeBaseJson(oldSocialInfo.getSocialPaymentBaseString());
|
||||
adjustInfo.setAdjustBeforeSchemeId(oldSocialInfo.getSocialSchemeId());
|
||||
adjustInfo.setAdjustBeforeComBaseJson(oldSocialInfo.getSocialPaymentComBaseString());
|
||||
//新数据
|
||||
InsuranceArchivesSocialSchemePO updateSocialInfo =
|
||||
InsuranceArchivesSocialSchemePO.builder()
|
||||
|
|
@ -962,9 +1068,17 @@ public class SIArchivesBiz {
|
|||
.paymentOrganization(param.getPaymentOrganization())
|
||||
.build();
|
||||
//校验福利基数是否符合上下限要求
|
||||
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString())) {
|
||||
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
|
||||
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
updateSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm());
|
||||
//校验福利基数是否符合上下限要求
|
||||
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
}
|
||||
encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class);
|
||||
socialSchemeMapper.updateById(updateSocialInfo);
|
||||
//更新base_info表状态
|
||||
|
|
@ -972,8 +1086,9 @@ public class SIArchivesBiz {
|
|||
if(baseInfoPO != null && baseInfoPO.getEmployeeType() != null && baseInfoPO.getEmployeeType().equals(DataCollectionEmployeeTypeEnum.EXT_EMPLOYEE.getValue())) {
|
||||
//对于非系统人员,编辑后状态切换为正在缴纳
|
||||
baseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue());
|
||||
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
|
||||
}
|
||||
baseInfoPO.setSocialArchivesId(updateSocialInfo.getId());
|
||||
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
|
||||
sqlSession.commit();
|
||||
} else {
|
||||
socialSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesSocialSchemePO.builder()
|
||||
|
|
@ -1000,9 +1115,17 @@ public class SIArchivesBiz {
|
|||
.paymentOrganization(param.getPaymentOrganization())
|
||||
.build();
|
||||
//校验福利基数是否符合上下限要求
|
||||
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString())) {
|
||||
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue())) {
|
||||
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
insertSocialInfo.setSocialPaymentComBaseString(paramReq.getPaymentComForm());
|
||||
//校验福利基数是否符合上下限要求
|
||||
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
|
||||
}
|
||||
}
|
||||
encryptUtil.encrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class);
|
||||
socialSchemeMapper.insert(insertSocialInfo);
|
||||
sqlSession.commit();
|
||||
|
|
@ -1040,14 +1163,11 @@ public class SIArchivesBiz {
|
|||
* @param paymentBaseString
|
||||
* @return
|
||||
*/
|
||||
public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString) {
|
||||
public Boolean checkWelBaseLimit(Long primaryId, String paymentBaseString, Integer paymentScope) {
|
||||
|
||||
if (primaryId ==null || paymentBaseString == null) {
|
||||
return true;
|
||||
}
|
||||
//设置缴纳对象和缴费状态
|
||||
// Integer paymentScope = 2;
|
||||
// Integer isPayment = 1;
|
||||
Map<String, String> paymentBaseJson = JSON.parseObject(paymentBaseString, new HashMap<String, String>().getClass());
|
||||
if (paymentBaseJson == null) {
|
||||
return true;
|
||||
|
|
@ -1071,7 +1191,7 @@ public class SIArchivesBiz {
|
|||
return false;
|
||||
}
|
||||
List<InsuranceSchemeDetailPO> isPaymentList = insuranceSchemeDetailPOList.stream()
|
||||
.filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue())).collect(Collectors.toList());
|
||||
.filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(paymentScope)).collect(Collectors.toList());
|
||||
if (isPaymentList.size() > 0) {
|
||||
InsuranceSchemeDetailPO insuranceSchemeDetailPO = isPaymentList.get(0);
|
||||
|
||||
|
|
@ -1279,6 +1399,7 @@ public class SIArchivesBiz {
|
|||
* @return
|
||||
*/
|
||||
public List<WeaTableColumn> buildWeaTableColumns(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS, long operateId) {
|
||||
|
||||
Map<Integer, Map<String, String>> titleMap = buildColumnTitle(insuranceArchivesEmployeePOS, operateId);
|
||||
List<WeaTableColumn> list = new ArrayList<>();
|
||||
WeaTableColumn nameColumn = new WeaTableColumn("100px", "姓名", "employeeName");
|
||||
|
|
@ -1318,6 +1439,9 @@ public class SIArchivesBiz {
|
|||
* @return
|
||||
*/
|
||||
public Map<Integer, Map<String, String>> buildColumnTitle(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS, long operateId) {
|
||||
|
||||
boolean welBaseDiffSign = isDiffWelBase();
|
||||
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
Map<Integer, Map<String, String>> result = new HashMap<>();
|
||||
|
||||
|
|
@ -1333,16 +1457,17 @@ public class SIArchivesBiz {
|
|||
Set<String> fundSet = new HashSet<>();
|
||||
Set<String> otherSet = new HashSet<>();
|
||||
|
||||
Set<String> socialComSet = new HashSet<>();
|
||||
Set<String> fundComSet = new HashSet<>();
|
||||
Set<String> otherComSet = new HashSet<>();
|
||||
|
||||
insuranceArchivesEmployeePOS.forEach(item -> {
|
||||
List<InsuranceArchivesSocialSchemePO> socialList = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(item.getEmployeeId()));
|
||||
encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class);
|
||||
// InsuranceArchivesSocialSchemePO socialItem = socialList.size() != 0 ? socialList.get(0) : null;
|
||||
List<InsuranceArchivesFundSchemePO> fundList = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(item.getEmployeeId()));
|
||||
encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class);
|
||||
// InsuranceArchivesFundSchemePO fundItem = fundList.size() != 0 ? fundList.get(0) : null;
|
||||
List<InsuranceArchivesOtherSchemePO> otherList = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(item.getEmployeeId()));
|
||||
encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class);
|
||||
// InsuranceArchivesOtherSchemePO otherItem = otherList.size() != 0 ? otherList.get(0) : null;
|
||||
if (socialList.size() > 0) {
|
||||
for (InsuranceArchivesSocialSchemePO socialSchemePO : socialList) {
|
||||
|
||||
|
|
@ -1351,6 +1476,14 @@ public class SIArchivesBiz {
|
|||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> socialSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> socialComJson = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialComJson != null) {
|
||||
socialComJson.forEach((k, v) -> socialComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1361,6 +1494,14 @@ public class SIArchivesBiz {
|
|||
if (fundJson != null) {
|
||||
fundJson.forEach((k, v) -> fundSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> fundComJson = JSON.parseObject(fundSchemePO.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundComJson != null) {
|
||||
fundComJson.forEach((k, v) -> fundComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1371,11 +1512,20 @@ public class SIArchivesBiz {
|
|||
if (otherJson != null) {
|
||||
otherJson.forEach((k, v) -> otherSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> otherComJson = JSON.parseObject(otherSchemePO.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherComJson != null) {
|
||||
otherComJson.forEach((k, v) -> otherComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialMap = new HashMap<>();
|
||||
Map<String, String> socialComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> socialCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customSocial = iCategoryMapper.listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), null)
|
||||
.stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
|
|
@ -1385,34 +1535,76 @@ public class SIArchivesBiz {
|
|||
|
||||
socialCollect.putAll(customSocial);
|
||||
socialCollect.putAll(sysSocial);
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
}
|
||||
});
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
socialComSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, String> fundMap = new HashMap<>();
|
||||
Map<String, String> fundComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> fundCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customFund = iCategoryMapper.listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
Map<Long, ICategoryPO> sysFund = iCategoryMapper.listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
fundCollect.putAll(customFund);
|
||||
fundCollect.putAll(sysFund);
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
}
|
||||
});
|
||||
if (welBaseDiffSign) {
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
fundComSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, String> otherMap = new HashMap<>();
|
||||
Map<String, String> otherComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> otherCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customOther = iCategoryMapper.listByWelfareType(WelfareTypeEnum.OTHER.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
Map<Long, ICategoryPO> sysOther = iCategoryMapper.listByWelfareType(WelfareTypeEnum.OTHER.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
otherCollect.putAll(customOther);
|
||||
otherCollect.putAll(sysOther);
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
}
|
||||
});
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
otherComSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
// map根据key排序
|
||||
LinkedHashMap<String, String> socialMapWithAscKey = socialMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
|
|
@ -1426,6 +1618,23 @@ public class SIArchivesBiz {
|
|||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
if (welBaseDiffSign) {
|
||||
LinkedHashMap<String, String> socialComMapWithAscKey = socialComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundComMapWithAscKey = fundComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> otherComMapWithAscKey = otherComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
socialMapWithAscKey.putAll(socialComMapWithAscKey);
|
||||
fundMapWithAscKey.putAll(fundComMapWithAscKey);
|
||||
otherMapWithAscKey.putAll(otherComMapWithAscKey);
|
||||
}
|
||||
|
||||
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMapWithAscKey);
|
||||
result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMapWithAscKey);
|
||||
|
|
@ -1448,6 +1657,9 @@ public class SIArchivesBiz {
|
|||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> buildTableData(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS, boolean export) {
|
||||
|
||||
boolean welBaseDiffSign = isDiffWelBase();
|
||||
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listAll();
|
||||
Map<Long, TaxAgentPO> longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId);
|
||||
|
||||
|
|
@ -1495,16 +1707,39 @@ public class SIArchivesBiz {
|
|||
map.put("socialName", insuranceSchemeMapper.querySchemeName(socialItem.getSocialSchemeId()));
|
||||
Map<String, Object> socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(socialJson);
|
||||
if (socialComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
socialComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
map.put("socialAccount", socialItem.getSocialAccount());
|
||||
map.put("socialStartTime", socialItem.getSocialStartTime());
|
||||
map.put("socialEndTime", socialItem.getSocialEndTime());
|
||||
|
|
@ -1514,16 +1749,39 @@ public class SIArchivesBiz {
|
|||
map.put("fundAccount", fundItem.getFundAccount());
|
||||
Map<String, Object> fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(fundJson);
|
||||
if (fundComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
fundComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
map.put("supplementFundAccount", fundItem.getSupplementFundAccount());
|
||||
map.put("fundStartTime", fundItem.getFundStartTime());
|
||||
map.put("fundEndTime", fundItem.getFundEndTime());
|
||||
|
|
@ -1533,16 +1791,39 @@ public class SIArchivesBiz {
|
|||
map.put("otherName", insuranceSchemeMapper.querySchemeName(otherItem.getOtherSchemeId()));
|
||||
Map<String, Object> otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(otherJson);
|
||||
if (otherComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
otherComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
map.put("otherStartTime", otherItem.getOtherStartTime());
|
||||
map.put("otherEndTime", otherItem.getOtherEndTime());
|
||||
}
|
||||
|
|
@ -1565,6 +1846,19 @@ public class SIArchivesBiz {
|
|||
}
|
||||
return insuranceIdList;
|
||||
}
|
||||
|
||||
public List<Long> payInsuranceIds(Long socialSchemeId, Integer paymentScope) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<InsuranceSchemeDetailPO> detailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(socialSchemeId);
|
||||
List<Long> insuranceIdList = new ArrayList<>();
|
||||
if (detailPOS != null && detailPOS.size() > 0) {
|
||||
//开启缴纳的
|
||||
insuranceIdList = detailPOS.stream().filter(f -> f.getIsPayment().equals(IsPaymentEnum.YES.getValue()) && f.getPaymentScope().equals(paymentScope))
|
||||
.map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList());
|
||||
}
|
||||
return insuranceIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息提示
|
||||
*/
|
||||
|
|
@ -1906,6 +2200,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder()
|
||||
.adjustAfterSchemeId(po.getSocialSchemeId())
|
||||
.adjustAfterBaseJson(po.getSocialPaymentBaseString())
|
||||
.adjustAfterComBaseJson(po.getSocialPaymentComBaseString())
|
||||
.welfareType(po.getWelfareType())
|
||||
.employeeId(po.getEmployeeId())
|
||||
.paymentOrganization(po.getPaymentOrganization())
|
||||
|
|
@ -1915,6 +2210,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesSocialSchemePO oldBaseInfo = oldBaseInfoList.get(0);
|
||||
encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesSocialSchemePO.class);
|
||||
adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getSocialPaymentBaseString());
|
||||
adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getSocialPaymentComBaseString());
|
||||
adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getSocialSchemeId());
|
||||
} else if (oldBaseInfoList.size() > 1) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保档案存在冗余数据!"));
|
||||
|
|
@ -1936,6 +2232,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder()
|
||||
.adjustAfterSchemeId(po.getFundSchemeId())
|
||||
.adjustAfterBaseJson(po.getFundPaymentBaseString())
|
||||
.adjustAfterComBaseJson(po.getFundPaymentComBaseString())
|
||||
.welfareType(po.getWelfareType())
|
||||
.employeeId(po.getEmployeeId())
|
||||
.paymentOrganization(po.getPaymentOrganization())
|
||||
|
|
@ -1945,6 +2242,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesFundSchemePO oldBaseInfo = oldBaseInfoList.get(0);
|
||||
encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesFundSchemePO.class);
|
||||
adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getFundPaymentBaseString());
|
||||
adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getFundPaymentComBaseString());
|
||||
adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getFundSchemeId());
|
||||
} else if (oldBaseInfoList.size() > 1) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金档案存在冗余数据!"));
|
||||
|
|
@ -1965,6 +2263,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesBaseHistoryDTO adjustInfo = InsuranceArchivesBaseHistoryDTO.builder()
|
||||
.adjustAfterSchemeId(po.getOtherSchemeId())
|
||||
.adjustAfterBaseJson(po.getOtherPaymentBaseString())
|
||||
.adjustAfterComBaseJson(po.getOtherPaymentComBaseString())
|
||||
.welfareType(po.getWelfareType())
|
||||
.employeeId(po.getEmployeeId())
|
||||
.paymentOrganization(po.getPaymentOrganization())
|
||||
|
|
@ -1974,6 +2273,7 @@ public class SIArchivesBiz {
|
|||
InsuranceArchivesOtherSchemePO oldBaseInfo = oldBaseInfoList.get(0);
|
||||
encryptUtil.decrypt(oldBaseInfo, InsuranceArchivesOtherSchemePO.class);
|
||||
adjustInfo.setAdjustBeforeBaseJson(oldBaseInfo.getOtherPaymentBaseString());
|
||||
adjustInfo.setAdjustBeforeComBaseJson(oldBaseInfo.getOtherPaymentComBaseString());
|
||||
adjustInfo.setAdjustBeforeSchemeId(oldBaseInfo.getOtherSchemeId());
|
||||
} else if (oldBaseInfoList.size() > 1) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利档案存在冗余数据!"));
|
||||
|
|
@ -1987,6 +2287,8 @@ public class SIArchivesBiz {
|
|||
//生成基数调整记录(基数单元未变化则忽略)
|
||||
public List<InsuranceArchivesBaseHistoryPO> createAdjustInfo(InsuranceArchivesBaseHistoryDTO adjustInfo, Long creator) {
|
||||
Date now = new Date();
|
||||
boolean welBaseDiffSign = isDiffWelBase();
|
||||
|
||||
List<InsuranceArchivesBaseHistoryPO> toCreateAdjustHistoryList = new ArrayList<>();
|
||||
//旧档案不存在基数信息,则直接遍历新的基数数据,生成调整记录;旧档案存在基数信息,则合并新旧基数数据,遍历合并后的技术数据中的key,生成调整记录。
|
||||
if(StringUtils.isNotBlank(adjustInfo.getAdjustAfterBaseJson()) && StringUtils.isBlank(adjustInfo.getAdjustBeforeBaseJson())) {
|
||||
|
|
@ -2005,6 +2307,7 @@ public class SIArchivesBiz {
|
|||
adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
adjustItem.setId(IdGenerator.generate());
|
||||
adjustItem.setPaymentScope(welBaseDiffSign ? PaymentScopeEnum.SCOPE_PERSON.getValue().toString() : PaymentScopeEnum.SCOPE_PERSON.getValue().toString() + "," + PaymentScopeEnum.SCOPE_COMPANY.getValue().toString());
|
||||
toCreateAdjustHistoryList.add(adjustItem);
|
||||
}
|
||||
} else if (StringUtils.isNotBlank(adjustInfo.getAdjustAfterBaseJson()) && StringUtils.isNotBlank(adjustInfo.getAdjustBeforeBaseJson())) {
|
||||
|
|
@ -2039,12 +2342,75 @@ public class SIArchivesBiz {
|
|||
adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
adjustItem.setId(IdGenerator.generate());
|
||||
adjustItem.setPaymentScope(welBaseDiffSign ? PaymentScopeEnum.SCOPE_PERSON.getValue().toString() : PaymentScopeEnum.SCOPE_PERSON.getValue().toString() + "," + PaymentScopeEnum.SCOPE_COMPANY.getValue().toString());
|
||||
|
||||
toCreateAdjustHistoryList.add(adjustItem);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//如果系统应用设置拆分了个人和公司福利基数,则对adjustBeforeComBaseJson,adjustAfterComBaseJson也进行处理
|
||||
if (welBaseDiffSign) {
|
||||
//旧档案不存在基数信息,则直接遍历新的基数数据,生成调整记录;旧档案存在基数信息,则合并新旧基数数据,遍历合并后的技术数据中的key,生成调整记录。
|
||||
if(StringUtils.isNotBlank(adjustInfo.getAdjustAfterComBaseJson()) && StringUtils.isBlank(adjustInfo.getAdjustBeforeComBaseJson())) {
|
||||
Map<String, Object> adjustAfterComBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterComBaseJson(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
for (String key : adjustAfterComBaseMap.keySet()) {
|
||||
InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO();
|
||||
BeanUtils.copyProperties(adjustInfo, adjustItem);
|
||||
adjustItem.setAdjustWelfareItemId(Long.valueOf(key));
|
||||
adjustItem.setAdjustAfterBaseValue((String) adjustAfterComBaseMap.get(key));
|
||||
adjustItem.setOperateTime(now);
|
||||
adjustItem.setOperator(creator);
|
||||
adjustItem.setCreator(creator);
|
||||
adjustItem.setCreateTime(now);
|
||||
adjustItem.setUpdateTime(now);
|
||||
adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
adjustItem.setId(IdGenerator.generate());
|
||||
adjustItem.setPaymentScope(PaymentScopeEnum.SCOPE_COMPANY.getValue().toString());
|
||||
toCreateAdjustHistoryList.add(adjustItem);
|
||||
}
|
||||
} else if (StringUtils.isNotBlank(adjustInfo.getAdjustAfterComBaseJson()) && StringUtils.isNotBlank(adjustInfo.getAdjustBeforeComBaseJson())) {
|
||||
Map<String, Object> adjustAfterComBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterComBaseJson(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> adjustBeforeComBaseMap = JSON.parseObject(adjustInfo.getAdjustBeforeComBaseJson(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> reDealMap = new HashMap<>();
|
||||
if (adjustAfterComBaseMap != null) {
|
||||
reDealMap.putAll(adjustAfterComBaseMap);
|
||||
}
|
||||
if (adjustBeforeComBaseMap != null) {
|
||||
reDealMap.putAll(adjustBeforeComBaseMap);
|
||||
}
|
||||
if (reDealMap.size() >0) {
|
||||
for (String key : reDealMap.keySet()) {
|
||||
String beforeValue = (String) adjustBeforeComBaseMap.get(key);
|
||||
String afterValue = (String) adjustAfterComBaseMap.get(key);
|
||||
if (SalaryEntityUtil.empty2Zero(beforeValue).compareTo(SalaryEntityUtil.empty2Zero(afterValue)) == 0) {
|
||||
continue;
|
||||
}
|
||||
InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO();
|
||||
BeanUtils.copyProperties(adjustInfo, adjustItem);
|
||||
adjustItem.setAdjustWelfareItemId(Long.valueOf(key));
|
||||
adjustItem.setAdjustBeforeBaseValue(beforeValue);
|
||||
adjustItem.setAdjustAfterBaseValue(afterValue);
|
||||
adjustItem.setOperateTime(now);
|
||||
adjustItem.setOperator(creator);
|
||||
adjustItem.setCreator(creator);
|
||||
adjustItem.setCreateTime(now);
|
||||
adjustItem.setUpdateTime(now);
|
||||
adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
adjustItem.setId(IdGenerator.generate());
|
||||
adjustItem.setPaymentScope( PaymentScopeEnum.SCOPE_COMPANY.getValue().toString());
|
||||
|
||||
toCreateAdjustHistoryList.add(adjustItem);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return toCreateAdjustHistoryList;
|
||||
}
|
||||
|
||||
|
|
@ -2123,4 +2489,12 @@ public class SIArchivesBiz {
|
|||
list.add(new WeaTableColumn("150px", "操作时间", "operatorTime"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public boolean isDiffWelBase() {
|
||||
User user = (User) SalaryContext.get().getValue("user");
|
||||
//判断是否要区分个人和单位福利基数
|
||||
SalarySysConfPO welBaseDiff = getSalarySysConfService(user).getOneByCode(WEL_BASE_DIFF_BY_PER_AND_COM);
|
||||
|
||||
return welBaseDiff != null && welBaseDiff.getConfValue().equals(OpenEnum.OPEN.getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class InsuranceComparisonResultBO {
|
|||
* 构建福利核算结果列表的表头(线下对比)
|
||||
*
|
||||
*/
|
||||
public static List<Column> buildTableColumns4ComparisonResult(Set<Long> insuranceBaseSet, Set<Long> insurancePerPaySet, Set<Long> insuranceComPaySet) {
|
||||
public static List<Column> buildTableColumns4ComparisonResult(Set<Long> insuranceBaseSet, Set<Long> insurancePerPaySet, Set<Long> insuranceComPaySet, boolean welBaseDiffSign) {
|
||||
|
||||
List<ICategoryPO> listAll = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll();
|
||||
List<ICategoryPO> socialWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 1 && e.getIsUse() == 1 && insuranceBaseSet.contains(e.getId())).collect(Collectors.toList());
|
||||
|
|
@ -67,21 +67,63 @@ public class InsuranceComparisonResultBO {
|
|||
columns.add(new Column("社保账号", "socialAccount", "socialAccount"));
|
||||
columns.add(new Column("社保方案名称", "socialSchemeName", "socialSchemeName"));
|
||||
//组装社保基数
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "socialBase", po.getId() + "socialBase"));
|
||||
if (welBaseDiffSign) {
|
||||
List<Column> socialComColumns = Lists.newArrayList();
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")
|
||||
, po.getId() + "socialPerBase", po.getId() + "socialPerBase"));
|
||||
socialComColumns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")
|
||||
, po.getId() + "socialComBase", po.getId() + "socialComBase"));
|
||||
}
|
||||
columns.addAll(socialComColumns);
|
||||
} else {
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "socialBase", po.getId() + "socialBase"));
|
||||
}
|
||||
}
|
||||
// for (ICategoryPO po : socialWelfareList) {
|
||||
// columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "socialBase", po.getId() + "socialBase"));
|
||||
// }
|
||||
columns.add(new Column("公积金账号", "fundAccount", "fundAccount"));
|
||||
columns.add(new Column("公积金方案名称", "fundSchemeName", "fundSchemeName"));
|
||||
//组装公积金基数
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "fundBase", po.getId() + "fundBase"));
|
||||
if (welBaseDiffSign) {
|
||||
List<Column> fundComColumns = Lists.newArrayList();
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")
|
||||
, po.getId() + "fundPerBase", po.getId() + "fundPerBase"));
|
||||
fundComColumns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")
|
||||
, po.getId() + "fundComBase", po.getId() + "fundComBase"));
|
||||
}
|
||||
columns.addAll(fundComColumns);
|
||||
} else {
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "fundBase", po.getId() + "fundBase"));
|
||||
}
|
||||
}
|
||||
// for (ICategoryPO po : fundWelfareList) {
|
||||
// columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "fundBase", po.getId() + "fundBase"));
|
||||
// }
|
||||
columns.add(new Column("补充公积金账号", "supplementFundAccount", "supplementFundAccount"));
|
||||
columns.add(new Column("其他福利方案名称", "otherSchemeName", "otherSchemeName"));
|
||||
//组装其他福利基数
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "otherBase", po.getId() + "otherBase"));
|
||||
if (welBaseDiffSign) {
|
||||
List<Column> otherComColumns = Lists.newArrayList();
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人")
|
||||
, po.getId() + "otherPerBase", po.getId() + "otherPerBase"));
|
||||
otherComColumns.add(new Column(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位")
|
||||
, po.getId() + "otherComBase", po.getId() + "otherComBase"));
|
||||
}
|
||||
columns.addAll(otherComColumns);
|
||||
} else {
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "otherBase", po.getId() + "otherBase"));
|
||||
}
|
||||
}
|
||||
// for (ICategoryPO po : otherWelfareList) {
|
||||
// columns.add(new Column(po.getInsuranceName() + "申报基数", po.getId() + "otherBase", po.getId() + "otherBase"));
|
||||
// }
|
||||
|
||||
//社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人)
|
||||
for (ICategoryPO po : socialWelPerList) {
|
||||
|
|
@ -127,7 +169,8 @@ public class InsuranceComparisonResultBO {
|
|||
* 构建福利核算线下对比结果
|
||||
*
|
||||
*/
|
||||
public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS, Map<Long, String> schemeIdNameMap) {
|
||||
public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS
|
||||
, Map<Long, String> schemeIdNameMap, boolean welBaseDiffSign) {
|
||||
|
||||
Map<Long, List<ExcelAccountExportPO>> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getEmployeeId);
|
||||
// Map<String, List<AccountExportPO>> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode);
|
||||
|
|
@ -177,12 +220,28 @@ public class InsuranceComparisonResultBO {
|
|||
if (excelResultValueList != null && excelResultValueList.size() == 1) {
|
||||
excelAccountExportPO = excelResultValueList.get(0);
|
||||
}
|
||||
//社保基数,socialPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1);
|
||||
//公积金基数,fundPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2);
|
||||
//其他福利基数,otherPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3);
|
||||
if (welBaseDiffSign) {
|
||||
//社保基数-个人,socialPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "PerBase", 1);
|
||||
//公积金基数-个人,fundPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "PerBase", 2);
|
||||
//其他福利基数-个人,otherPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "PerBase", 3);
|
||||
|
||||
//社保基数-公司,socialPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentComBaseString(), excelAccountExportPO.getSocialPaymentComBaseString(), "ComBase", 1);
|
||||
//公积金基数-公司,fundPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentComBaseString(), excelAccountExportPO.getFundPaymentComBaseString(), "ComBase", 2);
|
||||
//其他福利基数-公司,otherPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentComBaseString(), excelAccountExportPO.getOtherPaymentComBaseString(), "ComBase", 3);
|
||||
} else {
|
||||
//社保基数,socialPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1);
|
||||
//公积金基数,fundPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2);
|
||||
//其他福利基数,otherPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3);
|
||||
}
|
||||
//社保个人socialPerJson
|
||||
welfareElementCompare(map, accountExportPO.getSocialPerJson(), excelAccountExportPO.getSocialPerJson(), "Per", 1);
|
||||
//公积金个人fundPerJson
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@ public class ExcelInsuranceImportParam {
|
|||
/**
|
||||
* 账单月份
|
||||
*/
|
||||
private String billMonth;
|
||||
private String billMonth;
|
||||
private String paymentOrganization;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,6 +101,12 @@ public class ExcelInsuranceDetailPO {
|
|||
@Encrypt
|
||||
private String socialPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 社保缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String socialPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 公积金方案ID
|
||||
*/
|
||||
|
|
@ -112,6 +118,12 @@ public class ExcelInsuranceDetailPO {
|
|||
@Encrypt
|
||||
private String fundPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 公积金缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String fundPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 其他福利方案id
|
||||
*/
|
||||
|
|
@ -123,6 +135,12 @@ public class ExcelInsuranceDetailPO {
|
|||
@Encrypt
|
||||
private String otherPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 其他福利缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String otherPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 社保个人缴费明细
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -106,6 +106,12 @@ public class InsuranceAccountDetailPO {
|
|||
@Encrypt
|
||||
private String socialPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 社保缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String socialPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 公积金方案ID
|
||||
*/
|
||||
|
|
@ -117,6 +123,12 @@ public class InsuranceAccountDetailPO {
|
|||
@Encrypt
|
||||
private String fundPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 公积金缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String fundPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 其他福利方案id
|
||||
*/
|
||||
|
|
@ -128,6 +140,12 @@ public class InsuranceAccountDetailPO {
|
|||
@Encrypt
|
||||
private String otherPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 其他福利缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String otherPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 社保个人缴费明细
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -102,6 +102,11 @@ public class InsuranceAccountDetailTempPO {
|
|||
@Encrypt
|
||||
private String socialPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 社保缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String socialPaymentComBaseString;
|
||||
/**
|
||||
* 公积金方案ID
|
||||
*/
|
||||
|
|
@ -113,6 +118,12 @@ public class InsuranceAccountDetailTempPO {
|
|||
@Encrypt
|
||||
private String fundPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 公积金缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String fundPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 其他福利方案id
|
||||
*/
|
||||
|
|
@ -124,6 +135,13 @@ public class InsuranceAccountDetailTempPO {
|
|||
@Encrypt
|
||||
private String otherPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 其他福利缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String otherPaymentComBaseString;
|
||||
|
||||
|
||||
/**
|
||||
* 社保个人缴费明细
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ public class InsuranceArchivesBO {
|
|||
.socialStartTime(po.getSocialStartTime())
|
||||
.schemeAccount(po.getSocialAccount())
|
||||
.schemePaymentBaseString(po.getSocialPaymentBaseString())
|
||||
.schemePaymentComBaseString(po.getSocialPaymentComBaseString())
|
||||
.underTake(po.getUnderTake() == null ? null : String.valueOf(po.getUnderTake()))
|
||||
.build();
|
||||
}
|
||||
|
|
@ -52,6 +53,7 @@ public class InsuranceArchivesBO {
|
|||
.fundSchemeId(po.getFundSchemeId())
|
||||
.paymentOrganization(po.getPaymentOrganization())
|
||||
.fundPaymentBaseString(po.getFundPaymentBaseString())
|
||||
.fundPaymentComBaseString(po.getFundPaymentComBaseString())
|
||||
.fundStartTime(po.getFundStartTime())
|
||||
.supplementFundAccount(po.getSupplementFundAccount())
|
||||
.nonPayment(po.getNonPayment())
|
||||
|
|
@ -72,6 +74,7 @@ public class InsuranceArchivesBO {
|
|||
.otherName(po.getOtherSchemeId() == null ? null : String.valueOf(po.getOtherSchemeId()))
|
||||
.otherSchemeId(po.getOtherSchemeId())
|
||||
.otherPaymentBaseString(po.getOtherPaymentBaseString())
|
||||
.otherPaymentComBaseString(po.getOtherPaymentComBaseString())
|
||||
.otherStartTime(po.getOtherStartTime())
|
||||
.otherEndTime(po.getOtherEndTime())
|
||||
.paymentOrganization(po.getPaymentOrganization())
|
||||
|
|
|
|||
|
|
@ -70,12 +70,18 @@ public class InsuranceArchivesBaseHistoryDTO {
|
|||
|
||||
private String adjustAfterBaseJson;
|
||||
|
||||
private String adjustBeforeComBaseJson;
|
||||
|
||||
private String adjustAfterComBaseJson;
|
||||
|
||||
@TableTitle(title = "对象", dataIndex = "employeeName", key = "employeeName")
|
||||
private String employeeName;
|
||||
@TableTitle(title = "个税扣缴义务人", dataIndex = "paymentOrganizationName", key = "paymentOrganizationName")
|
||||
private String paymentOrganizationName;
|
||||
@TableTitle(title = "福利项名称", dataIndex = "welfareItemName", key = "welfareItemName")
|
||||
private String welfareItemName;
|
||||
@TableTitle(title = "缴费对象", dataIndex = "paymentScope", key = "paymentScope")
|
||||
private String paymentScope;
|
||||
@TableTitle(title = "调整前方案", dataIndex = "adjustBeforeSchemeName", key = "adjustBeforeSchemeName")
|
||||
private String adjustBeforeSchemeName;
|
||||
@TableTitle(title = "调整前基数", dataIndex = "adjustBeforeBaseValue", key = "adjustBeforeBaseValue")
|
||||
|
|
|
|||
|
|
@ -65,4 +65,6 @@ public class InsuranceArchivesFundSchemeDTO {
|
|||
|
||||
//缴纳基数
|
||||
private String fundPaymentBaseString;
|
||||
|
||||
private String fundPaymentComBaseString;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,5 +56,7 @@ public class InsuranceArchivesOtherSchemeDTO {
|
|||
|
||||
private String otherPaymentBaseString;
|
||||
|
||||
private String otherPaymentComBaseString;
|
||||
|
||||
//private WeaForm otherPaymentBase;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,4 +59,7 @@ public class InsuranceArchivesSocialSchemeDTO {
|
|||
//社保缴纳基数
|
||||
private String schemePaymentBaseString;
|
||||
|
||||
//社保缴纳基数——单位
|
||||
private String schemePaymentComBaseString;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,4 +23,6 @@ public class InsuranceArchivesSaveParam {
|
|||
private String baseForm;
|
||||
|
||||
private String paymentForm;
|
||||
|
||||
private String paymentComForm;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,4 +77,6 @@ public class InsuranceArchivesBaseHistoryPO {
|
|||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private String paymentScope;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,13 @@ public class InsuranceArchivesFundSchemePO {
|
|||
@Encrypt
|
||||
private String fundPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 公积金缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String fundPaymentComBaseString;
|
||||
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -77,6 +77,12 @@ public class InsuranceArchivesOtherSchemePO {
|
|||
@Encrypt
|
||||
private String otherPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 其他福利缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String otherPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@ public class InsuranceArchivesSocialSchemePO {
|
|||
@Encrypt
|
||||
private String socialPaymentBaseString;
|
||||
|
||||
/**
|
||||
* 社保缴纳基数——单位
|
||||
*/
|
||||
@Encrypt
|
||||
private String socialPaymentComBaseString;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -157,7 +157,8 @@
|
|||
(id,employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
VALUES
|
||||
<foreach collection="accounts" item="item" separator=",">
|
||||
(
|
||||
|
|
@ -204,7 +205,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey},
|
||||
#{item.paymentOrganization}
|
||||
#{item.paymentOrganization},
|
||||
#{item.socialPaymentComBaseString},
|
||||
#{item.fundPaymentComBaseString},
|
||||
#{item.otherPaymentComBaseString}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -213,7 +217,8 @@
|
|||
(id,employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
<foreach collection="accounts" item="item" separator="union all">
|
||||
select
|
||||
#{item.id,jdbcType=DOUBLE},
|
||||
|
|
@ -259,7 +264,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey,jdbcType=VARCHAR},
|
||||
#{item.paymentOrganization,jdbcType=DOUBLE}
|
||||
#{item.paymentOrganization,jdbcType=DOUBLE},
|
||||
#{item.socialPaymentComBaseString,jdbcType=VARCHAR},
|
||||
#{item.fundPaymentComBaseString,jdbcType=VARCHAR},
|
||||
#{item.otherPaymentComBaseString,jdbcType=VARCHAR}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -269,7 +277,8 @@
|
|||
(id,employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
VALUES
|
||||
(
|
||||
#{item.id},
|
||||
|
|
@ -315,7 +324,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey},
|
||||
#{item.paymentOrganization}
|
||||
#{item.paymentOrganization},
|
||||
#{item.socialPaymentComBaseString},
|
||||
#{item.fundPaymentComBaseString},
|
||||
#{item.otherPaymentComBaseString}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
|
|||
|
|
@ -18,10 +18,13 @@
|
|||
<result column="other_pay_org" property="otherPayOrg"/>
|
||||
<result column="social_scheme_id" property="socialSchemeId"/>
|
||||
<result column="social_payment_base_string" property="socialPaymentBaseString"/>
|
||||
<result column="social_payment_com_base_string" property="socialPaymentComBaseString"/>
|
||||
<result column="fund_scheme_id" property="fundSchemeId"/>
|
||||
<result column="fund_payment_base_string" property="fundPaymentBaseString"/>
|
||||
<result column="fund_payment_com_base_string" property="fundPaymentComBaseString"/>
|
||||
<result column="other_scheme_id" property="otherSchemeId"/>
|
||||
<result column="other_payment_base_string" property="otherPaymentBaseString"/>
|
||||
<result column="other_payment_com_base_string" property="otherPaymentComBaseString"/>
|
||||
<result column="social_per_json" property="socialPerJson"/>
|
||||
<result column="social_per_sum" property="socialPerSum"/>
|
||||
<result column="fund_per_json" property="fundPerJson"/>
|
||||
|
|
@ -69,10 +72,13 @@
|
|||
, t.other_pay_org
|
||||
, t.social_scheme_id
|
||||
, t.social_payment_base_string
|
||||
, t.social_payment_com_base_string
|
||||
, t.fund_scheme_id
|
||||
, t.fund_payment_base_string
|
||||
, t.fund_payment_com_base_string
|
||||
, t.other_scheme_id
|
||||
, t.other_payment_base_string
|
||||
, t.other_payment_com_base_string
|
||||
, t.social_per_json
|
||||
, t.social_per_sum
|
||||
, t.fund_per_json
|
||||
|
|
@ -117,10 +123,13 @@
|
|||
, t.other_pay_org
|
||||
, t.social_scheme_id
|
||||
, t.social_payment_base_string
|
||||
, t.social_payment_com_base_string
|
||||
, t.fund_scheme_id
|
||||
, t.fund_payment_base_string
|
||||
, t.fund_payment_com_base_string
|
||||
, t.other_scheme_id
|
||||
, t.other_payment_base_string
|
||||
, t.other_payment_com_base_string
|
||||
, t.social_per_json
|
||||
, t.social_per_sum
|
||||
, t.fund_per_json
|
||||
|
|
@ -420,7 +429,8 @@
|
|||
t.other_com_json,t.social_per_sum,t.social_com_sum,
|
||||
t.fund_per_sum,t.fund_com_sum,t.other_per_sum,
|
||||
t.other_com_sum,t.per_sum,t.com_sum,t.payment_organization,
|
||||
t.social_payment_base_string, t.fund_payment_base_string, t.other_payment_base_string
|
||||
t.social_payment_base_string, t.fund_payment_base_string, t.other_payment_base_string,
|
||||
t.social_payment_com_base_string, t.fund_payment_com_base_string, t.other_payment_com_base_string
|
||||
FROM
|
||||
hrsa_bill_detail t
|
||||
WHERE t.delete_type = 0
|
||||
|
|
@ -711,7 +721,8 @@
|
|||
(employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
VALUES
|
||||
<foreach collection="accounts" item="item" separator=",">
|
||||
(
|
||||
|
|
@ -757,7 +768,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey},
|
||||
#{item.paymentOrganization}
|
||||
#{item.paymentOrganization},
|
||||
#{item.socialPaymentComBaseString},
|
||||
#{item.fundPaymentComBaseString},
|
||||
#{item.otherPaymentComBaseString}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -766,7 +780,8 @@
|
|||
(employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
<foreach collection="accounts" item="item" separator="union all">
|
||||
select
|
||||
#{item.employeeId,jdbcType=DOUBLE},
|
||||
|
|
@ -811,7 +826,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey,jdbcType=VARCHAR},
|
||||
#{item.paymentOrganization,jdbcType=DOUBLE}
|
||||
#{item.paymentOrganization,jdbcType=DOUBLE},
|
||||
#{item.socialPaymentComBaseString,jdbcType=VARCHAR},
|
||||
#{item.fundPaymentComBaseString,jdbcType=VARCHAR},
|
||||
#{item.otherPaymentComBaseString,jdbcType=VARCHAR}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -821,7 +839,8 @@
|
|||
(employee_id,bill_month,bill_status,payment_status,supplementary_month,supplementary_projects,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
VALUES
|
||||
(
|
||||
#{item.employeeId},
|
||||
|
|
@ -866,7 +885,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey},
|
||||
#{item.paymentOrganization}
|
||||
#{item.paymentOrganization},
|
||||
#{item.socialPaymentComBaseString},
|
||||
#{item.fundPaymentComBaseString},
|
||||
#{item.otherPaymentComBaseString}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
|
|||
|
|
@ -18,10 +18,13 @@
|
|||
<result column="other_pay_org" property="otherPayOrg"/>
|
||||
<result column="social_scheme_id" property="socialSchemeId"/>
|
||||
<result column="social_payment_base_string" property="socialPaymentBaseString"/>
|
||||
<result column="social_payment_com_base_string" property="socialPaymentComBaseString"/>
|
||||
<result column="fund_scheme_id" property="fundSchemeId"/>
|
||||
<result column="fund_payment_base_string" property="fundPaymentBaseString"/>
|
||||
<result column="fund_payment_com_base_string" property="fundPaymentComBaseString"/>
|
||||
<result column="other_scheme_id" property="otherSchemeId"/>
|
||||
<result column="other_payment_base_string" property="otherPaymentBaseString"/>
|
||||
<result column="other_payment_com_base_string" property="otherPaymentComBaseString"/>
|
||||
<result column="social_per_json" property="socialPerJson"/>
|
||||
<result column="social_per_sum" property="socialPerSum"/>
|
||||
<result column="fund_per_json" property="fundPerJson"/>
|
||||
|
|
@ -68,10 +71,13 @@
|
|||
, t.other_pay_org
|
||||
, t.social_scheme_id
|
||||
, t.social_payment_base_string
|
||||
, t.social_payment_com_base_string
|
||||
, t.fund_scheme_id
|
||||
, t.fund_payment_base_string
|
||||
, t.fund_payment_com_base_string
|
||||
, t.other_scheme_id
|
||||
, t.other_payment_base_string
|
||||
, t.other_payment_com_base_string
|
||||
, t.social_per_json
|
||||
, t.social_per_sum
|
||||
, t.fund_per_json
|
||||
|
|
@ -130,7 +136,8 @@
|
|||
(employee_id,bill_month,bill_status,payment_status,supplementary_month,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
VALUES
|
||||
<foreach collection="accounts" item="item" separator=",">
|
||||
(
|
||||
|
|
@ -175,7 +182,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey},
|
||||
#{item.paymentOrganization}
|
||||
#{item.paymentOrganization},
|
||||
#{item.socialPaymentComBaseString},
|
||||
#{item.fundPaymentComBaseString},
|
||||
#{item.otherPaymentComBaseString}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -184,7 +194,8 @@
|
|||
(employee_id,bill_month,bill_status,payment_status,supplementary_month,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
|
||||
<foreach collection="accounts" item="item" separator="union all">
|
||||
select
|
||||
|
|
@ -229,7 +240,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey,jdbcType=VARCHAR},
|
||||
#{item.paymentOrganization,jdbcType=DOUBLE}
|
||||
#{item.paymentOrganization,jdbcType=DOUBLE},
|
||||
#{item.socialPaymentComBaseString,jdbcType=VARCHAR},
|
||||
#{item.fundPaymentComBaseString,jdbcType=VARCHAR},
|
||||
#{item.otherPaymentComBaseString,jdbcType=VARCHAR}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -239,7 +253,8 @@
|
|||
(employee_id,bill_month,bill_status,payment_status,supplementary_month,resource_from,social_pay_org,social_account,social_scheme_id,social_payment_base_string,
|
||||
fund_pay_org,fund_account,supplement_fund_account,fund_scheme_id,fund_payment_base_string,other_pay_org,other_scheme_id,other_payment_base_string,social_per_json,
|
||||
social_per_sum,fund_per_json,fund_per_sum,other_per_json,other_per_sum,per_sum,social_com_json,social_com_sum,fund_com_json,fund_com_sum,other_com_json,other_com_sum,
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization)
|
||||
com_sum,social_sum,fund_sum,other_sum,total,creator,create_time,update_time,delete_type,tenant_key,payment_organization,
|
||||
social_payment_com_base_string,fund_payment_com_base_string,other_payment_com_base_string)
|
||||
VALUES
|
||||
(
|
||||
#{item.employeeId},
|
||||
|
|
@ -283,7 +298,10 @@
|
|||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey},
|
||||
#{item.paymentOrganization}
|
||||
#{item.paymentOrganization},
|
||||
#{item.socialPaymentComBaseString},
|
||||
#{item.fundPaymentComBaseString},
|
||||
#{item.otherPaymentComBaseString}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<result column="payment_organization" property="paymentOrganization"/>
|
||||
<result column="under_take" property="underTake"/>
|
||||
<result column="fund_payment_base_string" property="fundPaymentBaseString"/>
|
||||
<result column="fund_payment_com_base_string" property="fundPaymentComBaseString"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
|
|
@ -35,6 +36,7 @@
|
|||
, t.payment_organization
|
||||
, t.under_take
|
||||
, t.fund_payment_base_string
|
||||
, t.fund_payment_com_base_string
|
||||
, t.create_time
|
||||
, t.update_time
|
||||
, t.creator
|
||||
|
|
@ -135,6 +137,7 @@
|
|||
fund_end_time,
|
||||
fund_start_time,
|
||||
fund_payment_base_string,
|
||||
fund_payment_com_base_string,
|
||||
supplement_fund_account,
|
||||
create_time,
|
||||
creator,
|
||||
|
|
@ -154,6 +157,7 @@
|
|||
#{item.fundEndTime},
|
||||
#{item.fundStartTime},
|
||||
#{item.fundPaymentBaseString},
|
||||
#{item.fundPaymentComBaseString},
|
||||
#{item.supplementFundAccount},
|
||||
#{item.createTime},
|
||||
#{item.creator},
|
||||
|
|
@ -175,6 +179,7 @@
|
|||
fund_end_time,
|
||||
fund_start_time,
|
||||
fund_payment_base_string,
|
||||
fund_payment_com_base_string,
|
||||
supplement_fund_account,
|
||||
create_time,
|
||||
creator,
|
||||
|
|
@ -193,6 +198,7 @@
|
|||
#{item.fundEndTime,jdbcType=VARCHAR},
|
||||
#{item.fundStartTime,jdbcType=VARCHAR},
|
||||
#{item.fundPaymentBaseString,jdbcType=VARCHAR},
|
||||
#{item.fundPaymentComBaseString,jdbcType=VARCHAR},
|
||||
#{item.supplementFundAccount,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=DATE},
|
||||
#{item.creator,jdbcType=DOUBLE},
|
||||
|
|
@ -215,6 +221,7 @@
|
|||
fund_end_time,
|
||||
fund_start_time,
|
||||
fund_payment_base_string,
|
||||
fund_payment_com_base_string,
|
||||
supplement_fund_account,
|
||||
create_time,
|
||||
creator,
|
||||
|
|
@ -233,6 +240,7 @@
|
|||
#{item.fundEndTime},
|
||||
#{item.fundStartTime},
|
||||
#{item.fundPaymentBaseString},
|
||||
#{item.fundPaymentComBaseString},
|
||||
#{item.supplementFundAccount},
|
||||
#{item.createTime},
|
||||
#{item.creator},
|
||||
|
|
@ -311,6 +319,7 @@
|
|||
<set>
|
||||
welfare_type = #{welfareType},
|
||||
fund_payment_base_string = #{fundPaymentBaseString},
|
||||
fund_payment_com_base_string = #{fundPaymentComBaseString},
|
||||
fund_scheme_id = #{fundSchemeId},
|
||||
fund_end_time = #{fundEndTime},
|
||||
fund_start_time = #{fundStartTime},
|
||||
|
|
@ -353,6 +362,7 @@
|
|||
fund_end_time,
|
||||
fund_start_time,
|
||||
fund_payment_base_string,
|
||||
fund_payment_com_base_string,
|
||||
supplement_fund_account,
|
||||
create_time,
|
||||
creator,
|
||||
|
|
@ -371,6 +381,7 @@
|
|||
#{fundEndTime},
|
||||
#{fundStartTime},
|
||||
#{fundPaymentBaseString},
|
||||
#{fundPaymentComBaseString},
|
||||
#{supplementFundAccount},
|
||||
#{createTime},
|
||||
#{creator},
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
<result column="adjust_before_base_value" property="adjustBeforeBaseValue"/>
|
||||
<result column="adjust_after_base_value" property="adjustAfterBaseValue"/>
|
||||
<result column="adjust_welfare_item_id" property="adjustWelfareItemId"/>
|
||||
<result column="payment_scope" property="paymentScope"/>
|
||||
<result column="operator" property="operator"/>
|
||||
<result column="operate_time" property="operateTime"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
, t.adjust_before_base_value
|
||||
, t.adjust_after_base_value
|
||||
, t.adjust_welfare_item_id
|
||||
, t.payment_scope
|
||||
, t.operator
|
||||
, t.operate_time
|
||||
, t.create_time
|
||||
|
|
@ -48,7 +50,7 @@
|
|||
adjust_before_scheme_id,adjust_after_scheme_id,
|
||||
adjust_before_base_value,adjust_after_base_value,
|
||||
adjust_welfare_item_id,operator,operate_time,
|
||||
tenant_key,creator,delete_type,create_time,update_time)
|
||||
tenant_key,creator,delete_type,create_time,update_time,payment_scope)
|
||||
VALUES
|
||||
<foreach collection="infos" item="item" separator=",">
|
||||
(
|
||||
|
|
@ -67,7 +69,8 @@
|
|||
#{item.creator},
|
||||
#{item.deleteType},
|
||||
#{item.createTime},
|
||||
#{item.updateTime}
|
||||
#{item.updateTime},
|
||||
#{item.paymentScope}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -77,7 +80,7 @@
|
|||
adjust_before_scheme_id,adjust_after_scheme_id,
|
||||
adjust_before_base_value,adjust_after_base_value,
|
||||
adjust_welfare_item_id,operator,operate_time,
|
||||
tenant_key,creator,delete_type,create_time,update_time)
|
||||
tenant_key,creator,delete_type,create_time,update_time,payment_scope)
|
||||
<foreach collection="infos" item="item" separator="union all">
|
||||
select
|
||||
#{item.id,jdbcType=DOUBLE},
|
||||
|
|
@ -95,7 +98,8 @@
|
|||
#{item.creator,jdbcType=DOUBLE},
|
||||
#{item.deleteType},
|
||||
#{item.createTime},
|
||||
#{item.updateTime}
|
||||
#{item.updateTime},
|
||||
#{item.paymentScope}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -106,7 +110,7 @@
|
|||
adjust_before_scheme_id,adjust_after_scheme_id,
|
||||
adjust_before_base_value,adjust_after_base_value,
|
||||
adjust_welfare_item_id,operator,operate_time,
|
||||
tenant_key,creator,delete_type,create_time,update_time)
|
||||
tenant_key,creator,delete_type,create_time,update_time,payment_scope)
|
||||
VALUES
|
||||
(
|
||||
#{item.id},
|
||||
|
|
@ -124,7 +128,8 @@
|
|||
#{item.creator},
|
||||
#{item.deleteType},
|
||||
#{item.createTime},
|
||||
#{item.updateTime}
|
||||
#{item.updateTime},
|
||||
#{item.paymentScope}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -148,6 +153,7 @@
|
|||
, eo.lastname as operatorName
|
||||
, ee.lastname as employeeName
|
||||
, p.name as paymentOrganizationName
|
||||
, t.payment_scope
|
||||
FROM hrsa_insurance_base_history t
|
||||
LEFT JOIN hrmresource eo on eo.id = t.operator
|
||||
LEFT JOIN hrmresource ee on ee.id = t.employee_id
|
||||
|
|
@ -180,6 +186,7 @@
|
|||
, eo.lastname as operatorName
|
||||
, ee.lastname as employeeName
|
||||
, p.name as paymentOrganizationName
|
||||
, t.payment_scope
|
||||
FROM hrsa_insurance_base_history t
|
||||
LEFT JOIN hrmresource eo on eo.id = t.operator
|
||||
LEFT JOIN hrmresource ee on ee.id = t.employee_id
|
||||
|
|
@ -216,6 +223,7 @@
|
|||
, eo.lastname as operatorName
|
||||
, ee.username as employeeName
|
||||
, p.name as paymentOrganizationName
|
||||
, t.payment_scope
|
||||
FROM hrsa_insurance_base_history t
|
||||
LEFT JOIN hrmresource eo on eo.id = t.operator
|
||||
LEFT JOIN hrsa_external_employee ee on ee.id = t.employee_id
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
<result column="payment_organization" property="paymentOrganization"/>
|
||||
<result column="under_take" property="underTake"/>
|
||||
<result column="other_payment_base_string" property="otherPaymentBaseString"/>
|
||||
<result column="other_payment_com_base_string" property="otherPaymentComBaseString"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
|
|
@ -31,6 +32,7 @@
|
|||
, t.payment_organization
|
||||
, t.under_take
|
||||
, t.other_payment_base_string
|
||||
, t.other_payment_com_base_string
|
||||
, t.create_time
|
||||
, t.update_time
|
||||
, t.creator
|
||||
|
|
@ -129,7 +131,8 @@
|
|||
non_payment,
|
||||
creator,
|
||||
payment_organization,
|
||||
other_payment_base_string)
|
||||
other_payment_base_string,
|
||||
other_payment_com_base_string)
|
||||
VALUES
|
||||
<foreach collection="otherSchemePOS" item="item" separator=",">
|
||||
(
|
||||
|
|
@ -146,7 +149,8 @@
|
|||
#{item.nonPayment},
|
||||
#{item.creator},
|
||||
#{item.paymentOrganization},
|
||||
#{item.otherPaymentBaseString}
|
||||
#{item.otherPaymentBaseString},
|
||||
#{item.otherPaymentComBaseString}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -165,7 +169,8 @@
|
|||
non_payment,
|
||||
creator,
|
||||
payment_organization,
|
||||
other_payment_base_string)
|
||||
other_payment_base_string,
|
||||
other_payment_com_base_string)
|
||||
<foreach collection="otherSchemePOS" item="item" separator="union all">
|
||||
select
|
||||
#{item.otherSchemeId,jdbcType=DOUBLE},
|
||||
|
|
@ -181,7 +186,8 @@
|
|||
#{item.nonPayment,jdbcType=INTEGER},
|
||||
#{item.creator,jdbcType=DOUBLE},
|
||||
#{item.paymentOrganization,jdbcType=DOUBLE},
|
||||
#{item.otherPaymentBaseString,jdbcType=VARCHAR}
|
||||
#{item.otherPaymentBaseString,jdbcType=VARCHAR},
|
||||
#{item.otherPaymentComBaseString,jdbcType=VARCHAR}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -201,7 +207,8 @@
|
|||
non_payment,
|
||||
creator,
|
||||
payment_organization,
|
||||
other_payment_base_string)
|
||||
other_payment_base_string,
|
||||
other_payment_com_base_string)
|
||||
VALUES
|
||||
(
|
||||
#{item.otherSchemeId},
|
||||
|
|
@ -217,7 +224,8 @@
|
|||
#{item.nonPayment},
|
||||
#{item.creator},
|
||||
#{item.paymentOrganization},
|
||||
#{item.otherPaymentBaseString}
|
||||
#{item.otherPaymentBaseString},
|
||||
#{item.otherPaymentComBaseString}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -292,6 +300,7 @@
|
|||
<set>
|
||||
welfare_type = #{welfareType},
|
||||
other_payment_base_string = #{otherPaymentBaseString},
|
||||
other_payment_com_base_string = #{otherPaymentComBaseString},
|
||||
other_scheme_id = #{otherSchemeId},
|
||||
other_end_time = #{otherEndTime},
|
||||
other_start_time = #{otherStartTime},
|
||||
|
|
@ -340,7 +349,8 @@
|
|||
non_payment,
|
||||
creator,
|
||||
payment_organization,
|
||||
other_payment_base_string)
|
||||
other_payment_base_string,
|
||||
other_payment_com_base_string)
|
||||
VALUES
|
||||
(
|
||||
#{otherSchemeId},
|
||||
|
|
@ -356,7 +366,8 @@
|
|||
#{nonPayment},
|
||||
#{creator},
|
||||
#{paymentOrganization},
|
||||
#{otherPaymentBaseString}
|
||||
#{otherPaymentBaseString},
|
||||
#{otherPaymentComBaseString}
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
<result column="payment_organization" property="paymentOrganization"/>
|
||||
<result column="under_take" property="underTake"/>
|
||||
<result column="social_payment_base_string" property="socialPaymentBaseString"/>
|
||||
<result column="social_payment_com_base_string" property="socialPaymentComBaseString"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
, t.payment_organization
|
||||
, t.under_take
|
||||
, t.social_payment_base_string
|
||||
, t.social_payment_com_base_string
|
||||
, t.create_time
|
||||
, t.update_time
|
||||
, t.creator
|
||||
|
|
@ -128,6 +130,7 @@
|
|||
welfare_type,
|
||||
delete_type,
|
||||
social_payment_base_string,
|
||||
social_payment_com_base_string,
|
||||
social_scheme_id,
|
||||
create_time,
|
||||
social_end_time,
|
||||
|
|
@ -146,6 +149,7 @@
|
|||
#{item.welfareType},
|
||||
#{item.deleteType},
|
||||
#{item.socialPaymentBaseString},
|
||||
#{item.socialPaymentComBaseString},
|
||||
#{item.socialSchemeId},
|
||||
#{item.createTime},
|
||||
#{item.socialEndTime},
|
||||
|
|
@ -166,6 +170,7 @@
|
|||
welfare_type,
|
||||
delete_type,
|
||||
social_payment_base_string,
|
||||
social_payment_com_base_string,
|
||||
social_scheme_id,
|
||||
create_time,
|
||||
social_end_time,
|
||||
|
|
@ -183,6 +188,7 @@
|
|||
#{item.welfareType,jdbcType=INTEGER},
|
||||
#{item.deleteType,jdbcType=INTEGER},
|
||||
#{item.socialPaymentBaseString,jdbcType=VARCHAR},
|
||||
#{item.socialPaymentComBaseString,jdbcType=VARCHAR},
|
||||
#{item.socialSchemeId,jdbcType=DOUBLE},
|
||||
#{item.createTime,jdbcType=DATE},
|
||||
#{item.socialEndTime,jdbcType=VARCHAR},
|
||||
|
|
@ -204,6 +210,7 @@
|
|||
welfare_type,
|
||||
delete_type,
|
||||
social_payment_base_string,
|
||||
social_payment_com_base_string,
|
||||
social_scheme_id,
|
||||
create_time,
|
||||
social_end_time,
|
||||
|
|
@ -221,6 +228,7 @@
|
|||
#{item.welfareType},
|
||||
#{item.deleteType},
|
||||
#{item.socialPaymentBaseString},
|
||||
#{item.socialPaymentComBaseString},
|
||||
#{item.socialSchemeId},
|
||||
#{item.createTime},
|
||||
#{item.socialEndTime},
|
||||
|
|
@ -955,6 +963,7 @@
|
|||
<set>
|
||||
welfare_type = #{welfareType},
|
||||
social_payment_base_string = #{socialPaymentBaseString},
|
||||
social_payment_com_base_string = #{socialPaymentComBaseString},
|
||||
social_scheme_id = #{socialSchemeId},
|
||||
social_end_time = #{socialEndTime},
|
||||
social_start_time = #{socialStartTime},
|
||||
|
|
@ -994,6 +1003,7 @@
|
|||
welfare_type,
|
||||
delete_type,
|
||||
social_payment_base_string,
|
||||
social_payment_com_base_string,
|
||||
social_scheme_id,
|
||||
create_time,
|
||||
social_end_time,
|
||||
|
|
@ -1011,6 +1021,7 @@
|
|||
#{welfareType},
|
||||
#{deleteType},
|
||||
#{socialPaymentBaseString},
|
||||
#{socialPaymentComBaseString},
|
||||
#{socialSchemeId},
|
||||
#{createTime},
|
||||
#{socialEndTime},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.core.impl.Service;
|
||||
|
|
@ -31,6 +32,8 @@ import java.util.stream.Collectors;
|
|||
**/
|
||||
public class ColumnBuildServiceImpl extends Service implements ColumnBuildService {
|
||||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
private ICategoryMapper getICategoryMapper() {
|
||||
return MapperProxyFactory.getProxy(ICategoryMapper.class);
|
||||
}
|
||||
|
|
@ -122,58 +125,128 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
}
|
||||
|
||||
private Map<Integer, Map<String, String>> buildPaymentTitle(List<InsuranceAccountDetailPO> pos, Map<String, String> categoryIdNameMap, Long employeeId, String tenantKey) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
Set<String> socailIds = new HashSet<>();
|
||||
Set<String> fundIds = new HashSet<>();
|
||||
Set<String> otherIds = new HashSet<>();
|
||||
|
||||
Set<String> socailComIds = new HashSet<>();
|
||||
Set<String> fundComIds = new HashSet<>();
|
||||
Set<String> otherComIds = new HashSet<>();
|
||||
|
||||
Map<Integer, Map<String, String>> result = new HashMap<>();
|
||||
|
||||
pos.stream().forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getSocialPaymentBaseString())) {
|
||||
if (StringUtils.isNotBlank(item.getSocialPaymentBaseString()) || StringUtils.isNotBlank(item.getSocialPaymentComBaseString())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialComJson != null) {
|
||||
socialComJson.forEach((k, v) -> socailComIds.add(k));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPaymentBaseString())) {
|
||||
if (StringUtils.isNotBlank(item.getFundPaymentBaseString()) || StringUtils.isNotBlank(item.getFundPaymentComBaseString())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if(fundJson!=null){
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundComJson != null) {
|
||||
fundComJson.forEach((k, v) -> fundComIds.add(k));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPaymentBaseString())) {
|
||||
if (StringUtils.isNotBlank(item.getOtherPaymentBaseString()) || StringUtils.isNotBlank(item.getOtherPaymentComBaseString())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if(otherJson!=null){
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherComJson != null) {
|
||||
otherComJson.forEach((k, v) -> otherComIds.add(k));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
Map<String, String> fundColumns = new HashMap<>();
|
||||
Map<String, String> otherColumns = new HashMap<>();
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "socialBase");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "fundBase");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "otherBase");
|
||||
}
|
||||
});
|
||||
|
||||
Map<String, String> socialComColumns = new HashMap<>();
|
||||
Map<String, String> fundComColumns = new HashMap<>();
|
||||
Map<String, String> otherComColumns = new HashMap<>();
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "socialPerBase");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "fundPerBase");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "otherPerBase");
|
||||
}
|
||||
});
|
||||
|
||||
socailComIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "socialComBase");
|
||||
}
|
||||
});
|
||||
fundComIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "fundComBase");
|
||||
}
|
||||
});
|
||||
otherComIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "otherComBase");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数"), social + "socialBase");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "fundBase");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "otherBase");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// map根据value排序
|
||||
LinkedHashMap<String, String> socialColumnsWithAscValue = socialColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
|
|
@ -188,6 +261,24 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
|
|||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
LinkedHashMap<String, String> socialComMapWithAscKey = socialComColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundComMapWithAscKey = fundComColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> otherComMapWithAscKey = otherComColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
socialColumnsWithAscValue.putAll(socialComMapWithAscKey);
|
||||
fundColumnsWithAscValue.putAll(fundComMapWithAscKey);
|
||||
otherColumnsWithAscValue.putAll(otherComMapWithAscKey);
|
||||
}
|
||||
|
||||
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue);
|
||||
result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue);
|
||||
result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SIArchivesBiz;
|
||||
|
|
@ -15,6 +16,7 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
|||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.BillStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.ResourceFromEnum;
|
||||
import com.engine.salary.enums.sicategory.PaymentScopeEnum;
|
||||
import com.engine.salary.mapper.datacollection.EmployMapper;
|
||||
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
|
||||
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
|
||||
|
|
@ -60,8 +62,11 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> buildCommonRecords(List<InsuranceAccountDetailPO> list, Long employeeId) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return result;
|
||||
|
|
@ -99,34 +104,130 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
record.put("socialAccount", item.getSocialAccount());
|
||||
|
||||
record.put("socialSchemeName", getInsuranceSchemeMapper().querySchemeName(item.getSocialSchemeId()));
|
||||
if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString())) {
|
||||
if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString()) || StringUtils.isNotEmpty(item.getSocialPaymentComBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialBase", (String) v);
|
||||
// if(socialJson!=null){
|
||||
// socialJson.forEach((k, v) -> {
|
||||
// record.put(k + "socialBase", (String) v);
|
||||
// });
|
||||
// }
|
||||
if (welBaseDiffSign) {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "socialPerBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
socialComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "socialComBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "socialBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
record.put("fundPayOrg", item.getFundPayOrg() == null ? "" : (paymentMap.getOrDefault(item.getFundPayOrg(),TaxAgentPO.builder().build())).getName());
|
||||
record.put("fundAccount", item.getFundAccount());
|
||||
record.put("fundSchemeName", getInsuranceSchemeMapper().querySchemeName(item.getFundSchemeId()));
|
||||
record.put("supplementFundAccount", item.getSupplementFundAccount());
|
||||
if (StringUtils.isNotEmpty(item.getFundPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "fundBase", (String) v);
|
||||
if (StringUtils.isNotEmpty(item.getFundPaymentBaseString()) || StringUtils.isNotEmpty(item.getFundPaymentComBaseString())) {
|
||||
Map<String, Object> fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
// if(fundJson!=null){
|
||||
// fundJson.forEach((k, v) -> {
|
||||
// record.put(k + "fundBase", (String) v);
|
||||
// });
|
||||
// }
|
||||
if (welBaseDiffSign) {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "fundPerBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
fundComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "fundComBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "fundBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
record.put("otherPayOrg", item.getOtherPayOrg() == null ? "" : (paymentMap.getOrDefault(item.getOtherPayOrg(),TaxAgentPO.builder().build())).getName());
|
||||
record.put("otherSchemeName", getInsuranceSchemeMapper().querySchemeName(item.getOtherSchemeId()));
|
||||
if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
if(socialJson!=null){
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "otherBase", (String) v);
|
||||
if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString()) || StringUtils.isNotEmpty(item.getOtherPaymentComBaseString())) {
|
||||
Map<String, Object> otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
// if(otherJson!=null){
|
||||
// otherJson.forEach((k, v) -> {
|
||||
// record.put(k + "otherBase", (String) v);
|
||||
// });
|
||||
// }
|
||||
if (welBaseDiffSign) {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "otherPerBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
otherComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "otherComBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "otherBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(item.getSocialPerJson())) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.service.impl;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SIArchivesBiz;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.siaccount.bo.InsuranceComparisonResultBO;
|
||||
import com.engine.salary.entity.siaccount.dto.InsuranceComparisonResultListDTO;
|
||||
|
|
@ -24,6 +25,7 @@ import com.engine.salary.sys.service.SalarySysConfService;
|
|||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.Column;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
|
|
@ -45,6 +47,8 @@ import java.util.stream.Collectors;
|
|||
public class SIAComparisonResultServiceImpl extends Service implements SIAComparisonResultService {
|
||||
private EncryptUtil encryptUtil = new EncryptUtil();
|
||||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
private InsuranceExportMapper getInsuranceExportMapper() {
|
||||
return MapperProxyFactory.getProxy(InsuranceExportMapper.class);
|
||||
}
|
||||
|
|
@ -131,7 +135,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
|||
|
||||
String sheetName = "线下对比结果";
|
||||
|
||||
return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
return ExcelUtilPlus.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -140,6 +144,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
|||
*/
|
||||
private InsuranceComparisonResultListDTO listByParam(boolean needPage, InsuranceComparisonResultQueryParam queryParam) {
|
||||
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
//排序配置
|
||||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
|
||||
|
|
@ -200,10 +205,10 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
|||
Set<Long> insurancePerPaySet = new HashSet<>(insurancePerPayIds);
|
||||
Set<Long> insuranceComPaySet = new HashSet<>(insuranceComPayIds);
|
||||
//3-构建福利核算对比结果列表表头
|
||||
List<Column> weaTableColumns = InsuranceComparisonResultBO.buildTableColumns4ComparisonResult(insuranceBaseSet, insurancePerPaySet, insuranceComPaySet);
|
||||
List<Column> weaTableColumns = InsuranceComparisonResultBO.buildTableColumns4ComparisonResult(insuranceBaseSet, insurancePerPaySet, insuranceComPaySet, welBaseDiffSign);
|
||||
//4-通过线上线下两份数据获得对比结果
|
||||
Map<Long, String> schemeIdNameMap = getSISchemeService(user).getSchemeIdNameMap();
|
||||
List<Map<String, Object>> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap);
|
||||
List<Map<String, Object>> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap, welBaseDiffSign);
|
||||
|
||||
// 系统值和线下值一致的人员
|
||||
if (queryParam.isOnlyDiffEmployee()) {
|
||||
|
|
@ -227,7 +232,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
|||
}
|
||||
|
||||
private Set<String> welfareInfo() {
|
||||
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
Set<String> info = new HashSet<>();
|
||||
|
||||
List<ICategoryPO> listAll = getICategoryMapper().listAll();
|
||||
|
|
@ -235,18 +240,37 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
|||
List<ICategoryPO> fundWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 2).collect(Collectors.toList());
|
||||
List<ICategoryPO> otherWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 3).collect(Collectors.toList());
|
||||
|
||||
//组装社保基数
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
info.add(po.getId() + "socialBase");
|
||||
}
|
||||
//组装公积金基数
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
info.add(po.getId() + "fundBase");
|
||||
}
|
||||
//组装其他福利基数
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
info.add(po.getId() + "otherBase");
|
||||
if (welBaseDiffSign) {
|
||||
//组装社保基数
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
info.add(po.getId() + "socialPerBase");
|
||||
info.add(po.getId() + "socialComBase");
|
||||
}
|
||||
//组装公积金基数
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
info.add(po.getId() + "fundPerBase");
|
||||
info.add(po.getId() + "fundComBase");
|
||||
}
|
||||
//组装其他福利基数
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
info.add(po.getId() + "otherPerBase");
|
||||
info.add(po.getId() + "otherComBase");
|
||||
}
|
||||
} else {
|
||||
//组装社保基数
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
info.add(po.getId() + "socialBase");
|
||||
}
|
||||
//组装公积金基数
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
info.add(po.getId() + "fundBase");
|
||||
}
|
||||
//组装其他福利基数
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
info.add(po.getId() + "otherBase");
|
||||
}
|
||||
}
|
||||
|
||||
//社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人)
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
info.add(po.getId() + "socialPer");
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.excel.ExcelSupport;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.Column;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
|
|
@ -2221,7 +2222,79 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
*/
|
||||
@Override
|
||||
public XSSFWorkbook exportComparisonWelfareTemplate(InsuranceAccountDetailParam param) {
|
||||
Map<String, List<Object>> welColumnMap = createWelColumnMap(param);
|
||||
|
||||
List<Object> headerList = Lists.newArrayList(SalaryI18nUtil.getI18nLabel(85429, "姓名"),
|
||||
SalaryI18nUtil.getI18nLabel(86185, "部门"),
|
||||
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
|
||||
SalaryI18nUtil.getI18nLabel(86317, "工号"),
|
||||
SalaryI18nUtil.getI18nLabel(86187, "员工状态"),
|
||||
SalaryI18nUtil.getI18nLabel(100377, "数据来源"),
|
||||
SalaryI18nUtil.getI18nLabel(91325, "个税扣缴义务人"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91324, "社保账号"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"));
|
||||
//组装社保基数
|
||||
if (welColumnMap.get("socialBase") != null) {
|
||||
headerList.addAll(welColumnMap.get("socialBase"));
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91486, "公积金账号"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称"));
|
||||
//组装公积金基数
|
||||
if (welColumnMap.get("fundBase") != null) {
|
||||
headerList.addAll(welColumnMap.get("fundBase"));
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称"));
|
||||
//组装其他福利基数
|
||||
if (welColumnMap.get("otherBase") != null) {
|
||||
headerList.addAll(welColumnMap.get("otherBase"));
|
||||
}
|
||||
//社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人)
|
||||
if (welColumnMap.get("socialPer") != null) {
|
||||
headerList.addAll(welColumnMap.get("socialPer"));
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100388, "社保个人合计"));
|
||||
//住房公积金个人、补充住房公积金个人
|
||||
if (welColumnMap.get("fundPer") != null) {
|
||||
headerList.addAll(welColumnMap.get("fundPer"));
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100390, "公积金个人合计"));
|
||||
//其他个人(比如企业年金个人)
|
||||
if (welColumnMap.get("otherPer") != null) {
|
||||
headerList.addAll(welColumnMap.get("otherPer"));
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100392, "其他福利个人合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100393, "个人合计"));
|
||||
//社保单位(生育保险单位、工伤保险单位、失业保险单位、养老保险单位、医疗保险单位)
|
||||
if (welColumnMap.get("socialCom") != null) {
|
||||
headerList.addAll(welColumnMap.get("socialCom"));
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100394, "社保单位合计"));
|
||||
//住房公积金单位、补充住房公积金单位
|
||||
if (welColumnMap.get("fundCom") != null) {
|
||||
headerList.addAll(welColumnMap.get("fundCom"));
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100395, "公积金单位合计"));
|
||||
//其他单位(比如企业年金单位)
|
||||
if (welColumnMap.get("otherCom") != null) {
|
||||
headerList.addAll(welColumnMap.get("otherCom"));
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100396, "其他福利单位合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100397, "单位合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100398, "社保合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100399, "公积金合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100400, "其他福利合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(93278, "合计"));
|
||||
|
||||
List<List<Object>> rows = new ArrayList<>();
|
||||
rows.add(headerList);
|
||||
String sheetName = "福利核算-线下对比导入模板";
|
||||
|
||||
return ExcelUtilPlus.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
||||
public Map<String, List<Object>> createWelColumnMap(InsuranceAccountDetailParam param) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
//查询线上福利核算记录
|
||||
InsuranceExportParam insuranceExportParam = new InsuranceExportParam();
|
||||
insuranceExportParam.setBillMonth(param.getBillMonth());
|
||||
|
|
@ -2265,77 +2338,238 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
List<ICategoryPO> fundWelComList = listAll.stream().filter(e -> e.getWelfareType() == 2 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList());
|
||||
List<ICategoryPO> otherWelComList = listAll.stream().filter(e -> e.getWelfareType() == 3 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList());
|
||||
|
||||
List<Object> headerList = Lists.newArrayList(SalaryI18nUtil.getI18nLabel(85429, "姓名"),
|
||||
SalaryI18nUtil.getI18nLabel(86185, "部门"),
|
||||
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
|
||||
SalaryI18nUtil.getI18nLabel(86317, "工号"),
|
||||
SalaryI18nUtil.getI18nLabel(86187, "员工状态"),
|
||||
SalaryI18nUtil.getI18nLabel(100377, "数据来源"),
|
||||
SalaryI18nUtil.getI18nLabel(91325, "个税扣缴义务人"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91324, "社保账号"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"));
|
||||
// "失业保险申报基数"
|
||||
// "生育保险申报基数"
|
||||
// "养老保险申报基数"
|
||||
// "医疗保险申报基数"
|
||||
// "工伤保险申报基数"
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
headerList.add(po.getInsuranceName() + "申报基数");
|
||||
//组装社保基数
|
||||
List<Object> socialBaseColumns = new ArrayList<>();
|
||||
List<Object> socialPerBaseColumns = new ArrayList<>();
|
||||
List<Object> socialComBaseColumns = Lists.newArrayList();
|
||||
if (welBaseDiffSign) {
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
socialPerBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
socialComBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
socialBaseColumns.addAll(socialPerBaseColumns);
|
||||
socialBaseColumns.addAll(socialComBaseColumns);
|
||||
} else {
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
socialBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91486, "公积金账号"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称"));
|
||||
|
||||
//组装公积金基数
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
headerList.add(po.getInsuranceName() + "申报基数");
|
||||
List<Object> fundBaseColumns = new ArrayList<>();
|
||||
List<Object> fundPerBaseColumns = Lists.newArrayList();
|
||||
List<Object> fundComBaseColumns = Lists.newArrayList();
|
||||
if (welBaseDiffSign) {
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
fundPerBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
fundComBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
fundBaseColumns.addAll(fundPerBaseColumns);
|
||||
fundBaseColumns.addAll(fundComBaseColumns);
|
||||
} else {
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
fundBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称"));
|
||||
|
||||
//组装其他福利基数
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
headerList.add(po.getInsuranceName() + "申报基数");
|
||||
List<Object> otherBaseColumns = new ArrayList<>();
|
||||
List<Object> otherPerBaseColumns = new ArrayList<>();
|
||||
List<Object> otherComBaseColumns = Lists.newArrayList();
|
||||
if (welBaseDiffSign) {
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
otherPerBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
otherComBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
otherBaseColumns.addAll(otherPerBaseColumns);
|
||||
otherBaseColumns.addAll(otherComBaseColumns);
|
||||
} else {
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
otherBaseColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
}
|
||||
|
||||
//社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人)
|
||||
List<Object> socialPerColumns = new ArrayList<>();
|
||||
for (ICategoryPO po : socialWelPerList) {
|
||||
socialPerColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
//住房公积金个人、补充住房公积金个人
|
||||
List<Object> fundPerColumns = new ArrayList<>();
|
||||
for (ICategoryPO po : fundWelPerList) {
|
||||
fundPerColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
//其他个人(比如企业年金个人)
|
||||
List<Object> otherPerColumns = new ArrayList<>();
|
||||
for (ICategoryPO po : otherWelPerList) {
|
||||
otherPerColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
//社保单位(生育保险单位、工伤保险单位、失业保险单位、养老保险单位、医疗保险单位)
|
||||
List<Object> socialComColumns = new ArrayList<>();
|
||||
for (ICategoryPO po : socialWelComList) {
|
||||
socialComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
//住房公积金单位、补充住房公积金单位
|
||||
List<Object> fundComColumns = new ArrayList<>();
|
||||
for (ICategoryPO po : fundWelComList) {
|
||||
fundComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
|
||||
//其他单位(比如企业年金单位)
|
||||
List<Object> otherComColumns = new ArrayList<>();
|
||||
for (ICategoryPO po : otherWelComList) {
|
||||
otherComColumns.add(po.getInsuranceName() + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
|
||||
Map<String, List<Object>> welColumnMap = new HashMap<>();
|
||||
welColumnMap.put("socialPerBase", socialPerBaseColumns);
|
||||
welColumnMap.put("fundPerBase", fundPerBaseColumns);
|
||||
welColumnMap.put("otherPerBase", otherPerBaseColumns);
|
||||
welColumnMap.put("socialComBase", socialComBaseColumns);
|
||||
welColumnMap.put("fundComBase", fundComBaseColumns);
|
||||
welColumnMap.put("otherComBase", otherComBaseColumns);
|
||||
welColumnMap.put("socialBase", socialBaseColumns);
|
||||
welColumnMap.put("fundBase", fundBaseColumns);
|
||||
welColumnMap.put("otherBase", otherBaseColumns);
|
||||
welColumnMap.put("socialPer", socialPerColumns);
|
||||
welColumnMap.put("fundPer", fundPerColumns);
|
||||
welColumnMap.put("otherPer", otherPerColumns);
|
||||
welColumnMap.put("socialCom", socialComColumns);
|
||||
welColumnMap.put("fundCom", fundComColumns);
|
||||
welColumnMap.put("otherCom", otherComColumns);
|
||||
return welColumnMap;
|
||||
}
|
||||
|
||||
public Map<String, String> welColumnNameCodeMap(InsuranceAccountDetailParam param) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
//查询线上福利核算记录
|
||||
InsuranceExportParam insuranceExportParam = new InsuranceExportParam();
|
||||
insuranceExportParam.setBillMonth(param.getBillMonth());
|
||||
insuranceExportParam.setPaymentOrganization(param.getPaymentOrganization());
|
||||
List<AccountExportPO> accountExportPOS = getInsuranceExportMapper().exportAccount(param.getPaymentStatus(), insuranceExportParam);
|
||||
|
||||
//整理线上核算记录相关的福利方案,并以此整理需要对比的福利项类别数据
|
||||
Set<Long> welfareSchemeIds = new HashSet<>();
|
||||
accountExportPOS.forEach(f -> {
|
||||
welfareSchemeIds.add(f.getSocialSchemeId());
|
||||
welfareSchemeIds.add(f.getFundSchemeId());
|
||||
welfareSchemeIds.add(f.getOtherSchemeId());
|
||||
});
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPos = getInsuranceSchemeDetailMapper().listAll();
|
||||
List<Long> insuranceBaseIds = insuranceSchemeDetailPos.stream()
|
||||
.filter(f -> welfareSchemeIds.contains(f.getPrimaryId()) && f.getIsPayment() == 1)
|
||||
.map(InsuranceSchemeDetailPO::getInsuranceId)
|
||||
.collect(Collectors.toList());
|
||||
List<Long> insurancePerPayIds = insuranceSchemeDetailPos.stream()
|
||||
.filter(f -> welfareSchemeIds.contains(f.getPrimaryId()) && f.getIsPayment() == 1 && f.getPaymentScope() == 2)
|
||||
.map(InsuranceSchemeDetailPO::getInsuranceId)
|
||||
.collect(Collectors.toList());
|
||||
List<Long> insuranceComPayIds = insuranceSchemeDetailPos.stream()
|
||||
.filter(f -> welfareSchemeIds.contains(f.getPrimaryId()) && f.getIsPayment() == 1 && f.getPaymentScope() == 1)
|
||||
.map(InsuranceSchemeDetailPO::getInsuranceId)
|
||||
.collect(Collectors.toList());
|
||||
Set<Long> insuranceBaseSet = new HashSet<>(insuranceBaseIds);
|
||||
Set<Long> insurancePerPaySet = new HashSet<>(insurancePerPayIds);
|
||||
Set<Long> insuranceComPaySet = new HashSet<>(insuranceComPayIds);
|
||||
|
||||
List<ICategoryPO> listAll = getICategoryMapper().listAll();
|
||||
List<ICategoryPO> socialWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 1 && e.getIsUse() == 1 && insuranceBaseSet.contains(e.getId())).collect(Collectors.toList());
|
||||
List<ICategoryPO> fundWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 2 && e.getIsUse() == 1 && insuranceBaseSet.contains(e.getId())).collect(Collectors.toList());
|
||||
List<ICategoryPO> otherWelfareList = listAll.stream().filter(e -> e.getWelfareType() == 3 && e.getIsUse() == 1 && insuranceBaseSet.contains(e.getId())).collect(Collectors.toList());
|
||||
|
||||
List<ICategoryPO> socialWelPerList = listAll.stream().filter(e -> e.getWelfareType() == 1 && e.getIsUse() == 1 && insurancePerPaySet.contains(e.getId())).collect(Collectors.toList());
|
||||
List<ICategoryPO> fundWelPerList = listAll.stream().filter(e -> e.getWelfareType() == 2 && e.getIsUse() == 1 && insurancePerPaySet.contains(e.getId())).collect(Collectors.toList());
|
||||
List<ICategoryPO> otherWelPerList = listAll.stream().filter(e -> e.getWelfareType() == 3 && e.getIsUse() == 1 && insurancePerPaySet.contains(e.getId())).collect(Collectors.toList());
|
||||
|
||||
List<ICategoryPO> socialWelComList = listAll.stream().filter(e -> e.getWelfareType() == 1 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList());
|
||||
List<ICategoryPO> fundWelComList = listAll.stream().filter(e -> e.getWelfareType() == 2 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList());
|
||||
List<ICategoryPO> otherWelComList = listAll.stream().filter(e -> e.getWelfareType() == 3 && e.getIsUse() == 1 && insuranceComPaySet.contains(e.getId())).collect(Collectors.toList());
|
||||
|
||||
//组装社保基数
|
||||
Map<String, String> result = new HashMap<>();
|
||||
if (welBaseDiffSign) {
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数")
|
||||
+ SalaryI18nUtil.getI18nLabel(0,"个人"), po.getId() + "socialPerBase");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数")
|
||||
+ SalaryI18nUtil.getI18nLabel(0,"单位"), po.getId() + "socialComBase");
|
||||
}
|
||||
} else {
|
||||
for (ICategoryPO po : socialWelfareList) {
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "socialBase");
|
||||
}
|
||||
}
|
||||
|
||||
//组装公积金基数
|
||||
if (welBaseDiffSign) {
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数")
|
||||
+ SalaryI18nUtil.getI18nLabel(0,"个人"), po.getId() + "fundPerBase");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数")
|
||||
+ SalaryI18nUtil.getI18nLabel(0,"单位"), po.getId() + "fundComBase");
|
||||
}
|
||||
} else {
|
||||
for (ICategoryPO po : fundWelfareList) {
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "fundBase");
|
||||
}
|
||||
}
|
||||
|
||||
//组装其他福利基数
|
||||
if (welBaseDiffSign) {
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数")
|
||||
+ SalaryI18nUtil.getI18nLabel(0,"个人"), po.getId() + "otherPerBase");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数")
|
||||
+ SalaryI18nUtil.getI18nLabel(0,"单位"), po.getId() + "otherComBase");
|
||||
}
|
||||
} else {
|
||||
for (ICategoryPO po : otherWelfareList) {
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "申报基数"), po.getId() + "otherBase");
|
||||
}
|
||||
}
|
||||
|
||||
//社保个人(生育保险个人、工伤保险个人、失业保险个人、养老保险个人、医疗保险个人)
|
||||
for (ICategoryPO po : socialWelPerList) {
|
||||
headerList.add(po.getInsuranceName() + "个人");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "个人"), po.getId() + "socialPer");
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100388, "社保个人合计"));
|
||||
//住房公积金个人、补充住房公积金个人
|
||||
for (ICategoryPO po : fundWelPerList) {
|
||||
headerList.add(po.getInsuranceName() + "个人");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "个人"), po.getId() + "fundPer");
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100390, "公积金个人合计"));
|
||||
//其他个人(比如企业年金个人)
|
||||
for (ICategoryPO po : otherWelPerList) {
|
||||
headerList.add(po.getInsuranceName() + "个人");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "个人"), po.getId() + "otherPer");
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100392, "其他福利个人合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100393, "个人合计"));
|
||||
//社保单位(生育保险单位、工伤保险单位、失业保险单位、养老保险单位、医疗保险单位)
|
||||
for (ICategoryPO po : socialWelComList) {
|
||||
headerList.add(po.getInsuranceName() + "单位");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "单位"), po.getId() + "socialCom");
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100394, "社保单位合计"));
|
||||
//住房公积金单位、补充住房公积金单位
|
||||
for (ICategoryPO po : fundWelComList) {
|
||||
headerList.add(po.getInsuranceName() + "单位");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "单位"), po.getId() + "fundCom");
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100395, "公积金单位合计"));
|
||||
|
||||
//其他单位(比如企业年金单位)
|
||||
for (ICategoryPO po : otherWelComList) {
|
||||
headerList.add(po.getInsuranceName() + "单位");
|
||||
result.put(Util.formatMultiLang(po.getInsuranceName(), String.valueOf(user.getLanguage()))
|
||||
+ SalaryI18nUtil.getI18nLabel(0, "单位"), po.getId() + "otherCom");
|
||||
}
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100396, "其他福利单位合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100397, "单位合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100398, "社保合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100399, "公积金合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(100400, "其他福利合计"));
|
||||
headerList.add(SalaryI18nUtil.getI18nLabel(93278, "合计"));
|
||||
|
||||
List<List<Object>> rows = new ArrayList<>();
|
||||
rows.add(headerList);
|
||||
String sheetName = "福利核算-线下对比导入模板";
|
||||
|
||||
return ExcelUtil.genWorkbookV2(rows, sheetName);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2386,6 +2620,13 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
|
||||
String billMonth = importParam.getBillMonth();
|
||||
|
||||
// Map<String, String> welColumnNameCodeMap = welColumnNameCodeMap(InsuranceAccountDetailParam.builder()
|
||||
// .billMonth(billMonth)
|
||||
// .paymentOrganization(importParam.getPaymentOrganization())
|
||||
// .paymentStatus(PaymentStatusEnum.COMMON.getValue())
|
||||
// .build());
|
||||
Map<String, String> welColumnNameCodeMap = new HashMap<>();
|
||||
//存储待更新的InsuranceAccountDetailPO数据
|
||||
List<ExcelInsuranceDetailPO> addCompareList = new ArrayList<>();
|
||||
//记录待删除hrsa_excel_bill_detail.id
|
||||
|
|
@ -2407,6 +2648,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
if (taxAgentPoList.size() == 1) {
|
||||
paymentOrganization = taxAgentPoList.get(0).getId();
|
||||
welColumnNameCodeMap = welColumnNameCodeMap(InsuranceAccountDetailParam.builder()
|
||||
.billMonth(billMonth)
|
||||
.paymentOrganization(paymentOrganization.toString())
|
||||
.paymentStatus(PaymentStatusEnum.COMMON.getValue())
|
||||
.build());
|
||||
} else {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
|
|
@ -2480,7 +2726,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
idList.addAll(ids);
|
||||
}
|
||||
//拼装待更新数据
|
||||
addCompareList.add(handleExcelInsuranceDetail(billMonth, employeeId, paymentOrganization, map));
|
||||
addCompareList.add(handleExcelInsuranceDetail(billMonth, employeeId, paymentOrganization, map, welColumnNameCodeMap));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -2519,7 +2765,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
* @param billMonth 对比的账单月份
|
||||
* @param baseMap excel导入的对比数据
|
||||
*/
|
||||
private ExcelInsuranceDetailPO handleExcelInsuranceDetail(String billMonth, Long employeeId, Long paymentOrganization, Map<String, Object> baseMap) {
|
||||
private ExcelInsuranceDetailPO handleExcelInsuranceDetail(String billMonth, Long employeeId, Long paymentOrganization, Map<String, Object> baseMap, Map<String, String> welColumnNameCodeMap) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
|
||||
ExcelInsuranceDetailPO excelInsuranceDetailPO = new ExcelInsuranceDetailPO();
|
||||
excelInsuranceDetailPO.setId(IdGenerator.generate());
|
||||
|
|
@ -2535,6 +2782,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
Map<String, String> fundPaymentBaseMap = new HashMap<>();
|
||||
Map<String, String> otherPaymentBaseMap = new HashMap<>();
|
||||
|
||||
Map<String, String> socialPaymentComBaseMap = new HashMap<>();
|
||||
Map<String, String> fundPaymentComBaseMap = new HashMap<>();
|
||||
Map<String, String> otherPaymentComBaseMap = new HashMap<>();
|
||||
|
||||
//筛选出福利核算项
|
||||
Map<String, Object> toDealMap =
|
||||
baseMap.entrySet().stream()
|
||||
|
|
@ -2548,73 +2799,157 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
|
||||
for(Map.Entry<String, Object> entry : toDealMap.entrySet()) {
|
||||
//判断元素是否属于福利类
|
||||
String keyName = entry.getKey();
|
||||
//获取元素名后缀,方便之后判断“个人”或“单位”或者“基数”
|
||||
String payScope = keyName.substring(keyName.length() - 2);
|
||||
//获取福利类型
|
||||
Integer welfareType;
|
||||
//根据元素名后缀,区分截取内容
|
||||
String targetWelfareName;
|
||||
if ("基数".equals(payScope)) {
|
||||
targetWelfareName = entry.getKey().substring(0, keyName.length() - 4);
|
||||
} else {
|
||||
targetWelfareName = entry.getKey().substring(0, keyName.length() - 2);
|
||||
}
|
||||
List<ICategoryPO> categoryPOList = siCategoryBiz.listByName(targetWelfareName);
|
||||
if (categoryPOList.size() == 1) {
|
||||
ICategoryPO iCategoryPO = categoryPOList.get(0);
|
||||
welfareType = iCategoryPO.getWelfareType();
|
||||
// //判断元素是否属于福利类
|
||||
// String keyName = entry.getKey();
|
||||
// //获取元素名后缀,方便之后判断“个人”或“单位”或者“基数”
|
||||
// String payScope = keyName.substring(keyName.length() - 2);
|
||||
// //获取福利类型
|
||||
// Integer welfareType;
|
||||
// //根据元素名后缀,区分截取内容
|
||||
// String targetWelfareName;
|
||||
// if ("基数".equals(payScope)) {
|
||||
// targetWelfareName = entry.getKey().substring(0, keyName.length() - 4);
|
||||
// } else {
|
||||
// targetWelfareName = entry.getKey().substring(0, keyName.length() - 2);
|
||||
// }
|
||||
// List<ICategoryPO> categoryPOList = siCategoryBiz.listByName(targetWelfareName);
|
||||
// if (categoryPOList.size() == 1) {
|
||||
// ICategoryPO iCategoryPO = categoryPOList.get(0);
|
||||
// welfareType = iCategoryPO.getWelfareType();
|
||||
//
|
||||
// switch (payScope) {
|
||||
// case "个人":
|
||||
// switch (welfareType) {
|
||||
// case 1:
|
||||
// socialPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// case 2:
|
||||
// fundPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// case 3:
|
||||
// otherPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// default:
|
||||
// throw new SalaryRunTimeException("福利类型不存在");
|
||||
// }
|
||||
// break;
|
||||
// case "单位":
|
||||
// switch (welfareType) {
|
||||
// case 1:
|
||||
// socialComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// case 2:
|
||||
// fundComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// case 3:
|
||||
// otherComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// default:
|
||||
// throw new SalaryRunTimeException("福利类型不存在");
|
||||
// }
|
||||
// break;
|
||||
// case "基数":
|
||||
// switch (welfareType) {
|
||||
// case 1:
|
||||
// socialPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// case 2:
|
||||
// fundPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// case 3:
|
||||
// otherPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
// break;
|
||||
// default:
|
||||
// throw new SalaryRunTimeException("福利类型不存在");
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
switch (payScope) {
|
||||
case "个人":
|
||||
switch (welfareType) {
|
||||
case 1:
|
||||
socialPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 2:
|
||||
fundPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 3:
|
||||
otherPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
default:
|
||||
throw new SalaryRunTimeException("福利类型不存在");
|
||||
}
|
||||
break;
|
||||
case "单位":
|
||||
switch (welfareType) {
|
||||
case 1:
|
||||
socialComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 2:
|
||||
fundComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 3:
|
||||
otherComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
default:
|
||||
throw new SalaryRunTimeException("福利类型不存在");
|
||||
}
|
||||
break;
|
||||
case "基数":
|
||||
switch (welfareType) {
|
||||
case 1:
|
||||
socialPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 2:
|
||||
fundPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 3:
|
||||
otherPaymentBaseMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
default:
|
||||
throw new SalaryRunTimeException("福利类型不存在");
|
||||
}
|
||||
break;
|
||||
if (welColumnNameCodeMap.get(entry.getKey()) != null) {
|
||||
String code = welColumnNameCodeMap.get(entry.getKey());
|
||||
if (welBaseDiffSign) {
|
||||
if (code.contains("socialPerBase")) {
|
||||
code = code.replace("socialPerBase", "");
|
||||
socialPaymentBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("socialComBase")) {
|
||||
code = code.replace("socialComBase", "");
|
||||
socialPaymentComBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("fundPerBase")) {
|
||||
code = code.replace("fundPerBase", "");
|
||||
fundPaymentBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("fundComBase")) {
|
||||
code = code.replace("fundComBase", "");
|
||||
fundPaymentComBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("otherPerBase")) {
|
||||
code = code.replace("otherPerBase", "");
|
||||
otherPaymentBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("otherComBase")) {
|
||||
code = code.replace("otherComBase", "");
|
||||
otherPaymentComBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (code.contains("socialBase")) {
|
||||
code = code.replace("socialBase", "");
|
||||
socialPaymentBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("fundBase")) {
|
||||
code = code.replace("fundBase", "");
|
||||
fundPaymentBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("otherBase")) {
|
||||
code = code.replace("otherBase", "");
|
||||
otherPaymentBaseMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (code.contains("socialPer") && !code.contains("socialPerBase")) {
|
||||
code = code.replace("socialPer", "");
|
||||
socialPerMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("fundPer") && !code.contains("fundPerBase")) {
|
||||
code = code.replace("fundPer", "");
|
||||
fundPerMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("otherPer") && !code.contains("otherPerBase")) {
|
||||
code = code.replace("otherPer", "");
|
||||
otherPerMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (code.contains("socialCom") && !code.contains("socialComBase")) {
|
||||
code = code.replace("socialCom", "");
|
||||
socialComMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("fundCom") && !code.contains("fundComBase")) {
|
||||
code = code.replace("fundCom", "");
|
||||
fundComMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
if (code.contains("otherCom") && !code.contains("otherComBase")) {
|
||||
code = code.replace("otherCom", "");
|
||||
otherComMap.put(code, entry.getValue().toString());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//设置社保个人和公司缴纳明细
|
||||
|
|
@ -2631,6 +2966,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
excelInsuranceDetailPO.setFundPaymentBaseString(JSON.toJSONString(fundPaymentBaseMap));
|
||||
excelInsuranceDetailPO.setOtherPaymentBaseString(JSON.toJSONString(otherPaymentBaseMap));
|
||||
|
||||
excelInsuranceDetailPO.setSocialPaymentComBaseString(JSON.toJSONString(socialPaymentComBaseMap));
|
||||
excelInsuranceDetailPO.setFundPaymentComBaseString(JSON.toJSONString(fundPaymentComBaseMap));
|
||||
excelInsuranceDetailPO.setOtherPaymentComBaseString(JSON.toJSONString(otherPaymentComBaseMap));
|
||||
|
||||
//组装新的insuranceAccountDetailPO对象数据
|
||||
excelInsuranceDetailPO.setEmployeeId(employeeId);
|
||||
excelInsuranceDetailPO.setBillMonth(billMonth);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum;
|
|||
import com.engine.salary.enums.siaccount.EmployeeStatusEnum;
|
||||
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
|
||||
import com.engine.salary.enums.sicategory.NonPaymentEnum;
|
||||
import com.engine.salary.enums.sicategory.PaymentScopeEnum;
|
||||
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
|
||||
import com.engine.salary.enums.taxagent.TaxAgentEmpChangeModuleEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -141,7 +142,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
@Override
|
||||
public String insert(InsuranceArchivesSaveParam param) {
|
||||
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
siArchivesBiz.insert(param, (long) user.getUID());
|
||||
siArchivesBiz.insert(param, user);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -1158,6 +1159,19 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
public PageInfo<InsuranceArchivesBaseHistoryDTO> historyListByEmployeeIdAndOperator(SIArchiveBaseHistoryListParam param) {
|
||||
|
||||
List<InsuranceArchivesBaseHistoryDTO> adjustHistoryDTOS = siArchivesBiz.getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId());
|
||||
adjustHistoryDTOS.forEach(f -> {
|
||||
if (StringUtils.isNotBlank(f.getPaymentScope())) {
|
||||
if(f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue().toString())) {
|
||||
f.setPaymentScope(SalaryI18nUtil.getI18nLabel(0, "个人"));
|
||||
} else if(f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue().toString())) {
|
||||
f.setPaymentScope(SalaryI18nUtil.getI18nLabel(0, "公司"));
|
||||
} else {
|
||||
f.setPaymentScope(SalaryI18nUtil.getI18nLabel(0, "个人") + "," + SalaryI18nUtil.getI18nLabel(0, "公司"));
|
||||
}
|
||||
} else {
|
||||
f.setPaymentScope(SalaryI18nUtil.getI18nLabel(0, "个人") + "," + SalaryI18nUtil.getI18nLabel(0, "公司"));
|
||||
}
|
||||
});
|
||||
|
||||
PageInfo<InsuranceArchivesBaseHistoryDTO> listPage = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
|
||||
adjustHistoryDTOS , InsuranceArchivesBaseHistoryDTO.class);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SIAccountBiz;
|
||||
import com.engine.salary.biz.SIArchivesBiz;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
|
||||
import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam;
|
||||
|
|
@ -17,6 +19,7 @@ import com.engine.salary.enums.siaccount.BillStatusEnum;
|
|||
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
||||
import com.engine.salary.enums.siaccount.ResourceFromEnum;
|
||||
import com.engine.salary.enums.sicategory.DataTypeEnum;
|
||||
import com.engine.salary.enums.sicategory.PaymentScopeEnum;
|
||||
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
|
||||
import com.engine.salary.mapper.InsuranceExportMapper;
|
||||
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
|
||||
|
|
@ -37,6 +40,7 @@ import com.engine.salary.util.SalaryEnumUtil;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
|
|
@ -66,6 +70,8 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
|
||||
private SIAccountBiz siAccountBiz = new SIAccountBiz();
|
||||
|
||||
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
|
||||
|
||||
private SISchemeService getSISchemeService(User user) {
|
||||
return ServiceUtil.getService(SISchemeServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -242,11 +248,12 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
}
|
||||
|
||||
excelSheetData.addAll(rows);
|
||||
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName, total);
|
||||
return ExcelUtilPlus.genWorkbookV2(excelSheetData, sheetName, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> buildCommonRecords(List<AccountExportPO> list) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
||||
List<TaxAgentPO> paymentList = getTaxAgentMapper().listAll();
|
||||
|
|
@ -272,10 +279,42 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
record.put("socialSchemeName", schemeIdNameMap.get(item.getSocialSchemeId()));
|
||||
if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "socialBase", v);
|
||||
// if (socialJson != null) {
|
||||
// socialJson.forEach((k, v) -> {
|
||||
// record.put(k + "socialBase", v);
|
||||
// });
|
||||
// }
|
||||
if (welBaseDiffSign) {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "socialPerBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
socialComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "socialComBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getSocialSchemeId());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "socialBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -284,22 +323,86 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
record.put("fundSchemeName", schemeIdNameMap.get(item.getFundSchemeId()));
|
||||
record.put("supplementFundAccount", item.getSupplementFundAccount());
|
||||
if (StringUtils.isNotEmpty(item.getFundPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "fundBase", v);
|
||||
Map<String, Object> fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
// if (fundJson != null) {
|
||||
// fundJson.forEach((k, v) -> {
|
||||
// record.put(k + "fundBase", v);
|
||||
// });
|
||||
// }
|
||||
if (welBaseDiffSign) {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "fundPerBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
fundComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "fundComBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getFundSchemeId());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "fundBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
record.put("otherPayOrg", paymentMap.get(item.getOtherPayOrg()) == null ? "" : paymentMap.get(item.getOtherPayOrg()).getName());
|
||||
record.put("otherSchemeName", schemeIdNameMap.get(item.getOtherSchemeId()));
|
||||
if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
record.put(k + "otherBase", v);
|
||||
Map<String, Object> otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||
// if (otherJson != null) {
|
||||
// otherJson.forEach((k, v) -> {
|
||||
// record.put(k + "otherBase", v);
|
||||
// });
|
||||
// }
|
||||
if (welBaseDiffSign) {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "otherPerBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
otherComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "otherComBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(item.getOtherSchemeId());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
record.put(k + "otherBase", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -628,58 +731,127 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
}
|
||||
|
||||
private Map<Integer, Map<String, String>> buildPaymentTitle(List<AccountExportPO> pos, Map<String, String> categoryIdNameMap) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
Set<String> socailIds = new HashSet<>();
|
||||
Set<String> fundIds = new HashSet<>();
|
||||
Set<String> otherIds = new HashSet<>();
|
||||
|
||||
Set<String> socailComIds = new HashSet<>();
|
||||
Set<String> fundComIds = new HashSet<>();
|
||||
Set<String> otherComIds = new HashSet<>();
|
||||
|
||||
Map<Integer, Map<String, String>> result = new HashMap<>();
|
||||
|
||||
pos.stream().forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getSocialPaymentBaseString())) {
|
||||
if (StringUtils.isNotBlank(item.getSocialPaymentBaseString()) || StringUtils.isNotBlank(item.getSocialPaymentComBaseString())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> {
|
||||
socailIds.add(k);
|
||||
});
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialComJson != null) {
|
||||
socialComJson.forEach((k, v) -> socailComIds.add(k));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundPaymentBaseString())) {
|
||||
if (StringUtils.isNotBlank(item.getFundPaymentBaseString()) || StringUtils.isNotBlank(item.getFundPaymentComBaseString())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((k, v) -> {
|
||||
fundIds.add(k);
|
||||
});
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundComJson != null) {
|
||||
fundComJson.forEach((k, v) -> fundComIds.add(k));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherPaymentBaseString())) {
|
||||
if (StringUtils.isNotBlank(item.getOtherPaymentBaseString()) || StringUtils.isNotBlank(item.getOtherPaymentComBaseString())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((k, v) -> {
|
||||
otherIds.add(k);
|
||||
});
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherComJson != null) {
|
||||
otherComJson.forEach((k, v) -> otherComIds.add(k));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Map<String, String> socialColumns = new HashMap<>();
|
||||
Map<String, String> fundColumns = new HashMap<>();
|
||||
Map<String, String> otherColumns = new HashMap<>();
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "socialBase");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "fundBase");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"), social + "otherBase");
|
||||
}
|
||||
});
|
||||
|
||||
Map<String, String> socialComColumns = new HashMap<>();
|
||||
Map<String, String> fundComColumns = new HashMap<>();
|
||||
Map<String, String> otherComColumns = new HashMap<>();
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "socialPerBase");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "fundPerBase");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "otherPerBase");
|
||||
}
|
||||
});
|
||||
|
||||
socailComIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "socialComBase");
|
||||
}
|
||||
});
|
||||
fundComIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "fundComBase");
|
||||
}
|
||||
});
|
||||
otherComIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "otherComBase");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
socailIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数"), social + "socialBase");
|
||||
}
|
||||
});
|
||||
fundIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "fundBase");
|
||||
}
|
||||
});
|
||||
otherIds.stream().forEach(social -> {
|
||||
if (categoryIdNameMap.containsKey(social)) {
|
||||
otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "otherBase");
|
||||
}
|
||||
});
|
||||
}
|
||||
// map根据value排序
|
||||
LinkedHashMap<String, String> socialColumnsWithAscValue = socialColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByValue())
|
||||
|
|
@ -694,6 +866,24 @@ public class SIExportServiceImpl extends Service implements SIExportService {
|
|||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
LinkedHashMap<String, String> socialComMapWithAscKey = socialComColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundComMapWithAscKey = fundComColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> otherComMapWithAscKey = otherComColumns.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
socialColumnsWithAscValue.putAll(socialComMapWithAscKey);
|
||||
fundColumnsWithAscValue.putAll(fundComMapWithAscKey);
|
||||
otherColumnsWithAscValue.putAll(otherComMapWithAscKey);
|
||||
}
|
||||
|
||||
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue);
|
||||
result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue);
|
||||
result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import com.engine.salary.util.SalaryI18nUtil;
|
|||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelComment;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
|
|
@ -184,7 +185,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
|
||||
|
||||
//工作簿数据
|
||||
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName,excelComments);
|
||||
return ExcelUtilPlus.genWorkbookV2(excelSheetData, sheetName,excelComments);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -194,6 +195,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
* @return
|
||||
*/
|
||||
public List<String> buildHeader() {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
List<String> result = new ArrayList<>();
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 85429, "姓名"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 86184, "个税扣缴义务人"));
|
||||
|
|
@ -206,7 +208,13 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
// result.add(SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织"));
|
||||
//社保福利基数
|
||||
Map<String, Long> socialMap = welfareNameIdMap( WelfareTypeEnum.SOCIAL_SECURITY);
|
||||
socialMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 100293, "申报基数")));
|
||||
if (welBaseDiffSign) {
|
||||
socialMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人")));
|
||||
socialMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位")));
|
||||
} else {
|
||||
socialMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数")));
|
||||
}
|
||||
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91324, "社保账号"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91319, "社保起始缴纳月"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91320, "社保最后缴纳月"));
|
||||
|
|
@ -215,7 +223,13 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
result.add(SalaryI18nUtil.getI18nLabel( 91486, "公积金账号"));
|
||||
//公积金福利基数
|
||||
Map<String, Long> fundMap = welfareNameIdMap( WelfareTypeEnum.ACCUMULATION_FUND);
|
||||
fundMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 100293, "申报基数")));
|
||||
if (welBaseDiffSign) {
|
||||
fundMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人")));
|
||||
fundMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位")));
|
||||
} else {
|
||||
fundMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数")));
|
||||
}
|
||||
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91487, "补充公积金账号"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91483, "公积金起始缴纳月"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91484, "公积金最后缴纳月"));
|
||||
|
|
@ -223,7 +237,13 @@ public class SIImportServiceImpl extends Service implements SIImportService {
|
|||
// result.add(SalaryI18nUtil.getI18nLabel( 91497, "其他福利缴纳组织"));
|
||||
//其他福利基数
|
||||
Map<String, Long> otherMap = welfareNameIdMap( WelfareTypeEnum.OTHER);
|
||||
otherMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 100293, "申报基数")));
|
||||
if (welBaseDiffSign) {
|
||||
otherMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人")));
|
||||
otherMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位")));
|
||||
} else {
|
||||
otherMap.forEach((k, v) -> result.add(k + SalaryI18nUtil.getI18nLabel( 0, "申报基数")));
|
||||
}
|
||||
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91490, "其他福利起始缴纳月"));
|
||||
result.add(SalaryI18nUtil.getI18nLabel( 91494, "其他福利最后缴纳月"));
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -197,6 +197,9 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic
|
|||
// temp.setExternalFlag(insuranceAccountDetailPO.getExternalFlag());
|
||||
temp.setPaymentOrganization(insuranceAccountDetailPO.getPaymentOrganization());
|
||||
// temp.setPaymentAgency(insuranceAccountDetailPO.getPaymentAgency());
|
||||
temp.setSocialPaymentComBaseString(insuranceAccountDetailPO.getSocialPaymentComBaseString());
|
||||
temp.setFundPaymentComBaseString(insuranceAccountDetailPO.getFundPaymentComBaseString());
|
||||
temp.setOtherPaymentComBaseString(insuranceAccountDetailPO.getOtherPaymentComBaseString());
|
||||
}
|
||||
private void recessionSocial(RecessionParam param, InsuranceAccountDetailPO temp, InsuranceAccountDetailPO insuranceAccountDetailPO) {
|
||||
//退差社保个人缴费
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.excel.ExcelSupport;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
|
|
@ -261,6 +262,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
|
||||
@Override
|
||||
public List<Map<String, Object>> buildTableData(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
List<Map<String, Object>> records = new ArrayList<>();
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listAll();
|
||||
Map<Long, TaxAgentPO> longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId);
|
||||
|
|
@ -286,9 +288,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
Map<String, InsuranceArchivesFundSchemePO> fundSchemePOMap = SalaryEntityUtil.convert2Map(fundList, k -> k.getPaymentOrganization() + "-" + k.getEmployeeId());
|
||||
Map<String, InsuranceArchivesOtherSchemePO> otherSchemePOMap = SalaryEntityUtil.convert2Map(otherList, k -> k.getPaymentOrganization() + "-" + k.getEmployeeId());
|
||||
|
||||
// Map<Long, InsuranceArchivesSocialSchemePO> socialSchemePOMap = socialList.stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getEmployeeId, Function.identity()));
|
||||
// Map<Long, InsuranceArchivesFundSchemePO> fundSchemePOMap = fundList.stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getEmployeeId, Function.identity()));
|
||||
// Map<Long, InsuranceArchivesOtherSchemePO> otherSchemePOMap = otherList.stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getEmployeeId, Function.identity()));
|
||||
insuranceArchivesEmployeePOS.forEach(item -> {
|
||||
InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId());
|
||||
InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId());
|
||||
|
|
@ -307,15 +306,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("socialName", getSiSchemeService().querySchemeName(socialItem.getSocialSchemeId()));
|
||||
Map<String, Object> socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(socialJson);
|
||||
if (socialComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
socialComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
map.put("socialAccount", socialItem.getSocialAccount());
|
||||
map.put("socialStartTime", socialItem.getSocialStartTime());
|
||||
|
|
@ -326,15 +347,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("fundAccount", fundItem.getFundAccount());
|
||||
Map<String, Object> fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(fundJson);
|
||||
if (fundComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
fundComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
map.put("supplementFundAccount", fundItem.getSupplementFundAccount());
|
||||
map.put("fundStartTime", fundItem.getFundStartTime());
|
||||
|
|
@ -345,15 +388,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("otherName", getSiSchemeService().querySchemeName(otherItem.getOtherSchemeId()));
|
||||
Map<String, Object> otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(otherJson);
|
||||
if (otherComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
otherComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
map.put("otherStartTime", otherItem.getOtherStartTime());
|
||||
map.put("otherEndTime", otherItem.getOtherEndTime());
|
||||
|
|
@ -422,11 +487,11 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
|
||||
//工作簿数据
|
||||
List<List<String>> rows = new LinkedList<>();
|
||||
List<String> collect = columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList());
|
||||
List<List<Object>> rows = new LinkedList<>();
|
||||
List<Object> collect = columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList());
|
||||
rows.add(collect);
|
||||
for (Map<String, Object> recordData : records) {
|
||||
List<String> row = new LinkedList<>();
|
||||
List<Object> row = new LinkedList<>();
|
||||
for (WeaTableColumn column : columns) {
|
||||
try {
|
||||
Object o = recordData.get(column.getColumn());
|
||||
|
|
@ -437,20 +502,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
rows.add(row);
|
||||
}
|
||||
// return salaryBatchService.simpleExportExcel(ExportExcelInfo.builder()
|
||||
// .bizId(exportMap.get("biz"))
|
||||
// .flag(true)
|
||||
// .userId(employeeId)
|
||||
// .eteamsId(eteamsId)
|
||||
// .tenantKey(tenantKey)
|
||||
// .operator(operator)
|
||||
// .module(exportMap.get("module"))
|
||||
// .fileName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 94629, "社保福利档案") + SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
|
||||
// .handlerName("insuranceArchivesExportHandler")
|
||||
// .dataType(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 99915, "档案"))
|
||||
// .function(exportMap.get("function")).build(), sheetList);
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rows, sheetName);
|
||||
return ExcelUtilPlus.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -532,10 +585,17 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
|
||||
|
||||
public Map<Integer, Map<String, String>> buildColumnTitle(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS, Long employeeId) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
|
||||
Map<Integer, Map<String, String>> result = new HashMap<>();
|
||||
Set<String> socialSet = new HashSet<>();
|
||||
Set<String> fundSet = new HashSet<>();
|
||||
Set<String> otherSet = new HashSet<>();
|
||||
|
||||
Set<String> socialComSet = new HashSet<>();
|
||||
Set<String> fundComSet = new HashSet<>();
|
||||
Set<String> otherComSet = new HashSet<>();
|
||||
|
||||
insuranceArchivesEmployeePOS.forEach(item -> {
|
||||
List<InsuranceArchivesSocialSchemePO> socialByEmployeeId = siArchivesBiz.getSocialByEmployeeIds(new ArrayList<Long>() {{
|
||||
add(item.getEmployeeId());
|
||||
|
|
@ -571,6 +631,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> socialSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialComJson != null) {
|
||||
socialComJson.forEach((k, v) -> socialComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fundItem != null) {
|
||||
Map<String, Object> fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
@ -578,6 +646,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
if (fundJson != null) {
|
||||
fundJson.forEach((k, v) -> fundSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundComJson != null) {
|
||||
fundComJson.forEach((k, v) -> fundComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (otherItem != null) {
|
||||
Map<String, Object> otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
@ -585,42 +661,92 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
if (otherJson != null) {
|
||||
otherJson.forEach((k, v) -> otherSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherComJson != null) {
|
||||
otherComJson.forEach((k, v) -> otherComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Map<String, String> socialMap = new HashMap<>();
|
||||
Map<String, String> socialComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> socialCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customSocial = getICategoryMapper().listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
|
||||
Map<Long, ICategoryPO> sysSocial = getICategoryMapper().listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
socialCollect.putAll(customSocial);
|
||||
socialCollect.putAll(sysSocial);
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
}
|
||||
});
|
||||
if (welBaseDiffSign) {
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
socialComSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, String> fundMap = new HashMap<>();
|
||||
Map<String, String> fundComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> fundCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customFund = getICategoryMapper().listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
Map<Long, ICategoryPO> sysFund = getICategoryMapper().listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
fundCollect.putAll(customFund);
|
||||
fundCollect.putAll(sysFund);
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
}
|
||||
});
|
||||
if (welBaseDiffSign) {
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
fundComSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, String> otherMap = new HashMap<>();
|
||||
Map<String, String> otherComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> otherCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customOther = getICategoryMapper().listByWelfareType(WelfareTypeEnum.OTHER.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
Map<Long, ICategoryPO> sysOther = getICategoryMapper().listByWelfareType(WelfareTypeEnum.OTHER.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
otherCollect.putAll(customOther);
|
||||
otherCollect.putAll(sysOther);
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
}
|
||||
});
|
||||
if (welBaseDiffSign) {
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
otherComSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// map根据key排序
|
||||
LinkedHashMap<String, String> socialMapWithAscKey = socialMap.entrySet().stream()
|
||||
|
|
@ -635,6 +761,23 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
if (welBaseDiffSign) {
|
||||
LinkedHashMap<String, String> socialComMapWithAscKey = socialComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundComMapWithAscKey = fundComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> otherComMapWithAscKey = otherComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
socialMapWithAscKey.putAll(socialComMapWithAscKey);
|
||||
fundMapWithAscKey.putAll(fundComMapWithAscKey);
|
||||
otherMapWithAscKey.putAll(otherComMapWithAscKey);
|
||||
}
|
||||
|
||||
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMapWithAscKey);
|
||||
result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMapWithAscKey);
|
||||
|
|
@ -1084,16 +1227,40 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
insuranceArchivesOtherSchemePO = buildOtherPO(employeeId, welfareMap, singleAccount, schemeNameIdMap, paymentNameIdMap, creator);
|
||||
}
|
||||
/**************校验申报基数**************/
|
||||
for (Map.Entry<Long, String> entry : welfareMap.entrySet()) {
|
||||
String keyName = entry.getValue() + SalaryI18nUtil.getI18nLabel(100293, "申报基数");
|
||||
String numberVlue = findElement(singleAccount, keyName).get(keyName) == null ? "" : findElement(singleAccount, keyName).get(keyName).toString();
|
||||
if (!"".equals(numberVlue) && !NumberUtils.isParsable(numberVlue)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + keyName + SalaryI18nUtil.getI18nLabel(100581, "请输入数字"));
|
||||
excelComments.add(errorMessageMap);
|
||||
isError = true;
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (welBaseDiffSign) {
|
||||
for (Map.Entry<Long, String> entry : welfareMap.entrySet()) {
|
||||
String keyPerName = entry.getValue() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人");
|
||||
String keyComName = entry.getValue() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位");
|
||||
String numberPerValue = findElement(singleAccount, keyPerName).get(keyPerName) == null ? "" : findElement(singleAccount, keyPerName).get(keyPerName).toString();
|
||||
String numberComValue = findElement(singleAccount, keyComName).get(keyComName) == null ? "" : findElement(singleAccount, keyComName).get(keyComName).toString();
|
||||
|
||||
if (!"".equals(numberPerValue) && !NumberUtils.isParsable(numberPerValue)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + keyPerName + SalaryI18nUtil.getI18nLabel(0, "请输入数字"));
|
||||
excelComments.add(errorMessageMap);
|
||||
isError = true;
|
||||
}
|
||||
if (!"".equals(numberComValue) && !NumberUtils.isParsable(numberComValue)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + keyComName + SalaryI18nUtil.getI18nLabel(0, "请输入数字"));
|
||||
excelComments.add(errorMessageMap);
|
||||
isError = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (Map.Entry<Long, String> entry : welfareMap.entrySet()) {
|
||||
String keyName = entry.getValue() + SalaryI18nUtil.getI18nLabel(0, "申报基数");
|
||||
String numberValue = findElement(singleAccount, keyName).get(keyName) == null ? "" : findElement(singleAccount, keyName).get(keyName).toString();
|
||||
if (!"".equals(numberValue) && !NumberUtils.isParsable(numberValue)) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + keyName + SalaryI18nUtil.getI18nLabel(0, "请输入数字"));
|
||||
excelComments.add(errorMessageMap);
|
||||
isError = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//生成福利档案基础信息数据
|
||||
InsuranceArchivesBaseInfoPO insuranceArchivesBaseInfoPO = buildBaseInfoPO(employeeId, singleAccount, paymentNameIdMap, creator, runStatus, employees.get(0).isExtEmp());
|
||||
if (!isError) {
|
||||
|
|
@ -1102,23 +1269,31 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
insuranceArchivesAccountPO.setOther(insuranceArchivesOtherSchemePO);
|
||||
insuranceArchivesAccountPO.setBaseInfo(insuranceArchivesBaseInfoPO);
|
||||
//校验福利基数是否符合上下限要求,
|
||||
Boolean socialCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString());
|
||||
Boolean socialCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
|
||||
Boolean fundCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString());
|
||||
Boolean fundCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
|
||||
Boolean otherCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString());
|
||||
Boolean otherCheckBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
|
||||
if (socialCheckBase && fundCheckBase && otherCheckBase) {
|
||||
Boolean socialCheckComBase = true;
|
||||
Boolean fundCheckComBase = true;
|
||||
Boolean otherCheckComBase = true;
|
||||
if (welBaseDiffSign) {
|
||||
socialCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
fundCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
otherCheckComBase = siArchivesBiz.checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
}
|
||||
if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckComBase && fundCheckComBase && otherCheckComBase) {
|
||||
insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO);
|
||||
} else {
|
||||
String checkMessage = "该条数据中";
|
||||
if (!socialCheckBase) {
|
||||
if (!socialCheckBase || !socialCheckComBase) {
|
||||
checkMessage = checkMessage + "社保福利基数、";
|
||||
}
|
||||
if (!fundCheckBase) {
|
||||
if (!fundCheckBase || !fundCheckComBase) {
|
||||
checkMessage = checkMessage + "公积金福利基数、";
|
||||
}
|
||||
if (!otherCheckBase) {
|
||||
if (!otherCheckBase || !otherCheckComBase) {
|
||||
checkMessage = checkMessage + "其他福利基数、";
|
||||
}
|
||||
checkMessage = checkMessage.substring(0, checkMessage.length() - 1);
|
||||
|
|
@ -1162,12 +1337,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
String socialAccount = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91324, "社保账号")).get(SalaryI18nUtil.getI18nLabel(91324, "社保账号"));
|
||||
Long socialSchemeId = schemeNameIdMap.get((String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91323, "社保方案名称")).get(SalaryI18nUtil.getI18nLabel(91323, "社保方案名称")));
|
||||
HashMap<String, String> oldSocialBaseMap = new HashMap<>();
|
||||
HashMap<String, String> oldSocialComBaseMap = new HashMap<>();
|
||||
if (oldSocialSchemeInfos.size() > 0) {
|
||||
oldSocialSchemePO = oldSocialSchemeInfos.get(0);
|
||||
encryptUtil.decrypt(oldSocialSchemePO, InsuranceArchivesSocialSchemePO.class);
|
||||
BeanUtils.copyProperties(oldSocialSchemePO, insuranceArchivesSocialSchemePO);
|
||||
//社保基数
|
||||
oldSocialBaseMap = JSON.parseObject(oldSocialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
oldSocialComBaseMap = JSON.parseObject(oldSocialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
|
||||
insuranceArchivesSocialSchemePO.setId(IdGenerator.generate());
|
||||
|
|
@ -1202,21 +1379,48 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
insuranceArchivesSocialSchemePO.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue());
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesSocialSchemePO.getSocialSchemeId());
|
||||
encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
||||
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) {
|
||||
List<Long> insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList());
|
||||
HashMap<String, String> socialPaymentBase = new HashMap<>();
|
||||
HashMap<String, String> socialPaymentComBase = new HashMap<>();
|
||||
for (Long insuranceId : insuranceIds) {
|
||||
if (StringUtils.isBlank(welfareMap.get(insuranceId))) {
|
||||
continue;
|
||||
}
|
||||
if (findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")) != null) {
|
||||
String itemValue = (String) findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")).get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldSocialBaseMap != null && StringUtils.isNotBlank(oldSocialBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), oldSocialBaseMap.get(String.valueOf(insuranceId)));
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> itemPerMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人"));
|
||||
if (itemPerMap != null) {
|
||||
String itemValue = (String) itemPerMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldSocialBaseMap != null && StringUtils.isNotBlank(oldSocialBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), oldSocialBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
Map<String, Object> itemComMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位"));
|
||||
if (itemComMap != null) {
|
||||
String itemValue = (String) itemComMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
socialPaymentComBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldSocialComBaseMap != null && StringUtils.isNotBlank(oldSocialComBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
socialPaymentComBase.put(String.valueOf(insuranceId), oldSocialComBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
insuranceArchivesSocialSchemePO.setSocialPaymentComBaseString(JSON.toJSONString(socialPaymentComBase));
|
||||
} else {
|
||||
Map<String, Object> itemMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
if (itemMap != null) {
|
||||
String itemValue = (String) itemMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldSocialBaseMap != null && StringUtils.isNotBlank(oldSocialBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), oldSocialBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(JSON.toJSONString(socialPaymentBase));
|
||||
}
|
||||
|
|
@ -1243,12 +1447,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
String supplementFundAccount = (String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号")).get(SalaryI18nUtil.getI18nLabel(91487, "补充公积金账号"));
|
||||
Long fundSchemeId = schemeNameIdMap.get((String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称")).get(SalaryI18nUtil.getI18nLabel(91485, "公积金方案名称")));
|
||||
HashMap<String, String> oldFundBaseMap = new HashMap<>();
|
||||
HashMap<String, String> oldFundComBaseMap = new HashMap<>();
|
||||
if (oldFundSchemeInfos.size() > 0) {
|
||||
oldFundSchemePO = oldFundSchemeInfos.get(0);
|
||||
encryptUtil.decrypt(oldFundSchemePO, InsuranceArchivesFundSchemePO.class);
|
||||
BeanUtils.copyProperties(oldFundSchemePO, insuranceArchivesFundSchemePO);
|
||||
//社保基数
|
||||
oldFundBaseMap = JSON.parseObject(oldFundSchemePO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
oldFundComBaseMap = JSON.parseObject(oldFundSchemePO.getFundPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
|
||||
insuranceArchivesFundSchemePO.setId(IdGenerator.generate());
|
||||
|
|
@ -1286,24 +1492,49 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesFundSchemePO.getFundSchemeId());
|
||||
encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) {
|
||||
List<Long> insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList());
|
||||
HashMap<String, String> socialPaymentBase = new HashMap<>();
|
||||
HashMap<String, String> fundPaymentBase = new HashMap<>();
|
||||
HashMap<String, String> fundPaymentComBase = new HashMap<>();
|
||||
for (Long insuranceId : insuranceIds) {
|
||||
if (StringUtils.isBlank(welfareMap.get(insuranceId))) {
|
||||
continue;
|
||||
}
|
||||
if (findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")) != null) {
|
||||
String itemValue = (String) findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")).get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldFundBaseMap != null && StringUtils.isNotBlank(oldFundBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), oldFundBaseMap.get(String.valueOf(insuranceId)));
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> itemPerMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人"));
|
||||
if (itemPerMap != null) {
|
||||
String itemValue = (String) itemPerMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
fundPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldFundBaseMap != null && StringUtils.isNotBlank(oldFundBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
fundPaymentBase.put(String.valueOf(insuranceId), oldFundBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
Map<String, Object> itemComMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位"));
|
||||
if (itemComMap != null) {
|
||||
String itemValue = (String) itemComMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
fundPaymentComBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldFundComBaseMap != null && StringUtils.isNotBlank(oldFundComBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
fundPaymentComBase.put(String.valueOf(insuranceId), oldFundComBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
insuranceArchivesFundSchemePO.setFundPaymentComBaseString(JSON.toJSONString(fundPaymentComBase));
|
||||
} else {
|
||||
Map<String, Object> itemMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
if (itemMap != null) {
|
||||
String itemValue = (String) itemMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
fundPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldFundBaseMap != null && StringUtils.isNotBlank(oldFundBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
fundPaymentBase.put(String.valueOf(insuranceId), oldFundBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
insuranceArchivesFundSchemePO.setFundPaymentBaseString(JSON.toJSONString(socialPaymentBase));
|
||||
insuranceArchivesFundSchemePO.setFundPaymentBaseString(JSON.toJSONString(fundPaymentBase));
|
||||
}
|
||||
return insuranceArchivesFundSchemePO;
|
||||
}
|
||||
|
|
@ -1325,12 +1556,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
//设置其他福利方案、起始缴纳月、最后缴纳月
|
||||
Long otherSchemeId = schemeNameIdMap.get((String) findElement(singleAccount, SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称")).get(SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称")));
|
||||
HashMap<String, String> oldOtherBaseMap = new HashMap<>();
|
||||
HashMap<String, String> oldOtherComBaseMap = new HashMap<>();
|
||||
if (oldOtherSchemeInfos.size() > 0) {
|
||||
oldOtherSchemePO = oldOtherSchemeInfos.get(0);
|
||||
encryptUtil.decrypt(oldOtherSchemePO, InsuranceArchivesOtherSchemePO.class);
|
||||
BeanUtils.copyProperties(oldOtherSchemePO, insuranceArchivesOtherSchemePO);
|
||||
//社保基数
|
||||
oldOtherBaseMap = JSON.parseObject(oldOtherSchemePO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
oldOtherComBaseMap = JSON.parseObject(oldOtherSchemePO.getOtherPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
}
|
||||
|
||||
insuranceArchivesOtherSchemePO.setId(IdGenerator.generate());
|
||||
|
|
@ -1361,24 +1594,49 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
insuranceArchivesOtherSchemePO.setEmployeeId(employeeId);
|
||||
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(insuranceArchivesOtherSchemePO.getOtherSchemeId());
|
||||
encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
if (CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) {
|
||||
List<Long> insuranceIds = insuranceSchemeDetailPOS.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList());
|
||||
HashMap<String, String> socialPaymentBase = new HashMap<>();
|
||||
HashMap<String, String> otherPaymentBase = new HashMap<>();
|
||||
HashMap<String, String> otherPaymentComBase = new HashMap<>();
|
||||
for (Long insuranceId : insuranceIds) {
|
||||
if (StringUtils.isBlank(welfareMap.get(insuranceId))) {
|
||||
continue;
|
||||
}
|
||||
if (findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")) != null) {
|
||||
String itemValue = (String) findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数")).get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldOtherBaseMap != null && StringUtils.isNotBlank(oldOtherBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
socialPaymentBase.put(String.valueOf(insuranceId), oldOtherBaseMap.get(String.valueOf(insuranceId)));
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> itemPerMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人"));
|
||||
if (itemPerMap != null) {
|
||||
String itemValue = (String) itemPerMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "个人"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
otherPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldOtherBaseMap != null && StringUtils.isNotBlank(oldOtherBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
otherPaymentBase.put(String.valueOf(insuranceId), oldOtherBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
Map<String, Object> itemComMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位"));
|
||||
if (itemComMap != null) {
|
||||
String itemValue = (String) itemComMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0, "单位"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
otherPaymentComBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldOtherComBaseMap != null && StringUtils.isNotBlank(oldOtherComBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
otherPaymentComBase.put(String.valueOf(insuranceId), oldOtherComBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
insuranceArchivesOtherSchemePO.setOtherPaymentComBaseString(JSON.toJSONString(otherPaymentComBase));
|
||||
} else {
|
||||
Map<String, Object> itemMap = findElement(singleAccount, welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
if (itemMap != null) {
|
||||
String itemValue = (String) itemMap.get(welfareMap.get(insuranceId) + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
if (StringUtils.isNotBlank(itemValue)) {
|
||||
otherPaymentBase.put(String.valueOf(insuranceId), itemValue);
|
||||
} else if (oldOtherBaseMap != null && StringUtils.isNotBlank(oldOtherBaseMap.get(String.valueOf(insuranceId)))) {
|
||||
otherPaymentBase.put(String.valueOf(insuranceId), oldOtherBaseMap.get(String.valueOf(insuranceId)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(JSON.toJSONString(socialPaymentBase));
|
||||
insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(JSON.toJSONString(otherPaymentBase));
|
||||
}
|
||||
return insuranceArchivesOtherSchemePO;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,4 +105,9 @@ public class SalarySysConstant {
|
|||
* 核算固定列头数
|
||||
*/
|
||||
public static final String SALARY_ACCT_FIXED_COLUMNS = "salaryAcctFixedColumns";
|
||||
|
||||
/**
|
||||
* 应用设置是否福利档案基数区分个人和单位
|
||||
*/
|
||||
public static final String WEL_BASE_DIFF_BY_PER_AND_COM = "welBaseDiffByPerAndCom";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -755,8 +755,10 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
insuranceArchivesSocialSchemePos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setSocialPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentBaseString(), sysConfPo));
|
||||
po.setSocialPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentComBaseString(), sysConfPo));
|
||||
} else {
|
||||
po.setSocialPaymentBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentBaseString()));
|
||||
po.setSocialPaymentComBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentComBaseString()));
|
||||
}
|
||||
});
|
||||
List<List<InsuranceArchivesSocialSchemePO>> partition = Lists.partition(insuranceArchivesSocialSchemePos, 50);
|
||||
|
|
@ -782,8 +784,10 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
insuranceArchivesFundSchemePos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setFundPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentBaseString(), sysConfPo));
|
||||
po.setFundPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentComBaseString(), sysConfPo));
|
||||
} else {
|
||||
po.setFundPaymentBaseString(AESEncryptUtil.encrypt(po.getFundPaymentBaseString()));
|
||||
po.setFundPaymentComBaseString(AESEncryptUtil.encrypt(po.getFundPaymentComBaseString()));
|
||||
}
|
||||
});
|
||||
List<List<InsuranceArchivesFundSchemePO>> partition = Lists.partition(insuranceArchivesFundSchemePos, 50);
|
||||
|
|
@ -809,8 +813,10 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
insuranceArchivesOtherSchemePos.forEach(po -> {
|
||||
if (OpenEnum.OFF.getValue().equals(isOpenEncrypt)) {
|
||||
po.setOtherPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentBaseString(), sysConfPo));
|
||||
po.setOtherPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentComBaseString(), sysConfPo));
|
||||
} else {
|
||||
po.setOtherPaymentBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentBaseString()));
|
||||
po.setOtherPaymentComBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentComBaseString()));
|
||||
}
|
||||
});
|
||||
List<List<InsuranceArchivesOtherSchemePO>> partition = Lists.partition(insuranceArchivesOtherSchemePos, 50);
|
||||
|
|
@ -869,6 +875,9 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
po.setSocialPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentBaseString(), sysConfPo));
|
||||
po.setFundPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentBaseString(), sysConfPo));
|
||||
po.setOtherPaymentBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentBaseString(), sysConfPo));
|
||||
po.setSocialPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getSocialPaymentComBaseString(), sysConfPo));
|
||||
po.setFundPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getFundPaymentComBaseString(), sysConfPo));
|
||||
po.setOtherPaymentComBaseString(AESEncryptUtil.closeEncryptSetting(po.getOtherPaymentComBaseString(), sysConfPo));
|
||||
po.setSocialPerJson(AESEncryptUtil.closeEncryptSetting(po.getSocialPerJson(), sysConfPo));
|
||||
po.setSocialPerSum(AESEncryptUtil.closeEncryptSetting(po.getSocialPerSum(), sysConfPo));
|
||||
po.setFundPerJson(AESEncryptUtil.closeEncryptSetting(po.getFundPerJson(), sysConfPo));
|
||||
|
|
@ -887,6 +896,9 @@ public class SalarySysConfServiceImpl extends Service implements SalarySysConfSe
|
|||
po.setSocialPaymentBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentBaseString()));
|
||||
po.setFundPaymentBaseString(AESEncryptUtil.encrypt(po.getFundPaymentBaseString()));
|
||||
po.setOtherPaymentBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentBaseString()));
|
||||
po.setSocialPaymentComBaseString(AESEncryptUtil.encrypt(po.getSocialPaymentComBaseString()));
|
||||
po.setFundPaymentComBaseString(AESEncryptUtil.encrypt(po.getFundPaymentComBaseString()));
|
||||
po.setOtherPaymentComBaseString(AESEncryptUtil.encrypt(po.getOtherPaymentComBaseString()));
|
||||
po.setSocialPerJson(AESEncryptUtil.encrypt(po.getSocialPerJson()));
|
||||
po.setSocialPerSum(AESEncryptUtil.encrypt(po.getSocialPerSum()));
|
||||
po.setFundPerJson(AESEncryptUtil.encrypt(po.getFundPerJson()));
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.web;
|
|||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.common.SalaryContext;
|
||||
import com.engine.salary.entity.hrm.dto.HrmInfoDTO;
|
||||
import com.engine.salary.entity.hrm.param.HrmQueryParam;
|
||||
import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO;
|
||||
|
|
@ -37,11 +38,9 @@ import javax.ws.rs.core.StreamingOutput;
|
|||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 福利核算控制器
|
||||
|
|
@ -50,6 +49,7 @@ import java.util.stream.Collectors;
|
|||
public class SIAccountController {
|
||||
|
||||
public SIAccountService getService(User user) {
|
||||
SalaryContext.get().setValue("user",user);
|
||||
return ServiceUtil.getService(SIAccountServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.web;
|
|||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.common.SalaryContext;
|
||||
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseHistoryDTO;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
|
||||
import com.engine.salary.entity.siarchives.param.InsuranceArchivesSaveParam;
|
||||
|
|
@ -33,6 +34,7 @@ import java.util.Map;
|
|||
public class SIArchivesController {
|
||||
|
||||
private SIArchivesService getService(User user) {
|
||||
SalaryContext.get().setValue("user",user);
|
||||
return ServiceUtil.getService(SIArchivesServiceImpl.class,user);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue