zxl
2025-04-22 f0a6462c539e217186d6fee31dfec6d2aba2e92a
ycl-server/src/main/java/com/ycl/platform/controller/DataCenterController.java
@@ -1,14 +1,20 @@
package com.ycl.platform.controller;
import annotation.Log;
import com.ycl.platform.domain.form.UpdateDynamicValueForm;
import com.ycl.platform.domain.query.DataCenterQuery;
import com.ycl.platform.service.DataCenterService;
import com.ycl.platform.service.ITMonitorService;
import com.ycl.platform.service.PlatformOnlineService;
import com.ycl.system.Result;
import enumeration.BusinessType;
import io.swagger.annotations.ApiOperation;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
/**
 * 数据中心接口
@@ -38,7 +44,26 @@
        query.setTime();
        return monitorService.assetManagement(query);
    }
    /**
     * 资产管理统计
     *
     * @param query
     * @return
     */
    @GetMapping("/assetManagement/count")
    @ApiOperation(value = "资产管理统计", notes = "资产管理统计")
    @PreAuthorize("@ss.hasPermi('assetManagement:page')")
    public Result assetManagementCount(DataCenterQuery query) {
        query.setTime();
        return monitorService.assetManagementCount(query);
    }
    @DeleteMapping("/assetManagement/clear")
    @ApiOperation(value = "清理一机一档", notes = "清理一机一档")
    @PreAuthorize("@ss.hasPermi('point:remove')")
    @Log(title = "清理一机一档", businessType = BusinessType.DELETE)
    public Result clear() {
        return monitorService.clearMonitor();
    }
    /**
     * 平台在线率
     *
@@ -110,7 +135,7 @@
    @PostMapping("/videoMinistrySiteOnline")
    public Result videoMinistrySiteOnline(@RequestBody DataCenterQuery query) {
        query.setTime();
        return dataCenterService.videoPointOnlineRate(query);
        return dataCenterService.deptVideoPointOnlineRate(query);
    }
    /**
@@ -122,9 +147,14 @@
    @PostMapping("/videoMinistryVideoAvailable")
    public Result videoMinistryVideoAvailable(@RequestBody DataCenterQuery query) {
        query.setTime();
        // TODO 做部级数据区分
        return dataCenterService.videoLabelingAccuracy(query);
        return dataCenterService.deptVideoAvailabilityRate(query);
    }
    @PutMapping("/videoMinistryVideoAvailable/updateDynamicValue")
    public Result updateDynamicValue(@RequestBody UpdateDynamicValueForm form){
        return dataCenterService.updateDynamicValue(form);
    }
    /**
     * 视频:录像可用率
@@ -162,8 +192,44 @@
        return dataCenterService.videoImportantPointLabelingAccuracy(query);
    }
    @PostMapping("/recordingAvailability/export")
    public void recordingAvailabilityExport(HttpServletResponse response,DataCenterQuery query) throws IOException {
        query.setTime();
        dataCenterService.recordingAvailabilityExport(response, query);
    }
    @PostMapping("/pointOnlineVideo/export")
    public void pointOnlineVideoExport(HttpServletResponse response,DataCenterQuery query) throws IOException {
        query.setTime();
        dataCenterService.pointOnlineVideoExport(response,query);
    }
    @PostMapping("/pointOnlineCar/export")
    public void pointOnlineCarExport(HttpServletResponse response,DataCenterQuery query) throws IOException {
        query.setTime();
        dataCenterService.pointOnlineCarExport(response,query);
    }
    @PostMapping("/pointOnlineFace/export")
    public void pointOnlineFaceExport(HttpServletResponse response,DataCenterQuery query) throws IOException {
        query.setTime();
        dataCenterService.pointOnlineFaceExport(response,query);
    }
    /**
     * 视频:校时正确率
     * 视频:导出重点点位标注正确率
     *
     * @param query
     * @return
     */
    @PostMapping("/videoImportantPointLabelingAccuracy/export")
    public void videoImportantPointLabelingAccuracyExport(HttpServletResponse response,DataCenterQuery query) {
        query.setTime();
        dataCenterService.videoImportantPointLabelingAccuracyExport(response,query);
    }
    /**
     * 视频:校时正确率 (新规则已经弃用)
     *
     * @param query
     * @return