package com.yfd.platform.modules.algorithm.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yfd.platform.config.ResponseResult;
import com.yfd.platform.modules.algorithm.domain.AlgorithmLogs;
import com.yfd.platform.modules.algorithm.service.IAlgorithmLogsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhengsl
 * @since 2025-05-20
 */
@RestController
@RequestMapping("/algorithm/algorithm-logs")
@Api(value = "AlgorithmLogsController", tags = "算法分析日志")
public class AlgorithmLogsController {

    @Resource
    private IAlgorithmLogsService algorithmLogsService;

    // 算法分类，区域，间隔，部件
    @GetMapping("/getAlgorithmLogsPage")
    @ApiOperation("分页查询算法分析日志")
    public ResponseResult getAlgorithmLogsPage(String stationCode, String algorithmId, String areaId, String bayId,
                                               String mainDeviceId, String componentId, String componentName,
                                               Page<AlgorithmLogs> page) {
        Page<AlgorithmLogs> pageMaps = algorithmLogsService.getAlgorithmLogsPage(stationCode, algorithmId, areaId,
                bayId, mainDeviceId, componentId, componentName, page);
        return ResponseResult.successData(pageMaps);
    }

}
