lxw
2023-08-15 160e150009b51a39fa95d9462c3798ba28d51a09
src/main/java/com/whyc/service/BattTestDataStopService.java
@@ -35,8 +35,8 @@
        List<BattTestDataStop> listBehind = new ArrayList<>();//存放落后单体
        if (stopList != null && stopList.size() > 0) {
            for (int i = 0; i < stopList.size(); i++) {
                STDAH = battTestDataInf.getTestCurr();//标称电容
                MonomerVolType = battTestDataInf.getTestCap();//电压类型
                STDAH = battTestDataInf.getBattInf().getMonCapStd();//标称电容
                MonomerVolType = battTestDataInf.getBattInf().getMonVolStd();//电压类型
                current = stopList.get(i).getTestCurr();
                SumAH = stopList.get(i).getTestCap();
                MaxMonomerVol = battTestDataInf.getMaxMonvol();//最大电压
@@ -56,7 +56,10 @@
        }
        //查询平均截止电压值
        Float avgVol = mapper.calcAvgVol(battTestDataInf.getBattGroupId(), battTestDataInf.getTestRecordCount());
        avgVol = BigDecimal.valueOf(avgVol).setScale(3, BigDecimal.ROUND_HALF_UP).floatValue();
        if(avgVol!=null){
            avgVol = BigDecimal.valueOf(avgVol).setScale(3, BigDecimal.ROUND_HALF_UP).floatValue();
            battTestDataInf.setAvgVol(avgVol);
        }
        //整理编号和电压
        if (listBehind != null && listBehind.size() > 0) {
@@ -81,8 +84,6 @@
            battTestDataInf.setCapBehindMonCode(numStrN);
            battTestDataInf.setCapBehindMonNum(monSum);
        }
        battTestDataInf.setAvgVol(avgVol);
        return battTestDataInf;
    }