查询库存逻辑修改;
This commit is contained in:
@@ -690,16 +690,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
LEFT JOIN material_base_info b on a.material_base_info_id = b.material_base_info_id
|
||||
WHERE
|
||||
a.del_flag = 1 AND b.shipper_id = #{shipperId} AND a.organization_id = #{organizationId}
|
||||
AND TRUNC(a.EXT_ATTR_4) = TRUNC(#{extAttr4})
|
||||
AND TRUNC(a.EXT_ATTR_3) = TRUNC(#{extAttr3})
|
||||
AND TRUNC(a.inventory_date) = TRUNC(#{inventoryDate})
|
||||
AND TRUNC(a.EXPIRY_DATE) = TRUNC(#{expiryDate})
|
||||
AND TRUNC(a.PRODUCTION_DATE) = TRUNC(#{productionDate})
|
||||
AND a.EXT_ATTR_2 = #{extAttr2}
|
||||
AND a.EXT_ATTR_1 = #{extAttr1}
|
||||
AND a.BOX_PALLET_NO = #{boxPalletNo}
|
||||
AND a.SHEET_REF_NO = #{sheetRefNo}
|
||||
AND a.BATCH_REF_NO = #{batchRefNo}
|
||||
<if test="materialBaseInfoId != null and materialBaseInfoId != ''">
|
||||
AND a.material_base_info_id = #{materialBaseInfoId}
|
||||
</if>
|
||||
@@ -712,6 +702,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="storageLocationId != null and storageLocationId != ''">
|
||||
AND a.storage_location_id = #{storageLocationId}
|
||||
</if>
|
||||
<if test="extAttr4 != null">
|
||||
AND TRUNC(a.EXT_ATTR_4) = TRUNC(#{extAttr4})
|
||||
</if>
|
||||
<if test="extAttr3 != null">
|
||||
AND TRUNC(a.EXT_ATTR_3) = TRUNC(#{extAttr3})
|
||||
</if>
|
||||
<if test="inventoryDate != null">
|
||||
AND TRUNC(a.inventory_date) = TRUNC(#{inventoryDate})
|
||||
</if>
|
||||
<if test="expiryDate != null">
|
||||
AND TRUNC(a.EXPIRY_DATE) = TRUNC(#{expiryDate})
|
||||
</if>
|
||||
<if test="productionDate != null">
|
||||
AND TRUNC(a.PRODUCTION_DATE) = TRUNC(#{productionDate})
|
||||
</if>
|
||||
<if test="extAttr2 != null and extAttr2 != ''">
|
||||
AND a.EXT_ATTR_2 = #{extAttr2}
|
||||
</if>
|
||||
<if test="extAttr1 != null and extAttr1 != ''">
|
||||
AND a.EXT_ATTR_1 = #{extAttr1}
|
||||
</if>
|
||||
<if test="boxPalletNo != null and boxPalletNo != ''">
|
||||
AND a.BOX_PALLET_NO = #{boxPalletNo}
|
||||
</if>
|
||||
<if test="sheetRefNo != null and sheetRefNo != ''">
|
||||
AND a.SHEET_REF_NO = #{sheetRefNo}
|
||||
</if>
|
||||
<if test="batchRefNo != null and batchRefNo != ''">
|
||||
AND a.BATCH_REF_NO = #{batchRefNo}
|
||||
</if>
|
||||
|
||||
<if test="extAttr4 == null">
|
||||
AND TRUNC(a.EXT_ATTR_4) is null
|
||||
</if>
|
||||
<if test="extAttr3 == null">
|
||||
AND TRUNC(a.EXT_ATTR_3) is null
|
||||
</if>
|
||||
<if test="inventoryDate == null">
|
||||
AND TRUNC(a.inventory_date) is null
|
||||
</if>
|
||||
<if test="expiryDate == null">
|
||||
AND TRUNC(a.EXPIRY_DATE) is null
|
||||
</if>
|
||||
<if test="productionDate == null">
|
||||
AND a.PRODUCTION_DATE is null
|
||||
</if>
|
||||
<if test="extAttr2 == null and extAttr2 == ''">
|
||||
AND a.EXT_ATTR_2 = #{extAttr2}
|
||||
</if>
|
||||
<if test="extAttr1 == null and extAttr1 == ''">
|
||||
AND a.EXT_ATTR_1 = #{extAttr1}
|
||||
</if>
|
||||
<if test="boxPalletNo == null and boxPalletNo == ''">
|
||||
AND a.BOX_PALLET_NO = #{boxPalletNo}
|
||||
</if>
|
||||
<if test="sheetRefNo == null and sheetRefNo == ''">
|
||||
AND a.SHEET_REF_NO = #{sheetRefNo}
|
||||
</if>
|
||||
<if test="batchRefNo == null and batchRefNo == ''">
|
||||
AND a.BATCH_REF_NO = #{batchRefNo}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据库存ID查询库存信息(包含批次属性字段) -->
|
||||
|
||||
Reference in New Issue
Block a user