| | |
| | | import com.fgkj.services.history.Batt_realdataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | @RequestMapping("battRealData") |
| | | @RestController |
| | |
| | | private Batt_realdataService service; |
| | | |
| | | //按照时间倒序查出具体电池组的所有信息 |
| | | @GetMapping("byCondition") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "",value="按照时间倒序查出具体电池组的所有信息") |
| | | public ServiceModel serchByCondition(@RequestBody Batt_realdata realData) { |
| | | // Batt_realdata breal=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_realdata.class); |
| | | ServiceModel model=service.serchByCondition(realData); |
| | | public ServiceModel serchByCondition(@ApiParam(value = "battGroupId 1000002", required = true) @RequestParam Integer battGroupId, @ApiParam(value = "前一时间 格式2017/12/29 09:28:31", required = true) @RequestParam Date record_time, @ApiParam(value = "后一时间", required = true) @RequestParam Date record_time1,@RequestParam Integer pageNum,@RequestParam Integer pageSize) { |
| | | Batt_realdata realData = new Batt_realdata(); |
| | | realData.setBattGroupId(battGroupId); |
| | | realData.setRecord_time(record_time); |
| | | realData.setRecord_time1(record_time1); |
| | | ServiceModel model = service.serchByCondition(realData,pageNum,pageSize); |
| | | |
| | | return model; |
| | | } |