refactor(oa): 重构薪资计算逻辑并添加项目签约公司字段

- 将 SalaryCalculationResult 类从 OaEmployeeTemplateBindingServiceImpl 中提取到域模型包下- 在 SysOaProject 模型中添加 signingCompany 字段用于记录签约公司
- 更新相关 BO、VO 和 Mapper 文件以支持新增的签约公司字段
- 优化 SysOaProjectServiceImpl 中的查询条件,支持按签约公司筛选- 修复 SysOssServiceImpl 中的文件下载逻辑,使用 baseMapper 替代 AOP 代理
This commit is contained in:
2025-09-06 15:40:10 +08:00
parent 6fe5e8017e
commit f5ee618454
8 changed files with 42 additions and 27 deletions

View File

@@ -122,32 +122,7 @@ public class OaEmployeeTemplateBindingServiceImpl implements IOaEmployeeTemplate
return TableDataInfo.build(result);
}
/**
* 薪资计算结果内部类
*/
private static class SalaryCalculationResult {
private BigDecimal totalSalary = BigDecimal.ZERO; // 薪资总额
private BigDecimal totalPersonalInsurance = BigDecimal.ZERO; // 个人社保总额
private BigDecimal totalCompanyInsurance = BigDecimal.ZERO; // 企业社保总额
private BigDecimal netSalary = BigDecimal.ZERO; // 实发工资
private BigDecimal totalCompanyCost = BigDecimal.ZERO; // 公司总成本
// getters and setters
public BigDecimal getTotalSalary() { return totalSalary; }
public void setTotalSalary(BigDecimal totalSalary) { this.totalSalary = totalSalary; }
public BigDecimal getTotalPersonalInsurance() { return totalPersonalInsurance; }
public void setTotalPersonalInsurance(BigDecimal totalPersonalInsurance) { this.totalPersonalInsurance = totalPersonalInsurance; }
public BigDecimal getTotalCompanyInsurance() { return totalCompanyInsurance; }
public void setTotalCompanyInsurance(BigDecimal totalCompanyInsurance) { this.totalCompanyInsurance = totalCompanyInsurance; }
public BigDecimal getNetSalary() { return netSalary; }
public void setNetSalary(BigDecimal netSalary) { this.netSalary = netSalary; }
public BigDecimal getTotalCompanyCost() { return totalCompanyCost; }
public void setTotalCompanyCost(BigDecimal totalCompanyCost) { this.totalCompanyCost = totalCompanyCost; }
}
/**
* 根据绑定记录ID集合批量计算薪资明细

View File

@@ -180,6 +180,8 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), SysOaProject::getProjectType, bo.getProjectType());
lqw.eq(StringUtils.isNotBlank(bo.getProjectStatus()), SysOaProject::getProjectStatus, bo.getProjectStatus());
lqw.eq(StringUtils.isNotBlank(bo.getCreateBy()), SysOaProject::getCreateBy, bo.getCreateBy());
//新增签约公司作为筛选条件
lqw.eq(StringUtils.isNotBlank(bo.getSigningCompany()), SysOaProject::getSigningCompany, bo.getSigningCompany());
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
SysOaProject::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
lqw.orderByDesc(SysOaProject::getCreateTime);