whyclxw
1 天以前 7a8d50965cb69ecc348a6b11d902409628012cd0
src/main/java/com/whyc/service/BatttestdataInfService.java
@@ -7,7 +7,9 @@
import com.whyc.constant.PwrCapperformanceEnum;
import com.whyc.constant.StopReasonEnum;
import com.whyc.dto.Real.TestDataDto;
import com.whyc.dto.ResSocreHehavior;
import com.whyc.dto.Response;
import com.whyc.dto.SocreHehaviorDto;
import com.whyc.dto.Statistic.*;
import com.whyc.factory.BattCapFactory;
import com.whyc.mapper.BatttestdataInfMapper;
@@ -27,6 +29,7 @@
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class BatttestdataInfService {
@@ -289,6 +292,7 @@
        map.put("standCapDiff",0f);
        Float sumCap=0f;
        Float maxCap=0f;
        Float minCap=0f;
        Float standCapDiff=0f;
        List<ComPareChart> capList=new ArrayList<>();
        List<ComPareChart> resList=new ArrayList<>();
@@ -312,11 +316,14 @@
            res.setDevName(binf.getDevName());
            res.setProduct(binf.getProduct());
            res.setInuseTime(binf.getInuseTime());
            res.setInuseTimeStr(ActionUtil.sdfwithday.format(binf.getInuseTime()));
            res.setMonvolstd(binf.getMonvolstd());
            res.setMoncapstd(binf.getMoncapstd());
            res.setStationId(binf.getStationId());
            res.setPowerId(binf.getPowerId());
            res.setDevId(binf.getDevId());
            res.setBattgroupId(binf.getBattgroupId());
            res.setFullName(binf.getFullName());
            //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电)
            BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),stic.getTestStartTime(),stic.getTestEndTime());
            if(tinf==null){
@@ -354,9 +361,11 @@
                    String precentCap = String.format("%.5f",(grouprealCap/binf.getMoncapstd()*100));
                    res.setPrecentCap(precentCap);
                    sumCap+=grouprealCap;
                    standCapDiff=grouprealCap-maxCap;
                    if(grouprealCap>=maxCap){
                        maxCap=grouprealCap;
                    }
                    if(grouprealCap<=minCap){
                        minCap=grouprealCap;
                    }
                }
            }
