xiaoyi
2 天以前 b5e1bceabb36fe1d1e5e88397280d12e7044c6dd
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/collect/MesCollectController.java
@@ -18,6 +18,8 @@
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@@ -30,6 +32,16 @@
    @Resource
    private MesCollectQueryService queryService;
    @GetMapping("/offline/intervals")
    @Operation(summary = "查询数采离线停机区间")
    @PreAuthorize("@ss.hasPermission('mes:collect:query')")
    public CommonResult<MesCollectOfflineResultRespVO> getOfflineIntervals(
            @RequestParam("deviceCode") String deviceCode,
            @RequestParam("startTime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
            @RequestParam("endTime") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
        return success(queryService.getOfflineIntervals(deviceCode, startTime, endTime));
    }
    @GetMapping("/device/list")
    @Operation(summary = "获取数采设备状态列表")
    @PreAuthorize("@ss.hasPermission('mes:collect:query')")