| | |
| | | package com.fgkj.controller; |
| | | |
| | | import com.fgkj.util.*; |
| | | |
| | | import com.fgkj.dto.BattInf; |
| | | import com.fgkj.dto.Battresdata; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.services.BattresdataService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RequestMapping("battResData") |
| | | @RestController |
| | | @Api |
| | | @Api(tags = "battResData接口") |
| | | //Perry TODO |
| | | public class BattresdataController { |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private BattresdataService service; |
| | | |
| | | // private Battresdata brd; |
| | | |
| | | //根据电池组id和单体id查询内阻历史信息 |
| | | @GetMapping("monHistory") |
| | | @ApiOperation(notes = "",value="电池组id和单体id查询内阻历史信息") |
| | | public ServiceModel serchByMonHistory(@RequestBody BattInf binf) { |
| | | // BattInf binf=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class); |
| | | ServiceModel model = service.serchByMonHistory(binf); |
| | |
| | | } |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="新增") |
| | | public ServiceModel add(@RequestBody Battresdata brd) { |
| | | ServiceModel model = service.add(brd); |
| | | return model; |
| | | } |
| | | |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="修改") |
| | | public ServiceModel update(@RequestBody Battresdata brd) { |
| | | ServiceModel model = service.update(brd); |
| | | return model; |
| | | } |
| | | |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel delete(@RequestBody Battresdata brd) { |
| | | ServiceModel model = service.delete(brd); |
| | | return model; |
| | | } |
| | | |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "",value="byCondition") |
| | | public ServiceModel serchByCondition(@RequestBody Battresdata brd) { |
| | | |
| | | ServiceModel model = service.serchByCondition(brd); |
| | |
| | | } |
| | | |
| | | @GetMapping("all") |
| | | @ApiOperation(notes = "",value="all") |
| | | public ServiceModel searchAll(@RequestBody Battresdata brd) { |
| | | ServiceModel model = service.searchAll(brd); |
| | | return model; |