|
|
@ -416,10 +416,14 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
) AS calc |
|
|
) AS calc |
|
|
<where> |
|
|
<where> |
|
|
AND m.Site = #{query.site} |
|
|
AND m.Site = #{query.site} |
|
|
AND ISNULL(m.QtyToIssue_Original,0) < ISNULL(m.QtyToIssue,0) |
|
|
|
|
|
|
|
|
|
|
|
AND DATEDIFF(MINUTE, o.needDate, GETDATE()) > 0 |
|
|
AND DATEDIFF(MINUTE, o.needDate, GETDATE()) > 0 |
|
|
AND calc.overtimeMinutes > 0 |
|
|
AND calc.overtimeMinutes > 0 |
|
|
|
|
|
|
|
|
|
|
|
<if test="query.overtimeNotDistributed != null and query.overtimeNotDistributed == false"> |
|
|
|
|
|
AND ISNULL(m.QtyToIssue_Original,0) < ISNULL(m.QtyToIssue,0) |
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
<if test="query.notifyNo != null and query.notifyNo != ''"> |
|
|
<if test="query.notifyNo != null and query.notifyNo != ''"> |
|
|
AND m.NotifyNo = #{query.notifyNo} |
|
|
AND m.NotifyNo = #{query.notifyNo} |
|
|
</if> |
|
|
</if> |
|
|
|