生产派工查询条件修改。

master
Leon 3 years ago
parent 987415f7b7
commit 32ed7520d8

@ -668,6 +668,8 @@
</select>
<select id="findSfcDispatchList" resultMap="FullResultMap">
SELECT WIP.*
FROM (
SELECT WIP.*, V1.STEP_ID PREPOSITION_STEP_ID, V1.OPERATION PREPOSITION_OPERATION,
CASE WHEN WIP.DISPATCH_SEQ = 1 OR V1.DISPATCH_STATUS = 'COMPLETE' THEN N'是' ELSE N'否' END IS_COMPLETED,
CASE WHEN WIP.DISPATCH_STATUS = 'NEW' THEN N'新建' WHEN WIP.DISPATCH_STATUS = 'CANCEL' THEN N'取消'
@ -744,10 +746,10 @@
AND SD.BLANKING_SIZE LIKE '%'||#{blankingSize}||'%'
</if>
<if test="startFromDate != null">
AND SO.PLANNED_START_DATE >= #{startFromDate}
AND SO.PLANNED_START_DATE >= TO_DATE(#{startFromDate}, 'YYYY-MM-DD')
</if>
<if test="startToDate != null">
AND SO.PLANNED_START_DATE &lt;= #{startToDate}
AND SO.PLANNED_START_DATE &lt;= TO_DATE(#{startToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="completeFromDate != null">
AND SO.PLANNED_COMP_DATE >= TO_DATE(#{completeFromDate}, 'YYYY-MM-DD')
@ -758,9 +760,9 @@
) WIP
LEFT JOIN Z_SFC_DISPATCH V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC AND V1.DISPATCH_SEQ = WIP.BEFORE_SEQ
LEFT JOIN Z_SFC_DISPATCH V2 ON V2.SITE = WIP.SITE AND V2.SFC = WIP.SFC AND V2.DISPATCH_SEQ = WIP.AFTER_SEQ
WHERE 1 = 1
<if test="isCompleted != null and isCompleted != '' and isCompleted = 'true'">
AND V1.DISPATCH_STATUS = 'COMPLETE'
) WIP
<if test="isCompleted != null and isCompleted != ''">
WHERE WIP.IS_COMPLETED = #{isCompleted}
</if>
ORDER BY WIP.SHOP_ORDER, WIP.SFC, TO_NUMBER(WIP.DISPATCH_SEQ)
</select>

Loading…
Cancel
Save