whyclxw
7 天以前 257c8bcbc5453ecfa9c108ed650422013f7c11b6
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.db_user.Baojigroup;
import com.whyc.pojo.db_user.User;
import com.whyc.service.*;
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.*;
 
import java.util.List;
 
@RestController
@Api(tags = "下拉条件管理")
@RequestMapping("condition")
public class ConditionController {
    @Autowired
    private StationInfService stationInfService;
 
    @Autowired
    private PowerInfService  powerInfService;
 
    @Autowired
    private BaojigroupService bjGroupService;
 
    @Autowired
    private BattInfService binfService;
 
    @Autowired
    private BattalarmDataService  almDataService;
 
    @Autowired
    private DevalarmDataService  devAlmService;
 
    @Autowired
    private PwrdevAlarmService  pwrAlmService;
 
    @Autowired
    private PowerInfService  pinfService;
 
    @Autowired
    private DeviceStateService  deviceStateService;
 
    @Autowired
    private BattRtstateService  rtstateService;
 
    @Autowired
    private BatttestdataInfService  tinfService;
 
    @ApiOperation("获取所有的省份(下拉)")
    @GetMapping("getProviceByUid")
    public Response getProviceByUid() {
        User uinf= ActionUtil.getUser();
        return stationInfService.getProviceByUid(uinf.getId());
    }
 
    @ApiOperation("获取省下的市(下拉)")
    @GetMapping("getCityByUid")
    public Response getCityByUid(@RequestParam(required = false) String provice) {
        User uinf= ActionUtil.getUser();
        return stationInfService.getCityByUid(uinf.getId(),provice);
    }
 
    @ApiOperation("获取省市下的区县(下拉)")
    @GetMapping("getCountryByUid")
    public Response getCountryByUid(@RequestParam(required = false) String provice,@RequestParam(required = false) String city) {
        User uinf= ActionUtil.getUser();
        return stationInfService.getCountryByUid(uinf.getId(),provice,city);
    }
 
    @ApiOperation("获取省市区县下的站点(下拉)")
    @GetMapping("getStationByUid")
    public Response getStationByUid(@RequestParam(required = false) String provice,@RequestParam(required = false) String city,@RequestParam(required = false) String country) {
        User uinf= ActionUtil.getUser();
        return stationInfService.getStationByUid(uinf.getId(),provice,city,country);
    }
 
    @ApiOperation("获取站点下的电源(下拉)")
    @GetMapping("getPowerByUid")
    public Response getPowerByUid(@RequestParam(required = false) String provice,@RequestParam(required = false) String city
            ,@RequestParam(required = false) String country,@RequestParam(required = false) String stationName) {
        User uinf= ActionUtil.getUser();
        return stationInfService.getPowerByUid(uinf.getId(),provice,city,country,stationName);
    }
    @ApiOperation("获取站点下的电池组(下拉)")
    @GetMapping("getBattByUid")
    public Response getBattByUid(@RequestParam(required = false) String provice,@RequestParam(required = false) String city
            ,@RequestParam(required = false) String country,@RequestParam(required = false) String stationName) {
        User uinf= ActionUtil.getUser();
        return binfService.getBattByUid(uinf.getId(),provice,city,country,stationName);
    }
 
    @ApiOperation("获取电压等级(下拉)")
    @GetMapping("getStationType")
    public Response getStationTypeByUid() {
        User uinf= ActionUtil.getUser();
        return stationInfService.getStationTypeByUid(uinf.getId());
    }
 
    @ApiOperation("获取电池品牌(下拉)")
    @GetMapping("getProductByUid")
    public Response getProductByUid() {
        User uinf= ActionUtil.getUser();
        return binfService.getProductByUid(uinf.getId());
    }
 
