whycrzh
2021-01-28 c8332186836b3dfe1fbd32d7bec7cd29a57e1888
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
49
package com.fgkj.controller.bts61850;
 
import com.fgkj.dto.BTS_61850_state;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.User_inf;
import com.fgkj.services.bts61850.BTS_61850_stateService;
import com.fgkj.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
/**
 * 61850数据库目前无表,暂mapper未写
 */
 
@RequestMapping("bts61850State")
@RestController
@Api(tags = "bts61850State接口")
public class BTS_61850_stateController {
 
    @Resource
    private BTS_61850_stateService service;
 
    //查询BTS_61850_stateService实时数据
    @GetMapping("all")
    @ApiOperation(notes = "",value="查询BTS_61850_stateService实时数据")
    public ServiceModel searchAll() {
        ServiceModel model=service.searchAll();
 
        return model;
    }
 
    @GetMapping("byCondition")
    @ApiOperation(notes = "",value="BTS_61850设备通信状态查询")
    //11.1BTS_61850设备通信状态查询
    public ServiceModel serchByCondition(@RequestBody BTS_61850_state bts){
        // BTS_61850_state bts= ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BTS_61850_state.class);
        User_inf uinf=(User_inf) ActionUtil.getUser();
        bts.setNum(uinf.getuId());//将用户id存放在BTS_61850_state的num中用于处理用户管理的机房问题
        ServiceModel model = service.serchByCondition(bts);
        return model;
    }
 
}