社保线下对比、调差bug修复
This commit is contained in:
parent
454a414666
commit
e5a3351568
|
|
@ -1,9 +1,6 @@
|
|||
package com.engine.salary.entity.siaccount.bo;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.salary.entity.salaryacct.po.ExcelAcctResultPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobEmpFieldDTO;
|
||||
import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
||||
import com.engine.salary.entity.siexport.po.AccountExportPO;
|
||||
import com.engine.salary.entity.siexport.po.ExcelAccountExportPO;
|
||||
|
|
@ -18,7 +15,10 @@ import com.engine.salary.util.page.Column;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ public class InsuranceComparisonResultBO {
|
|||
*
|
||||
*/
|
||||
public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS
|
||||
, Map<Long, String> schemeIdNameMap, boolean welBaseDiffSign) {
|
||||
, Map<Long, String> schemeIdNameMap, boolean welBaseDiffSign, Set<Long> insuranceBaseSet) {
|
||||
|
||||
Map<Long, List<ExcelAccountExportPO>> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getEmployeeId);
|
||||
// Map<String, List<AccountExportPO>> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode);
|
||||
|
|
@ -222,38 +222,38 @@ public class InsuranceComparisonResultBO {
|
|||
}
|
||||
if (welBaseDiffSign) {
|
||||
//社保基数-个人,socialPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "PerBase", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "PerBase", 1, insuranceBaseSet);
|
||||
//公积金基数-个人,fundPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "PerBase", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "PerBase", 2, insuranceBaseSet);
|
||||
//其他福利基数-个人,otherPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "PerBase", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "PerBase", 3, insuranceBaseSet);
|
||||
|
||||
//社保基数-公司,socialPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentComBaseString(), excelAccountExportPO.getSocialPaymentComBaseString(), "ComBase", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentComBaseString(), excelAccountExportPO.getSocialPaymentComBaseString(), "ComBase", 1, insuranceBaseSet);
|
||||
//公积金基数-公司,fundPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentComBaseString(), excelAccountExportPO.getFundPaymentComBaseString(), "ComBase", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentComBaseString(), excelAccountExportPO.getFundPaymentComBaseString(), "ComBase", 2, insuranceBaseSet);
|
||||
//其他福利基数-公司,otherPaymentComBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentComBaseString(), excelAccountExportPO.getOtherPaymentComBaseString(), "ComBase", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentComBaseString(), excelAccountExportPO.getOtherPaymentComBaseString(), "ComBase", 3, insuranceBaseSet);
|
||||
} else {
|
||||
//社保基数,socialPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1, insuranceBaseSet);
|
||||
//公积金基数,fundPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2, insuranceBaseSet);
|
||||
//其他福利基数,otherPaymentBaseString
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3, insuranceBaseSet);
|
||||
}
|
||||
//社保个人socialPerJson
|
||||
welfareElementCompare(map, accountExportPO.getSocialPerJson(), excelAccountExportPO.getSocialPerJson(), "Per", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialPerJson(), excelAccountExportPO.getSocialPerJson(), "Per", 1, null);
|
||||
//公积金个人fundPerJson
|
||||
welfareElementCompare(map, accountExportPO.getFundPerJson(), excelAccountExportPO.getFundPerJson(), "Per", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundPerJson(), excelAccountExportPO.getFundPerJson(), "Per", 2, null);
|
||||
//其他个人otherPerJson
|
||||
welfareElementCompare(map, accountExportPO.getOtherPerJson(), excelAccountExportPO.getOtherPerJson(), "Per", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherPerJson(), excelAccountExportPO.getOtherPerJson(), "Per", 3, null);
|
||||
//社保单位socialComJson
|
||||
welfareElementCompare(map, accountExportPO.getSocialComJson(), excelAccountExportPO.getSocialComJson(), "Com", 1);
|
||||
welfareElementCompare(map, accountExportPO.getSocialComJson(), excelAccountExportPO.getSocialComJson(), "Com", 1, null);
|
||||
//公积金单位fundComJson
|
||||
welfareElementCompare(map, accountExportPO.getFundComJson(), excelAccountExportPO.getFundComJson(), "Com", 2);
|
||||
welfareElementCompare(map, accountExportPO.getFundComJson(), excelAccountExportPO.getFundComJson(), "Com", 2, null);
|
||||
//其他单位otherComJson
|
||||
welfareElementCompare(map, accountExportPO.getOtherComJson(), excelAccountExportPO.getOtherComJson(), "Com", 3);
|
||||
welfareElementCompare(map, accountExportPO.getOtherComJson(), excelAccountExportPO.getOtherComJson(), "Com", 3, null);
|
||||
|
||||
//各种合计
|
||||
welfareSumCompare(map, accountExportPO, excelAccountExportPO);
|
||||
|
|
@ -263,9 +263,12 @@ public class InsuranceComparisonResultBO {
|
|||
return resultList;
|
||||
}
|
||||
|
||||
private static Map<String, Object> welfareElementCompare(Map<String, Object> map, String accountJson, String excelAccountJson, String welfareStand, Integer welfareType) {
|
||||
private static Map<String, Object> welfareElementCompare(Map<String, Object> map, String accountJson, String excelAccountJson, String welfareStand, Integer welfareType, Set<Long> insuranceBaseSet) {
|
||||
List<ICategoryPO> listAll = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll();
|
||||
List<ICategoryPO> accountWelfareList = listAll.stream().filter(e -> e.getWelfareType().equals(welfareType)).collect(Collectors.toList());
|
||||
if (insuranceBaseSet != null) {
|
||||
accountWelfareList = accountWelfareList.stream().filter(e -> insuranceBaseSet.contains(e.getId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
String baseTypeInfo = welfareType.equals(1) ? "social" : (welfareType.equals(2) ? "fund" : "other");
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
|||
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, welBaseDiffSign);
|
||||
List<Map<String, Object>> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap, welBaseDiffSign, insuranceBaseSet);
|
||||
|
||||
// 系统值和线下值一致的人员
|
||||
if (queryParam.isOnlyDiffEmployee()) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alipay.oceanbase.jdbc.StringUtils;
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
|
|
@ -41,6 +40,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.engine.salary.util.page.Column;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue