汇通修复
This commit is contained in:
parent
cf03a36835
commit
e199408ec8
|
|
@ -2118,6 +2118,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
// 获取是社保还是公积金还是其他
|
||||
ICategoryPO category = getICategoryMapper().getById(singleInsuranceId);
|
||||
String singleInsuranceIdStr = singleInsuranceId.toString();
|
||||
Map<Long, List<InsuranceAccountDetailPO>> employeeMap = list.stream().filter(item -> item.getEmployeeId() != null)
|
||||
.collect(Collectors.groupingBy(InsuranceAccountDetailPO::getEmployeeId));
|
||||
|
|
@ -2130,50 +2132,156 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
List<InsuranceAccountDetailPO> v = entry.getValue();
|
||||
for (InsuranceAccountDetailPO item : v) {
|
||||
encryptUtil.decrypt(item, InsuranceAccountDetailPO.class);
|
||||
if (StringUtils.isNotBlank(item.getSocialPerJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, String>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (singleInsuranceIdStr.equals(insuranceId)) {
|
||||
if (socialPerMap.get(k) == null) {
|
||||
socialPerMap.put(k, num);
|
||||
} else {
|
||||
String oldNum = socialPerMap.get(k);
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
BigDecimal insuanceNum = numDecimal.add(oldDecimal);
|
||||
socialPerMap.put(k, insuanceNum.toPlainString());
|
||||
if (category == null || category.getWelfareType().equals(WelfareTypeEnum.SOCIAL_SECURITY.getValue())) {
|
||||
if (StringUtils.isNotBlank(item.getSocialPerJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, String>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (singleInsuranceIdStr.equals(insuranceId)) {
|
||||
if (socialPerMap.get(k) == null) {
|
||||
socialPerMap.put(k, num);
|
||||
} else {
|
||||
String oldNum = socialPerMap.get(k);
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
BigDecimal insuanceNum = numDecimal.add(oldDecimal);
|
||||
socialPerMap.put(k, insuanceNum.toPlainString());
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(num) && NumberUtils.isNumber(num) && new BigDecimal(num).compareTo(BigDecimal.ZERO) != 0) {
|
||||
payedEmpList.add(item.getEmployeeId());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getSocialComJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, String>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (singleInsuranceIdStr.equals(insuranceId)) {
|
||||
if (socialComMap.get(k) == null) {
|
||||
socialComMap.put(k, num);
|
||||
} else {
|
||||
String oldNum = socialComMap.get(k);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
socialComMap.put(k, insuanceNum.toPlainString());
|
||||
}
|
||||
if (StringUtils.isNotBlank(num) && NumberUtils.isNumber(num) && new BigDecimal(num).compareTo(BigDecimal.ZERO) != 0) {
|
||||
payedEmpList.add(item.getEmployeeId());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (category.getWelfareType().equals(WelfareTypeEnum.ACCUMULATION_FUND.getValue())) {
|
||||
if (StringUtils.isNotBlank(item.getFundPerJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, String>().getClass());
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
if (singleInsuranceIdStr.equals(insuranceId)) {
|
||||
if (socialPerMap.get(k) == null) {
|
||||
socialPerMap.put(k, num);
|
||||
} else {
|
||||
String oldNum = socialPerMap.get(k);
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
BigDecimal insuranceNum= numDecimal.add(oldDecimal);
|
||||
socialPerMap.put(k, insuranceNum.toPlainString());
|
||||
}
|
||||
if (StringUtils.isNotBlank(num) && NumberUtils.isNumber(num) && new BigDecimal(num).compareTo(BigDecimal.ZERO) != 0) {
|
||||
payedEmpList.add(item.getEmployeeId());
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(num) && NumberUtils.isNumber(num) && new BigDecimal(num).compareTo(BigDecimal.ZERO) != 0) {
|
||||
payedEmpList.add(item.getEmployeeId());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getFundComJson())) {
|
||||
Map<String, String> fundJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, String>().getClass());
|
||||
if (fundJson != null) {
|
||||
fundJson.forEach((insuranceId, num) -> {
|
||||
if (singleInsuranceIdStr.equals(insuranceId)) {
|
||||
if (socialComMap.get(k) == null) {
|
||||
socialComMap.put(k, num);
|
||||
} else {
|
||||
String oldNum = socialComMap.get(k);
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
BigDecimal insuanceNum = numDecimal.add(oldDecimal);
|
||||
socialComMap.put(k, insuanceNum.toPlainString());
|
||||
}
|
||||
if (StringUtils.isNotBlank(num) && NumberUtils.isNumber(num) && new BigDecimal(num).compareTo(BigDecimal.ZERO) != 0) {
|
||||
payedEmpList.add(item.getEmployeeId());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getSocialComJson())) {
|
||||
Map<String, String> socialJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, String>().getClass());
|
||||
if (socialJson != null) {
|
||||
socialJson.forEach((insuranceId, num) -> {
|
||||
if (singleInsuranceIdStr.equals(insuranceId)) {
|
||||
if (socialComMap.get(k) == null) {
|
||||
socialComMap.put(k, num);
|
||||
} else {
|
||||
String oldNum = socialComMap.get(k);
|
||||
BigDecimal insuanceNum = new BigDecimal("0");
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
insuanceNum = insuanceNum.add(numDecimal).add(oldDecimal);
|
||||
socialComMap.put(k, insuanceNum.toPlainString());
|
||||
}
|
||||
if (StringUtils.isNotBlank(num) && NumberUtils.isNumber(num) && new BigDecimal(num).compareTo(BigDecimal.ZERO) != 0) {
|
||||
payedEmpList.add(item.getEmployeeId());
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (category.getWelfareType().equals(WelfareTypeEnum.OTHER.getValue())) {
|
||||
if (StringUtils.isNotBlank(item.getOtherPerJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, String>().getClass());
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
if (singleInsuranceIdStr.equals(insuranceId)) {
|
||||
if (socialPerMap.get(k) == null) {
|
||||
socialPerMap.put(k, num);
|
||||
} else {
|
||||
String oldNum = socialPerMap.get(k);
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
BigDecimal insuanceNum = numDecimal.add(oldDecimal);
|
||||
socialPerMap.put(k, insuanceNum.toPlainString());
|
||||
}
|
||||
if (StringUtils.isNotBlank(num) && NumberUtils.isNumber(num) && new BigDecimal(num).compareTo(BigDecimal.ZERO) != 0) {
|
||||
payedEmpList.add(item.getEmployeeId());
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOtherComJson())) {
|
||||
Map<String, String> otherJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, String>().getClass());
|
||||
if (otherJson != null) {
|
||||
otherJson.forEach((insuranceId, num) -> {
|
||||
if (singleInsuranceIdStr.equals(insuranceId)) {
|
||||
if (socialComMap.get(k) == null) {
|
||||
socialComMap.put(k, num);
|
||||
} else {
|
||||
String oldNum = socialComMap.get(insuranceId);
|
||||
BigDecimal oldDecimal = new BigDecimal(oldNum);
|
||||
BigDecimal numDecimal = num == null ? new BigDecimal("0") : new BigDecimal(num);
|
||||
BigDecimal insuanceNum = numDecimal.add(oldDecimal);
|
||||
socialComMap.put(k, insuanceNum.toPlainString());
|
||||
}
|
||||
if (StringUtils.isNotBlank(num) && NumberUtils.isNumber(num) && new BigDecimal(num).compareTo(BigDecimal.ZERO) != 0) {
|
||||
payedEmpList.add(item.getEmployeeId());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
resultMap.put("payedEmpList", payedEmpList);
|
||||
|
|
|
|||
Loading…
Reference in New Issue