| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.BattState; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.paramter.GroupTestCapPar; |
| | | import com.whyc.pojo.Battinf; |
| | | import com.whyc.service.BatttestdataInfService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 电池续航能力历史查询 |
| | |
| | | |
| | | @PostMapping("/searchBattTestInfDataById") |
| | | @ApiOperation(value = "获取充放电记录") |
| | | public Response searchBattTestInfDataById(@RequestParam int battGroupId) { |
| | | return service.searchBattTestInfDataById(battGroupId); |
| | | public Response searchBattTestInfDataById(@RequestParam int battGroupId,@RequestParam int fbsDeviceId) { |
| | | return service.searchBattTestInfDataById(battGroupId,fbsDeviceId); |
| | | } |
| | | |
| | | @PostMapping("/searchBattLastHrDataById") |
| | | @ApiOperation(value = "最后一次核容放电数据") |
| | | public Response searchBattLastHrDataById(@RequestParam int battGroupId) { |
| | | return service.searchBattLastHrDataById(battGroupId); |
| | | public Response searchBattLastHrDataById(@RequestParam int battGroupId, @RequestParam int devId) { |
| | | String lang = ActionUtil.getLang(); |
| | | return service.searchBattLastHrDataById(battGroupId, devId, lang); |
| | | } |
| | | //@PostMapping("/searchBattLife") |
| | | //@ApiOperation(value = "电池组历史放电数据续航能力查询",notes = "Batttestdata_infAction!serchBattLife") |
| | | //public Response searchBattLife(@RequestParam int pageNum,@RequestParam int pageSize,@RequestBody Battinf binf){ |
| | | // if (binf.getBattGroupId()==0){ |
| | | // return service.searchBattLifeNow(pageNum,pageSize,binf); |
| | | // } |
| | | // if(binf.getBattGroupId()==1){ |
| | | // return service.searchBattLife(pageNum,pageSize,binf); |
| | | // } |
| | | // return new Response().set(1,false,"参数错误"); |
| | | //} |
| | | |
| | | @PostMapping("/searchBattLife") |
| | | @ApiOperation(value = "电池组历史放电数据续航能力查询", notes = "Batttestdata_infAction!serchBattLife,num: 3, //电池状态\n" + |
| | | " BattGroupId: this.selectValue3, //续航能力类型 \n" + |
| | | " StationName: this.selectValue2, //机房类型\n" + |
| | | " StationName1: this.selectValue1, //维护区\n" + |
| | | " BattProductDate: this.startDrsj,\n" + |
| | | " BattProductDate1: this.endDrsj, //生产日期段") |
| | | public Response searchBattLife(@RequestParam int pageNum, @RequestParam int pageSize, @RequestBody Battinf binf) { |
| | | if (binf.getBattGroupId() == 0) { |
| | | return service.searchBattLifeNow(pageNum, pageSize, binf); |
| | | } |
| | | if (binf.getBattGroupId() == 1) { |
| | | return service.searchBattLife(pageNum, pageSize, binf); |
| | | } |
| | | return new Response().set(1, false, "参数错误"); |
| | | } |
| | | |
| | | @PostMapping("/searchGroupTestCap") |
| | | @ApiOperation(value = "统计时间段内设备的测试容量") |
| | | public Response searchGroupTestCap(@RequestBody GroupTestCapPar groupCapPar) { |
| | | return service.searchGroupTestCap(groupCapPar); |
| | | } |
| | | |
| | | |
| | | @GetMapping("getHrYeardisBatt") |
| | | @ApiOperation(value = "获取本年已核容放电电池组") |
| | | public Response getHrYeardisBatt() { |
| | | return service.getHrYeardisBatt(); |
| | | } |
| | | |
| | | @GetMapping("getJcdisBatt") |
| | | @ApiOperation(value = "获取实时停电放电机房") |
| | | public Response getJcdisBatt() { |
| | | return service.getJcdisBatt(); |
| | | } |
| | | |
| | | @GetMapping("getHrYeardisBattInfo") |
| | | @ApiOperation(value = "获取本年已核容放电电池组最新一次数据详情") |
| | | public Response getHrYeardisBattInfo() { |
| | | return service.getHrYeardisBattInfo(); |
| | | } |
| | | } |