Browse Source

Merge branch 'dev' into pre-production

master
pref_mail@163.com 10 months ago
parent
commit
9b1f790277
  1. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

23
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -574,9 +574,8 @@
</select> </select>
<select id="selectStockupSelf" resultType="com.logpm.distribution.vo.DistributionStockupStockListVO"> <select id="selectStockupSelf" resultType="com.logpm.distribution.vo.DistributionStockupStockListVO">
select lddd.stock_list_id stockListId, select lddd.stock_list_id stockListId,
GROUP_CONCAT(DISTINCT lwug.position_code) allocation, concat(ifnull(t1.allocation_ids,''),if(t1.allocation_ids is not null,',',''), ifnull(t2.allocation_ids,'')) as allocations,
GROUP_CONCAT(DISTINCT lwug.allocation_id) allocations,
ldsl.description_goods materialName, ldsl.description_goods materialName,
ldsl.sku sku, ldsl.sku sku,
ldsl.cargo_norms cargoNorms, ldsl.cargo_norms cargoNorms,
@ -594,10 +593,20 @@
lddd.id deliveryDetailsId lddd.id deliveryDetailsId
from logpm_distribution_delivery_details lddd from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_warehouse_updown_goods lwug LEFT JOIN ( SELECT association_value,warehouse_id, GROUP_CONCAT( DISTINCT ( allocation_id )) AS allocation_ids FROM logpm_warehouse_updown_goods WHERE association_type = 4 GROUP BY association_value,warehouse_id ) AS t2 ON ldsl.cargo_number = t2.association_value and ldsl.warehouse_id=t2.warehouse_id
on lwug.association_id = ldsl.material_id and lwug.association_type = '4' LEFT JOIN ( SELECT
and ldsl.market_id = lwug.market_id and ldsl.incoming_batch = lwug.incoming_batch and ldpl.material_code,
ldsl.warehouse_id = lwug.warehouse_id ldpl.warehouse_id,
GROUP_CONCAT( DISTINCT ( lwug.allocation_id ) ) AS allocation_ids
FROM
logpm_warehouse_updown_goods lwug
LEFT JOIN logpm_distribution_parcel_list ldpl ON ldpl.id = lwug.association_id
WHERE
lwug.association_type != 4
AND ldpl.conditions = 2
GROUP BY ldpl.material_code,ldpl.warehouse_id ) AS t1 ON ldsl.cargo_number = t1.material_code and ldsl.warehouse_id=t1.warehouse_id
where lddd.bill_lading_id = #{reservationId} where lddd.bill_lading_id = #{reservationId}
GROUP BY lddd.stock_list_id, ldsl.description_goods, ldsl.sku, ldsl.cargo_norms, lddd.quantity, ldsl.cargo_unit, GROUP BY lddd.stock_list_id, ldsl.description_goods, ldsl.sku, ldsl.cargo_norms, lddd.quantity, ldsl.cargo_unit,
ldsl.tray_name, ldsl.source_type,ldsl.unpack,lddd.id ldsl.tray_name, ldsl.source_type,ldsl.unpack,lddd.id

Loading…
Cancel
Save