whyclxw
6 天以前 2753ad7aee272a5a5a8a0124b1feea5a1e4cc83e
src/main/resources/mapper/BatttestdataInfMapper.xml
@@ -44,20 +44,21 @@
    <select id="getNoDischargeData" resultType="com.whyc.pojo.db_batt_testdata.BatttestdataInf">
        select * from db_batt_testdata.tb_batttestdata_inf
        <where>
            battgroup_id=#{battgroupId} and test_type=3
            and (test_starttype!=3 or test_timelong &lt;7200)
            battgroup_id=#{battgroupId}
            and test_type=3
            and  data_available!=1
            <if test="testStartTime!=null">
                and tb_batttestdata_inf.test_starttime>=#{stic.testStartTime}
            </if>
            <if test="testEndTime!=null">
                and tb_batttestdata_inf.test_starttime&lt;=#{stic.testEndTime}
            </if>
            <if test="typeList!=null">
            <!--<if test="typeList!=null">
                and test_stoptype in
                <foreach item="item" index="index" collection="typeList" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
            </if>-->
        </where>
        order by test_starttime desc
    </select>
@@ -71,4 +72,21 @@
        )
    </select>
    <select id="getHrDisCount" resultType="java.lang.Integer">
        select distinct battgroup_id from db_batt_testdata.tb_batttestdata_inf
        where test_type=3
        and test_starttype=3 and test_timelong >=7200
        <if test="startTime!=null">
            and test_starttime >= #{startTime}
        </if>
        <if test="endTime!=null">
            and test_starttime &lt;= #{endTime}
        </if>
        and battgroup_id in(
        select distinct battgroup_id from db_user.tb_baojigroup_usr bu,db_user.tb_baojigroup_power bp,db_station.tb_batt_inf bi
        where bu.baoji_group_id = bp.baoji_group_id
        and bp.station_id = bi.station_id
        and bu.uid = #{userId}
        )
    </select>
</mapper>