| | |
| | | import com.fgkj.util.ActionUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.sun.xml.internal.bind.v2.TODO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("battInf") |
| | |
| | | return service.serchBatt(binf); |
| | | } |
| | | |
| | | //TODO 数据不足待测 |
| | | //6.4.7按地域和标称电压分组统计蓄电池组服役超期的数量 |
| | | /* |
| | | * 区域层次放在stationid中 |
| | | * battgroupnum 中存放统计方式:年度统计为0 季度统计为1 |
| | | * moncount中存放统计季度:一季度为1 以此类推 |
| | | * monnum 中存放年份*/ |
| | | @GetMapping("beyondTime") |
| | | * moncount中存放统计季度:一季度为1 以此类推 -3 |
| | | * monnum 中存放年份 -2020*/ |
| | | @PostMapping("beyondTime") |
| | | @ApiOperation(notes = "区域层次放在stationid中 battgroupnum 中存放统计方式:年度统计为0 季度统计为1 moncount中存放统计季度:一季度为1 以此类推 monnum 中存放年份",value="按地域和标称电压分组统计蓄电池组服役超期的数量") |
| | | public ServiceModel serchBeyondTime(@RequestBody BattInf bif){ |
| | | // bif=ActionUtil.getGson("yyyy-MM-dd").fromJson(result,BattInf.class); |
| | | |
| | | return service.serchBeyondTime(bif); |
| | | public ServiceModel serchBeyondTime(@ApiParam(value = "区域层次(字符串数字)",required = true) @RequestParam String stationId,@ApiParam(value = "统计方式:年度统计为0 季度统计为1",required = true) @RequestParam Integer battGroupNum,@ApiParam(value = "年份",required = true) @RequestParam Integer monNum,@ApiParam(value = "统计季度:一季度为1 以此类推",required = true) @RequestParam Integer monCount,@ApiParam(value = "",required = true) @RequestParam Date BattInUseDate,@ApiParam(value = "使用日期段 格式2021/02/01 08:16:35",required = true) @RequestParam Date BattInUseDate1) { |
| | | ServiceModel model= new ServiceModel(); |
| | | try { |
| | | Integer.parseInt(stationId); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | model.setMsg("参数不合法"); |
| | | return model; |
| | | } |
| | | BattInf binf = new BattInf(); |
| | | binf.setStationId(stationId); |
| | | binf.setBattGroupNum(battGroupNum); |
| | | binf.setMonNum(monNum); |
| | | binf.setMonCount(monCount); |
| | | binf.setBattInUseDate(BattInUseDate); |
| | | binf.setBattInUseDate1(BattInUseDate1); |
| | | return service.serchBeyondTime(binf); |
| | | } |
| | | |
| | | //6.4.8按地域和标称电压分组统计蓄电池组的数量(蓄电池组数量统计) |