| | |
| | | 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") |
| | |
| | | List<String> getCountryByUid(@Param("uid") Integer uid,@Param("provice") String provice, @Param("city") String city); |
| | | //获取省市区县下的站点 |
| | | List<String> getStationByUid(@Param("uid") Integer uid,@Param("provice") String provice,@Param("city") String city,@Param("country") String country); |
| | | |
| | | //获取站点下的电源(下拉) |
| | | List<String> getPowerByUid(@Param("uid") Integer uid,@Param("provice") String provice,@Param("city") String city,@Param("country") String country,@Param("stationName") String stationName); |
| | | } |
| | |
| | | List<String> list=mapper.getStationByUid(uid,provice,city,country); |
| | | return new Response().setII(1,list.size()>0,list,"获取省市区县下的站点"); |
| | | } |
| | | //获取站点下的电源(下拉) |
| | | public Response getPowerByUid(int uid, String provice, String city, String country, String stationName) { |
| | | List<String> list=mapper.getPowerByUid(uid,provice,city,country,stationName); |
| | | return new Response().setII(1,list.size()>0,list,"获取站点下的电源(下拉)"); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getPowerByUid" resultType="java.lang.String"> |
| | | select distinct power_name from db_station.tb_power_inf,db_station.tb_station_inf |
| | | <where> |
| | | tb_power_inf.station_id=tb_station_inf.station_id |
| | | <if test="provice!=null"> |
| | | and tb_station_inf.provice=#{provice} |
| | | </if> |
| | | <if test="city!=null"> |
| | | and tb_station_inf.city=#{city} |
| | | </if> |
| | | <if test="country!=null"> |
| | | and tb_station_inf.country=#{country} |
| | | </if> |
| | | <if test="stationName!=null"> |
| | | and tb_station_inf.station_name=#{stationName} |
| | | </if> |
| | | <if test="uid>100"> |
| | | and tb_power_inf.power_id in( |
| | | select distinct power_id from db_user.tb_baojigroup_power,db_user.tb_baojigroup_usr |
| | | where tb_baojigroup_power.baoji_group_id=tb_baojigroup_usr.baoji_group_id |
| | | and tb_baojigroup_usr.uid=#{uid} |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |