汇总,社保审批流程中增加人数、减少人数需求调整

This commit is contained in:
Harryxzy 2024-11-19 14:15:19 +08:00
parent 82eb197079
commit 6333891457
1 changed files with 8 additions and 2 deletions

View File

@ -1310,12 +1310,18 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
// 获取上期人数
List<Long> lastEmpList = lastEmpMap.getOrDefault(dto.getInsuranceId().toString(), Collections.emptyList());
lastEmpList = lastEmpList.stream().distinct().collect(Collectors.toList());
// 本月新增人数
List<Long> finalLastEmpList = lastEmpList;
Long increaseNum = empList.stream().filter(empId -> !finalLastEmpList.contains(empId)).count();
// 本月减少人员
List<Long> finalEmpList = empList;
Long decreaseNum = lastEmpList.stream().filter(empId -> !finalEmpList.contains(empId)).count();
HtSbqsListDTO build = HtSbqsListDTO.builder()
.insuranceId(dto.getInsuranceId())
.bxlx(dto.getInsuranceName())
.sqjnrs(lastEmpList.size())
.zjrs(lastEmpList.size() < empList.size() ? empList.size() - lastEmpList.size() : 0)
.jsrs(lastEmpList.size() > empList.size() ? lastEmpList.size() - empList.size() : 0)
.zjrs(increaseNum.intValue())
.jsrs(decreaseNum.intValue())
.bqrs(empList.size())
.grjnje(perPayment.doubleValue())
.dwjnje(comPayment.doubleValue())