Commit 5fe26b24 by 叶立庆

feat(staff): 添加员工姓名模糊查询功能

- 在薪资员工列表查询中增加员工姓名模糊匹配条件
- 修改测试用例使用员工姓名查询替代手机号查询
- 更新SQL映射文件添加staff_name LIKE查询逻辑
- 调整测试数据从2026年3月改为2025年12月
- 注释掉原有的手机号查询测试条件
1 parent d4fafd2f
...@@ -129,6 +129,9 @@ ...@@ -129,6 +129,9 @@
<if test="salaryMonth != null and salaryMonth != ''"> <if test="salaryMonth != null and salaryMonth != ''">
AND dss.salary_month=#{salaryMonth} AND dss.salary_month=#{salaryMonth}
</if> </if>
<if test="staffName != null and staffName.length()>0">
AND dss.staff_name LIKE CONCAT('%',#{staffName},'%')
</if>
<if test="staffPhones !=null and staffPhones.size()>0"> <if test="staffPhones !=null and staffPhones.size()>0">
AND dss.staff_phone IN AND dss.staff_phone IN
<foreach collection="staffPhones" item="staffPhone" open="(" separator="," close=")"> <foreach collection="staffPhones" item="staffPhone" open="(" separator="," close=")">
......
...@@ -42,8 +42,9 @@ public class StaffMonthSalaryServiceTest extends BaseServiceTest { ...@@ -42,8 +42,9 @@ public class StaffMonthSalaryServiceTest extends BaseServiceTest {
pagination.setPageNum(1); pagination.setPageNum(1);
pagination.setPageSize(10); pagination.setPageSize(10);
SalaryStaffInfoDTO condition = new SalaryStaffInfoDTO(); SalaryStaffInfoDTO condition = new SalaryStaffInfoDTO();
condition.setStaffPhone("19984226251"); // condition.setStaffPhone("19984226251");
condition.setSalaryMonth("2026-03"); condition.setStaffName("庆");
condition.setSalaryMonth("2025-12");
pagination.setCondition(condition); pagination.setCondition(condition);
Page<SalaryStaffInfoDTO> page = staffMonthSalarySlipService.getSalaryStaffList(pagination); Page<SalaryStaffInfoDTO> page = staffMonthSalarySlipService.getSalaryStaffList(pagination);
System.out.println(page); System.out.println(page);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!