whyclxw
2024-01-16 c1f8b80068acb234ad01873ee7756a1cc29ee0be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.whyc.controller;
 
import com.whyc.dto.BattGroupStationInfoWithFileParam;
import com.whyc.dto.Response;
import com.whyc.pojo.BattgroupData;
import com.whyc.service.BattGroupDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
import java.util.Map;
 
@Api(tags = "电池组数据")
@RestController
@RequestMapping("battGroupData")
public class BattGroupDataController {
 
    @Autowired
    private BattGroupDataService service;
 
    @ApiOperation("单数据分析-单体数据列表")
    @GetMapping("list")
    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:电压均一性,fileParamBase:参考文件的参数")
    @GetMapping("comparedList")
    public Response getComparedList(@RequestParam String baseFileId,@RequestParam String fileId){
        return service.getComparedList(baseFileId,fileId);
    }
 
}