whyclxw
2025-05-16 98680dbc7facfcfcd5ef0c00deb2f172929a34bd
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.db_user.User;
import com.whyc.service.BaojigroupService;
import com.whyc.service.StationInfService;
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.*;
 
@RestController
@Api(tags = "下拉条件管理")
@RequestMapping("condition")
public class ConditionController {
    @Autowired
    private StationInfService stationInfService;
 
    @Autowired
    private BaojigroupService bjGroupService;
 
    @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(value = "当前用户所在包机组下所有的用户(下拉)")
    @GetMapping("getBaojiUserByUid")
    public Response getBaojiUserByUid(){
        User uinf= ActionUtil.getUser();
        return bjGroupService.getBaojiUserByUid(uinf.getId());
    }
 
 
 
}