|
|
|
@ -316,6 +316,7 @@ |
|
|
|
LEFT JOIN ST_STOREHOUSE h ON r.sh_id = h.id AND h.is_deleted = 0 AND h.id = #{shId} |
|
|
|
LEFT JOIN ST_STOREHOUSE h ON r.sh_id = h.id AND h.is_deleted = 0 AND h.id = #{shId} |
|
|
|
LEFT JOIN ST_STOCK_INOUT_RECORD io ON io.rls_id = r.id AND io.is_deleted = 0 AND io.in_out_type = 0 |
|
|
|
LEFT JOIN ST_STOCK_INOUT_RECORD io ON io.rls_id = r.id AND io.is_deleted = 0 AND io.in_out_type = 0 |
|
|
|
WHERE r.is_deleted = 0 |
|
|
|
WHERE r.is_deleted = 0 |
|
|
|
|
|
|
|
AND r.stop_use = 0 |
|
|
|
AND r.sh_id = #{shId} |
|
|
|
AND r.sh_id = #{shId} |
|
|
|
AND g.id = #{goodsId} |
|
|
|
AND g.id = #{goodsId} |
|
|
|
<!-- 新增:可选库位过滤 --> |
|
|
|
<!-- 新增:可选库位过滤 --> |
|
|
|
@ -612,6 +613,7 @@ |
|
|
|
LEFT JOIN ST_REALTIME_STOCK_LOCK l ON s.id = l.rls_id |
|
|
|
LEFT JOIN ST_REALTIME_STOCK_LOCK l ON s.id = l.rls_id |
|
|
|
-- 调整:goods_code从关联的STGOODS表匹配,而非库存表 |
|
|
|
-- 调整:goods_code从关联的STGOODS表匹配,而非库存表 |
|
|
|
WHERE g.goods_code = #{goodsCode} |
|
|
|
WHERE g.goods_code = #{goodsCode} |
|
|
|
|
|
|
|
AND s.stop_use = 0 |
|
|
|
<if test="materialNo == null"> |
|
|
|
<if test="materialNo == null"> |
|
|
|
AND s.material_no IS NULL |
|
|
|
AND s.material_no IS NULL |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
|