31
aijinhui
2024-03-26 82f8f0065a27acf9f7e1558b04fa75ce68a7fa50
ard-work/src/main/resources/mapper/alarm/ArdAlarmStealelecMapper.xml
@@ -24,6 +24,9 @@
        <include refid="Base_Column_List"/>
        from ard_alarm_stealelec
        <where>
            <if test="name != null  and name != ''">
                AND name like concat('%', #{name}, '%')
            </if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND start_time &gt;= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss')
            </if>
@@ -130,9 +133,14 @@
    </insert>
    <select id="stealelecYear" resultType="com.ruoyi.statistical.vo.CountVo">
        select to_char(start_time::DATE, 'MM') as month,count(id)
        select to_char(start_time::DATE, 'MM') as date,count(id)
        from ard_alarm_stealelec
        where start_time &gt;= #{start} and  start_time &lt;= #{end}  group by month order by month
        where start_time &gt;= #{start} and  start_time &lt;= #{end}  group by date order by date
    </select>
</mapper>
    <select id="stealelecMonth" resultType="com.ruoyi.statistical.vo.CountVo">
        select to_char(start_time::DATE, 'dd') as date,count(id)
        from ard_alarm_stealelec
        where start_time &gt;= #{start} and  start_time &lt;= #{end}  group by date order by date
    </select>
</mapper>