|
|
@ -212,9 +212,10 @@ |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<!-- rqrq - 根据notifyNo和productionOrderNo查询itemNo --> |
|
|
<!-- rqrq - 根据notifyNo和productionOrderNo查询itemNo --> |
|
|
|
|
|
<!-- 注意:不能用NOLOCK,结果用于后续INSERT和UPDATE操作,脏读可能导致数据不一致 - rqrq --> |
|
|
<select id="getItemNoByNotifyNoAndOrderNo" resultType="java.math.BigDecimal"> |
|
|
<select id="getItemNoByNotifyNoAndOrderNo" resultType="java.math.BigDecimal"> |
|
|
SELECT TOP 1 item_no |
|
|
SELECT TOP 1 item_no |
|
|
FROM SOIssueNotifyOrderList WITH (NOLOCK) |
|
|
|
|
|
|
|
|
FROM SOIssueNotifyOrderList |
|
|
<where> |
|
|
<where> |
|
|
AND site = #{site} |
|
|
AND site = #{site} |
|
|
AND notify_no = #{notifyNo} |
|
|
AND notify_no = #{notifyNo} |
|
|
@ -280,7 +281,7 @@ |
|
|
production_area AS productionArea, |
|
|
production_area AS productionArea, |
|
|
transport_flag AS transportFlag, |
|
|
transport_flag AS transportFlag, |
|
|
order_type AS orderType |
|
|
order_type AS orderType |
|
|
FROM SOIssueNotifyOrderList WITH (NOLOCK) |
|
|
|
|
|
|
|
|
FROM SOIssueNotifyOrderList |
|
|
WHERE site = #{site} |
|
|
WHERE site = #{site} |
|
|
AND notify_no = #{notifyNo} |
|
|
AND notify_no = #{notifyNo} |
|
|
AND item_no = #{itemNo,jdbcType=DECIMAL} |
|
|
AND item_no = #{itemNo,jdbcType=DECIMAL} |
|
|
@ -351,7 +352,7 @@ |
|
|
<!-- 优化:添加 WITH (NOLOCK) 避免死锁 - rqrq --> |
|
|
<!-- 优化:添加 WITH (NOLOCK) 避免死锁 - rqrq --> |
|
|
<select id="getPalletDetailsByPalletAndSerials" resultType="com.gaotao.modules.automatedWarehouse.entity.PalletDetail"> |
|
|
<select id="getPalletDetailsByPalletAndSerials" resultType="com.gaotao.modules.automatedWarehouse.entity.PalletDetail"> |
|
|
SELECT position, layer, serial_no as serialNo |
|
|
SELECT position, layer, serial_no as serialNo |
|
|
FROM pallet_detail WITH (NOLOCK) |
|
|
|
|
|
|
|
|
FROM pallet_detail |
|
|
WHERE site = #{site} |
|
|
WHERE site = #{site} |
|
|
AND pallet_id = #{palletId} |
|
|
AND pallet_id = #{palletId} |
|
|
AND serial_no IN |
|
|
AND serial_no IN |
|
|
@ -361,10 +362,11 @@ |
|
|
ORDER BY position, layer |
|
|
ORDER BY position, layer |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<!-- rqrq - 查询序列号在handling_unit中的location_id(无锁查询)--> |
|
|
|
|
|
|
|
|
<!-- rqrq - 查询序列号在handling_unit中的location_id --> |
|
|
|
|
|
<!-- 注意:不能用NOLOCK,结果用于设置outWcsFlag后INSERT到detail表,脏读可能导致标记错误 - rqrq --> |
|
|
<select id="getSerialNoLocationId" resultType="java.lang.String"> |
|
|
<select id="getSerialNoLocationId" resultType="java.lang.String"> |
|
|
SELECT location_id |
|
|
SELECT location_id |
|
|
FROM handling_unit WITH (NOLOCK) |
|
|
|
|
|
|
|
|
FROM handling_unit |
|
|
WHERE site = #{site} |
|
|
WHERE site = #{site} |
|
|
AND unit_id = #{serialNo} |
|
|
AND unit_id = #{serialNo} |
|
|
</select> |
|
|
</select> |
|
|
@ -383,7 +385,7 @@ |
|
|
out_wcs_flag AS outWcsFlag, |
|
|
out_wcs_flag AS outWcsFlag, |
|
|
issure_flag AS issureFlag, |
|
|
issure_flag AS issureFlag, |
|
|
order_type AS orderType |
|
|
order_type AS orderType |
|
|
FROM SOIssueNotifyOrderMaterialList_detail WITH (NOLOCK) |
|
|
|
|
|
|
|
|
FROM SOIssueNotifyOrderMaterialList_detail |
|
|
WHERE site = #{site} |
|
|
WHERE site = #{site} |
|
|
AND notify_no = #{notifyNo} |
|
|
AND notify_no = #{notifyNo} |
|
|
ORDER BY item_no, BOM_item_no, task_seq |
|
|
ORDER BY item_no, BOM_item_no, task_seq |
|
|
|