| | |
| | | public class BaojiGroupController { |
| | | @Autowired |
| | | private BaojigroupService service; |
| | | |
| | | @PostMapping("updateTeamFlag") |
| | | @ApiOperation("设置包机组标记") |
| | | public Response updateTeamFlag(@RequestParam Integer baoJiGroupId,@RequestParam Integer flag){ |
| | | return service.updateTeamFlag(baoJiGroupId,flag); |
| | | } |
| | | @ApiOperation("添加包机组") |
| | | @GetMapping("addBaoji") |
| | | public Response addBaoji(@RequestParam String baojiName) { |
| | |
| | | } |
| | | |
| | | @GetMapping("stationList") |
| | | @ApiOperation(value = "已添加机房锁和未添加机房锁") |
| | | @ApiOperation(value = "已添加机房电源和未添加机房电源") |
| | | public Response<Map<String,List<PowerInf>>> getStationList(@RequestParam int id){ |
| | | Map<String,List<PowerInf>> resultMap = service.getStationList(id); |
| | | return new Response().setII(1,resultMap.size()>0,resultMap,"已添加机房锁和未添加机房锁"); |
| | | return new Response().setII(1,resultMap.size()>0,resultMap,"已添加机房锁和未添加机房电源"); |
| | | } |
| | | @ApiOperation("查询包机组及包机组对应的用户和对应机房和锁") |
| | | @ApiOperation("查询包机组及包机组对应的用户和对应机房和电源") |
| | | @GetMapping("getAllBaojiInf") |
| | | public Response getAllBaojiInf() { |
| | | return service.getAllBaojiInf(); |
| | | } |
| | | |
| | | @PostMapping("updateStationList") |
| | | @ApiOperation(value = "包机组添加机房和锁|移除机房和锁",notes = "operationFlag为1,添加;-1,移除") |
| | | @ApiOperation(value = "包机组添加机房和电源|移除机房和电源",notes = "operationFlag为1,添加;-1,移除") |
| | | public Response updateStationAndLockList(@RequestBody List<BaojigroupPower> baoJiGroupLockList, @RequestParam int operationFlag){ |
| | | service.updateStationAndLockList(baoJiGroupLockList,operationFlag); |
| | | if(operationFlag==1) { |
| | | return new Response().set(1, true,"添加成功"); |
| | | }else{ |
| | | return new Response().set(1,true,"移除成功"); |
| | | } |
| | | |
| | | return service.updateStationAndLockList(baoJiGroupLockList,operationFlag); |
| | | } |
| | | |
| | | |