| | |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.Battinf; |
| | | import com.whyc.pojo.PowerInf; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.service.BattInfService; |
| | | import com.whyc.util.ActionUtil; |
| | |
| | | |
| | | @RequestMapping("battInf") |
| | | @RestController |
| | | @Api(tags = "电池信息") |
| | | @Api(tags = "数据管理-电池信息") |
| | | public class BattInfController { |
| | | |
| | | @Autowired |
| | | private BattInfService service; |
| | | |
| | | @GetMapping("/searchAllStationName1") |
| | | @ApiOperation("查询省") |
| | | @ApiOperation(tags = "在线监测-历史数据管理",value="查询省",notes = "原接口:BattInfAction!serchAllStationName1") |
| | | public Response searchAllStationName1(){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | return service.searchAllStationName1(userInf.getUId().intValue()); |
| | |
| | | List<Battinf> stationList = service.getStationList(userInf.getUId().intValue()); |
| | | return new Response().set(1,stationList); |
| | | } |
| | | @GetMapping("/searchByBattProducer") |
| | | @ApiOperation(value = "获取所有电池品牌") |
| | | public Response getAllBattProducer(){ |
| | | return service.searchBattProducer(); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/add") |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增电池组") |
| | | public Response addBattinf(@RequestBody Battinf battinf){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | |
| | | } |
| | | |
| | | |
| | | @PutMapping("/updatePubByDevId") |
| | | @ApiOperation(value = "根据设备id修改PublicKeyY值") |
| | | public Response updatePubByDevId(@RequestParam String publicKeyY,@RequestParam Integer deviceId){ |
| | | return service.updatePublicKeyByDevId(publicKeyY,deviceId); |
| | | } |
| | | |
| | | @PutMapping("/updateIP") |
| | | @ApiOperation(value = "更新电池组网关等信息",notes = "todo还需向设备发送相关指令和服务需重启") |
| | | public Response updateIp(@RequestBody Battinf battinf){ |
| | | //todo Fbs9100_setparamImpl().sendCmdToFBS9100Dev |
| | | //修改ip需要将61850的服务设为重启 |
| | | //todo process_survey |
| | | return service.updateIp(battinf); |
| | | } |
| | | @GetMapping("/findByBattGroupId") |
| | | @ApiOperation(value = "通过电池组id获取电池信息") |
| | | public Response findByBattGroupId(@RequestParam int battGroupId){ |
| | | return service.findByBattGroupId(battGroupId); |
| | | } |
| | | |
| | | |
| | | public Response searchNotInBattMapByUid(){ |
| | | UserInf user = ActionUtil.getUser(); |
| | | return service.searchNotInBattMapByUid(user.getUId().intValue()); |
| | | } |
| | | |
| | | @GetMapping("battGroupInfoByFBSDeviceId") |
| | | @ApiOperation(value = "查询电池组信息-通过设备Id") |
| | | public Response<List<Battinf>> getBattGroupInfoByFBSDeviceId(@RequestParam int fbsDeviceId){ |
| | | List<Battinf> battInfList = service.getBattGroupInfoByFBSDeviceId(fbsDeviceId); |
| | | return new Response<List<Battinf>>().set(1,battInfList); |
| | | } |
| | | |
| | | @GetMapping("/findUseYear") |
| | | @ApiOperation(value = "查询电池使用年限") |
| | | public Response findUseYear(){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | return service.findUseYear(userInf.getUId().intValue()); |
| | | } |
| | | @GetMapping("/findBattProducer") |
| | | @ApiOperation(value = "查询品牌数量") |
| | | public Response findBattProducer(){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | return service.findBattProducer(userInf.getUId().intValue()); |
| | | } |
| | | |
| | | @GetMapping("/findBattProducerInfoByProducerName") |
| | | @ApiOperation(value = "根据电池品牌查询站点及电池品牌基础信息") |
| | | public Response findBattProducerInfoByProducerName(@RequestParam String battProducer){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | return service.findBattProducerInfoByProducerName(battProducer,userInf.getUId().intValue()); |
| | | } |
| | | @GetMapping("/findBattProducerInfoByYearCode") |
| | | @ApiOperation(value = "根据电池使用年限查询站点及电池品牌基础信息",notes = "yearCode: ,1:3年以内 ,2:3-5年 ,3:5到7年 ,4:7年以上") |
| | | public Response findBattProducerInfoByYearCode(@RequestParam int yearCode){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | return service.findBattProducerInfoByYearCode(yearCode,userInf.getUId().intValue()); |
| | | } |
| | | |
| | | @GetMapping("/findBattInfByStationId") |
| | | @ApiOperation("根据机房id获取电池信息") |
| | | public Response findBattInfByStationId(@RequestParam String stationId){ |
| | | return service.findBattInfoByStationId(stationId); |
| | | } |
| | | |
| | | @GetMapping("stationList8059") |
| | | @ApiOperation(tags = "在线监测-一体机导入记录",value = "站点列表") |
| | | public Response<List<Battinf>> getStationList8059(){ |
| | | Long uId = ActionUtil.getUser().getUId(); |
| | | List<Battinf> stationList = service.getStationList8059(uId); |
| | | return new Response<List<Battinf>>().set(1,stationList); |
| | | } |
| | | |
| | | @GetMapping("battInfByStationId") |
| | | @ApiOperation(tags = "在线监测-一体机导入记录",value = "站点下的电池组信息") |
| | | public Response findBattInfByStationId2(@RequestParam String stationId){ |
| | | return service.findBattInfoByStationId(stationId); |
| | | } |
| | | |
| | | @GetMapping("/searchByMonNum") |
| | | @ApiOperation(value = "根据电池组id查询不重复的单体编号") |
| | | public Response searchByMonNum(int battGroupId){ |
| | | return service.searchByMonNum(battGroupId); |
| | | } |
| | | |
| | | } |