BI大屏总体运营态势查询修改

This commit is contained in:
秦鸿展
2026-05-19 17:02:51 +08:00
parent 5d81c89de7
commit 1f08d86746
7 changed files with 28 additions and 59 deletions
@@ -1,5 +1,6 @@
package com.mhd.bi.domain.biOverallOperation.repository.mapper;
import com.mhd.bi.domain.biOverallOperation.support.OverallOperationPayloadNormalizer;
import com.mhd.bi.domain.biReport.support.BiReportSnapshotMapperSupport;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
@@ -11,10 +12,12 @@ public interface BiOverallOperationReportMapper {
String selectLatestPayloadJson();
default OverallOperationSituationVO loadLatestOverallOperation() {
return BiReportSnapshotMapperSupport.parsePayload(
selectLatestPayloadJson(),
String json = OverallOperationPayloadNormalizer.normalizeJson(selectLatestPayloadJson());
OverallOperationSituationVO vo = BiReportSnapshotMapperSupport.parsePayload(
json,
OverallOperationSituationVO.class,
BiReportSnapshotMapperSupport::emptyOverallOperationSituation,
"总体运营态势");
return OverallOperationPayloadNormalizer.ensureDefaults(vo);
}
}
@@ -5,6 +5,7 @@ import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.CustomerContributionRankVO;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.*;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TrTypedChartVO;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.*;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.*;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.*;
@@ -117,7 +118,7 @@ public final class BiReportSnapshotMapperSupport {
.customerCount(0L).coverageArea("")
.annualThroughput(0).throughputUnit("").throughputGrowth(0d)
.build())
.capabilityRanking(Collections.emptyList())
.capabilityRanking(BiWarehouseCapabilityRankingSupport.defaultRanking())
.build())
.map(OverallMapSectionVO.builder().nodes(Collections.emptyList()).build())
.transport(OverallTransportOperationVO.builder()
@@ -133,7 +134,7 @@ public final class BiReportSnapshotMapperSupport {
.freightTrendByMonth(Collections.emptyList())
.orderDistribution(OverallTransportModeDistributionVO.builder()
.crossBorder(0L).domestic(0L).build())
.enterpriseRanking(Collections.emptyList())
.onTimeRate(BiOnTimeDeliveryRateChartSupport.emptyChartShell())
.build())
.build();
}
@@ -1,11 +1,12 @@
package com.mhd.bi.domain.biSnapshotSync.support;
import com.mhd.bi.domain.biReport.support.BiOnTimeDeliveryRateChartSupport;
import com.mhd.bi.domain.biReport.support.BiWarehouseCapabilityRankingSupport;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.CustomerContributionRankVO;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.*;
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.*;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
@@ -242,7 +243,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
/**
* 与产品约定返回值示例一致,供快照同步与联调。
* {@code warehouse.capabilityRanking}{@code transport.enterpriseRanking} 的 {@code name} 为固定展示名,不参与随机抖动
* 左侧 {@code warehouse.capabilityRanking} 仓储运营能力表;右下角 {@code transport.on_time_rate} 准时配送率
*/
public static OverallOperationSituationVO overallReferenceDashboard() {
return OverallOperationSituationVO.builder()
@@ -284,13 +285,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
.throughputUnit("万吨")
.throughputGrowth(8.5)
.build())
.capabilityRanking(Arrays.asList(
OverallWarehouseCapabilityRankVO.builder().rank(1).name("君华仓").processedVolume("2,400单").throughput("5.2万吨").utilizationRate("85%").build(),
OverallWarehouseCapabilityRankVO.builder().rank(2).name("通宇仓").processedVolume("1,800单").throughput("4.1万吨").utilizationRate("78%").build(),
OverallWarehouseCapabilityRankVO.builder().rank(3).name("横琴仓").processedVolume("1,200单").throughput("3.5万吨").utilizationRate("92%").build(),
OverallWarehouseCapabilityRankVO.builder().rank(4).name("新南仓").processedVolume("800单").throughput("2.2万吨").utilizationRate("65%").build(),
OverallWarehouseCapabilityRankVO.builder().rank(5).name("谷丰仓").processedVolume("567单").throughput("1.8万吨").utilizationRate("45%").build()
))
.capabilityRanking(BiWarehouseCapabilityRankingSupport.defaultRanking())
.build())
.map(OverallMapSectionVO.builder()
.nodes(Arrays.asList(
@@ -361,13 +356,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
.crossBorder(2400L)
.domestic(2300L)
.build())
.enterpriseRanking(Arrays.asList(
OverallTransportEnterpriseRankVO.builder().rank(1).name("通宇").processedVolume("2,400单").freight("5.2万吨").onTimeRate("85%").build(),
OverallTransportEnterpriseRankVO.builder().rank(2).name("南岐").processedVolume("1,800单").freight("4.1万吨").onTimeRate("78%").build(),
OverallTransportEnterpriseRankVO.builder().rank(3).name("谷丰").processedVolume("1,200单").freight("3.5万吨").onTimeRate("92%").build(),
OverallTransportEnterpriseRankVO.builder().rank(4).name("仓码").processedVolume("800单").freight("2.2万吨").onTimeRate("65%").build(),
OverallTransportEnterpriseRankVO.builder().rank(5).name("横琴").processedVolume("567单").freight("1.8万吨").onTimeRate("45%").build()
))
.onTimeRate(BiOnTimeDeliveryRateChartSupport.defaultChart())
.build())
.build();
}