Browse Source

Merge branch 'dev' into pre-production

master
汤建军 8 months ago
parent
commit
01049c23a0
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.xml
  2. 42
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.xml

@ -145,7 +145,7 @@
ldsl.tray_name trayName, lds.allocation_title allocation,
lddd.reality_quantity preparedQuantity,
lddd.stock_status,
(SELECT count(id) FROM logpm_distribution_bill_lading_scan ldbls WHERE ldbls.stock_list_id = lddd.stock_list_id and ldbls.material_type = 1) AS pick_up_quantity,
(SELECT count(id) FROM logpm_distribution_bill_lading_scan ldbls WHERE ldbls.bill_lading_id = lddd.bill_lading_id AND ldbls.stock_list_id = lddd.stock_list_id and ldbls.material_type = 1) AS pick_up_quantity,
CASE
WHEN (lddd.quantity - (SELECT count(id) FROM logpm_distribution_bill_lading_scan ldbls WHERE ldbls.stock_list_id = lddd.stock_list_id and ldbls.material_type = 1)) > 0 THEN 20
WHEN (lddd.quantity - (SELECT count(id) FROM logpm_distribution_bill_lading_scan ldbls WHERE ldbls.stock_list_id = lddd.stock_list_id and ldbls.material_type = 1)) = 0 THEN 10

42
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -94,9 +94,9 @@
END id,
CONCAT_WS( ',', k.orderCode, m.orderCode ) AS orderCode,
CONCAT_WS( ',', k.serviceNumber, m.serviceNumber ) AS serviceNumber,
CONCAT_WS( ',', k.consigneeUnit, m.consigneeUnit ) AS consigneeUnit,
CONCAT_WS( ',', k.customerName, m.customerName ) AS customerName,
CONCAT_WS( ',', k.customerTelephone, m.customerTelephone ) AS customerTelephone,
IF(k.customerName is not null, k.customerName, m.customerName) AS customerName,
IF(k.consigneeUnit is not null, k.consigneeUnit, m.consigneeUnit) AS consigneeUnit,
IF(k.customerTelephone is not null, k.customerTelephone, m.customerTelephone) AS customerTelephone,
CONCAT_WS( ',', k.waybillNumber ) AS waybillNumber,
k.warehouse_entry_time AS warehouseEntryTime,
k.storage_fee AS storageFee
@ -286,9 +286,9 @@
END id,
CONCAT_WS( ',', k.orderCode, m.orderCode ) AS orderCode,
CONCAT_WS( ',', k.serviceNumber, m.serviceNumber ) AS serviceNumber,
CONCAT_WS( ',', k.consigneeUnit, m.consigneeUnit ) AS consigneeUnit,
CONCAT_WS( ',', k.customerName, m.customerName ) AS customerName,
CONCAT_WS( ',', k.customerTelephone, m.customerTelephone ) AS customerTelephone,
IF(k.customerName is not null, k.customerName, m.customerName) AS customerName,
IF(k.consigneeUnit is not null, k.consigneeUnit, m.consigneeUnit) AS consigneeUnit,
IF(k.customerTelephone is not null, k.customerTelephone, m.customerTelephone) AS customerTelephone,
CONCAT_WS( ',', k.waybillNumber ) AS waybillNumber,
k.warehouse_entry_time AS warehouseEntryTime,
k.storage_fee AS storageFee
@ -614,16 +614,28 @@
</select>
<select id="getViewDetailOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingViewVO">
SELECT ldbl.pickup_batch AS pickupBatch,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.waybill_number)) AS waybillNumber,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.service_number)) AS serviceNumber,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.consignee_unit)) AS consigneeUnit,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.consignee_person)) AS customerName,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.consignee_mobile)) AS customerTelephone
FROM logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldbl.id = ldbs.bill_lading_id AND order_status != '2'
SELECT
ldbl.pickup_batch AS pickupBatch,
GROUP_CONCAT(
DISTINCT ANY_VALUE ( ldsa.waybill_number )) AS waybillNumber,
GROUP_CONCAT(
DISTINCT ANY_VALUE ( ldsa.service_number )) AS serviceNumber,
IFNULL(GROUP_CONCAT(
DISTINCT ANY_VALUE ( ldsl.market_name )),GROUP_CONCAT(
DISTINCT ANY_VALUE ( ldsa.consignee_unit ))) AS consigneeUnit,
IFNULL(ldbl.consignee,GROUP_CONCAT(
DISTINCT ANY_VALUE ( ldsa.consignee_person ))) AS customerName,
GROUP_CONCAT(
DISTINCT ANY_VALUE ( ldsa.consignee_mobile )) AS customerTelephone
FROM
logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldbl.id = ldbs.bill_lading_id
AND order_status != '2'
LEFT JOIN logpm_distribution_stock_article ldsa ON ldbs.stock_article_id = ldsa.id
WHERE ldbl.id = #{id}
LEFT JOIN logpm_distribution_delivery_details AS lddd ON ldbl.id = lddd.bill_lading_id AND lddd.inventory_status IN ('1','3')
LEFT JOIN logpm_distribution_stock_list AS ldsl ON lddd.stock_list_id = ldsl.id
WHERE
ldbl.id = #{id}
GROUP BY ldbl.id;
</select>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -1266,7 +1266,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
distributionBillLadingExcelDTO.setBillOrderPackExcelList(distributionBillOrderPackExcels);
}
List<DistributionBillInventoryExcel> billInventoryExcelList = distributionDeliveryDetailsService.getBillLadingDetailOrderInventoryExcel(id);
if (billInventoryExcelList.isEmpty()) {
if (!billInventoryExcelList.isEmpty()) {
distributionBillLadingExcelDTO.setBillInventoryExcelList(billInventoryExcelList);
}
return distributionBillLadingExcelDTO;

Loading…
Cancel
Save