diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml
index e5604e5f9..5aea8e6a4 100644
--- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml
+++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml
@@ -201,7 +201,7 @@
when lww.waybill_type = '2' then sum(ldpn.signin_quantity) end signNum
from logpm_warehouse_waybill lww
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
- left join logpm_distribution_parcel_list ldpl on ldpl.waybill_id = lww.id
+ left join logpm_distribution_parcel_list ldpl on ldpl.waybill_id = lww.id and ldpl.warehouse_id = lww.destination_warehouse_id
left join logpm_distribution_parcel_number ldpn on ldpn.parcel_list_id = ldpl.id
where lww.document_making_time > '2024-10-22 00:00:00'
and lww.departure_warehouse_id != 1847456188105195522
@@ -285,7 +285,7 @@
when lww.waybill_type = '2' then sum(ldpn.signin_quantity) end signNum
from logpm_warehouse_waybill lww
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
- left join logpm_distribution_parcel_list ldpl on ldpl.waybill_id = lww.id
+ left join logpm_distribution_parcel_list ldpl on ldpl.waybill_id = lww.id and ldpl.warehouse_id = lww.destination_warehouse_id
left join logpm_distribution_parcel_number ldpn on ldpn.parcel_list_id = ldpl.id
where lww.document_making_time > '2024-10-22 00:00:00'
and lww.departure_warehouse_id != 1847456188105195522
@@ -607,7 +607,7 @@
when lww.waybill_type = '2' then sum(ldpn.signin_quantity) end signNum
from logpm_warehouse_waybill lww
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
- left join logpm_distribution_parcel_list ldpl on ldpl.waybill_id = lww.id
+ left join logpm_distribution_parcel_list ldpl on ldpl.waybill_id = lww.id and ldpl.warehouse_id = lww.destination_warehouse_id
left join logpm_distribution_parcel_number ldpn on ldpn.parcel_list_id = ldpl.id
where lww.document_making_time > '2024-10-22 00:00:00'
and lww.departure_warehouse_id != 1847456188105195522
diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
index aa2db686d..cfcc3a2ca 100644
--- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
+++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
@@ -1971,7 +1971,6 @@
lww.shipper_name shipperName,
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
- lww.service_type serviceType,
lww.destination destination,
lww.complete_destination completeDestination,
lww.departure departure,
@@ -1989,7 +1988,7 @@
lww.d_pay arrivePay,
lww.h_pay backPay,
lww.y_pay monthPay,
- lbc.type_service serviceType,
+ IFNULL(lbc.type_service,lww.service_type) serviceType,
IFNULL(lww.update_status,0) updateStatus,
IFNULL(lww.check_status,0) checkStatus,
lww.check_reson checkReson,
@@ -2127,7 +2126,7 @@
and lww.urgency = #{param.urgency}
- and lww.service_type = #{param.serviceType}
+ and IFNULL(lbc.type_service,lww.service_type) = #{param.serviceType}
and lww.transport_type = #{param.transportType}
@@ -2233,11 +2232,6 @@
lww.shipper_name shipperName,
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
- case when lww.service_type='1' then '商配'
- when lww.service_type='2' then '市配'
- when lww.service_type='3' then '自提'
- when lww.service_type='4' then '三方中转'
- ELSE '未知' END serviceType,
lww.destination destination,
lww.complete_destination completeDestination,
lww.departure departure,
@@ -2279,10 +2273,10 @@
lww.d_pay arrivePay,
lww.h_pay backPay,
lww.y_pay monthPay,
- case when lbc.type_service='1' then '商配'
- when lbc.type_service='2' then '市配'
- when lbc.type_service='3' then '自提'
- when lbc.type_service='4' then '三方中转'
+ case when IFNULL(lbc.type_service,lww.service_type)='1' then '商配'
+ when IFNULL(lbc.type_service,lww.service_type)='2' then '市配'
+ when IFNULL(lbc.type_service,lww.service_type)='3' then '自提'
+ when IFNULL(lbc.type_service,lww.service_type)='4' then '三方中转'
else '未知' end serviceType,
CASE WHEN IFNULL(lww.update_status,0)=0 THEN '未改单'
WHEN IFNULL(lww.update_status,0)=1 THEN '已改单'
@@ -2441,7 +2435,7 @@
and lww.urgency = #{param.urgency}
- and lww.service_type = #{param.serviceType}
+ and IFNULL(lbc.type_service,lww.service_type) = #{param.serviceType}
and lww.transport_type = #{param.transportType}