From aecc470a43f33ca37256453929cf9784dd920176 Mon Sep 17 00:00:00 2001
From: PigBaoBei <2739175034@qq.com>
Date: Tue, 4 Jun 2024 15:36:57 +0800
Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90BUG=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DistributionDeliveryDetailsMapper.xml | 2 +-
.../mapper/DistrilbutionBillLadingMapper.xml | 44 ++++++++++++-------
.../DistrilbutionBillLadingServiceImpl.java | 2 +-
3 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.xml
index 64923580d..c7b74da5e 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.xml
+++ b/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
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
index 54299a035..b3c2a973d 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
+++ b/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 @@
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
index 5ad4120cf..80d09c769 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
@@ -1266,7 +1266,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl billInventoryExcelList = distributionDeliveryDetailsService.getBillLadingDetailOrderInventoryExcel(id);
- if (billInventoryExcelList.isEmpty()) {
+ if (!billInventoryExcelList.isEmpty()) {
distributionBillLadingExcelDTO.setBillInventoryExcelList(billInventoryExcelList);
}
return distributionBillLadingExcelDTO;