    @ApiOperation("获取标称单体电压(下拉)")
    @GetMapping("getMonVolByUid")
    public Response getMonVolByUid() {
        User uinf= ActionUtil.getUser();
        return binfService.getMonVolByUid(uinf.getId());
    }
    @ApiOperation("获取标称容量(下拉)")
    @GetMapping("getMonCapByUid")
    public Response getMonCapByUid() {
        User uinf= ActionUtil.getUser();
        return binfService.getMonCapByUid(uinf.getId());
    }
 
    @ApiOperation("获取标称内阻(下拉)")
    @GetMapping("getMonResByUid")
    public Response getMonResByUid() {
        User uinf= ActionUtil.getUser();
        return binfService.getMonResByUid(uinf.getId());
    }
 
    @ApiOperation("获取设备型号(下拉)")
    @GetMapping("getDevTypeByUid")
    public Response getDevTypeByUid() {
        User uinf= ActionUtil.getUser();
        return binfService.getDevTypeByUid(uinf.getId());
    }
 
    @ApiOperation("获取电源品牌(下拉)")
    @GetMapping("getCompanyByUid")
    public Response getCompanyByUid() {
        User uinf= ActionUtil.getUser();
        return powerInfService.getCompanyByUid(uinf.getId());
    }
 
    @ApiOperation("获取电源型号(下拉)")
    @GetMapping("getPowerModelByUid")
    public Response getPowerModelByUid() {
        User uinf= ActionUtil.getUser();
        return powerInfService.getPowerModelByUid(uinf.getId());
    }
 
    @ApiOperation("获取电源协议(下拉)")
    @GetMapping("getProtocolByUid")
    public Response getProtocolByUid() {
        User uinf= ActionUtil.getUser();
        return powerInfService.getProtocolByUid(uinf.getId());
    }
 
 
    @ApiOperation(value = "当前用户所在包机组下所有的用户(下拉)")
    @GetMapping("getBaojiUserByUid")
    public Response getBaojiUserByUid(){
        User uinf= ActionUtil.getUser();
        return bjGroupService.getBaojiUserByUid(uinf.getId());
    }
 
    @ApiOperation(value = "获取电池告警类型(下拉)")
    @GetMapping("getAlarmIdType")
    public Response getAlarmIdType(){
        return almDataService.getAlarmIdType();
    }
 
    @ApiOperation(value = "获取设备告警类型(下拉)")
    @GetMapping("getDevAlmIdType")
    public Response getDevAlmIdType(){
        return devAlmService.getDevAlmIdType();
    }
    @ApiOperation(value = "获取电源告警类型(下拉)")
    @GetMapping("getPwrAlmIdType")
    public Response getPwrAlmIdType(){
        return pwrAlmService.getPwrAlmIdType();
    }
    @ApiOperation(value = "获取核容停止原因类型(下拉)")
    @GetMapping("getStopReasonType")
    public Response getStopReasonType(){
        return tinfService.getStopReasonType();
    }
 
    @ApiOperation(value = "获取容量性能(下拉)")
    @GetMapping("getCapperformance")
    public Response getCapperformance(){
        return binfService.getCapperformance();
    }
 
    @ApiOperation(value = "获取电源性能(下拉)")
    @GetMapping("getPwrCapperformance")
    public Response getPwrCapperformance(){
        return pinfService.getPwrCapperformance();
    }
 
    @ApiOperation(value = "获取设备工作类型(下拉)")
    @GetMapping("getDevState")
    public Response getDevState(){
        return deviceStateService.getDevState();
    }
    @ApiOperation(value = "获取电池组工作状态类型(下拉)")
    @GetMapping("getBattState")
    public Response getBattState(){
        return rtstateService.getBattState();
    }
 
    @ApiOperation(value = "获取所有的班组(下拉)")
    @GetMapping("getBattGroupBZ")
    public Response getBattGroupBZ(){
        List<Baojigroup> list=bjGroupService.getGroupList();
        return new Response().setII(1,true,list,"获取所有的班组(下拉)");
    }
 
 
 
}