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 9fa3ed755..2e4b4e9fa 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 @@ -4,6 +4,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO; 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 java.util.List; @@ -31,4 +32,7 @@ public interface BiPlatformRealDataMapper { /** 任务负荷(今日 24 小时) */ List queryTaskLoadToday(); + + /** 今日预约-业务类型统计(按 businessName 分组统计今日预约数量) */ + List queryTodayBusinessTypeStats(); } \ No newline at end of file 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 efa81e648..073bd6d41 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 @@ -6,6 +6,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO; 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.biPlatformSurveillance.repository.mapper.BiPlatformSurveillanceReportMapper; import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper; import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder; @@ -202,6 +203,19 @@ public class BiPlatformRealDataService { } } + /** + * 今日预约-业务类型统计:按业务类型分组统计今日预约数量。 + * 例:今日预约航空打板 3 条 → 返回 {businessName:"航空打板", count:3} + */ + public List queryTodayBusinessTypeStats() { + try { + return biPlatformRealDataMapper.queryTodayBusinessTypeStats(); + } 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 6bb0ceb34..e0c440b23 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 @@ -4,6 +4,7 @@ import com.mhd.bi.domain.biSnapshotSync.service.BiReportSnapshotSyncService; 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.biOverallOperation.service.BiOverallOperationReportService; import com.mhd.bi.domain.biHkMacaoServiceZone.service.BiHkMacaoServiceZoneReportService; import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService; @@ -30,6 +31,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * BI 报表接口 */ @@ -104,6 +107,16 @@ public class BiReportApi extends BaseController { PlatformSurveillanceVO data = biPlatformRealDataService.buildRealTimePlatformSurveillanceAndPersist(); return BiApiResult.ok(data); } + + /** + * 今日预约-业务类型统计(实时查 YMS 库,不落库) + */ + @ApiOperation(value = "今日预约业务类型统计", notes = "按业务类型分组统计今日预约数量,实时查询 YMS 库,不落库;例:航空打板 3 条") + @GetMapping("/businessTypeStats") + public BiApiResult> businessTypeStats() { + List data = biPlatformRealDataService.queryTodayBusinessTypeStats(); + 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 6397c6612..0808e1907 100644 --- a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml +++ b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml @@ -65,6 +65,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND TO_CHAR(ENTRY_TIME, 'YYYY-MM') = TO_CHAR(SYSDATE, 'YYYY-MM') + + +