lxw
2023-04-25 b13bc9c38bae9e9619cb2c87481808c5a35c12ef
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
40
41
42
43
44
45
46
47
48
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);
    }
 
    @ApiOperation(value = "查询Ld9状态",notes = "返回值类型为Fbs9100state类型")
    @GetMapping("/searchByCondition")
    public Response searchByCondition(int pageNum,int pageSize,int devErrcommcount){
        UserInf user = ActionUtil.getUser();
        return service.searchByCondition(pageNum,pageSize,devErrcommcount,user.getUId().intValue());
    }
 
 
}