whycrzg
2021-02-23 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4
src/main/java/com/fgkj/controller/Batttestdata_infController.java
@@ -1,35 +1,36 @@
package com.fgkj.controller;
import com.fgkj.util.*;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Batt_Maint_Dealarm;
import com.fgkj.dto.Batttestdata_inf;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.Batttestdata_infService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
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 javax.annotation.Resource;
import java.text.ParseException;
@RequestMapping("battTestDataInf")
@RestController
@Api
@Api(tags = "battTestDataInf接口")
//Perry TODO
public class Batttestdata_infController{
   
   private ServiceModel model;
   ServiceModel model = new ServiceModel();
   @Autowired
   @Resource
   private Batttestdata_infService service;
   // private Batttestdata_inf bti;
   // private Batt_Maint_Dealarm bmd;
   
   @GetMapping("byInfo")
   @ApiOperation(notes = "",value="历史数据查询")
   public ServiceModel findByInfo(@RequestBody Batttestdata_inf bti){
      model=service.serchByCondition(bti);
      
@@ -40,6 +41,7 @@
    * 根据电池组id查询电池组的inf表中的放电信息
    */
   @GetMapping("battTestInfDataById")
   @ApiOperation(notes = "",value="电池组id查询电池组的inf表中的放电信息")
   public ServiceModel searchBattTestInfDataById(@RequestBody Batttestdata_inf bti){
      // Batttestdata_inf bti = ActionUtil.getGson().fromJson(json, Batttestdata_inf.class);
      model=service.serchByCondition(bti);
@@ -49,6 +51,7 @@
   
   //0.7电测放电测试比例
   @GetMapping("testScale")
   @ApiOperation(notes = "",value="电测放电测试比例")
   public ServiceModel searchTestsCale(@RequestBody Batt_Maint_Dealarm bmd){
      try {
         model=service.serchByInfo(bmd);
@@ -61,6 +64,7 @@
   
   //0.10电池健康率
   @GetMapping("healthRate")
   @ApiOperation(notes = "",value="电池健康率")
   public ServiceModel searchGood(){
      model=service.serchGood();
      
@@ -69,6 +73,7 @@
   
   //6.4.2根据条件查询符合条件的测试完成的电池组(蓄电池放电测试完成率)
   @GetMapping("completeRate")
   @ApiOperation(notes = "",value="条件查询符合条件的测试完成的电池组(蓄电池放电测试完成率)")
   public ServiceModel serchComplete(@RequestBody Batttestdata_inf b){
      // Batttestdata_inf b=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Batttestdata_inf.class);
      ServiceModel model=service.serchComplete(b);
@@ -78,6 +83,7 @@
   
   //6.4.4根据条件查询符合条件的测试完成的电池组(蓄电池容量预警)
   @GetMapping("capWarning")
   @ApiOperation(notes = "",value="条件查询符合条件的测试完成的电池组(蓄电池容量预警)")
   public ServiceModel serchCap(@RequestBody Batttestdata_inf b){
      // Batttestdata_inf b=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Batttestdata_inf.class);
      ServiceModel model=service.serchCap(b);
@@ -87,6 +93,7 @@
   
   //电池组历史放电数据续航能力查询
   @GetMapping("battLife")
   @ApiOperation(notes = "",value="电池组历史放电数据续航能力查询")
    public ServiceModel serchBattLife(@RequestBody BattInf binf){
       // BattInf binf = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, BattInf.class);
       ServiceModel model = new ServiceModel();
@@ -100,6 +107,7 @@
    /* 根据电池组id查询电池组的inf表中的放电信息    <!------    跨域访问     --------->
    */
    @GetMapping("battTestInfDataById_ky")
   @ApiOperation(tags = "跨域", notes = "",value="根据电池组id查询电池组的inf表中的放电信息 跨域专用")
   public ServiceModel searchBattTestInfDataById_ky(@RequestBody Batttestdata_inf bti){
      // Batttestdata_inf bti = ActionUtil.getGson().fromJson(json, Batttestdata_inf.class);
      model=service.serchByCondition_ky(bti);