From 8fe5e079ddbef9c75e7b501688d6bb0153504030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Wed, 26 Aug 2026 00:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9C=88=E5=8F=B0=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E6=A5=BC=E5=B1=82=E8=BD=A6=E8=BE=86=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/BiPlatformRealDataMapper.java | 4 +++ .../po/RealPlatformFloorStatPO.java | 26 +++++++++++++++++++ .../service/BiPlatformRealDataService.java | 14 ++++++++++ .../facadeApi/biReport/BiReportApi.java | 11 ++++++++ .../BiPlatformRealDataMapper.xml | 22 ++++++++++++++++ 5 files changed, 77 insertions(+) create mode 100644 mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealPlatformFloorStatPO.java 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 2e4b4e9fa..1f283297c 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 @@ -5,6 +5,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO import com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO; +import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO; import java.util.List; @@ -35,4 +36,7 @@ public interface BiPlatformRealDataMapper { /** 今日预约-业务类型统计(按 businessName 分组统计今日预约数量) */ List queryTodayBusinessTypeStats(); + + /** 月台监控-按楼层统计月台车辆(楼层、月台数量、今日预约车辆、当前作业车辆) */ + List queryPlatformFloorStats(); } \ No newline at end of file diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealPlatformFloorStatPO.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealPlatformFloorStatPO.java new file mode 100644 index 000000000..c3c600faf --- /dev/null +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealPlatformFloorStatPO.java @@ -0,0 +1,26 @@ +package com.mhd.bi.domain.biPlatformRealData.repository.po; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 月台监控-月台车辆统计(按楼层分组) + * 数据来源:TEST_NGWL_YMS.QMS_WINDOW_INFO(楼层+月台)与 QMS_MAIN_BUSINESS(当日预约/作业) + */ +@Data +public class RealPlatformFloorStatPO implements Serializable { + private static final long serialVersionUID = 1L; + + /** 楼层(从叫号月台 WINDOW_NAME 解析,如 S1-01 -> F1) */ + private String floorNo; + + /** 该楼层的月台数量 */ + private Long platformCount; + + /** 今日预约车辆数(按 WINDOW_NAME 关联楼层) */ + private Long todayReservedVehicles; + + /** 当前作业车辆数(FLOW_STATUS IN 5,6,7,8,9,10) */ + 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 073bd6d41..9e2470dc6 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 @@ -7,6 +7,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO import com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO; +import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO; import com.mhd.bi.domain.biPlatformSurveillance.repository.mapper.BiPlatformSurveillanceReportMapper; import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper; import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder; @@ -216,6 +217,19 @@ public class BiPlatformRealDataService { } } + /** + * 月台监控-按楼层统计月台车辆:返回 {floorNo, platformCount, todayReservedVehicles, operatingVehicles} + * 实时查 YMS 库,不落库。 + */ + public List queryPlatformFloorStats() { + try { + return biPlatformRealDataMapper.queryPlatformFloorStats(); + } catch (Exception e) { + log.error("【YMS】月台监控按楼层统计失败: {}", e.getMessage(), e); + return java.util.Collections.emptyList(); + } + } + /** * 实时组装月台监测数据:真实字段查 YMS 库,写死字段保留静态值。 * 每次调用实时查库,不经过快照表。 diff --git a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java index e0c440b23..0375dc7d6 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java +++ b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java @@ -5,6 +5,7 @@ import com.mhd.bi.domain.biComprehensive.service.BiComprehensiveReportService; import com.mhd.bi.domain.biPlatformSurveillance.service.BiPlatformSurveillanceReportService; import com.mhd.bi.domain.biPlatformRealData.service.BiPlatformRealDataService; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO; +import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO; import com.mhd.bi.domain.biOverallOperation.service.BiOverallOperationReportService; import com.mhd.bi.domain.biHkMacaoServiceZone.service.BiHkMacaoServiceZoneReportService; import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService; @@ -117,6 +118,16 @@ public class BiReportApi extends BaseController { List data = biPlatformRealDataService.queryTodayBusinessTypeStats(); return BiApiResult.ok(data); } + + /** + * 月台监控-按楼层统计月台车辆(实时查 YMS 库,不落库) + */ + @ApiOperation(value = "月台车辆统计(按楼层)", notes = "按楼层统计月台数量、今日预约车辆、当前作业车辆,实时查询 YMS 库,不落库") + @GetMapping("/platformFloorStats") + public BiApiResult> platformFloorStats() { + List data = biPlatformRealDataService.queryPlatformFloorStats(); + return BiApiResult.ok(data); + } //园区物流大屏接口---------------------------------------------------------------------- /** * 总体运营态势 diff --git a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml index 826d95d47..4fc383635 100644 --- a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml +++ b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml @@ -77,6 +77,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY COUNT(1) DESC + + +