| | |
| | | package com.fgkj.controller; |
| | | |
| | | import com.fgkj.util.*; |
| | | |
| | | import com.fgkj.dto.Battresdata_inf; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.services.Battresdata_infService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private Battresdata_infService service; |
| | | |
| | | ServiceModel model = new ServiceModel(); |
| | | // private Battresdata_inf brdi; |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="新增") |
| | | public ServiceModel add(@RequestBody Battresdata_inf brdi) { |
| | | model = service.add(brdi); |
| | | @ApiOperation(value="新增") |
| | | public ServiceModel add(@RequestBody Battresdata_inf dataInf) { |
| | | ServiceModel model = service.add(dataInf); |
| | | return model; |
| | | } |
| | | |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="修改") |
| | | public ServiceModel update(@RequestBody Battresdata_inf brdi) { |
| | | model = service.update(brdi); |
| | | |
| | | //System.out.println(result); |
| | | @ApiOperation(value="修改") |
| | | public ServiceModel update(@RequestBody Battresdata_inf dataInf) { |
| | | ServiceModel model = service.update(dataInf); |
| | | return model; |
| | | } |
| | | |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel delete(@RequestBody Battresdata_inf brdi) { |
| | | model = service.delete(brdi); |
| | | |
| | | //System.out.println(result); |
| | | @ApiOperation(value="删除") |
| | | public ServiceModel delete(@RequestParam int num) { |
| | | ServiceModel model = service.delete(num); |
| | | return model; |
| | | } |
| | | |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "",value="筛选存在battresdata_inf表中的数据") |
| | | public ServiceModel serchByCondition(@RequestBody Battresdata_inf brdi) { |
| | | model = service.serchByCondition(brdi); |
| | | |
| | | //System.out.println(result); |
| | | @ApiOperation(value="筛选存在battresdata_inf表中的数据") |
| | | public ServiceModel serchByCondition(@RequestBody Battresdata_inf dataInf) { |
| | | ServiceModel model = service.serchByCondition(dataInf); |
| | | return model; |
| | | } |
| | | |
| | | @GetMapping("all") |
| | | @ApiOperation(notes = "",value="all") |
| | | @ApiOperation(value="all") |
| | | public ServiceModel searchAll() { |
| | | model = service.searchAll(); |
| | | |
| | | //System.out.println(result); |
| | | ServiceModel model = service.searchAll(); |
| | | return model; |
| | | } |
| | | |
| | | //6.4.1根据条件查询符合条件的测试完成的电池组(蓄电池电导测试完成率) |
| | | @GetMapping("complete") |
| | | @ApiOperation(notes = "",value="条件查询符合条件的测试完成的电池组(蓄电池电导测试完成率)") |
| | | public ServiceModel serchComplete(@RequestBody Battresdata_inf b){ |
| | | @ApiOperation(value="条件查询符合条件的测试完成的电池组(蓄电池电导测试完成率)") |
| | | public ServiceModel serchComplete(@RequestBody Battresdata_inf dataInf){ |
| | | // Battresdata_inf b=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Battresdata_inf.class); |
| | | ServiceModel model=service.serchComplete(b); |
| | | ServiceModel model=service.serchComplete(dataInf); |
| | | return model; |
| | | } |
| | | |
| | | //6.4.3根据条件查询符合条件的测试完成的电池组(蓄电池电导合格率) |
| | | @GetMapping("serRate") |
| | | @ApiOperation(notes = "",value="条件查询符合条件的测试完成的电池组(蓄电池电导合格率)") |
| | | public ServiceModel serchSer(@RequestBody Battresdata_inf b){ |
| | | public ServiceModel serchSer(@RequestBody Battresdata_inf dataInf){ |
| | | // Battresdata_inf b=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Battresdata_inf.class); |
| | | ServiceModel model=service.serchSer(b); |
| | | ServiceModel model=service.serchSer(dataInf); |
| | | return model; |
| | | } |
| | | |
| | | //6.4.3根据条件查询符合条件的测试完成的电池组(蓄电池电导合格率) |
| | | @GetMapping("judge") |
| | | @ApiOperation(value="judge调试") |
| | | public ServiceModel judge(@RequestParam int battGroupId){ |
| | | // Battresdata_inf b=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Battresdata_inf.class); |
| | | Battresdata_inf battresdata_inf = new Battresdata_inf(); |
| | | battresdata_inf.setBattGroupId(battGroupId); |
| | | ServiceModel model=service.judge(battresdata_inf); |
| | | return model; |
| | | } |
| | | |