|
|
|
@ -293,5 +293,43 @@ |
|
|
|
AND B.ItemNo like '%'+#{consumeItemNo}+'%' |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY A.CreatedDate DESC |
|
|
|
<if test="page != null and limit != null"> |
|
|
|
OFFSET #{page} ROWS FETCH NEXT #{limit} ROWS ONLY |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询订单产出标签总数 --> |
|
|
|
<select id="searchSfdcRollsReportCount" resultType="int"> |
|
|
|
SELECT COUNT(*) |
|
|
|
FROM SFDC_Rolls A |
|
|
|
LEFT JOIN SFDC_MaterialHist B ON A.Site = B.SITE AND A.OrderNo = B.OrderNo AND A.RollNo = B.StartFromRollNo |
|
|
|
<where> |
|
|
|
a.CreatedDate >= #{createdDate2} |
|
|
|
<if test=" createdDate3 != null"> |
|
|
|
AND #{createdDate3} >= CONVERT(varchar(10), a.CreatedDate, 120) |
|
|
|
</if> |
|
|
|
<if test=" Site != null and Site != ''"> |
|
|
|
AND A.site = #{Site} |
|
|
|
</if> |
|
|
|
<if test=" OrderNo != null and OrderNo != ''"> |
|
|
|
AND A.OrderNo like '%'+#{OrderNo}+'%' |
|
|
|
</if> |
|
|
|
<if test=" CreatedOpsSeqNo != 0"> |
|
|
|
AND A.CreatedOpsSeqNo = #{CreatedOpsSeqNo} |
|
|
|
</if> |
|
|
|
<if test=" CreatedOpsItemNo != 0"> |
|
|
|
AND A.CreatedOpsItemNo = #{CreatedOpsItemNo} |
|
|
|
</if> |
|
|
|
<if test=" consumeOrderNo != null and consumeOrderNo != ''"> |
|
|
|
AND B.OrderNo like '%'+#{consumeOrderNo}+'%' |
|
|
|
</if> |
|
|
|
<if test=" consumeSeqNo != null and consumeSeqNo != ''"> |
|
|
|
AND B.SeqNo like '%'+#{consumeSeqNo}+'%' |
|
|
|
</if> |
|
|
|
<if test=" consumeItemNo != null and consumeItemNo != ''"> |
|
|
|
AND B.ItemNo like '%'+#{consumeItemNo}+'%' |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
</mapper> |