| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.ActionUtil; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.service.FileParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.Date; |
| | | |
| | | @RestController |
| | | @RequestMapping("fileParam") |
| | |
| | | return service.getMonVolStd(); |
| | | } |
| | | |
| | | @ApiOperation("按照筛选条件查询数据库信息") |
| | | @GetMapping("getDataByCondition") |
| | | public Response getDataByCondition(@RequestParam(required = false ,defaultValue = "1982-01-01 00:00:00") String startTime |
| | | , @RequestParam(required = false,defaultValue = "2222-01-01 00:00:00") String endTime |
| | | , @RequestParam(required = false) String battVol |
| | | ,@RequestParam(required = false ,defaultValue = "1") int pageCurr |
| | | ,@RequestParam(required = false ,defaultValue = "10") int pageSize |
| | | ,@RequestParam(required = false ,defaultValue = "0") int flag) { |
| | | Date testTime1= null; |
| | | Date testTime2= null; |
| | | try { |
| | | testTime1 = ActionUtil.sdfwithALL.parse(startTime); |
| | | testTime2 = ActionUtil.sdfwithALL.parse(endTime); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return service.getDataByCondition(testTime1,testTime2,battVol,pageCurr,pageSize,flag); |
| | | } |
| | | @ApiOperation("删除基站下数据") |
| | | @GetMapping("deleteDataById") |
| | | public Response deleteDataById(@RequestParam int stationId,@RequestParam int fileId){ |
| | | return service.deleteDataById(stationId,fileId); |
| | | } |
| | | |
| | | @ApiOperation("根据fileId获取参数信息") |
| | | @GetMapping("getParamByFileId") |
| | | public Response getParamByFileId(@RequestParam int fileId){ |
| | | return service.getParamByFileId(fileId); |
| | | } |
| | | |
| | | } |