whycxzp
2025-04-14 8557f4a954278b76a3054ee1edbb93f656b533ba
更新容量
3个文件已修改
18 ■■■■■ 已修改文件
src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BattTestInfService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BattTestInfMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/db_dis_batt/BattTestInf.java
@@ -99,4 +99,12 @@
    @TableField(exist = false)
    private String battGroupName;
    /**标称单体电压*/
    @TableField(exist = false)
    private int monVol;
    /**标称容量*/
    @TableField(exist = false)
    private int monCap;
}
src/main/java/com/whyc/service/BattTestInfService.java
@@ -53,6 +53,14 @@
    public Response getDischargePage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<BattTestInf> list =mapper.getDischargeList();
        list.forEach(item->{
            //小时率
            int hourRate = BattCapFactory.GetHourRate(item.getMonCap(), item.getTestCurr());
            //容量计算
            Double realCap = BattCapFactory.GetMonomerCap(item.getMonCap(), hourRate, item.getTestCap(), item.getMaxMonvol(), item.getMinMonvol(), item.getMonVol(), BattCapFactory.CapType_Real);
            item.setRealCap(realCap.floatValue());
        });
        PageInfo pageInfo = new PageInfo(list);
        return new Response().set(1, pageInfo);
    }
src/main/resources/mapper/BattTestInfMapper.xml
@@ -55,7 +55,7 @@
    </select>
    <select id="getDischargeList" resultType="com.whyc.pojo.db_dis_batt.BattTestInf">
        select
        binf_name as battGroupName,batt_test_inf.binf_id as battGroupId,test_record_count,group_vol,test_curr,max_monvol,min_monvol,test_cap,test_starttime,record_time,test_timelong,test_stoptype
        binf_name as battGroupName,batt_test_inf.binf_id as battGroupId,mon_cap,mon_vol,test_record_count,group_vol,test_curr,max_monvol,min_monvol,test_cap,test_starttime,record_time,test_timelong,test_stoptype
        from db_dis_batt.batt_test_inf,db_batt.power_inf where db_batt.power_inf.binf_id=db_dis_batt.batt_test_inf.binf_id
        and test_starttype=3 and test_type=3
        and (test_stoptype in (3, 4, 6)