whycxzp
2022-10-26 ada3e9094ecfb8b995c5580bbb59a1d64d89a801
src/main/java/com/whyc/controller/BattGroupDataController.java
@@ -1,5 +1,6 @@
package com.whyc.controller;
import com.whyc.dto.BattGroupStationInfoWithFileParam;
import com.whyc.dto.Response;
import com.whyc.pojo.BattgroupData;
import com.whyc.service.BattGroupDataService;
@@ -11,8 +12,8 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Api(tags = "电池组数据")
@RestController
@@ -24,16 +25,18 @@
    @ApiOperation("单数据分析-单体数据列表")
    @GetMapping("list")
    public Response getListWithTestTime(@RequestParam String battGroupId){
        List<BattgroupData> monList = service.getListWithTestTime(battGroupId);
        return new Response().set(1,monList);
    public Response getListWithTestTime(@RequestParam String fileId){
        //List<BattgroupData> monList = service.getListWithTestTime(fileId);
        BattGroupStationInfoWithFileParam info = service.getListWithTestTime(fileId);
        Map<String,String> map = service.getStandardDeviation(info.getDataList());
        return new Response().setII(1,info,map,null);
    }
    @ApiOperation(value = "对比分析-两组数据列表",notes = "data:第一行的基础数据,data2:第二行的基础数据," +
            "data3:key-value键值对,其中resChangeRate:内阻变化率,volChangeRate:电压变化率,resBalanceRate:内阻均一性,volBalanceRate:电压均一性")
            "data3:key-value键值对,其中resChangeRate:内阻变化率,volChangeRate:电压变化率,resBalanceRate:内阻均一性,volBalanceRate:电压均一性,fileParamBase:参考文件的参数")
    @GetMapping("comparedList")
    public Response getComparedList(@RequestParam String baseBattGroupId,@RequestParam String battGroupId){
        return service.getComparedList(baseBattGroupId,battGroupId);
    public Response getComparedList(@RequestParam String baseFileId,@RequestParam String fileId){
        return service.getComparedList(baseFileId,fileId);
    }
}