Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 10 months ago
parent
commit
83c1af5346
  1. 57
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

57
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -283,39 +283,54 @@
</where> </where>
</select> </select>
<select id="selectDistributionDeliveryinventoryByDeliveryId" resultType="com.logpm.distribution.vo.DistributionStockListVO"> <select id="selectDistributionDeliveryinventoryByDeliveryId" resultType="com.logpm.distribution.vo.DistributionStockListVO">
select SELECT
ldsl.sku sku, ldsl.sku AS sku,
ldsl.incoming_batch AS incomingBatch, ldsl.incoming_batch AS incomingBatch,
ldsl.order_code AS order_code, ldsl.order_code AS order_code,
ldsl.warehouse_name AS warehouseName, ldsl.warehouse_name AS warehouseName,
ldsl.market_name AS marketName, ldsl.market_name AS marketName,
ldsl.brand_name AS brandName, ldsl.brand_name AS brandName,
ldrsl.reservation_num AS plannedQuantity, ldsl.description_goods AS descriptionGoods,
ldsl.description_goods descriptionGoods, ldsl.cargo_unit AS cargoUnit,
ldsl.cargo_unit cargoUnit, (
( SELECT SELECT COALESCE
sum(ldrsl.reservation_num) ( count(*), 0 )
FROM FROM
logpm_distribution_reservation_stocklist ldrsl logpm_dis_stock_list_detail ldsld
WHERE WHERE
ldrsl.stocklist_id = ldsl.id) deliveryNumber, ldsl.id = ldsld.stock_list_id
AND ldrsl.reservation_id = ldsld.reservation_id
) AS plannedQuantity,
( SELECT COALESCE ( count(*), 0 ) FROM logpm_distribution_stock lds WHERE ldsl.id = lds.stock_list_id AND lds.reservation_id =ldrsl.reservation_id AND lds.tenant_id = '627683' ) AS readyStock,
( (
SELECT SELECT COALESCE
COALESCE(count(*), 0) ( count(*), 0 )
FROM FROM
logpm_distribution_stock lds logpm_dis_stock_list_detail ldsld
WHERE WHERE
ldsl.id = lds.stock_list_id ldsl.id = ldsld.stock_list_id
) readyStock, AND ldrsl.reservation_id = ldsld.reservation_id
( SELECT COALESCE ( count(*), 0 ) FROM logpm_dis_stock_list_detail ldsld WHERE ldsl.id = ldsld.stock_list_id AND ldrsl.reservation_id = ldsld.reservation_id AND ldsld.stock_locking_status = '20' ) AS loadedinNumber, AND ldsld.stock_locking_status = '20'
( SELECT COALESCE ( count(*), 0 ) FROM logpm_dis_stock_list_detail ldsld WHERE ldsl.id = ldsld.stock_list_id AND ldrsl.reservation_id = ldsld.reservation_id AND ldsld.stock_signfo_status = '20' ) AS signedinNumber, AND ldsld.tenant_id = '627683'
ldsl.storage_location goodsAllocation, ) AS loadingNumber,
ldsl.cargo_number cargoNumber (
SELECT COALESCE
( count(*), 0 )
FROM
logpm_dis_stock_list_detail ldsld
WHERE
ldsl.id = ldsld.stock_list_id
AND ldrsl.reservation_id = ldsld.reservation_id
AND ldsld.stock_signfo_status = '20'
AND ldsld.tenant_id = '627683'
) AS signedingNumber,
ldsl.storage_location AS goodsAllocation,
ldsl.cargo_number AS cargoNumber
FROM FROM
logpm_distribution_reservation_stocklist ldrsl logpm_distribution_reservation_stocklist ldrsl
JOIN logpm_distribution_signfor lds on lds.reservation_id = ldrsl.reservation_id JOIN logpm_distribution_signfor lds ON lds.reservation_id = ldrsl.reservation_id
JOIN logpm_distribution_delivery_list lddl on lddl.id = lds.delivery_id JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
join logpm_distribution_stock_list ldsl on ldrsl.stocklist_id = ldsl.id JOIN logpm_distribution_stock_list ldsl ON ldrsl.stocklist_id = ldsl.id
<where> <where>
lds.is_deleted =0 and lddl.id = #{deliveryId} lds.is_deleted =0 and lddl.id = #{deliveryId}
</where> </where>

Loading…
Cancel
Save