he wei
2021-12-22 7700134f0a9f9405442573e7ed549e2b51f97bff
电池关注
2个文件已修改
9 ■■■■■ 已修改文件
src/main/java/com/whyc/mapper/BattTestDataStopMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BattTestDataStopMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/BattTestDataStopMapper.java
@@ -1,6 +1,7 @@
package com.whyc.mapper;
import com.whyc.pojo.BattTestDataStop;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -8,5 +9,5 @@
    BattTestDataStop findByMonNum(Integer battGroupId,Integer monNum);
    Float getRealCap(BattTestDataStop stop);
    Float getRealCap(@Param("stop") BattTestDataStop stop);
}
src/main/resources/mapper/BattTestDataStopMapper.xml
@@ -4,15 +4,15 @@
    <select id="findByMonNum" resultType="com.whyc.pojo.BattTestDataStop">
        select stop.battgroupid,stop.test_curr,stop.test_cap,stop.mon_vol,stop.test_record_count,stop.mon_num,inf.max_monvol
        select stop.battgroupid,stop.test_curr,stop.test_cap,stop.mon_vol,stop.test_record_count,stop.mon_num,stop.group_vol,inf.max_monvol
        from db_batt_testdata.tb_batttestdatastop_${battGroupId} stop,db_batt_testdata.tb_batttestdata_inf inf
        where stop.battGroupId = inf.battGroupId and stop.test_starttime = inf.test_starttime and stop.mon_num = #{monNum}
        and stop.data_available=1 and inf.test_type=3
        order by stop.test_starttime desc limit 1
    </select>
    <select id="getRealCap" resultType="java.lang.Float">
    <select id="getRealCap" resultType="java.lang.Float" parameterType="com.whyc.pojo.BattTestDataStop">
        select test_cap from db_batt_testdata.tb_batttestdata_${stop.battGroupId}
        where test_record_count=?  and mon_vol>? and mon_num=? and data_available=1
        where test_record_count=#{stop.testRecordCount}  and mon_vol>#{stop.monVol} and mon_num=#{stop.monNum} and data_available=1
        order by record_time desc limit 1
    </select>