| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.BaoJiGroupUser; |
| | | import com.whyc.pojo.BaojiGroupBattGroup; |
| | | import com.whyc.pojo.Battinf; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.service.BaoJiGroupBattGroupService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @RequestMapping("baoJiGroupBattGroup") |
| | | @RestController |
| | | @Api(tags = "包机组-电池组|站点") |
| | | @Api(tags = "用户管理-包机组-电池组|站点") |
| | | public class BaoJiGroupBattGroupController { |
| | | |
| | | @Autowired |
| | |
| | | |
| | | /** |
| | | * searchStationName1InGroup 蓄电池组后评估、电池组统计分析查询、电池组单体统计分析查询 等菜单功能使用接口 |
| | | * @param userInf |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/searchStationName1InGroup") |
| | | @ApiOperation(value = "放电测试(查询用户管理的维护区)") |
| | | public Response<List<String>> searchStationName1InGroup(@RequestBody UserInf userInf){ |
| | | |
| | | return service.searchStationName1InGroup(userInf); |
| | | public Response<List<String>> searchStationName1InGroup(){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | return service.searchStationName1InGroup(userInf.getUId().intValue()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * searchStationByStationName1 蓄电池组后评估、电池组统计分析查询、电池组单体统计分析查询 等菜单功能使用接口 |
| | | * @param userInf |
| | | * @param stationName1 省 |
| | | * @return |
| | | */ |
| | | @PostMapping("/searchStationByStationName1") |
| | | @ApiOperation(value = "首页(查询用户管理的维护区对应的机房和机房ID以及设备id)") |
| | | public Response<List<Battinf>> searchStationByStationName1(@RequestBody UserInf userInf){ |
| | | |
| | | return service.searchStationByStationName1(userInf); |
| | | public Response<List<Battinf>> searchStationByStationName1(@RequestParam(required = false) String stationName1){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | return service.searchStationByStationName1(stationName1,userInf.getUId().intValue()); |
| | | } |
| | | |
| | | |
| | |
| | | return new Response<Map<String, List<Battinf>>>().set(1,resultMap); |
| | | } |
| | | |
| | | @PutMapping("stationList") |
| | | @ApiOperation(value = "包机组添加机房|移除机房",notes = "operationFlag为1,添加;-1,移除") |
| | | public Response updateStationList(@RequestBody List<BaojiGroupBattGroup> baoJiGroupBattGroupList, @RequestParam int operationFlag){ |
| | | service.updateStationList(baoJiGroupBattGroupList,operationFlag); |
| | | if(operationFlag==1) { |
| | | return new Response().setII(1, "添加成功"); |
| | | }else{ |
| | | return new Response().setII(1,"移除成功"); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("stationInfo") |
| | | @ApiOperation(tags = "在线监测-历史数据管理",value = "机房站点查询",notes = "原接口:User_battgroup_baojigroup_battgroupAction!serchStationNameInGroup") |
| | | public Response getStationInfo(@RequestParam String stationName1){ |
| | | Long uId = ActionUtil.getUser().getUId(); |
| | | List<Battinf> stationInfoList = service.getStationInfoList(uId,stationName1); |
| | | return new Response().set(1,stationInfoList); |
| | | } |
| | | |
| | | @GetMapping("battGroupList") |
| | | @ApiOperation(tags = "在线监测-历史数据管理",value = "电池组查询") |
| | | public Response<List<Battinf>> getBattGroupList(){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | userInf.setUNote(""); |
| | | userInf.setUName(""); |
| | | return service.searchBattGroupIdInGroup(userInf); |
| | | } |
| | | |
| | | |
| | | } |