| | |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.StationInf; |
| | | import com.whyc.pojo.UserInf; |
| | | 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.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "站点管理") |
| | | @RequestMapping("StationInf") |
| | | public class StationInfController { |
| | | public class StationInfController extends BaseController{ |
| | | @Autowired |
| | | private StationInfService service; |
| | | |
| | | @ApiOperation(value = "查询所有的站点") |
| | | @GetMapping("searchStationAll") |
| | | public Response searchStationAll(@RequestParam int pageCurr, @RequestParam int pageSize) { |
| | | return service.searchStationAll(pageCurr, pageSize); |
| | | public Response searchStationAll(@RequestParam int pageCurr, @RequestParam int pageSize |
| | | , @RequestParam(required = false) String stationName1 |
| | | , @RequestParam(required = false) String stationName2 |
| | | , @RequestParam(required = false) String stationName5 |
| | | , @RequestParam(required = false) String nodeStation |
| | | , @RequestParam(required = false) String stationType) { |
| | | return service.searchStationAll(pageCurr, pageSize, stationName1, stationName2, stationName5, nodeStation, stationType); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询所有的机房信息(南京机房配置)") |
| | | @GetMapping("searchNjStationAll") |
| | | public Response searchNjStationAll() { |
| | | return service.searchNjStationAll(); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据stationId和togetherFlag查询另外相同的机房") |
| | | @GetMapping("getTogetherFlagStationInf") |
| | | public Response getTogetherFlagStationInf(@RequestParam String stationId, @RequestParam int togetherFlag) { |
| | | return service.getTogetherFlagStationInf(stationId, togetherFlag); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加站点") |
| | |
| | | return service.insertStation(stationInf); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除总站点") |
| | | @GetMapping("deleteStation") |
| | | public Response deleteStation(@RequestParam int num) { |
| | | return service.deleteStation(num); |
| | | @ApiOperation(value = "编辑站点") |
| | | @GetMapping("updateStation") |
| | | public Response updateStation(@RequestParam(required = false) String nodeStation, @RequestParam(required = false) String stationType |
| | | , @RequestParam(required = false) String stationLongitude, @RequestParam(required = false) String stationLatitude |
| | | , @RequestParam(required = false) String stationAddr, @RequestParam int togetherFlag, @RequestParam String stationId) { |
| | | return service.updateStation(nodeStation, stationType, stationLongitude, stationLatitude, stationAddr, togetherFlag, stationId); |
| | | } |
| | | |
| | | @ApiOperation(value = "测试") |
| | | @GetMapping("getAll") |
| | | public Response getAll(@RequestParam int uid) { |
| | | return service.getAll(uid); |
| | | @ApiOperation(value = "编辑机房名") |
| | | @GetMapping("updateName") |
| | | public Response updateName(@RequestParam(required = false) String stationName, @RequestParam(required = false) String stationName1 |
| | | , @RequestParam(required = false) String stationName2, @RequestParam(required = false) String stationName3 |
| | | , @RequestParam(required = false) String stationName4, @RequestParam(required = false) String stationName5 |
| | | , @RequestParam(required = false) String stationIdTogether, @RequestParam String stationId) { |
| | | return service.updateName(stationName, stationName1, stationName2, stationName3, stationName4, stationName5, stationIdTogether, stationId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除总站点") |
| | | @GetMapping("deleteStation") |
| | | public Response deleteStation(@RequestParam String stationId) { |
| | | return service.deleteStation(stationId); |
| | | } |
| | | |
| | | @GetMapping("searchAllStationName") |
| | | @ApiOperation("查询站点名") |
| | | public Response searchAllStationName(@RequestParam(required = false) String stationName1,@RequestParam(required = false) String stationName2,@RequestParam(required = false) String stationName5){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.searchAllStationName(userInf.getUId().intValue(), stationName1, stationName2, stationName5); |
| | | } |
| | | |
| | | @GetMapping("getInfInStation") |
| | | @ApiOperation("获取站点下所有设备信息") |
| | | public Response getInfInStation(@RequestParam String stationId){ |
| | | return service.getInfInStation(stationId); |
| | | } |
| | | |
| | | @GetMapping("/searchAllStationName1") |
| | | @ApiOperation(value = "查询省") |
| | | public Response searchAllStationName1() { |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.searchAllStationName1(userInf.getUId().intValue()); |
| | | } |
| | | |
| | | @GetMapping("/searchAllStationName2") |
| | | @ApiOperation("查询市") |
| | | public Response searchAllStationName2(@RequestParam(required = false) String stationName1) { |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.searchAllStationName2(userInf.getUId().intValue(), stationName1); |
| | | } |
| | | |
| | | @GetMapping("/searchAllStationName5") |
| | | @ApiOperation("查询区") |
| | | public Response searchAllStationName5(@RequestParam(required = false) String stationName1, @RequestParam(required = false) String stationName2) { |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.searchAllStationName5(userInf.getUId().intValue(), stationName1, stationName2); |
| | | } |
| | | |
| | | @ApiOperation(value = "穿梭框查询所有的站点") |
| | | @GetMapping("searchShuttle") |
| | | public Response searchShuttle() { |
| | | return service.searchShuttle(); |
| | | } |
| | | |
| | | @ApiOperation(value = "穿梭框移除或者添加站点") |
| | | @PostMapping("updateShuttle") |
| | | public Response updateShuttle(@RequestBody List<StationInf> stationInfs) { |
| | | return service.updateShuttle(stationInfs); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页上点击整流器故障") |
| | | @GetMapping("searchAcdcModError") |
| | | public Response searchAcdcModError() { |
| | | return service.searchAcdcModError(); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页上点击负载熔断") |
| | | @GetMapping("searchFuse") |
| | | public Response searchFuse() { |
| | | return service.searchFuse(); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页上点击停电站") |
| | | @GetMapping("searchPowerOff") |
| | | public Response searchPowerOff() { |
| | | return service.searchPowerOff(); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页上点击核容放电站") |
| | | @GetMapping("searchCheckCapDischarge") |
| | | public Response searchCheckCapDischarge() { |
| | | return service.searchCheckCapDischarge(); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页上点击容量不足站") |
| | | @GetMapping("searchCapAlarm") |
| | | public Response searchCapAlarm() { |
| | | return service.searchCapAlarm(); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页上点击电池损坏站") |
| | | @GetMapping("searCapChange") |
| | | public Response searCapChange() { |
| | | return service.searCapChange(); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询所有的站点电压等级") |
| | | @GetMapping("searStationType") |
| | | public Response searStationType() { |
| | | return service.searStationType(); |
| | | } |
| | | |
| | | @GetMapping("getTogetherStations") |
| | | @ApiOperation(value = "添加关联时下拉显示") |
| | | public Response getTogetherStations(@RequestParam(required = false) String stationName1, @RequestParam(required = false) String stationName2, @RequestParam(required = false) String stationName5) { |
| | | return service.getTogetherStations(stationName1, stationName2, stationName5); |
| | | } |
| | | } |