From b5b49d2e637f497a42fb43ac5ee193a9de6d00dc Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Wed, 8 Jan 2025 18:52:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E7=9A=84=E6=9F=A5=E8=AF=A2=E6=97=B6=E9=97=B4=20=E4=B8=8D?= =?UTF-8?q?=E7=84=B6=E6=B2=A1=E6=95=B0=E6=8D=AE=20=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E9=9C=80=E8=A6=81=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/LogpmDataSearchServiceImpl.java | 1 - .../largeScreen/BusinessRatioMapper.xml | 4 ++- .../impl/BillingDataServiceImpl.java | 32 ++++++++++++------- .../impl/BusinessRationServiceImpl.java | 8 +++-- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java index 1b30ddc42..882e71a63 100644 --- a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java +++ b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java @@ -219,7 +219,6 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { private WaybillInfoVO dataWEaybill(String waybillNo) { WaybillInfoVO result = new WaybillInfoVO(); - // todo 查询运单 WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(waybillNo); if (Objects.isNull(byWaybillNo)) { throw new CustomerException("运单信息不存在~"); diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BusinessRatioMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BusinessRatioMapper.xml index 9362ed39a..981d3a740 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BusinessRatioMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BusinessRatioMapper.xml @@ -14,7 +14,9 @@ brand as name, SUM(total_count) as value from logpm_platform.logpm_warehouse_waybill - where create_time between #{startTime} and #{endTime} + where create_time between #{startTime} and #{endTime} and brand is not null and brand != '' group by brand + order by SUM(total_count) desc + limit 5 diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BillingDataServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BillingDataServiceImpl.java index b5e8ffedf..b86bc8e89 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BillingDataServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BillingDataServiceImpl.java @@ -30,18 +30,18 @@ public class BillingDataServiceImpl implements IBillingDataService { public BillingDataVO getBillingData() { // 今天的数据 BillingDataInfoVO today = billingDataMapper.getBillingData( - DateUtil.format(new Date(), "yyyy-MM-dd 00:00:00"), - DateUtil.format(new Date(), "yyyy-MM-dd 23:59:59") + DateUtil.format(new Date(), "2024-MM-dd 00:00:00"), + DateUtil.format(new Date(), "2024-MM-dd 23:59:59") ); // 当月的数据 BillingDataInfoVO month = billingDataMapper.getBillingData( - DateUtil.format(new Date(), "yyyy-MM-01 00:00:00"), - DateUtil.format(new Date(), "yyyy-MM-31 23:59:59") + DateUtil.format(new Date(), "2024-MM-01 00:00:00"), + DateUtil.format(new Date(), "2024-MM-31 23:59:59") ); // 年的数据 BillingDataInfoVO year = billingDataMapper.getBillingData( - DateUtil.format(new Date(), "yyyy-01-01 00:00:00"), - DateUtil.format(new Date(), "yyyy-12-31 23:59:59") + DateUtil.format(new Date(), "2024-01-01 00:00:00"), + DateUtil.format(new Date(), "2024-12-31 23:59:59") ); BillingDataVO billingDataVO = new BillingDataVO(); @@ -55,9 +55,14 @@ public class BillingDataServiceImpl implements IBillingDataService { @Override public List getWarehouseBillingData() { List warehouselist = mapWarehouseMapper.warehouselist(); +// List warehouseBillingData = billingDataMapper.getWarehouseBillingData( +// DateUtil.format(new Date(), "yyyy-01-01 00:00:00"), +// DateUtil.format(new Date(), "yyyy-12-31 23:59:59") +// ); + List warehouseBillingData = billingDataMapper.getWarehouseBillingData( - DateUtil.format(new Date(), "yyyy-01-01 00:00:00"), - DateUtil.format(new Date(), "yyyy-12-31 23:59:59") + DateUtil.format(new Date(), "2024-01-01 00:00:00"), + DateUtil.format(new Date(), "2024-12-31 23:59:59") ); Map warehouseBillingDataMap = warehouselist.stream().collect(Collectors.toMap(WarehouseInfoVO::getWarehouseId, v -> v)); @@ -80,9 +85,14 @@ public class BillingDataServiceImpl implements IBillingDataService { @Override public List getMonthBillingData() { - return billingDataMapper.getMonthBillingData( - DateUtil.format(new Date(), "yyyy-01-01 00:00:00"), - DateUtil.format(new Date(), "yyyy-12-31 23:59:59") +// return billingDataMapper.getMonthBillingData( +// DateUtil.format(new Date(), "yyyy-01-01 00:00:00"), +// DateUtil.format(new Date(), "yyyy-12-31 23:59:59") +// ); + + return billingDataMapper.getMonthBillingData( + DateUtil.format(new Date(), "2024-01-01 00:00:00"), + DateUtil.format(new Date(), "2024-12-31 23:59:59") ); } } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BusinessRationServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BusinessRationServiceImpl.java index cbb347680..4bc32558b 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BusinessRationServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BusinessRationServiceImpl.java @@ -19,10 +19,14 @@ public class BusinessRationServiceImpl implements IBusinessRationService { private final BusinessRatioMapper businessRatioMapper; + @Override public BusinessRatioDataVO getBusinessRatioData() { - String startTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-01-01 00:00:00")); - String endTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-12-31 23:59:59")); +// String startTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-01-01 00:00:00")); +// String endTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-12-31 23:59:59")); + + String startTime = "2024-01-01 00:00:00"; + String endTime = "2024-12-31 23:59:59"; BusinessRatioDataVO businessRatioDataVO = new BusinessRatioDataVO(); businessRatioDataVO.setType(businessRatioMapper.getTypeData(startTime, endTime));