|
|
|
@ -381,11 +381,24 @@
|
|
|
|
|
and ldsl.warehouse_id = #{warehouseId} |
|
|
|
|
</select> |
|
|
|
|
<select id="listAllocation" resultType="com.logpm.distribution.vo.DistributionStockListAllocationVO"> |
|
|
|
|
select lwug.position_code allocationTitle,ldsi.market_name marketName,lwug.num,lwug.create_time createTime,ldsi.cargo_unit cargoUnit, |
|
|
|
|
ldsi.unpack,ldsi.quantity_stock quantityStock,ldsi.unpacking_quantity unpackingQuantity,ldsi.description_goods descriptionGoods |
|
|
|
|
from logpm_distribution_stock_list ldsi |
|
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug on ldsi.material_id = lwug.association_id and ldsi.incoming_batch = lwug.incoming_batch |
|
|
|
|
and ldsi.market_id = lwug.market_id and lwug.association_type = '4' and lwug.warehouse_id = ldsi.warehouse_id |
|
|
|
|
SELECT |
|
|
|
|
lwga.qr_code allocationTitle, |
|
|
|
|
ldsi.market_name marketName, |
|
|
|
|
lwug.num, |
|
|
|
|
lwug.create_time createTime, |
|
|
|
|
ldsi.cargo_unit cargoUnit, |
|
|
|
|
ldsi.unpack, |
|
|
|
|
ldsi.quantity_stock quantityStock, |
|
|
|
|
ldsi.unpacking_quantity unpackingQuantity, |
|
|
|
|
ldsi.description_goods descriptionGoods |
|
|
|
|
FROM |
|
|
|
|
logpm_distribution_stock_list ldsi |
|
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug ON ldsi.material_id = lwug.association_id |
|
|
|
|
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwug.allocation_id = lwga.id |
|
|
|
|
AND ldsi.incoming_batch = lwug.incoming_batch |
|
|
|
|
AND ldsi.market_id = lwug.market_id |
|
|
|
|
AND lwug.association_type = '4' |
|
|
|
|
AND lwug.warehouse_id = ldsi.warehouse_id |
|
|
|
|
<where> |
|
|
|
|
lwug.id is not null |
|
|
|
|
<if test="param.materialId != null and param.materialId != '' "> and ldsi.material_id = #{param.materialId}</if> |
|
|
|
|