fix(repository): 修正QmsIncomingInspectionTask中过期过滤条件
- 将isOverdue过滤条件从<if>移动到<choose>的<when>分支中 - 消除重复的isOverdue过滤判断,避免条件冲突 - 优化查询条件逻辑,提高代码可读性和维护性
This commit is contained in:
parent
d0fb34dc71
commit
71a989bb20
|
|
@ -149,6 +149,9 @@
|
|||
LEFT JOIN qms_incoming_inspection_task t2 ON t.related_task_id = t2.id
|
||||
<where>
|
||||
<choose>
|
||||
<when test="request.isOverdue != null">
|
||||
t.is_overdue = #{request.isOverdue}
|
||||
</when>
|
||||
<when test="request.inspectionStatus != null">
|
||||
t.inspection_status = #{request.inspectionStatus}
|
||||
</when>
|
||||
|
|
@ -157,9 +160,6 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND (t.inspector_id = #{inspectorId} OR t.agent_id = #{inspectorId})
|
||||
<if test="request.isOverdue != null">
|
||||
AND t.is_overdue = #{request.isOverdue}
|
||||
</if>
|
||||
<if test="request.key != null and request.key != ''">
|
||||
AND (m.material_no ilike concat('%', #{request.key}, '%')
|
||||
or m.material_desc ilike concat('%', #{request.key}, '%')
|
||||
|
|
|
|||
Loading…
Reference in New Issue