BI查询修改

This commit is contained in:
秦鸿展
2026-05-08 10:00:11 +08:00
parent ab7534e134
commit 5539a7c39b
9 changed files with 109 additions and 46 deletions
@@ -12,7 +12,7 @@ import java.util.Collections;
import java.util.function.Supplier;
/**
* Mapper 层使用的快照 JSON 解析与空态(SQL 仅定义在对应 Mapper.xml
* Mapper 层使用的快照 JSON 解析与空态(SQL 仅定义在对应 Mapper.xml;查询条件见各 XMLDEL_FLAG=1,按 CREATE_TIME 取最新
*/
@Slf4j
public final class BiReportSnapshotMapperSupport {
@@ -38,9 +38,9 @@ public class BiReportApi extends BaseController {
/**
* 综合态势指标查询
* 综合态势指标查询(按照 del_flag=1,按 create_time 最新一条)
*/
@ApiOperation("综合态势指标查询")
@ApiOperation(value = "综合态势指标查询", notes = "返回 DEL_FLAG=1 且 CREATE_TIME 最新的一条")
@GetMapping("/comprehensive")
public BiApiResult<ComprehensiveSituationVO> comprehensive() {
ComprehensiveSituationVO data = biComprehensiveReportService.loadLatestComprehensive();
@@ -48,9 +48,9 @@ public class BiReportApi extends BaseController {
}
/**
* 仓储运输指标查询
* 仓储运输指标查询(按照 del_flag=1,按 create_time 最新一条)
*/
@ApiOperation("仓储运输指标查询")
@ApiOperation(value = "仓储运输指标查询", notes = "返回 DEL_FLAG=1 且 CREATE_TIME 最新的一条")
@GetMapping("/warehouseTransport")
public BiApiResult<WarehouseTransportSituationVO> warehouseTransport() {
WarehouseTransportSituationVO data = biWarehouseTransportReportService.loadLatestWarehouseTransport();
@@ -58,9 +58,9 @@ public class BiReportApi extends BaseController {
}
/**
* 月台监测指标查询
* 月台监测指标查询(按照 del_flag=1,按 create_time 最新一条)
*/
@ApiOperation("月台监测指标查询")
@ApiOperation(value = "月台监测指标查询", notes = "返回 DEL_FLAG=1 且 CREATE_TIME 最新的一条快照")
@GetMapping("/platformSurveillance")
public BiApiResult<PlatformSurveillanceVO> platformSurveillance() {
PlatformSurveillanceVO data = biPlatformSurveillanceReportService.loadLatestPlatformSurveillance();
@@ -5,8 +5,9 @@
<select id="selectLatestPayloadJson" resultType="java.lang.String">
select PAYLOAD_JSON
from BI_COMPREHENSIVE_SNAPSHOT
order by UPDATE_TIME desc, ID desc
from NGWL_TEST_BI.BI_COMPREHENSIVE_SNAPSHOT
where DEL_FLAG = 1
order by CREATE_TIME desc nulls last, ID desc
limit 1
</select>
</mapper>
@@ -5,8 +5,9 @@
<select id="selectLatestPayloadJson" resultType="java.lang.String">
select PAYLOAD_JSON
from BI_PLATFORM_SURVEILLANCE_SNAPSHOT
order by UPDATE_TIME desc, ID desc
from NGWL_TEST_BI.BI_PLATFORM_SURVEILLANCE_SNAPSHOT
where DEL_FLAG = 1
order by CREATE_TIME desc nulls last, ID desc
limit 1
</select>
</mapper>
@@ -5,8 +5,9 @@
<select id="selectLatestPayloadJson" resultType="java.lang.String">
select PAYLOAD_JSON
from BI_WAREHOUSE_TRANSPORT_SNAPSHOT
order by UPDATE_TIME desc, ID desc
from NGWL_TEST_BI.BI_WAREHOUSE_TRANSPORT_SNAPSHOT
where DEL_FLAG = 1
order by CREATE_TIME desc nulls last, ID desc
limit 1
</select>
</mapper>