| | |
| | | } |
| | | |
| | | //搜索机房或电池组 |
| | | @GetMapping("stationOrBattGroup") |
| | | @ApiOperation(notes = "",value="搜索机房或电池组") |
| | | public ServiceModel serchStationOrBattgroup(@RequestBody BattInf binf){ |
| | | // BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class); |
| | | |
| | | @PostMapping("stationOrBattGroup") |
| | | @ApiOperation(notes = "num:1 机房;0电池组 两种状态 stationName9 模糊查询条件", value = "搜索机房或电池组") |
| | | public ServiceModel serchStationOrBattgroup(@ApiParam(value = "1 机房;0 电池组",required = true) @RequestParam Integer num,@RequestParam String stationName9) { |
| | | BattInf binf = new BattInf(); |
| | | binf.setNum(num); |
| | | binf.setStationName9(stationName9); |
| | | return service.serchStationOrBattgroup(binf); |
| | | } |
| | | |
| | | //根据机房id查询机房下的电池组信息 |
| | | @GetMapping("battByStationId") |
| | | @PostMapping("battByStationId") |
| | | @ApiOperation(notes = "",value="机房id查询机房下的电池组信息") |
| | | public ServiceModel serchBattByStation(@RequestBody BattInf binf){ |
| | | // BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class); |
| | | // result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model); |
| | | public ServiceModel serchBattByStation(@RequestParam String stationId){ |
| | | ServiceModel model = new ServiceModel(); |
| | | BattInf binf = new BattInf(); |
| | | try { |
| | | Integer.parseInt(stationId); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | model.setMsg("参数不合法"); |
| | | return model; |
| | | } |
| | | binf.setStationId(stationId); |
| | | return service.serchBattByStation(binf); |
| | | } |
| | | |
| | | //查询所有的电池组数 |
| | | @GetMapping("battCount") |
| | | @ApiOperation(notes = "",value="查询所有的电池组数") |
| | | public ServiceModel serchAllBatt(){ |
| | | public ServiceModelOnce serchAllBatt(){ |
| | | User_inf u = (User_inf)ActionUtil.getUser(); |
| | | |
| | | return service.serchAllBatt(u); |
| | | } |
| | | //查站点下的所有设备名称 |
| | | @GetMapping("devNameByStationName3") |
| | | @ApiOperation(notes = "",value="查站点下的所有设备名称") |
| | | public ServiceModel searchDevByStationName3(@RequestBody BattInf binf){ |
| | | // BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class); |
| | | |
| | | //查站点下的所有设备名称 |
| | | @PostMapping("devNameByStationName3") |
| | | @ApiOperation(notes = "模糊查询", value = "查站点下的所有设备名称") |
| | | public ServiceModel searchDevByStationName3(@ApiParam(value = "省", required = true) @RequestParam String stationName1, @ApiParam(value = "市", required = true) @RequestParam String stationName2, |
| | | @ApiParam(value = "机房", required = true) @RequestParam String stationName3, @ApiParam(value = "区", required = true) @RequestParam String stationName5) { |
| | | BattInf binf = new BattInf(); |
| | | binf.setStationName1(stationName1); |
| | | binf.setStationName2(stationName2); |
| | | binf.setStationName3(stationName3); |
| | | binf.setStationName5(stationName5); |
| | | return service.searchDevByStationName3(binf); |
| | | } |
| | | |
| | | //首页上根据stationid查询电池组的机历卡 |
| | | @GetMapping("battAllInfoByStationId") |
| | | @PostMapping("battAllInfoByStationId") |
| | | @ApiOperation(notes = "",value="首页上根据stationid查询电池组的机历卡") |
| | | public ServiceModel serchBattAllInfoByStationId(@RequestBody BattInf binf){ |
| | | // BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class); |
| | | |
| | | public ServiceModel serchBattAllInfoByStationId(@RequestParam String stationId){ |
| | | ServiceModel model = new ServiceModel(); |
| | | BattInf binf = new BattInf(); |
| | | try { |
| | | Integer.parseInt(stationId); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | model.setMsg("参数不合法"); |
| | | return model; |
| | | } |
| | | binf.setStationId(stationId); |
| | | return service.serchBattAllInfoByStationId(binf); |
| | | } |
| | | //跨域访问获取所有电池组的信息<-------跨域-----------> |