whycrzg
2021-02-19 6c8461135430e749c5349aa93184999b5f3450a6
src/main/java/com/fgkj/controller/Ld9/Ld9testdataController.java
@@ -5,10 +5,7 @@
import com.fgkj.services.Ld9.Ld9testdataService;
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 org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -21,19 +18,26 @@
   private Ld9testdataService service;
   
   //历史数据查询
   @GetMapping("byCondition")
   @ApiOperation(notes = "Table 'db_ld9_testdata.tb_ld9testdata_0' doesn't exist",value="历史数据查询")
   public ServiceModel serchByCondition(@RequestBody Ld9testdata ld9) {
      // Ld9testdata ld9=ActionUtil.getGson().fromJson(json, Ld9testdata.class);
   @PostMapping("byCondition")
   @ApiOperation(notes = "",value="历史数据查询")
   public ServiceModel serchByCondition(@RequestParam Integer battGroupId,@RequestParam Integer test_record_count,
                               @RequestParam Integer record_num,@RequestParam Integer test_monnum) {
      Ld9testdata ld9 = new Ld9testdata();
      ld9.setBattGroupId(battGroupId);         //1000002
      ld9.setTest_record_count(test_record_count);//2
      ld9.setRecord_num(record_num);            //2
      ld9.setTest_monnum(test_monnum);         //1
      ServiceModel model=service.serchByCondition(ld9);
      return model;
   }
   //查询某次测试下电池组节数放电情况
   @GetMapping("byInfo")
   @PostMapping("byInfo")
   @ApiOperation(notes = "",value="查询某次测试下电池组节数放电情况")
   public ServiceModel serchByInfo(@RequestBody Ld9testdata ld9) {
      // Ld9testdata ld9=ActionUtil.getGson().fromJson(json, Ld9testdata.class);
   public ServiceModel serchByInfo(@RequestParam Integer battGroupId,@RequestParam Integer test_record_count) {
      Ld9testdata ld9 = new Ld9testdata();
      ld9.setBattGroupId(battGroupId);
      ld9.setTest_record_count(test_record_count);
      ServiceModel model=service.serchByInfo(ld9);
      return model;