@@ -9,38 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectAvailableInventory"
|
||||
resultType="cn.code.nl.module.wms.controller.admin.iostorinv.vo.AvailableInventoryVO">
|
||||
SELECT
|
||||
gp.vehicle_code AS vehicleCode,
|
||||
gp.pcsn AS pcsn,
|
||||
gp.material_code AS materialCode,
|
||||
gp.material_id AS materialId,
|
||||
gp.qty AS qty,
|
||||
gp.frozen_qty AS frozenQty,
|
||||
(gp.qty - gp.frozen_qty) AS availableQty,
|
||||
gp.qty_unit_id AS qtyUnitId,
|
||||
gp.qty_unit_name AS qtyUnitName,
|
||||
gp.ext_code AS extCode,
|
||||
gp.ext_type AS extType,
|
||||
gp.ext_dtl_code AS extDtlCode,
|
||||
sa.stor_id AS storId,
|
||||
sa.stor_code AS storCode,
|
||||
sa.stor_name AS storName
|
||||
FROM wms_group_plate gp
|
||||
INNER JOIN wms_structattr sa
|
||||
ON gp.vehicle_code = sa.storagevehicle_code
|
||||
WHERE sa.stor_id = #{storId}
|
||||
AND gp.status = '可用'
|
||||
AND (gp.qty - gp.frozen_qty) > 0
|
||||
<if test="materialCode != null and materialCode != ''">
|
||||
AND gp.material_code = #{materialCode}
|
||||
</if>
|
||||
<if test="pcsn != null and pcsn != ''">
|
||||
AND gp.pcsn = #{pcsn}
|
||||
</if>
|
||||
<if test="vehicleCode != null and vehicleCode != ''">
|
||||
AND gp.vehicle_code = #{vehicleCode}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user