下载附表明细数据
This commit is contained in:
parent
7a58e92fc7
commit
f2cbbbe18a
|
|
@ -54,6 +54,7 @@ import org.apache.commons.lang3.Validate;
|
|||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.general.Util;
|
||||
|
|
@ -2232,15 +2233,15 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
public XSSFWorkbook downloadDetailTemplate(OtherDeductionQueryParam param) {
|
||||
|
||||
|
||||
List<FreeIncomePO> freeIncomeList= new ArrayList<>();
|
||||
List<EndowmentInsurancePO> endowmentInsurancePOS =new ArrayList<>();
|
||||
List<GrantDonationPO> grantDonationPOS =new ArrayList<>();
|
||||
List<HealthInsurancePO> healthInsurancePOS =new ArrayList<>();
|
||||
List<OtherDerateDeductionPO> otherDerateDeductionPOS =new ArrayList<>();
|
||||
List<DerateDeductionPO> derateDeductionPOS =new ArrayList<>();
|
||||
List<PersonalPensionPO> personalPensionPOS =new ArrayList<>();
|
||||
List<FreeIncomeListDTO> freeIncomeList = new ArrayList<>();
|
||||
List<HealthInsuranceListDTO> healthInsuranceList = new ArrayList<>();
|
||||
List<EndowmentInsuranceListDTO> endowmentInsuranceList = new ArrayList<>();
|
||||
List<GrantDonationListDTO> grantDonationList = new ArrayList<>();
|
||||
List<DerateDeductionListDTO> derateDeductionList = new ArrayList<>();
|
||||
List<OtherDerateDeductionListDTO> otherDerateDeductionList = new ArrayList<>();
|
||||
List<PersonalPensionListDTO> personalPensionList = new ArrayList<>();
|
||||
if (param.isHasData()) {
|
||||
long employeeId = user.getUID();
|
||||
long employeeId = user.getUID();
|
||||
//排序配置
|
||||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
param.setOrderRule(orderRule);
|
||||
|
|
@ -2257,39 +2258,158 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
).collect(Collectors.toList());
|
||||
}
|
||||
list.forEach(dto -> {
|
||||
freeIncomeList.addAll(getFreeIncomeMapper().listSome(FreeIncomePO.builder().mainId(dto.getId()).build()));
|
||||
endowmentInsurancePOS.addAll(getEndowmentInsuranceMapper().listSome(EndowmentInsurancePO.builder().mainId(dto.getId()).build()));
|
||||
grantDonationPOS.addAll( getGrantDonationMapper().listSome(GrantDonationPO.builder().mainId(dto.getId()).build()));
|
||||
healthInsurancePOS.addAll( getHealthInsuranceMapper().listSome(HealthInsurancePO.builder().mainId(dto.getId()).build()));
|
||||
otherDerateDeductionPOS.addAll(getOtherDerateDeductionMapper().listSome(OtherDerateDeductionPO.builder().mainId(dto.getId()).build()));
|
||||
derateDeductionPOS.addAll(getDerateDeductionMapper().listSome(DerateDeductionPO.builder().mainId(dto.getId()).build()));
|
||||
personalPensionPOS.addAll(getPersonalPensionMapper().listSome(PersonalPensionPO.builder().mainId(dto.getId()).build()));
|
||||
List<FreeIncomeListDTO> freeIncomeListDTOS = freeIncomePO2DTO(getFreeIncomeMapper().listSome(FreeIncomePO.builder().mainId(dto.getId()).build()));
|
||||
freeIncomeList.addAll(freeIncomeListDTOS);
|
||||
List<EndowmentInsuranceListDTO> endowmentInsuranceListDTOS = endowmentInsurancePO2DTO(getEndowmentInsuranceMapper().listSome(EndowmentInsurancePO.builder().mainId(dto.getId()).build()));
|
||||
endowmentInsuranceList.addAll(endowmentInsuranceListDTOS);
|
||||
List<GrantDonationListDTO> grantDonationListDTOS = grantDonationPO2DTO(getGrantDonationMapper().listSome(GrantDonationPO.builder().mainId(dto.getId()).build()));
|
||||
grantDonationList.addAll(grantDonationListDTOS);
|
||||
List<HealthInsuranceListDTO> healthInsuranceListDTOS = healthInsurancePO2DTO(getHealthInsuranceMapper().listSome(HealthInsurancePO.builder().mainId(dto.getId()).build()));
|
||||
healthInsuranceList.addAll(healthInsuranceListDTOS);
|
||||
List<OtherDerateDeductionListDTO> otherDerateDeductionListDTOS = otherDerateDeductionPO2DTO(getOtherDerateDeductionMapper().listSome(OtherDerateDeductionPO.builder().mainId(dto.getId()).build()));
|
||||
otherDerateDeductionList.addAll(otherDerateDeductionListDTOS);
|
||||
List<DerateDeductionListDTO> derateDeductionListDTOS = derateDeductionPO2DTO(getDerateDeductionMapper().listSome(DerateDeductionPO.builder().mainId(dto.getId()).build()));
|
||||
derateDeductionList.addAll(derateDeductionListDTOS);
|
||||
List<PersonalPensionListDTO> personalPensionListDTOS = personalPensionPO2DTO(getPersonalPensionMapper().listSome(PersonalPensionPO.builder().mainId(dto.getId()).build()));
|
||||
personalPensionList.addAll(personalPensionListDTOS);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Map<String, List<List<Object>>> map = new LinkedHashMap<>();
|
||||
|
||||
List<Object> freeIncomeTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "免税事项", "免税性质", "免税金额");
|
||||
List<List<Object>> freeIncomeRowList = new ArrayList<>();
|
||||
freeIncomeList.forEach(po->{
|
||||
List<Object> freeIncomeTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "免税事项", "免税性质", "免税金额");
|
||||
freeIncomeRowList.add(freeIncomeTitle);
|
||||
freeIncomeList.forEach(dto -> {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(Util.null2String(po.get()));
|
||||
row.add(dto.getUsername());
|
||||
row.add(dto.getTaxAgentName());
|
||||
row.add(dto.getDepartmentName());
|
||||
row.add(dto.getMobile());
|
||||
row.add(dto.getJobNum());
|
||||
row.add(dto.getIdNo());
|
||||
row.add(dto.getFreeItem());
|
||||
row.add(dto.getFreeProperty());
|
||||
row.add(dto.getFreeAmount());
|
||||
freeIncomeRowList.add(row);
|
||||
});
|
||||
map.put("免税收入", Arrays.asList(freeIncomeTitle));
|
||||
map.put("免税收入", freeIncomeRowList);
|
||||
|
||||
List<List<Object>> healthInsuranceRowList = new ArrayList<>();
|
||||
List<Object> healthInsuranceTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "税优识别码", "保单生效日期", "年度保费", "月度保费", "本期扣除金额");
|
||||
map.put("商业健康保险", Arrays.asList(healthInsuranceTitle));
|
||||
healthInsuranceRowList.add(healthInsuranceTitle);
|
||||
healthInsuranceList.forEach(dto -> {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(dto.getUsername());
|
||||
row.add(dto.getTaxAgentName());
|
||||
row.add(dto.getDepartmentName());
|
||||
row.add(dto.getMobile());
|
||||
row.add(dto.getJobNum());
|
||||
row.add(dto.getIdNo());
|
||||
row.add(dto.getIdentificationNumber());
|
||||
row.add(dto.getEffectiveDate());
|
||||
row.add(dto.getYearPremium());
|
||||
row.add(dto.getMonthPremium());
|
||||
row.add(dto.getCurrentDeduction());
|
||||
healthInsuranceRowList.add(row);
|
||||
});
|
||||
map.put("商业健康保险", healthInsuranceRowList);
|
||||
|
||||
|
||||
List<List<Object>> endowmentInsuranceRowList = new ArrayList<>();
|
||||
List<Object> endowmentInsuranceTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "税延养老账户编号", "报税校验码", "年度保费", "月度保费", "本期扣除金额");
|
||||
map.put("税延养老保险", Arrays.asList(endowmentInsuranceTitle));
|
||||
endowmentInsuranceRowList.add(endowmentInsuranceTitle);
|
||||
endowmentInsuranceList.forEach(dto -> {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(dto.getUsername());
|
||||
row.add(dto.getTaxAgentName());
|
||||
row.add(dto.getDepartmentName());
|
||||
row.add(dto.getMobile());
|
||||
row.add(dto.getJobNum());
|
||||
row.add(dto.getIdNo());
|
||||
row.add(dto.getAccountNumber());
|
||||
row.add(dto.getCheckCode());
|
||||
row.add(dto.getYearPremium());
|
||||
row.add(dto.getMonthPremium());
|
||||
row.add(dto.getCurrentDeduction());
|
||||
endowmentInsuranceRowList.add(row);
|
||||
});
|
||||
map.put("税延养老保险", endowmentInsuranceRowList);
|
||||
|
||||
List<List<Object>> grantDonationRowList = new ArrayList<>();
|
||||
List<Object> grantDonationTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "受赠单位名称", "受赠单位纳税人识别号", "凭证号", "捐赠日期", "捐赠金额", "扣除比例", "实际扣除金额");
|
||||
map.put("准予扣除的捐赠额", Arrays.asList(grantDonationTitle));
|
||||
grantDonationRowList.add(grantDonationTitle);
|
||||
grantDonationList.forEach(dto -> {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(dto.getUsername());
|
||||
row.add(dto.getTaxAgentName());
|
||||
row.add(dto.getDepartmentName());
|
||||
row.add(dto.getMobile());
|
||||
row.add(dto.getJobNum());
|
||||
row.add(dto.getIdNo());
|
||||
row.add(dto.getRecipientName());
|
||||
row.add(dto.getTaxCode());
|
||||
row.add(dto.getDonationNumber());
|
||||
row.add(dto.getDonateDate());
|
||||
row.add(dto.getDonateAmount());
|
||||
row.add(dto.getDeductionProportion());
|
||||
row.add(dto.getActualDeduction());
|
||||
grantDonationRowList.add(row);
|
||||
});
|
||||
map.put("准予扣除的捐赠额", grantDonationRowList);
|
||||
|
||||
List<List<Object>> derateDeductionRowList = new ArrayList<>();
|
||||
List<Object> derateDeductionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "减免事项", "减免性质", "减免金额");
|
||||
map.put("减免税额", Arrays.asList(derateDeductionTitle));
|
||||
derateDeductionRowList.add(derateDeductionTitle);
|
||||
derateDeductionList.forEach(dto -> {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(dto.getUsername());
|
||||
row.add(dto.getTaxAgentName());
|
||||
row.add(dto.getDepartmentName());
|
||||
row.add(dto.getMobile());
|
||||
row.add(dto.getJobNum());
|
||||
row.add(dto.getIdNo());
|
||||
row.add(dto.getDerateItem());
|
||||
row.add(dto.getDerateProperty());
|
||||
row.add(dto.getDerateAmount());
|
||||
derateDeductionRowList.add(row);
|
||||
});
|
||||
map.put("减免税额", derateDeductionRowList);
|
||||
|
||||
List<List<Object>> otherDerateDeductionRowList = new ArrayList<>();
|
||||
List<Object> otherDerateDeductionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "其他免税扣除金额", "备注");
|
||||
map.put("其他", Arrays.asList(otherDerateDeductionTitle));
|
||||
otherDerateDeductionRowList.add(otherDerateDeductionTitle);
|
||||
otherDerateDeductionList.forEach(dto -> {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(dto.getUsername());
|
||||
row.add(dto.getTaxAgentName());
|
||||
row.add(dto.getDepartmentName());
|
||||
row.add(dto.getMobile());
|
||||
row.add(dto.getJobNum());
|
||||
row.add(dto.getIdNo());
|
||||
row.add(dto.getOtherDeduction());
|
||||
row.add(dto.getRemark());
|
||||
otherDerateDeductionRowList.add(row);
|
||||
});
|
||||
map.put("其他", otherDerateDeductionRowList);
|
||||
|
||||
List<List<Object>> personalPensionRowList = new ArrayList<>();
|
||||
List<Object> personalPensionTitle = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "凭证类型", "凭证编码", "缴费金额");
|
||||
map.put("个人养老金", Arrays.asList(personalPensionTitle));
|
||||
personalPensionRowList.add(personalPensionTitle);
|
||||
personalPensionList.forEach(dto -> {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(dto.getUsername());
|
||||
row.add(dto.getTaxAgentName());
|
||||
row.add(dto.getDepartmentName());
|
||||
row.add(dto.getMobile());
|
||||
row.add(dto.getJobNum());
|
||||
row.add(dto.getIdNo());
|
||||
row.add(dto.getVoucherTypeName());
|
||||
row.add(dto.getVoucherNo());
|
||||
row.add(dto.getPayAmount());
|
||||
personalPensionRowList.add(row);
|
||||
});
|
||||
map.put("个人养老金", personalPensionRowList);
|
||||
|
||||
XSSFWorkbook book = ExcelUtil.genWorkbookV2(map);
|
||||
return book;
|
||||
|
|
@ -2306,6 +2426,12 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
List<FreeIncomePO> pos = getFreeIncomeMapper().listSome(build);
|
||||
|
||||
List<FreeIncomeListDTO> listDTOS = freeIncomePO2DTO(pos);
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, FreeIncomeListDTO.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<FreeIncomeListDTO> freeIncomePO2DTO(List<FreeIncomePO> pos) {
|
||||
List<Long> empIds = SalaryEntityUtil.properties(pos, FreeIncomePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(empIds);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
|
|
@ -2324,7 +2450,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
dto.setIdNo(employee.getIdNo());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, FreeIncomeListDTO.class);
|
||||
return listDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -2337,6 +2463,11 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
|
||||
List<DerateDeductionPO> pos = getDerateDeductionMapper().listSome(build);
|
||||
List<DerateDeductionListDTO> listDTOS = derateDeductionPO2DTO(pos);
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, DerateDeductionListDTO.class);
|
||||
}
|
||||
|
||||
private List<DerateDeductionListDTO> derateDeductionPO2DTO(List<DerateDeductionPO> pos) {
|
||||
List<Long> empIds = SalaryEntityUtil.properties(pos, DerateDeductionPO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(empIds);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
|
|
@ -2355,7 +2486,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
dto.setIdNo(employee.getIdNo());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, DerateDeductionListDTO.class);
|
||||
return listDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -2368,6 +2499,13 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
|
||||
List<EndowmentInsurancePO> pos = getEndowmentInsuranceMapper().listSome(build);
|
||||
|
||||
List<EndowmentInsuranceListDTO> listDTOS = endowmentInsurancePO2DTO(pos);
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, EndowmentInsuranceListDTO.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<EndowmentInsuranceListDTO> endowmentInsurancePO2DTO(List<EndowmentInsurancePO> pos) {
|
||||
List<Long> empIds = SalaryEntityUtil.properties(pos, EndowmentInsurancePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(empIds);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
|
|
@ -2386,7 +2524,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
dto.setIdNo(employee.getIdNo());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, EndowmentInsuranceListDTO.class);
|
||||
return listDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -2399,6 +2537,12 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
|
||||
List<GrantDonationPO> pos = getGrantDonationMapper().listSome(build);
|
||||
List<GrantDonationListDTO> listDTOS = grantDonationPO2DTO(pos);
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, GrantDonationListDTO.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<GrantDonationListDTO> grantDonationPO2DTO(List<GrantDonationPO> pos) {
|
||||
List<Long> empIds = SalaryEntityUtil.properties(pos, GrantDonationPO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(empIds);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
|
|
@ -2417,7 +2561,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
dto.setIdNo(employee.getIdNo());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, GrantDonationListDTO.class);
|
||||
return listDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -2430,6 +2574,12 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
|
||||
List<HealthInsurancePO> pos = getHealthInsuranceMapper().listSome(build);
|
||||
List<HealthInsuranceListDTO> listDTOS = healthInsurancePO2DTO(pos);
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, HealthInsuranceListDTO.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<HealthInsuranceListDTO> healthInsurancePO2DTO(List<HealthInsurancePO> pos) {
|
||||
List<Long> empIds = SalaryEntityUtil.properties(pos, HealthInsurancePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(empIds);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
|
|
@ -2448,7 +2598,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
dto.setIdNo(employee.getIdNo());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, HealthInsuranceListDTO.class);
|
||||
return listDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -2461,6 +2611,12 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
|
||||
List<OtherDerateDeductionPO> pos = getOtherDerateDeductionMapper().listSome(build);
|
||||
List<OtherDerateDeductionListDTO> listDTOS = otherDerateDeductionPO2DTO(pos);
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, OtherDerateDeductionListDTO.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<OtherDerateDeductionListDTO> otherDerateDeductionPO2DTO(List<OtherDerateDeductionPO> pos) {
|
||||
List<Long> empIds = SalaryEntityUtil.properties(pos, OtherDerateDeductionPO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(empIds);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
|
|
@ -2479,7 +2635,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
dto.setIdNo(employee.getIdNo());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, OtherDerateDeductionListDTO.class);
|
||||
return listDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -2492,6 +2648,12 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
|
||||
List<PersonalPensionPO> pos = getPersonalPensionMapper().listSome(build);
|
||||
List<PersonalPensionListDTO> listDTOS = personalPensionPO2DTO(pos);
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, PersonalPensionListDTO.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<PersonalPensionListDTO> personalPensionPO2DTO(List<PersonalPensionPO> pos) {
|
||||
List<Long> empIds = SalaryEntityUtil.properties(pos, PersonalPensionPO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(empIds);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
|
|
@ -2510,7 +2672,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
dto.setIdNo(employee.getIdNo());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, PersonalPensionListDTO.class);
|
||||
return listDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -2954,13 +3116,13 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
syncFreeIncome(deductionPO);
|
||||
}
|
||||
if (taxFreeTypes.contains(TaxFreeTypeEnum.HEALTH_INSURANCE)) {
|
||||
syncEndowmentInsurance(deductionPO);
|
||||
syncHealthInsurance(deductionPO);
|
||||
}
|
||||
if (taxFreeTypes.contains(TaxFreeTypeEnum.ENDOWMENT_INSURANCE)) {
|
||||
syncGrantDonation(deductionPO);
|
||||
syncEndowmentInsurance(deductionPO);
|
||||
}
|
||||
if (taxFreeTypes.contains(TaxFreeTypeEnum.GRANT_DONATION)) {
|
||||
syncHealthInsurance(deductionPO);
|
||||
syncGrantDonation(deductionPO);
|
||||
}
|
||||
if (taxFreeTypes.contains(TaxFreeTypeEnum.DERATE_DEDUCTION)) {
|
||||
syncDerateDeduction(deductionPO);
|
||||
|
|
|
|||
Loading…
Reference in New Issue