Browse Source

修改报修人员查询sql

java8
赵宏斌 6 months ago
parent
commit
c267c4ea12
  1. 12
      src/main/resources/mapper/pms/EamMapper.xml

12
src/main/resources/mapper/pms/EamMapper.xml

@ -3634,7 +3634,15 @@
<if test = "roleId != null and roleId != ''">
AND d.role_id = #{roleId}
</if>
<if test = "date != null">
<if test = "date != null and classesCode != null and classesCode != ''">
AND a.username IN (
SELECT tpm_scheduling_record.admin_id
FROM tpm_scheduling
join tpm_scheduling_record on tpm_scheduling.id = tpm_scheduling_record.head_id
WHERE tpm_scheduling.date= #{date} and tpm_scheduling.classes_code = #{classesCode} and tpm_scheduling_record.isHoliday = 'N'
)
</if>
<if test = "date != null and (classesCode == null or classesCode == '')">
AND a.username IN (
SELECT tpm_scheduling_record.admin_id
FROM tpm_scheduling
@ -3642,7 +3650,7 @@
WHERE tpm_scheduling.date= #{date} and tpm_scheduling_record.isHoliday = 'N'
)
</if>
<if test = "classesCode != null and classesCode != ''">
<if test = "classesCode != null and classesCode != '' and date == null">
AND a.username IN (
SELECT tpm_scheduling_record.admin_id
FROM tpm_scheduling

Loading…
Cancel
Save