|
|
@ -2132,23 +2132,24 @@ |
|
|
from StockTransactionLog A WITH(NOLOCK) |
|
|
from StockTransactionLog A WITH(NOLOCK) |
|
|
INNER JOIN inventory_stock B WITH(NOLOCK) ON A.site = B.site AND A.roll_no = B.roll_no |
|
|
INNER JOIN inventory_stock B WITH(NOLOCK) ON A.site = B.site AND A.roll_no = B.roll_no |
|
|
where A.site =#{site} and A.order_no = #{orderNo} AND a.bom_item_no = #{itemNo} and a.document_type in ('生产领料','生产退仓') |
|
|
where A.site =#{site} and A.order_no = #{orderNo} AND a.bom_item_no = #{itemNo} and a.document_type in ('生产领料','生产退仓') |
|
|
<where> |
|
|
|
|
|
<if test="transactionId != null and transactionId != ''"> |
|
|
<if test="transactionId != null and transactionId != ''"> |
|
|
and A.transactionId like concat('%', #{transactionId}, '%') |
|
|
|
|
|
|
|
|
and A.transaction_id like '%' + #{transactionId} + '%' |
|
|
</if> |
|
|
</if> |
|
|
<if test="documentType != null and documentType != ''"> |
|
|
<if test="documentType != null and documentType != ''"> |
|
|
and A.documentType = #{documentType} |
|
|
|
|
|
|
|
|
and A.document_type = #{documentType} |
|
|
</if> |
|
|
</if> |
|
|
<if test="rollNo != null and rollNo != ''"> |
|
|
<if test="rollNo != null and rollNo != ''"> |
|
|
and A.rollNo like concat('%', #{rollNo}, '%') |
|
|
|
|
|
|
|
|
and A.roll_no like '%' + #{rollNo} + '%' |
|
|
</if> |
|
|
</if> |
|
|
<if test="status != null and status != ''"> |
|
|
<if test="status != null and status != ''"> |
|
|
and A.status = #{status} |
|
|
|
|
|
|
|
|
and B.status = #{status} |
|
|
</if> |
|
|
</if> |
|
|
<if test="consumedFlag != null and consumedFlag != ''"> |
|
|
|
|
|
and A.consumedFlag = #{consumedFlag} |
|
|
|
|
|
|
|
|
<if test="consumedFlag == '已消耗'"> |
|
|
|
|
|
and B.consumed_flag = 'Y' |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="consumedFlag == '未使用'"> |
|
|
|
|
|
and ISNULL(B.consumed_flag, 'N') <> 'Y' |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
|
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<!-- 调用存储过程 sfdcRollsOpsReportExecute 用于打开材料卷 --> |
|
|
<!-- 调用存储过程 sfdcRollsOpsReportExecute 用于打开材料卷 --> |
|
|
|