Browse Source

fix:修改大屏的查询时间 不然没数据 正式上线需要还原

dev
pref_mail@163.com 2 weeks ago
parent
commit
b5b49d2e63
  1. 1
      blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java
  2. 4
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BusinessRatioMapper.xml
  3. 32
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BillingDataServiceImpl.java
  4. 8
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/BusinessRationServiceImpl.java

1
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("运单信息不存在~");

4
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
</select>
</mapper>

32
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<WarehouseBillingDataVO> getWarehouseBillingData() {
List<WarehouseInfoVO> warehouselist = mapWarehouseMapper.warehouselist();
// List<WarehouseBillingDataVO> warehouseBillingData = billingDataMapper.getWarehouseBillingData(
// DateUtil.format(new Date(), "yyyy-01-01 00:00:00"),
// DateUtil.format(new Date(), "yyyy-12-31 23:59:59")
// );
List<WarehouseBillingDataVO> 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<Long, WarehouseInfoVO> warehouseBillingDataMap = warehouselist.stream().collect(Collectors.toMap(WarehouseInfoVO::getWarehouseId, v -> v));
@ -80,9 +85,14 @@ public class BillingDataServiceImpl implements IBillingDataService {
@Override
public List<MonthBillingDataVO> 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")
);
}
}

8
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));

Loading…
Cancel
Save