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;