whyczh
2022-04-30 673465a448df06d6275d4b05e80ee8d39e61f885
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.Ld9UpdateStatus;
import com.whyc.pojo.UserInf;
import com.whyc.service.Ld9StateService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@Api(tags = "在线监测-实时监控")
@RestController
@RequestMapping("LD9_stateAction")
public class Ld9StateController {
 
    @Autowired
    private Ld9StateService service;
 
 
    @ApiOperation("通过设备id查询LD9数据")
    @GetMapping("searchByDevId")
    public Response searchByDevId(@RequestParam int devId){
        return  service.searchByDevId(devId);
    }
 
    @ApiOperation("查询LD9数据")
    @GetMapping("getPageLd9")
    public Response getPageLd9(@RequestParam int pageNum,@RequestParam int pageSize,@RequestParam(required = false) String stationName1,@RequestParam(required = false) String stationName2,@RequestParam(required = false) String stationName5){
        UserInf userInf = ActionUtil.getUser();
        return  service.getPageLd9(pageNum,pageSize,stationName1,stationName2,stationName5,userInf.getUId().intValue());
    }
    @ApiOperation("更新LD9参数")
    @PostMapping("/updateUpdateFile")
    public Response updateUpdateFile(@RequestBody Ld9UpdateStatus ld9UpdateStatus){
        return service.updateUpdateFile(ld9UpdateStatus);
    }
}