总体运营态势接口查询
This commit is contained in:
@@ -3,10 +3,12 @@ package com.mhd.bi.interfaces.facadeApi.biReport;
|
||||
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.biOverallOperation.service.BiOverallOperationReportService;
|
||||
import com.mhd.bi.domain.biWarehouseTransport.service.BiWarehouseTransportReportService;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.dto.BiApiResult;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -38,11 +40,14 @@ public class BiReportApi extends BaseController {
|
||||
@Autowired
|
||||
private BiPlatformSurveillanceReportService biPlatformSurveillanceReportService;
|
||||
|
||||
@Autowired
|
||||
private BiOverallOperationReportService biOverallOperationReportService;
|
||||
|
||||
@Autowired
|
||||
private BiReportSnapshotSyncService biReportSnapshotSyncService;
|
||||
|
||||
|
||||
@ApiOperation(value = "手动触发快照同步", notes = "立即写入三张快照表;须带 X-BI-Access-Token")
|
||||
@ApiOperation(value = "手动触发快照同步", notes = "立即写入各 BI 快照表(综合、仓储运输、月台监测、总体运营);须带 X-BI-Access-Token")
|
||||
@PostMapping("/snapshotSync/run")
|
||||
public BiApiResult<Void> runSnapshotSyncOnce() {
|
||||
biReportSnapshotSyncService.syncAllSnapshots();
|
||||
@@ -78,4 +83,14 @@ public class BiReportApi extends BaseController {
|
||||
PlatformSurveillanceVO data = biPlatformSurveillanceReportService.loadLatestPlatformSurveillance();
|
||||
return BiApiResult.ok(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 总体运营态势
|
||||
*/
|
||||
@ApiOperation(value = "总体运营态势查询", notes = "返回 DEL_FLAG=1 且 CREATE_TIME 最新的一条整包 JSON 解析结果")
|
||||
@GetMapping("/overallOperation")
|
||||
public BiApiResult<OverallOperationSituationVO> overallOperation() {
|
||||
OverallOperationSituationVO data = biOverallOperationReportService.loadLatestOverallOperation();
|
||||
return BiApiResult.ok(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* BI 接口统一响应(与前端约定:message 字段)
|
||||
* BI 接口统一响应(与前端示例:code + msg + data)
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@@ -14,11 +14,11 @@ public class BiApiResult<T> {
|
||||
|
||||
private int code = 200;
|
||||
|
||||
private String message = "success";
|
||||
private String msg = "操作成功";
|
||||
|
||||
private T data;
|
||||
|
||||
public static <T> BiApiResult<T> ok(T data) {
|
||||
return new BiApiResult<>(200, "success", data);
|
||||
return new BiApiResult<>(200, "操作成功", data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user