|
|
|
@ -50,5 +50,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
x.warehouse_id ,
|
|
|
|
|
x.material_id
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectInventoryMaterialInfoList" resultType="org.dromara.wms.domain.vo.WmsInventoryVo"
|
|
|
|
|
parameterType="org.dromara.wms.domain.bo.WmsInventoryBo">
|
|
|
|
|
SELECT
|
|
|
|
|
x.material_id,
|
|
|
|
|
MAX(b.material_code) material_code,
|
|
|
|
|
MAX(b.material_name) material_name,
|
|
|
|
|
SUM(x.inventory_qty) inventory_qty
|
|
|
|
|
FROM
|
|
|
|
|
hwmom.dbo.wms_inventory x
|
|
|
|
|
left join base_material_info b on
|
|
|
|
|
x.material_id = b.material_id
|
|
|
|
|
<where>
|
|
|
|
|
<!-- <if test="entity.materialId != null ">and x.material_id = #{entity.materialId}</if>-->
|
|
|
|
|
<if test="entity.warehouseId != null and entity.warehouseId != ''">and x.warehouse_id = #{entity.warehouseId}</if>
|
|
|
|
|
<if test="entity.lockState != null and entity.lockState != ''">and x.lock_state = #{entity.lockState}</if>
|
|
|
|
|
<if test="entity.materialCategories != null and entity.materialCategories != ''">and x.material_categories = #{entity.materialCategories}</if>
|
|
|
|
|
<if test="entity.inventoryStatus != null and entity.inventoryStatus != ''">and x.inventory_status = #{entity.inventoryStatus}</if>
|
|
|
|
|
<if test="entity.locationCode != null and entity.locationCode != ''">and x.location_code like concat('%',#{entity.locationCode},'%')</if>
|
|
|
|
|
<if test="entity.batchCode != null and entity.batchCode != ''">and x.batch_code like concat('%',#{entity.batchCode},'%')</if>
|
|
|
|
|
<if test="entity.storeId != null and entity.storeId != ''">and x.store_id = #{entity.storeId}</if>
|
|
|
|
|
</where>
|
|
|
|
|
group by
|
|
|
|
|
x.material_id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|