feat(oa): 工资发放记录增加员工姓名字段并优化查询功能

- 在 GearSalaryRecordsVo 中添加 employeeName 字段,用于显示员工姓名
- 在 GearSalaryRecordsMapper 中新增 selectVoPagePlus 方法,用于分页查询
- 更新 GearSalaryRecordsMapper.xml,添加新的 SQL 查询语句
- 修改 GearSalaryRecordsServiceImpl 中的 queryPageList 方法,使用新的查询方法- 优化查询条件构建逻辑,使用表别名提高查询效率
This commit is contained in:
2025-08-09 13:31:44 +08:00
parent ebfa25bb16
commit e17b0f9d27
4 changed files with 61 additions and 2 deletions

View File

@@ -25,6 +25,34 @@
<result property="remark" column="remark"/>
<result property="payStatus" column="pay_status"/>
</resultMap>
<select id="selectVoPagePlus" resultType="com.gear.oa.domain.vo.GearSalaryRecordsVo">
SELECT
sr.salary_id,
sr.employee_id,
sr.pay_period,
sr.base_salary,
sr.performance_bonus,
sr.overtime_pay,
sr.allowance,
sr.social_security,
sr.housing_fund,
sr.income_tax,
sr.gross_salary,
sr.net_salary,
sr.create_by,
sr.create_time,
sr.update_by,
sr.update_time,
sr.del_flag,
sr.remark,
sr.pay_status,
su.nick_name as employeeName
FROM gear_salary_records sr
LEFT JOIN sys_user su ON sr.employee_id = su.user_id
${ew.customSqlSegment}
ORDER BY sr.create_time DESC
</select>
</mapper>