whycxzp
2021-07-26 24fd4ac01b448c2dab5dbcc1f9a641a38fc783e7
src/main/java/com/whyc/controller/AFERectifierController.java
@@ -9,10 +9,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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 org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("afeRectifier")
@@ -34,6 +31,18 @@
        return service.getInfoByDevId(devId);
    }
    @PutMapping("updateState1")
    @ApiOperation(value = "更新整流状态-演示使用")
    public Response updateState1(@RequestParam int devId,@RequestParam int rectifierRun){
        return service.updateState1(devId,rectifierRun);
    }
    @PutMapping("updateState2")
    @ApiOperation(value = "更新逆变状态-演示使用")
    public Response updateState2(@RequestParam int devId,@RequestParam int invertRun){
        return service.updateState2(devId,invertRun);
    }
    /**
     * ======History======
     * 历史查询时,因为历史记录是按照日期分表的,如果查询所有的日期表(union)后再分页,会导致速度极慢,故查询按照单个日期查询