package com.whyc.controller;
|
|
import com.whyc.dto.Response;
|
import com.whyc.mapper.BaojigroupUsrMapper;
|
import com.whyc.pojo.plus_user.UserInf;
|
import com.whyc.service.BaojigroupService;
|
import com.whyc.service.LockInfService;
|
import com.whyc.service.StationInfService;
|
import com.whyc.util.ActionUtil;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.apache.ibatis.annotations.Param;
|
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 LockInfService lockInfService;
|
|
@Autowired
|
private BaojigroupService bjGroupService;
|
|
@ApiOperation("获取所有的省份(下拉)")
|
@GetMapping("getProviceByUid")
|
public Response getProviceByUid() {
|
UserInf uinf= ActionUtil.getUser();
|
return stationInfService.getProviceByUid(uinf.getUid());
|
}
|
|
@ApiOperation("获取省下的市(下拉)")
|
@GetMapping("getCityByUid")
|
public Response getCityByUid(@RequestParam(required = false) String stationName1) {
|
UserInf uinf= ActionUtil.getUser();
|
return stationInfService.getCityByUid(uinf.getUid(),stationName1);
|
}
|
|
@ApiOperation("获取省市下的区县(下拉)")
|
@GetMapping("getCountryByUid")
|
public Response getCountryByUid(@RequestParam(required = false) String stationName1,@RequestParam(required = false) String stationName2) {
|
UserInf uinf= ActionUtil.getUser();
|
return stationInfService.getCountryByUid(uinf.getUid(),stationName1,stationName2);
|
}
|
|
@ApiOperation("获取省市区县下的站点(下拉)")
|
@GetMapping("getStationByUid")
|
public Response getStationByUid(@RequestParam(required = false) String stationName1,@RequestParam(required = false) String stationName2,@RequestParam(required = false) String stationName3) {
|
UserInf uinf= ActionUtil.getUser();
|
return stationInfService.getStationByUid(uinf.getUid(),stationName1,stationName2,stationName3);
|
}
|
|
@ApiOperation("获取省市区县机房站点下的锁(下拉)")
|
@GetMapping("getLockByUid")
|
public Response getLockByUid(@RequestParam(required = false) String stationName1,@RequestParam(required = false) String stationName2,@RequestParam(required = false) String stationName3
|
,@RequestParam(required = false) String stationName4) {
|
UserInf uinf= ActionUtil.getUser();
|
return stationInfService.getLockByUid(uinf.getUid(),stationName1,stationName2,stationName3,stationName4);
|
}
|
|
@ApiOperation(value = "查询屏柜全部类型(下拉)")
|
@PostMapping("getScreenType")
|
public Response getScreenType(){
|
UserInf uinf= ActionUtil.getUser();
|
return lockInfService.getScreenType(uinf.getUid());
|
}
|
|
@ApiOperation(value = "查询屏柜全部品牌(下拉)")
|
@PostMapping("getScreenProduct")
|
public Response getScreenProduct(){
|
UserInf uinf= ActionUtil.getUser();
|
return lockInfService.getScreenProduct(uinf.getUid());
|
}
|
|
@ApiOperation(value = "历史界面查询锁(下拉)")
|
@GetMapping("getLockInHis")
|
public Response getLockInHis(@RequestParam Integer stationId, @RequestParam Integer baojiId){
|
return lockInfService.getLockInHis(stationId,baojiId);
|
}
|
|
@ApiOperation(value = "当前用户所在包机组下所有的用户(下拉)")
|
@GetMapping("getBaojiUserByUid")
|
public Response getBaojiUserByUid(){
|
UserInf uinf= ActionUtil.getUser();
|
return bjGroupService.getBaojiUserByUid(uinf.getUid());
|
}
|
|
|
|
}
|