BI月台动态真实数据

This commit is contained in:
秦鸿展
2026-08-10 21:01:04 +08:00
parent 15fdace0bc
commit f58691615b
5 changed files with 34 additions and 11 deletions
@@ -30,11 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY mb.CREATE_TIME DESC
</select>
<!-- 月台概览:totalPlatforms(总条数)、operatingPlatforms(作业状态=占用/作业中 -->
<!-- 月台概览:totalPlatforms(总条数)、operatingPlatforms(作业状态=占用JOB_STATUS: 0空闲 1占用 -->
<select id="queryPlatformOverview" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO">
SELECT
COUNT(1) AS totalPlatforms,
SUM(CASE WHEN JOB_STATUS = 2 THEN 1 ELSE 0 END) AS operatingPlatforms
SUM(CASE WHEN JOB_STATUS = 1 THEN 1 ELSE 0 END) AS operatingPlatforms
FROM NGWL_TEST_YMS.QMS_WINDOW_INFO
</select>
@@ -46,13 +46,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND TRUNC(ENTRY_TIME) = TRUNC(SYSDATE)
</select>
<!-- 车辆状态统计:今日的统计(按创建时间 / 流程状态) -->
<!-- 车辆状态统计:今日的统计(按创建时间 / 流程状态)
FLOW_STATUS: 1已预约 2已签到 3已叫号 4已过号 5已进场 6已称重 7已装车 8二次称重 9已结算 10已还卡 11已出场 12已取消 -->
<select id="queryVehicleStatusToday" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO">
SELECT
SUM(CASE WHEN TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS todayReservedVehicles,
SUM(CASE WHEN FLOW_STATUS = '已预约' AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS notCheckedIn,
SUM(CASE WHEN FLOW_STATUS IN ('已进场','已称重','已装车','二次称重','已结算','已还卡') AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS operatingVehicles,
SUM(CASE WHEN FLOW_STATUS = '已出场' AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS completedVehicles
SUM(CASE WHEN FLOW_STATUS = '1' AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS notCheckedIn,
SUM(CASE WHEN FLOW_STATUS IN ('5','6','7','8','9','10') AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS operatingVehicles,
SUM(CASE WHEN FLOW_STATUS = '11' AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS completedVehicles
FROM NGWL_TEST_YMS.QMS_MAIN_BUSINESS
</select>