From f58691615b9ebb9a081e9a591d5bfa9fb8b4106f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com>
Date: Mon, 10 Aug 2026 21:01:04 +0800
Subject: [PATCH] =?UTF-8?q?BI=E6=9C=88=E5=8F=B0=E5=8A=A8=E6=80=81=E7=9C=9F?=
=?UTF-8?q?=E5=AE=9E=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/BiPlatformRealDataService.java | 26 +++++++++++++++++--
.../BiReportSnapshotMapperSupport.java | 2 +-
.../service/BiReportSnapshotSyncService.java | 2 +-
.../BiSnapshotWeeklyRandomDataBuilder.java | 2 +-
.../BiPlatformRealDataMapper.xml | 13 +++++-----
5 files changed, 34 insertions(+), 11 deletions(-)
diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java
index 6ac8d082a..a3c52b08d 100644
--- a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java
+++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java
@@ -122,7 +122,7 @@ public class BiPlatformRealDataService {
v.setAppointmentTime(rv.getAppointmentTime());
v.setWorkFloor(rv.getWorkFloor());
v.setPlateNumber(rv.getPlateNumber());
- v.setStatus(rv.getStatus());
+ v.setStatus(translateFlowStatus(rv.getStatus()));
v.setPlatformId(rv.getPlatformId());
v.setPlatformDuration(rv.getPlatformDuration() == null ? 0 : rv.getPlatformDuration().intValue());
vehicleVos.add(v);
@@ -138,7 +138,7 @@ public class BiPlatformRealDataService {
template.getPlatformOverview().setOperatingPlatforms(ov.getOperatingPlatforms().intValue());
int total = ov.getTotalPlatforms().intValue();
int occ = ov.getOperatingPlatforms().intValue();
- int rate = total > 0 ? (int) Math.round(((double) occ / total) * 100.0) : 0;
+ double rate = total > 0 ? Math.round(((double) occ / total) * 100.0 * 100.0) / 100.0 : 0d;
template.getPlatformOverview().setCurrentOccupancyRate(rate);
}
long todayTasks = countTodayTasks();
@@ -189,4 +189,26 @@ public class BiPlatformRealDataService {
return null;
}
}
+
+ /**
+ * FLOW_STATUS 数字转中文:1已预约 2已签到 3已叫号 4已过号 5已进场 6已称重 7已装车 8二次称重 9已结算 10已还卡 11已出场 12已取消
+ */
+ private static String translateFlowStatus(String flowStatus) {
+ if (flowStatus == null) return null;
+ switch (flowStatus.trim()) {
+ case "1": return "已预约";
+ case "2": return "已签到";
+ case "3": return "已叫号";
+ case "4": return "已过号";
+ case "5": return "已进场";
+ case "6": return "已称重";
+ case "7": return "已装车";
+ case "8": return "二次称重";
+ case "9": return "已结算";
+ case "10": return "已还卡";
+ case "11": return "已出场";
+ case "12": return "已取消";
+ default: return flowStatus;
+ }
+ }
}
\ No newline at end of file
diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biReport/support/BiReportSnapshotMapperSupport.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biReport/support/BiReportSnapshotMapperSupport.java
index 435c6108f..b3ac1ac64 100644
--- a/mhd-bi/src/main/java/com/mhd/bi/domain/biReport/support/BiReportSnapshotMapperSupport.java
+++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biReport/support/BiReportSnapshotMapperSupport.java
@@ -85,7 +85,7 @@ public final class BiReportSnapshotMapperSupport {
.entryOvertimeRate(0).overtimeCount(0).platformOnTimeRate(0)
.avgPlatformDuration(0d).yardOnTimeRate(0).avgYardDuration(0d).build())
.platformOverview(PlatformOverviewVO.builder()
- .totalPlatforms(0).currentOccupancyRate(0).operatingPlatforms(0).todayTasks(0).build())
+ .totalPlatforms(0).currentOccupancyRate(0d).operatingPlatforms(0).todayTasks(0).build())
.vehicleStatus(VehicleStatusVO.builder()
.todayReservedVehicles(0).notCheckedIn(0).operatingVehicles(0).completedVehicles(0).build())
.avgOperationDurationTrend(Collections.emptyList())
diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/service/BiReportSnapshotSyncService.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/service/BiReportSnapshotSyncService.java
index ea997db21..6df016cbf 100644
--- a/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/service/BiReportSnapshotSyncService.java
+++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/service/BiReportSnapshotSyncService.java
@@ -178,7 +178,7 @@ public class BiReportSnapshotSyncService {
template.getPlatformOverview().setOperatingPlatforms(ov.getOperatingPlatforms().intValue());
int total = ov.getTotalPlatforms().intValue();
int occ = ov.getOperatingPlatforms().intValue();
- int rate = total > 0 ? (int) Math.round(((double) occ / total) * 100.0) : 0;
+ double rate = total > 0 ? Math.round(((double) occ / total) * 100.0 * 100.0) / 100.0 : 0d;
template.getPlatformOverview().setCurrentOccupancyRate(rate);
}
long todayTasks = biPlatformRealDataService.countTodayTasks();
diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/support/BiSnapshotWeeklyRandomDataBuilder.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/support/BiSnapshotWeeklyRandomDataBuilder.java
index e34d40d82..79f0cdd1a 100644
--- a/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/support/BiSnapshotWeeklyRandomDataBuilder.java
+++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/support/BiSnapshotWeeklyRandomDataBuilder.java
@@ -147,7 +147,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
PlatformOverviewVO overview = PlatformOverviewVO.builder()
.totalPlatforms(Math.max(1, jitterInt(Baseline.P_TOT_PL, r)))
- .currentOccupancyRate(jitterPercentInt(Baseline.P_OCC, r))
+ .currentOccupancyRate((double) jitterPercentInt(Baseline.P_OCC, r))
.operatingPlatforms(Math.max(0, jitterInt(Baseline.P_OP, r)))
.todayTasks(Math.max(0, jitterInt(Baseline.P_TASKS, r)))
.build();
diff --git a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml
index dd90d6dc8..6397c6612 100644
--- a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml
+++ b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml
@@ -30,11 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY mb.CREATE_TIME DESC
-
+
@@ -46,13 +46,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND TRUNC(ENTRY_TIME) = TRUNC(SYSDATE)
-
+