diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java index d10c3ae2f..96c5b0ac8 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java @@ -320,7 +320,7 @@ public interface IDistributionParcelListClient { List findListByOrderPackageCodesAndCode(@RequestBody List orderPackageCodeGroup); @PostMapping(API_PREFIX + "/findSignOrderPackageCodes") - List findSignOrderPackageCodes(@RequestBody List orderPackageCodeList); + List findSignOrderPackageCodes(@RequestBody List orderPackageCodes); } diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java index a2b5ccd36..2a0d24e91 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java @@ -535,9 +535,9 @@ public class WaybillCheckListener { String orderCode = orderInfoEntity.getOrderCode(); List advanceDetailList = advanceDetailGroupByOrderCode.get(orderCode); //把advanceDetailList中所有orderPackageCode放入一个List - List orderPackageCodeList = advanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getOrderPackageCode).collect(Collectors.toList()); + List orderPackageCodes = advanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getOrderPackageCode).collect(Collectors.toList()); //查询包件是否签收 - List signPackages = distributionParcelListClient.findSignOrderPackageCodes(orderPackageCodeList); + List signPackages = distributionParcelListClient.findSignOrderPackageCodes(orderPackageCodes); AtomicReference signNum = new AtomicReference<>(0); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml index 1e748bfb0..a4b2b4d8b 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml @@ -261,7 +261,7 @@ t.waybill_number waybillNo, t.entry_time_end warehouseEntryTimeEnd, t.tray_name trayName, - lww.create_time createTime, + lww.document_making_time createTime, lww.destination destination, lww.destination_warehouse_name destinationWarehouseName, lww.shipper shipper, @@ -336,10 +336,10 @@ and lww.abolish_status = 0 and lww.freeze_status = 0 - and lww.create_time >= #{param.openTimeStart} + and lww.document_making_time >= #{param.openTimeStart} - and lww.create_time <= #{param.openTimeEnd} + and lww.document_making_time <= #{param.openTimeEnd} and t.entry_time_end >= #{param.enterTimeStart} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 62179df08..40d963a3c 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -9025,7 +9025,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl select lww.id id, - lww.brand brand, - lww.waybill_no waybillNo, - lww.order_no orderNo, - lww.consignee consignee, - lbc.client_code consigneeCode, - lww.consignee_name consigneeName, - lww.consignee_mobile consigneeMobile, - lww.consignee_address consigneeAddress, - lww.shipper shipper, - lww.shipper_name shipperName, - lww.shipper_mobile shipperMobile, - lww.shipper_address shipperAddress, - lww.destination destination, - lww.departure departure, - lww.departure_warehouse_name departureWarehouseName, - lww.destination_warehouse_name destinationWarehouseName, - lww.delivery_way deliveryWay, - lww.customer_train customerTrain, - IFNULL(lww.return_status,0) returnStatus, - lww.remark remark, - lww.pay_type payType, - lww.pay_way payWay, - lww.x_pay xPay, - lww.d_pay dPay, - lww.h_pay hPay, - lww.y_pay yPay, - lww.service_type serviceType, - lww.cancle_check_remark cancleCheckRemark, - lww.cancle_check_user_name cancleCheckUserName, - lww.cancle_check_time cancleCheckTime, - lww.waybill_status waybillStatus, - lww.agent agent, - lww.waybill_type waybillType, - lww.document_making_time documentMakingTime, - lww.create_time createTime, - GROUP_CONCAT(lwwd.product_name) goodsName, - GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum, - GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice, - lww.total_count totalCount, - sum(lwwd.weight) totalWeight, - sum(lwwd.volume) totalVolume, - lww.cost_piece costPiece, - lww.cost_zhang costZhang, - lww.cost_num costNum, - lww.total_freight totalFreight, - lww.delivery_fee deliveryFee, - lww.pickup_fee pickupFee, - lww.storage_fee storageFee, - lww.warehouse_management_fee warehouseManagementFee, - lww.sorting_fee sortingFee, - lww.handling_fee handlingFee, - lww.claiming_value claimingValue, - lww.rebate rebate, - lww.urgency urgency, - lww.receipt_num receiptNum, - lww.receipt receipt, - lww.transport_type transportType, - lww.third_operation_fee thirdOperationFee, - lww.pickup_complete_or_not pickupCompleteOrNot, - lww.trunkline_complete_or_not trunklineCompleteOrNot, - lww.freeze_status freezeStatus, - lww.freeze_user_name freezeUserName, - lww.freeze_time freezeTime, - lww.abolish_status abolishStatus, - lww.abolish_user_name abolishUserName, - lww.abolish_time abolishTime, - lww.sign_num signNum, - lww.sign_user_name signUserName, - lww.sign_time signTime, - lww.sign_check_user_name signCheckUserName, - lww.sign_check_time signCheckTime, - IFNULL(lww.check_status,0) checkStatus, - lww.check_reson checkReson, - lww.check_remark checkRemark, - lww.check_user_name checkUserName, - lww.check_time checkTime + lww.brand brand, + lww.waybill_no waybillNo, + lww.order_no orderNo, + lww.consignee consignee, + lww.consignee_name consigneeName, + lww.consignee_mobile consigneeMobile, + lww.consignee_address consigneeAddress, + lww.shipper shipper, + lww.shipper_name shipperName, + lww.shipper_mobile shipperMobile, + lww.shipper_address shipperAddress, + lww.destination destination, + lww.departure departure, + lww.departure_warehouse_name departureWarehouseName, + lww.destination_warehouse_name destinationWarehouseName, + lww.delivery_way deliveryWay, + lww.customer_train customerTrain, + IFNULL(lww.return_status,0) returnStatus, + lww.remark remark, + lww.pay_type payType, + lww.pay_way payWay, + lww.x_pay xPay, + lww.d_pay dPay, + lww.h_pay hPay, + lww.y_pay yPay, + lww.service_type serviceType, + lww.cancle_check_remark cancleCheckRemark, + lww.cancle_check_user_name cancleCheckUserName, + lww.cancle_check_time cancleCheckTime, + lww.waybill_status waybillStatus, + lww.agent agent, + lww.waybill_type waybillType, + lww.document_making_time documentMakingTime, + lww.create_time createTime, + GROUP_CONCAT( lwwd.product_name) goodsName, + GROUP_CONCAT( lwwd.num) productNum, + GROUP_CONCAT( lwwd.price) productPrice, + lww.total_count totalCount, + sum( lwwd.weight) totalWeight, + sum( lwwd.volume) totalVolume, + lww.cost_piece costPiece, + lww.cost_zhang costZhang, + lww.cost_num costNum, + lww.total_freight totalFreight, + lww.delivery_fee deliveryFee, + lww.pickup_fee pickupFee, + lww.storage_fee storageFee, + lww.warehouse_management_fee warehouseManagementFee, + lww.sorting_fee sortingFee, + lww.handling_fee handlingFee, + lww.claiming_value claimingValue, + lww.rebate rebate, + lww.urgency urgency, + lww.receipt_num receiptNum, + lww.receipt receipt, + lww.transport_type transportType, + lww.third_operation_fee thirdOperationFee, + lww.pickup_complete_or_not pickupCompleteOrNot, + lww.trunkline_complete_or_not trunklineCompleteOrNot, + lww.freeze_status freezeStatus, + lww.freeze_user_name freezeUserName, + lww.freeze_time freezeTime, + lww.abolish_status abolishStatus, + lww.abolish_user_name abolishUserName, + lww.abolish_time abolishTime, + lww.sign_num signNum, + lww.sign_user_name signUserName, + lww.sign_time signTime, + lww.sign_check_user_name signCheckUserName, + lww.sign_check_time signCheckTime, + IFNULL(lww.check_status,0) checkStatus, + lww.check_reson checkReson, + lww.check_remark checkRemark, + lww.check_user_name checkUserName, + lww.check_time checkTime from logpm_warehouse_waybill lww - left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 - left join logpm_trunkline_waybill_track ltwt on ltwt.waybill_id = lww.id where lww.is_deleted = 0 and lww.abolish_status = 0 + + and lww.id in (select l.id + from logpm_warehouse_waybill l + left join logpm_trunkline_waybill_track wt on wt.waybill_id = l.id + where (l.departure_warehouse_id in + + #{item} + + or l.destination_warehouse_id in + + #{item} + + or wt.warehouse_id in + + #{item} + ) + group by l.id) + and lww.waybill_no in @@ -355,6 +370,9 @@ and lww.freeze_time <= #{param.freezeTimeEndDate} + + and IFNULL(lww.check_status,0) = #{param.checkStatus} + and lww.destination_warehouse_id in @@ -362,25 +380,6 @@ group by lww.id - - HAVING - - - GROUP_CONCAT(DISTINCT ltwt.warehouse_id) like CONCAT('%',#{item},'%') - - - or GROUP_CONCAT(DISTINCT ltwt.warehouse_id) like CONCAT('%',#{item},'%') - - - or group_concat(lww.departure_warehouse_id) in - - #{item} - - or group_concat(lww.destination_warehouse_id) in - - #{item} - - order by lww.create_time desc @@ -948,15 +947,14 @@ lww.shipper_mobile shipperMobile, lww.shipper_address shipperAddress, lww.consignee consignee, - lbc.client_code consigneeCode, lww.consignee_name consigneeName, lww.consignee_mobile consigneeMobile, lww.consignee_address consigneeAddress, lww.destination destination, lww.departure departure, GROUP_CONCAT(lwwd.product_name) goodsName, - GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum, - GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice, + GROUP_CONCAT(lwwd.num) productNum, + GROUP_CONCAT(lwwd.price) productPrice, lww.cost_piece costPiece, lww.cost_zhang costZhang, lww.cost_num costNum, @@ -1004,10 +1002,27 @@ lww.document_making_time documentMakingTime, lww.create_time createTime from logpm_warehouse_waybill lww - left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 where lww.is_deleted = 0 and lww.abolish_status = 0 + + and lww.id in (select l.id + from logpm_warehouse_waybill l + left join logpm_trunkline_waybill_track wt on wt.waybill_id = l.id + where (l.departure_warehouse_id in + + #{item} + + or l.destination_warehouse_id in + + #{item} + + or wt.warehouse_id in + + #{item} + ) + group by l.id) + and lww.waybill_no in @@ -1152,6 +1167,9 @@ and lww.freeze_time <= #{param.freezeTimeEndDate} + + and IFNULL(lww.check_status,0) = #{param.checkStatus} + and lww.destination_warehouse_id in