修复业务线核算不了社保

This commit is contained in:
钱涛 2025-02-05 16:00:52 +08:00
parent f3994f852d
commit 74bb4beffc
2 changed files with 7 additions and 6 deletions

View File

@ -221,7 +221,7 @@ public class CalculateFormulaVarBO {
formulaVarValues.addAll(salaryAcctCalculateBO.getIssuedFieldIds().stream()
.map(fieldId -> {
String originResultValue = salaryAcctResultPOMap.getOrDefault(
salaryCodeItemMap.get(fieldId),SalaryAcctResultPO.builder().originResultValue("").build())
salaryCodeItemMap.get(fieldId), SalaryAcctResultPO.builder().originResultValue("").build())
.getOriginResultValue();
String fieldId2 = SalaryFormulaReferenceEnum.ISSUED.getValue()
+ SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR
@ -474,9 +474,9 @@ public class CalculateFormulaVarBO {
// 社保福利可选字段
List<String> fieldNames = Lists.newArrayList(salaryAcctCalculateBO.getWelfareColumns().values());
// 社保福利数据
Map<String, List<FormulaVarValue>> tempMap = Maps.newHashMapWithExpectedSize(welfareData.size());
Map<String, List<FormulaVarValue>> tempMap = new HashMap<>();
welfareData.forEach(map -> {
String key = String.valueOf(map.getOrDefault("employeeId", StringUtils.EMPTY));
String key = map.getOrDefault("employeeId", StringUtils.EMPTY) + "_" + map.getOrDefault("taxAgentId", StringUtils.EMPTY);
List<FormulaVarValue> formulaVarValues = tempMap.computeIfAbsent(key, k -> Lists.newArrayList());
formulaVarValues.addAll(fieldNames.stream().map(fieldName -> {
String fieldId = SalaryFormulaReferenceEnum.WELFARE.getValue()
@ -489,7 +489,7 @@ public class CalculateFormulaVarBO {
for (SalaryAcctEmployeePO salaryAcctEmployeePO : salaryAcctCalculateBO.getSalaryAcctEmployeePOS()) {
List<FormulaVarValue> formulaVarValues = resultMap.computeIfAbsent(salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId(),
k -> Lists.newArrayList());
formulaVarValues.addAll(tempMap.getOrDefault(String.valueOf(salaryAcctEmployeePO.getEmployeeId()), Collections.emptyList()));
formulaVarValues.addAll(tempMap.getOrDefault(salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId(), Collections.emptyList()));
}
}
@ -586,8 +586,8 @@ public class CalculateFormulaVarBO {
// 填充到返回结果集中
employeeMap.forEach((key, po) -> {
// 获取po的状态
if(po.getStatus() != null && NumberUtil.isNumber(po.getStatus())) {
po.setStatusName(UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(po.getStatus(),"1"))));
if (po.getStatus() != null && NumberUtil.isNumber(po.getStatus())) {
po.setStatusName(UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(po.getStatus(), "1"))));
}
List<FormulaVarValue> formulaVarValues = resultMap.computeIfAbsent(key, k -> Lists.newArrayList());
Map<String, String> map = JsonUtil.parseMap(po, String.class);

View File

@ -961,6 +961,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
list.stream().forEach(item -> {
Map<String, Object> record = new HashMap<>();
record.put("employeeId", item.getEmployeeId());
record.put("taxAgentId", taxAgentId);
if (StringUtils.isNotEmpty(item.getSocialPerJson())) {
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, Object>().getClass());
socialJson.forEach((k, v) -> {