package com.njcn.csharmonic.controller;

import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.csharmonic.param.AbnormalDataParam;
import com.njcn.csharmonic.pojo.vo.AnomalousDataVo;
import com.njcn.csharmonic.service.AnomalousDataService;
import com.njcn.event.file.pojo.dto.WaveDataDTO;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 类的介绍：数据清洗控制层
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2024/4/3 13:56
 */
@Slf4j
@RestController
@RequestMapping("/clean")
@Api(tags = "数据清洗")
@AllArgsConstructor
public class AnomalousDataController extends BaseController {

    private final AnomalousDataService anomalousDataService;

    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @GetMapping("/getAbnormalData")
    @ApiOperation("查询装置异常指标数据")
    @ApiImplicitParam(name = "param", value = "参数实体", required = true)
    public HttpResult<List<AnomalousDataVo>> getAbnormalData(@RequestParam AbnormalDataParam param) {
        String methodDescribe = getMethodDescribe("getAbnormalData");
        List<AnomalousDataVo> result = anomalousDataService.getAbnormalData(param);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
    }































}