@@ -382,12 +391,98 @@
            resList.add(resChart);
        }
        map.put("avgCap",sumCap/binfList.size());
        map.put("standCapDiff",standCapDiff);
        map.put("standCapDiff",maxCap-minCap);
        PageInfo pageInfo=PageInfoUtils.list2PageInfo(comparelist, stic.getPageNum(), stic.getPageSize());
        return new Response().setIII(1,comparelist.size()>0,pageInfo,map,"蓄电池组对比分析界面(同一品牌同一时间)");
    }
    /*蓄电池组对比分析导出使用
     */
    public List<SticCompare15Res> exportBattCompare(BattCompareStic stic) {
        //获取核容优劣,损坏参数
        List<AppParam> paramList=appParamService.getHrParam();
        Float badValue=0f;
        Float damageValue=0f;
        if(paramList!=null){
            for (AppParam param:paramList) {
                if(param.getParamNamePsx().equals("batt_mon_deteriorate_val")){
                    badValue=param.getParamValue();
                }
                if(param.getParamNamePsx().equals("batt_mon_damage_val")){
                    damageValue=param.getParamValue();
                }
            }
        }
        //1查询符合条件的电池组
        List<BattInf> binfList=battInfService.getBattCompare15Statistic(stic);
        List<SticCompare15Res> comparelist=new ArrayList<>();
        if(binfList!=null&&binfList.size()>=0){
            for (BattInf binf:binfList) {
                SticCompare15Res res=new SticCompare15Res();
                res.setProvice(binf.getProvice());
                res.setCity(binf.getCity());
                res.setCountry(binf.getCountry());
                res.setStationName(binf.getStationName());
                res.setBattgroupName(binf.getBattgroupName());
                res.setDevName(binf.getDevName());
                res.setProduct(binf.getProduct());
                res.setInuseTime(binf.getInuseTime());
                res.setInuseTimeStr(ActionUtil.sdfwithday.format(binf.getInuseTime()));
                res.setMonvolstd(binf.getMonvolstd());
                res.setMoncapstd(binf.getMoncapstd());
                res.setStationId(binf.getStationId());
                res.setPowerId(binf.getPowerId());
                res.setDevId(binf.getDevId());
                res.setBattgroupId(binf.getBattgroupId());
                res.setFullName(binf.getFullName());
                //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电)
                BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),stic.getTestStartTime(),stic.getTestEndTime());
                if(tinf==null){
                    res.setRealCap(0f);
                    res.setPrecentCap("0.00000");
                    res.setCapperformance(BattCapperformanceEnum.getValue(BattCapperformanceEnum.BATTSTATE_4.getStateId()));
                    res.setStopReason("--");
                    res.setFloatGroupVol(0f);
                }else{
                    res.setStopReason(StopReasonEnum.getValue(tinf.getTestStoptype()));
                    res.setFloatGroupVol(tinf.getFloatGroupVol());
                    //找这次放电的最后一笔数据
                    List<BatttestdataId> idDataList=battTestdataIdService.getLastDataByBattgroupId(tinf.getBattgroupId(),tinf.getTestRecordCount(),tinf.getRecordNum());
                    if(idDataList==null||idDataList.size()==0){
                        res.setRealCap(0f);
                        res.setPrecentCap("0.00000");
                        res.setCapperformance(BattCapperformanceEnum.getValue(BattCapperformanceEnum.BATTSTATE_4.getStateId()));
                        res.setFloatGroupVol(0f);
                    }else{
                        Float moncapStd=binf.getMoncapstd();
                        int hourRate = BattCapFactory.GetHourRate(tinf.getTestCap(), tinf.getTestCurr());
                        Float grouprealCap = (float) BattCapFactory.GetMonomerCap(binf.getMoncapstd(), hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), tinf.getMinMonvol(), tinf.getGroupVol(), BattCapFactory.CapType_Real);
                        //Float restCap = (float) BattCapFactory.GetMonomerCap(binf.getMoncapstd(), hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), tinf.getMinMonvol(), tinf.getGroupVol(), BattCapFactory.CapType_Rest);
                        res.setRealCap(grouprealCap);
                        if(grouprealCap>=moncapStd*badValue){
                            res.setCapperformance(BattCapperformanceEnum.getValue(BattCapperformanceEnum.BATTSTATE_1.getStateId()));
                        }
                        if(grouprealCap<=moncapStd*damageValue){
                            res.setCapperformance(BattCapperformanceEnum.getValue(BattCapperformanceEnum.BATTSTATE_3.getStateId()));
                        }
                        if((grouprealCap>moncapStd*damageValue)&&(grouprealCap<moncapStd*badValue)){
                            res.setCapperformance(BattCapperformanceEnum.getValue(BattCapperformanceEnum.BATTSTATE_2.getStateId()));
                        }
                        //保留5位小数
                        String precentCap = String.format("%.5f",(grouprealCap/binf.getMoncapstd()*100));
                        res.setPrecentCap(precentCap);
                    }
                }
                if(stic.getPerformance()==null){
                    comparelist.add(res);
                }else{
                    if(res.getCapperformance().equals(BattCapperformanceEnum.getValue(stic.getPerformance()))){
                        comparelist.add(res);
                    }
                }
            }
        }
        return comparelist;
    }
    //蓄电池组对比分析界面(不同品牌同一时间)(1.2.16)
    public Response getBattCompare16Statistic(BattCompareStic stic) {
        //获取核容优劣,损坏参数
@@ -1045,4 +1140,356 @@
        wrapper.last(" limit 1");
        return mapper.selectOne(wrapper);
    }
    //点击右侧折线图画出电池组所有完整周期的实际容量变化图(1.2.15/16/17)
    public Response getRealCapChangeByBattgroupId(Integer battgroupId) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("battgroup_id", battgroupId);
        wrapper.eq("test_type", 3);
        wrapper.eq("test_starttype", 3);
        wrapper.eq("data_available", 1);//一次有效的记录
        wrapper.last("  ORDER BY test_starttime DESC ");
        List<BatttestdataInf> list = mapper.selectList(wrapper);
        //获取电池组的标称容量
        BattInf binf=battInfService.getBattgroupIdInf(battgroupId);
        List<ComPareChangeCurve> curvelist=new ArrayList<>();
        for (BatttestdataInf tinf:list) {
            int hourRate = BattCapFactory.GetHourRate(tinf.getTestCap(), tinf.getTestCurr());
            Float realCap = (float) BattCapFactory.GetMonomerCap(binf.getMoncapstd(), hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), tinf.getMinMonvol(), tinf.getGroupVol(), BattCapFactory.CapType_Real);
            ComPareChangeCurve curve=new ComPareChangeCurve();
            curve.setBattgroupId(battgroupId);
            curve.setStartTime(tinf.getTestStarttime());
            curve.setCurveValue(realCap);
            curvelist.add(curve);
        }
        return new Response().setII(1,list.size()>0,curvelist,"点击右侧折线图画出电池组所有完整周期的实际容量变化图(1.2.15/16/17)");
    }
    //点击右侧折线图画出电池组所有完整周期的浮充电压变化图(1.2.15/16/17)
    public Response getFloatGroupVolChangeByBattgroupId(Integer battgroupId) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("battgroup_id", battgroupId);
        wrapper.eq("test_type", 3);
        wrapper.eq("test_starttype", 3);
        wrapper.eq("data_available", 1);//一次有效的记录
        wrapper.last("  ORDER BY test_starttime asc ");
        List<BatttestdataInf> list = mapper.selectList(wrapper);
        List<ComPareChangeCurve> curvelist=new ArrayList<>();
        for (BatttestdataInf tinf:list) {
            ComPareChangeCurve curve=new ComPareChangeCurve();
            curve.setBattgroupId(battgroupId);
            curve.setStartTime(tinf.getTestStarttime());
            curve.setCurveValue(tinf.getFloatGroupVol());
            curvelist.add(curve);
        }
        return new Response().setII(1,list.size()>0,curvelist,"点击右侧折线图画出电池组所有完整周期的浮充电压变化图(1.2.15/16/17)");
    }
    //弹窗根据设置的权重表格评分
    public Response getScoreByHehavior(SocreHehaviorDto dto) {
        List<ResSocreHehavior> reslist=new ArrayList<>();
        //询符合条件的电池组权重表格评分
        List<BattInf> binfList=battInfService.getScoreByHehavior(dto);
        if(binfList==null||binfList.size()==0){
            return new Response().set(1,false,"当前用户未管理满足条件的电池组");
        }else{
            Map<String, List<BattInf>> map=new HashMap<>();
            if(dto.getSelectType()==1){//选品牌,选时间
                map=binfList.stream().collect(Collectors.groupingBy(item -> item.getProduct() + '-' + item.getInuseYear()));
                groupby1(dto,reslist,map);
            }
            if(dto.getSelectType()==2){//选品牌,不选时间
                map=binfList.stream().collect(Collectors.groupingBy(item -> item.getProduct()));
                groupby2(dto,reslist,map);
            }
            if(dto.getSelectType()==3){//不选品牌,选时间
                map=binfList.stream().collect(Collectors.groupingBy(item -> ""+item.getInuseYear()));
                groupby3(dto,reslist,map);
            }
            if(dto.getSelectType()==4){//不选品牌不选时间
                map=binfList.stream().collect(Collectors.groupingBy(item -> item.getMonvolstd().toString() + '-' + item.getMoncapstd()));
                groupby4(dto,reslist,map);
            }
        }
        return new Response().setII(1,reslist.size()>0,reslist,"弹窗根据设置的权重表格评分");
    }
    //不选品牌不选时间
    private void groupby4(SocreHehaviorDto dto,List<ResSocreHehavior> reslist, Map<String, List<BattInf>> map) {
        //获取核容优劣,损坏参数
        List<AppParam> paramList=appParamService.getHrParam();
        Float badValue=0f;
        Float damageValue=0f;
        if(paramList!=null){
            for (AppParam param:paramList) {
                if(param.getParamNamePsx().equals("batt_mon_deteriorate_val")){
                    badValue=param.getParamValue();
                }
                if(param.getParamNamePsx().equals("batt_mon_damage_val")){
                    damageValue=param.getParamValue();
                }
            }
        }
        for (String groupType : map.keySet()) {
            List<BattInf> list=map.get(groupType);
            Map<String,List<BattInf>> groupMap=list.stream().collect(Collectors.groupingBy(item -> item.getProduct()+"-"+item.getBattYear()));
            for (String group : groupMap.keySet()) {
                List<BattInf> grouplist=groupMap.get(group);
                ResSocreHehavior res=new ResSocreHehavior();
                Integer goodBatt=0;
                Integer badBatt=0;
                Integer damageBatt=0;
                Integer nodisBatt=0;
                Integer sumBatt=grouplist.size();
                res.setSumBatt(sumBatt);
                String[] productYearparts = group.split("-"); // 使用split方法分割字符串
                res.setProduct(productYearparts[0]);
                res.setInuseYear(productYearparts[1]+"年内");
                res.setMonvolstd(dto.getMonvolstd());
                res.setMoncapstd(dto.getMoncapstd());
                for (BattInf binf:grouplist) {
                    Float moncapStd=binf.getMoncapstd();
                    //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电)
                    BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),null,null);
                    if(tinf==null){
                        nodisBatt++;
                    }else{
                        int hourRate = BattCapFactory.GetHourRate(tinf.getTestCap(), tinf.getTestCurr());
                        Float grouprealCap = (float) BattCapFactory.GetMonomerCap(moncapStd, hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), tinf.getMinMonvol(), tinf.getGroupVol(), BattCapFactory.CapType_Real);
                        if(grouprealCap>=moncapStd*badValue){
                            goodBatt++;
                        }
                        if(grouprealCap<=moncapStd*damageValue){
                            damageBatt++;
                        }
                        if((grouprealCap>moncapStd*damageValue)&&(grouprealCap<moncapStd*badValue)){
                            badBatt++;
                        }
                    }
                }
                //保留5位小数
                String goodPercent = String.format("%.5f",(goodBatt/sumBatt*100.0));
                res.setGoodBatt(goodBatt);
                res.setGoodPercent(goodPercent);
                String badPercent = String.format("%.5f",(badBatt/sumBatt*100.0));
                res.setBadBatt(badBatt);
                res.setBadPercent(badPercent);
                String damagePercent = String.format("%.5f",(damageBatt/sumBatt*100.0));
                res.setDamagebatt(damageBatt);
                res.setDamagePercent(damagePercent);
                String nodisPercent = String.format("%.5f",(nodisBatt/sumBatt*100.0));
                res.setNodisbatt(nodisBatt);
                res.setNodisPercent(nodisPercent);
                res.setScore(0f);
                reslist.add(res);
            }
        }
    }
    //不选品牌,选时间
    private void groupby3(SocreHehaviorDto dto,List<ResSocreHehavior> reslist, Map<String, List<BattInf>> map) {
        //获取核容优劣,损坏参数
        List<AppParam> paramList=appParamService.getHrParam();
        Float badValue=0f;
        Float damageValue=0f;
        if(paramList!=null){
            for (AppParam param:paramList) {
                if(param.getParamNamePsx().equals("batt_mon_deteriorate_val")){
                    badValue=param.getParamValue();
                }
                if(param.getParamNamePsx().equals("batt_mon_damage_val")){
                    damageValue=param.getParamValue();
                }
            }
        }
        for (String groupType : map.keySet()) {
            List<BattInf> list=map.get(groupType);
            Map<String,List<BattInf>> productMap=list.stream().collect(Collectors.groupingBy(item -> item.getProduct()));
            for (String product : productMap.keySet()) {
                List<BattInf> productList=productMap.get(product);
                ResSocreHehavior res=new ResSocreHehavior();
                res.setInuseYear(dto.getInuseYear()+"年内");
                res.setProduct(product);
                Integer goodBatt=0;
                Integer badBatt=0;
                Integer damageBatt=0;
                Integer nodisBatt=0;
                Integer sumBatt=productList.size();
                res.setSumBatt(sumBatt);
                res.setMonvolstd(dto.getMonvolstd());
                res.setMoncapstd(dto.getMoncapstd());
                for (BattInf binf:productList) {
                    Float moncapStd=binf.getMoncapstd();
                    //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电)
                    BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),null,null);
                    if(tinf==null){
                        nodisBatt++;
                    }else{
                        int hourRate = BattCapFactory.GetHourRate(tinf.getTestCap(), tinf.getTestCurr());
                        Float grouprealCap = (float) BattCapFactory.GetMonomerCap(moncapStd, hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), tinf.getMinMonvol(), tinf.getGroupVol(), BattCapFactory.CapType_Real);
                        if(grouprealCap>=moncapStd*badValue){
                            goodBatt++;
                        }
                        if(grouprealCap<=moncapStd*damageValue){
                            damageBatt++;
                        }
                        if((grouprealCap>moncapStd*damageValue)&&(grouprealCap<moncapStd*badValue)){
                            badBatt++;
                        }
                    }
                }
                //保留5位小数
                String goodPercent = String.format("%.5f",(goodBatt/sumBatt*100.0));
                res.setGoodBatt(goodBatt);
                res.setGoodPercent(goodPercent);
                String badPercent = String.format("%.5f",(badBatt/sumBatt*100.0));
                res.setBadBatt(badBatt);
                res.setBadPercent(badPercent);
                String damagePercent = String.format("%.5f",(damageBatt/sumBatt*100.0));
                res.setDamagebatt(damageBatt);
                res.setDamagePercent(damagePercent);
                String nodisPercent = String.format("%.5f",(nodisBatt/sumBatt*100.0));
                res.setNodisbatt(nodisBatt);
                res.setNodisPercent(nodisPercent);
                res.setScore(0f);
                reslist.add(res);
            }
        }
    }
    //选品牌,不选时间
    private void groupby2(SocreHehaviorDto dto,List<ResSocreHehavior> reslist, Map<String, List<BattInf>> map) {
        //获取核容优劣,损坏参数
        List<AppParam> paramList=appParamService.getHrParam();
        Float badValue=0f;
        Float damageValue=0f;
        if(paramList!=null){
            for (AppParam param:paramList) {
                if(param.getParamNamePsx().equals("batt_mon_deteriorate_val")){
                    badValue=param.getParamValue();
                }
                if(param.getParamNamePsx().equals("batt_mon_damage_val")){
                    damageValue=param.getParamValue();
                }
            }
        }
        for (String groupType : map.keySet()) {
            List<BattInf> list=map.get(groupType);
            Map<String,List<BattInf>> timeMap=list.stream().collect(Collectors.groupingBy(item -> item.getBattYear().toString()));
            for (String time : timeMap.keySet()) {
                List<BattInf> timeList=timeMap.get(time);
                ResSocreHehavior res=new ResSocreHehavior();
                res.setProduct(dto.getProduct());
                res.setInuseYear(time+"年内");
                Integer goodBatt=0;
                Integer badBatt=0;
                Integer damageBatt=0;
                Integer nodisBatt=0;
                Integer sumBatt=timeList.size();
                res.setSumBatt(sumBatt);
                res.setMonvolstd(dto.getMonvolstd());
                res.setMoncapstd(dto.getMoncapstd());
                for (BattInf binf:timeList) {
                    Float moncapStd=binf.getMoncapstd();
                    //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电)
                    BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),null,null);
                    if(tinf==null){
                        nodisBatt++;
                    }else{
                        int hourRate = BattCapFactory.GetHourRate(tinf.getTestCap(), tinf.getTestCurr());
                        Float grouprealCap = (float) BattCapFactory.GetMonomerCap(moncapStd, hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), tinf.getMinMonvol(), tinf.getGroupVol(), BattCapFactory.CapType_Real);
                        if(grouprealCap>=moncapStd*badValue){
                            goodBatt++;
                        }
                        if(grouprealCap<=moncapStd*damageValue){
                            damageBatt++;
                        }
                        if((grouprealCap>moncapStd*damageValue)&&(grouprealCap<moncapStd*badValue)){
                            badBatt++;
                        }
                    }
                }
                //保留5位小数
                String goodPercent = String.format("%.5f",(goodBatt/sumBatt*100.0));
                res.setGoodBatt(goodBatt);
                res.setGoodPercent(goodPercent);
                String badPercent = String.format("%.5f",(badBatt/sumBatt*100.0));
                res.setBadBatt(badBatt);
                res.setBadPercent(badPercent);
                String damagePercent = String.format("%.5f",(damageBatt/sumBatt*100.0));
                res.setDamagebatt(damageBatt);
                res.setDamagePercent(damagePercent);
                String nodisPercent = String.format("%.5f",(nodisBatt/sumBatt*100.0));
                res.setNodisbatt(nodisBatt);
                res.setNodisPercent(nodisPercent);
                res.setScore(0f);
                reslist.add(res);
            }
        }
    }
    //选品牌,选时间
    private void groupby1(SocreHehaviorDto dto,List<ResSocreHehavior> reslist, Map<String, List<BattInf>> map) {
        //获取核容优劣,损坏参数
        List<AppParam> paramList=appParamService.getHrParam();
        Float badValue=0f;
        Float damageValue=0f;
        if(paramList!=null){
            for (AppParam param:paramList) {
                if(param.getParamNamePsx().equals("batt_mon_deteriorate_val")){
                    badValue=param.getParamValue();
                }
                if(param.getParamNamePsx().equals("batt_mon_damage_val")){
                    damageValue=param.getParamValue();
                }
            }
        }
        for (String groupType : map.keySet()) {
            List<BattInf> list=map.get(groupType);
            ResSocreHehavior res=new ResSocreHehavior();
            res.setProduct(dto.getProduct());
            res.setInuseYear(dto.getInuseYear()+"年内");
            Integer goodBatt=0;
            Integer badBatt=0;
            Integer damageBatt=0;
            Integer nodisBatt=0;
            Integer sumBatt=list.size();
            res.setSumBatt(sumBatt);
            res.setMonvolstd(dto.getMonvolstd());
            res.setMoncapstd(dto.getMoncapstd());
            for (BattInf binf:list) {
                Float moncapStd=binf.getMoncapstd();
                //2.获取电池组在给定时间段的放电记录(指定时间段的标准核容放电)
                BatttestdataInf tinf =getLastStandardTestDataByTime(binf.getBattgroupId(),null,null);
                if(tinf==null){
                    nodisBatt++;
                }else{
                    int hourRate = BattCapFactory.GetHourRate(tinf.getTestCap(), tinf.getTestCurr());
                    Float grouprealCap = (float) BattCapFactory.GetMonomerCap(moncapStd, hourRate, tinf.getTestCap(), tinf.getMaxMonvol(), tinf.getMinMonvol(), tinf.getGroupVol(), BattCapFactory.CapType_Real);
                    if(grouprealCap>=moncapStd*badValue){
                        goodBatt++;
                    }
                    if(grouprealCap<=moncapStd*damageValue){
                        damageBatt++;
                    }
                    if((grouprealCap>moncapStd*damageValue)&&(grouprealCap<moncapStd*badValue)){
                        badBatt++;
                    }
                }
            }
            //保留5位小数
            String goodPercent = String.format("%.5f",(goodBatt/sumBatt*100.0));
            res.setGoodBatt(goodBatt);
            res.setGoodPercent(goodPercent);
            String badPercent = String.format("%.5f",(badBatt/sumBatt*100.0));
            res.setBadBatt(badBatt);
            res.setBadPercent(badPercent);
            String damagePercent = String.format("%.5f",(damageBatt/sumBatt*100.0));
            res.setDamagebatt(damageBatt);
            res.setDamagePercent(damagePercent);
            String nodisPercent = String.format("%.5f",(nodisBatt/sumBatt*100.0));
            res.setNodisbatt(nodisBatt);
            res.setNodisPercent(nodisPercent);
            res.setScore(0f);
            reslist.add(res);
        }
    }
}