BI定时任务修改

This commit is contained in:
秦鸿展
2026-05-08 23:09:56 +08:00
parent 999bd1de3e
commit 1afddbe531
8 changed files with 487 additions and 10 deletions
@@ -1,5 +1,6 @@
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.biWarehouseTransport.service.BiWarehouseTransportReportService;
@@ -14,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -36,6 +38,16 @@ public class BiReportApi extends BaseController {
@Autowired
private BiPlatformSurveillanceReportService biPlatformSurveillanceReportService;
@Autowired
private BiReportSnapshotSyncService biReportSnapshotSyncService;
@ApiOperation(value = "手动触发快照同步", notes = "立即写入三张快照表;须带 X-BI-Access-Token")
@PostMapping("/snapshotSync/run")
public BiApiResult<Void> runSnapshotSyncOnce() {
biReportSnapshotSyncService.syncAllSnapshots();
return BiApiResult.ok(null);
}
/**
* 综合态势指标查询(按照 del_flag=1,按 create_time 最新一条)