diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java index 9119cec13..dae04e97d 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java @@ -29,7 +29,7 @@ public interface BiPlatformRealDataMapper { /** 今日作业任务数 */ Long countTodayTasks(); - /** 车辆状态统计(今日) */ + /** 车辆状态统计(今日,含叫号状态合计 callStatusTotal = 已签到+已叫号+已过号) */ RealVehicleStatusPO queryVehicleStatusToday(); /** 本月任务量 */ diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealVehicleStatusPO.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealVehicleStatusPO.java index 2cc77c420..dabf754e9 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealVehicleStatusPO.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealVehicleStatusPO.java @@ -19,6 +19,9 @@ public class RealVehicleStatusPO implements Serializable { /** 当前等待作业(FLOW_STATUS IN '1','2','3' 已预约/已签到/已叫号) */ private Long waiting; + /** 叫号状态合计:已签到 + 已叫号 + 已过号(FLOW_STATUS IN '2','3','4',预约日期为今天) */ + private Long callStatusTotal; + /** 当前作业中 */ private Long operatingVehicles; 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 1905737fe..d96d17022 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 @@ -16,7 +16,9 @@ import com.mhd.bi.domain.biPlatformSurveillance.repository.mapper.BiPlatformSurv import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper; import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder; import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO; + import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformVehicleItemVO; + import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.TaskLoadItemVO; import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.TaskTypeStatisticsVO; import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.TaskTypeCountItemVO; @@ -106,9 +108,13 @@ public class BiPlatformRealDataService { fp.put("todayReservedVehicles", vo.getVehicleStatus().getTodayReservedVehicles()); fp.put("notCheckedIn", vo.getVehicleStatus().getNotCheckedIn()); fp.put("waiting", vo.getVehicleStatus().getWaiting()); + fp.put("callStatusTotal", vo.getVehicleStatus().getCallStatusTotal()); fp.put("operatingVehicles", vo.getVehicleStatus().getOperatingVehicles()); + + fp.put("completedVehicles", vo.getVehicleStatus().getCompletedVehicles()); } + if (vo.getMonthlyTaskStatistics() != null) { fp.put("taskTotal", vo.getMonthlyTaskStatistics().getTaskTotal()); fp.put("avgTaskDuration", vo.getMonthlyTaskStatistics().getAvgTaskDuration()); @@ -226,6 +232,7 @@ public class BiPlatformRealDataService { if (po.getTodayReservedVehicles() == null) po.setTodayReservedVehicles(0L); if (po.getNotCheckedIn() == null) po.setNotCheckedIn(0L); if (po.getWaiting() == null) po.setWaiting(0L); + if (po.getCallStatusTotal() == null) po.setCallStatusTotal(0L); if (po.getOperatingVehicles() == null) po.setOperatingVehicles(0L); if (po.getCompletedVehicles() == null) po.setCompletedVehicles(0L); return po; @@ -235,10 +242,13 @@ public class BiPlatformRealDataService { po.setTodayReservedVehicles(0L); po.setNotCheckedIn(0L); po.setWaiting(0L); + po.setCallStatusTotal(0L); po.setOperatingVehicles(0L); po.setCompletedVehicles(0L); return po; } + + } public long countMonthTasks() { @@ -404,10 +414,15 @@ public class BiPlatformRealDataService { template.getVehicleStatus().setTodayReservedVehicles(vs.getTodayReservedVehicles().intValue()); template.getVehicleStatus().setNotCheckedIn(vs.getNotCheckedIn().intValue()); template.getVehicleStatus().setWaiting(vs.getWaiting().intValue()); + // 叫号状态合计:已签到 + 已叫号 + 已过号(一个字段表示三个状态的总数量) + template.getVehicleStatus().setCallStatusTotal(vs.getCallStatusTotal().intValue()); template.getVehicleStatus().setOperatingVehicles(vs.getOperatingVehicles().intValue()); + + template.getVehicleStatus().setCompletedVehicles(vs.getCompletedVehicles().intValue()); } + // 本月任务统计:taskTotal / avgTaskDuration / taskCompletionRate 均有真实数据源,无条件覆盖;YoY 保留模板写死值 if (template.getMonthlyTaskStatistics() != null) { template.getMonthlyTaskStatistics().setTaskTotal((int) countMonthTasks()); 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 f4b729e9a..914983d9c 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 @@ -87,7 +87,9 @@ public final class BiReportSnapshotMapperSupport { .platformOverview(PlatformOverviewVO.builder() .totalPlatforms(0).currentOccupancyRate(0d).operatingPlatforms(0).todayTasks(0).build()) .vehicleStatus(VehicleStatusVO.builder() - .todayReservedVehicles(0).notCheckedIn(0).waiting(0).operatingVehicles(0).completedVehicles(0).build()) + .todayReservedVehicles(0).notCheckedIn(0).waiting(0) + .callStatusTotal(0) + .operatingVehicles(0).completedVehicles(0).build()) .avgOperationDurationTrend(Collections.emptyList()) .monthlyTaskStatistics(MonthlyTaskStatisticsVO.builder() .taskTotal(0).taskTotalYoY(0).avgTaskDuration(0d).avgDurationYoY(0) 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 d32603d17..9843ae662 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 @@ -206,8 +206,13 @@ public class BiReportSnapshotSyncService { template.getVehicleStatus().setTodayReservedVehicles(vs.getTodayReservedVehicles().intValue()); template.getVehicleStatus().setNotCheckedIn(vs.getNotCheckedIn().intValue()); template.getVehicleStatus().setWaiting(vs.getWaiting().intValue()); + // 叫号状态合计:已签到 + 已叫号 + 已过号(一个字段表示三个状态的总数量) + template.getVehicleStatus().setCallStatusTotal(vs.getCallStatusTotal() == null ? 0 : vs.getCallStatusTotal().intValue()); template.getVehicleStatus().setOperatingVehicles(vs.getOperatingVehicles().intValue()); + + template.getVehicleStatus().setCompletedVehicles(vs.getCompletedVehicles().intValue()); + } // ====== 真实数据:本月任务统计 taskTotal / avgTaskDuration / taskCompletionRate ====== 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 60b0b4ebd..7b1012c18 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 @@ -155,10 +155,13 @@ public final class BiSnapshotWeeklyRandomDataBuilder { VehicleStatusVO vs = VehicleStatusVO.builder() .todayReservedVehicles(Math.max(0, jitterInt(Baseline.P_RESV, r))) .notCheckedIn(Math.max(0, jitterInt(Baseline.P_NC, r))) + .waiting(Math.max(0, jitterInt(Baseline.P_WAIT, r))) + .callStatusTotal(Math.max(0, jitterInt(Baseline.P_CALL_STATUS_TOTAL, r))) .operatingVehicles(Math.max(0, jitterInt(Baseline.P_OPV, r))) .completedVehicles(Math.max(0, jitterInt(Baseline.P_DONE, r))) .build(); + List avgTrend = new ArrayList<>(); for (int i = 0; i < Baseline.P_MO_LABELS.length; i++) { avgTrend.add(AvgOperationDurationTrendItemVO.builder() @@ -404,6 +407,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder { static final int P_RESV = 2_850; static final int P_NC = 920; static final int P_WAIT = 680; + static final int P_CALL_STATUS_TOTAL = 680; static final int P_OPV = 1_180; static final int P_DONE = 1_420; static final String[] P_MO_LABELS = {"5月", "6月", "7月"}; diff --git a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/vo/platform/VehicleStatusVO.java b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/vo/platform/VehicleStatusVO.java index db6015e93..d4f53884a 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/vo/platform/VehicleStatusVO.java +++ b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/vo/platform/VehicleStatusVO.java @@ -23,6 +23,9 @@ public class VehicleStatusVO { @ApiModelProperty("当前等待作业(已预约/已签到/已叫号),单位:辆") private Integer waiting; + @ApiModelProperty("已签到+已叫号+已过号(FLOW_STATUS IN 2/3/4),单位:辆") + private Integer callStatusTotal; + @ApiModelProperty("当前作业中,单位:辆") private Integer operatingVehicles; diff --git a/mhd-bi/src/main/resources/bootstrap.yml b/mhd-bi/src/main/resources/bootstrap.yml index 2572662c1..fa1d95e1a 100644 --- a/mhd-bi/src/main/resources/bootstrap.yml +++ b/mhd-bi/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: # username: nacos # password: manhuoda@2023 #线上正式环境 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 config: # server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 # server-addr: 10.33.0.129:6010 - server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 diff --git a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml index 03c071e2c..578ae9b27 100644 --- a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml +++ b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml @@ -70,17 +70,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + +