From 4b21002db25335a5a778903841de3df236d71f1c Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 12 Nov 2024 17:58:03 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/trunkline/dto/BillladingDTO.java | 13 ++++++ .../trunkline/vo/LoadingDetailExportVO.java | 6 +++ .../mapper/BasicdataClientMapper.xml | 2 +- .../listener/mq/WaybillCheckListener.java | 44 +++++++++---------- .../mapper/TrunklineBillladingMapper.xml | 12 +++++ .../mapper/TrunklineCarsLoadScanMapper.xml | 7 +-- .../impl/TrunklineBillladingServiceImpl.java | 8 +++- 7 files changed, 65 insertions(+), 27 deletions(-) diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java index 8fe676786..55b6e7dd7 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java @@ -56,4 +56,17 @@ public class BillladingDTO extends TrunklineBillladingEntity { private String completeTime;//目的仓 private Long billladingId; + + private String startTimeStartStr; + private String startTimeEndStr; + + private Date startTimeStart; + private Date startTimeEnd; + + private String completeTimeStartStr; + private String completeTimeEndStr; + + private Date completeTimeStart; + private Date completeTimeEnd; + } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java index 0ebe05a06..41e62b003 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadingDetailExportVO.java @@ -112,4 +112,10 @@ public class LoadingDetailExportVO implements Serializable { @ExcelProperty(value = "卸车托盘") private String unloadTrayName; + @ExcelProperty(value = "物料编码") + private String materialCode; + + @ExcelProperty(value = "物料编码") + private String materialName; + } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml index 38124ac04..50202445b 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml @@ -65,7 +65,7 @@ lbc.blade_region_area_id areaId, lbc.default_payment_methods defaultPayWay from logpm_basicdata_client lbc - left join logpm_basicdata_store_contact lbsc on lbsc.shop_id = lbc.id + left join logpm_basicdata_store_contact lbsc on lbsc.shop_id = lbc.id and lbsc.is_deleted = 0 where lbc.is_deleted = 0 and lbc.client_name like CONCAT('%',#{clientName},'%') 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 d1aea8a28..8bcc233d3 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 @@ -217,12 +217,12 @@ public class WaybillCheckListener { Integer totalCount = waybillEntity.getTotalCount(); // BigDecimal pickupPrice = pickupFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal warehouseManagementPrice = warehouseManagementFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); + BigDecimal warehouseManagementPrice = warehouseManagementFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); BigDecimal trunklineComletPrice; @@ -230,14 +230,14 @@ public class WaybillCheckListener { if(NumberUtil.equals(trunklineCompleteOrNot,1)){ BigDecimal totalFreight = waybillEntity.getTotalFreight(); - trunklineComletPrice = totalFreight.divide(new BigDecimal(totalCount),2, BigDecimal.ROUND_HALF_UP); + trunklineComletPrice = totalFreight.divide(new BigDecimal(totalCount),8, BigDecimal.ROUND_HALF_UP); } else { trunklineComletPrice = BigDecimal.ZERO; } if(NumberUtil.equals(pickupCompleteOrNot,1)){ BigDecimal pickupFee = waybillEntity.getPickupFee(); - trunklinePickupPrice = pickupFee.divide(new BigDecimal(totalCount),2, BigDecimal.ROUND_HALF_UP); + trunklinePickupPrice = pickupFee.divide(new BigDecimal(totalCount),8, BigDecimal.ROUND_HALF_UP); } else { trunklinePickupPrice = BigDecimal.ZERO; } @@ -499,14 +499,14 @@ public class WaybillCheckListener { Integer totalCount = waybillEntity.getTotalCount(); // BigDecimal pickupPrice = pickupFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal warehouseManagementPrice = warehouseManagementFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal sortingPrice = sortingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal deliveryPrice = deliveryFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP); + BigDecimal warehouseManagementPrice = warehouseManagementFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal warehousePrice = warehouseFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal handlingPrice = handlingFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal sortingPrice = sortingFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal deliveryPrice = deliveryFee.divide(new BigDecimal(totalCount), 8, BigDecimal.ROUND_HALF_UP); //查询运单下所有的订单 @@ -632,8 +632,8 @@ public class WaybillCheckListener { trunklinePackageEntity.setPickupChargeType(systemPickupChargeType); trunklinePackageEntity.setSystemPickupChargeType(systemPickupChargeType); - BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量 - BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积 + BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量 + BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积 trunklinePackageEntity.setWeight(Objects.isNull(packageWeight) ? BigDecimal.ZERO : packageWeight); trunklinePackageEntity.setVolume(Objects.isNull(packageVolume) ? BigDecimal.ZERO : packageVolume); @@ -740,8 +740,8 @@ public class WaybillCheckListener { Integer num = warehouseWayBillDetail.getNum();//运单品类的总数量 BigDecimal productTotalVolume = warehouseWayBillDetail.getVolume();//运单品类总体积 - BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量 - BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积 + BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的质量 + BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP);//平摊到包件的体积 warehousePackageEntity.setWeight(packageWeight); warehousePackageEntity.setVolume(packageVolume); @@ -794,8 +794,8 @@ public class WaybillCheckListener { Integer num = warehouseWayBillDetail.getNum(); BigDecimal productTotalVolume = warehouseWayBillDetail.getVolume(); - BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP); - BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 2, BigDecimal.ROUND_HALF_UP); + BigDecimal packageWeight = productTotalWeight.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP); + BigDecimal packageVolume = productTotalVolume.divide(new BigDecimal(num), 8, BigDecimal.ROUND_HALF_UP); distributionPackageEntity.setWeight(packageWeight); distributionPackageEntity.setVolume(packageVolume); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml index 0472cf240..92a5f969a 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml @@ -61,6 +61,18 @@ and ltb.create_user_name = #{param.createUserName} + + and ltb.start_time >= #{param.startTimeStart} + + + and ltb.start_time <= #{param.startTimeEnd} + + + and ltb.end_time >= #{param.completeTimeStart} + + + and ltb.end_time <= #{param.completeTimeEnd} + group by ltb.id order by ltb.create_time desc diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml index 2ed246675..0c5ee9dea 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml @@ -557,8 +557,7 @@ IFNULL(sum(IF(unload_node_id = null,0,unload_num)),0) unloadNum from logpm_trunkline_cars_load_scan where load_id = #{loadId} - and final_node_id = #{nodeId} - and (unload_node_id = #{nodeId} or unload_node_id is null) + and unload_node_id = #{nodeId} and waybill_no is not null group by waybill_no @@ -761,7 +760,9 @@ ltcls.customer_name customerName, ltcls.customer_telephone customerTelephone, ltcls.customer_address customerAddress, - ltcls.unload_tray_name unloadTrayName + ltcls.unload_tray_name unloadTrayName, + ltcls.material_code materialCode, + ltcls.material_name materialName from logpm_trunkline_cars_load_scan ltcls left join logpm_warehouse_waybill lww on ltcls.waybill_id = lww.id where ltcls.load_id = #{param.loadId} diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java index 0edfdf508..deb75f952 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java @@ -61,6 +61,12 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl