Files
system-jibei/pqs9300/src/main/resources/mybatis/mappers/report/GetFPYDataMapper.xml
2024-04-01 09:20:31 +08:00

31 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pqs9300.mapper.report.GetFpyMapper">
<select id="getFpy" resultType="java.util.HashMap">
select phasic_type PHASETYPE,
<choose>
<when test="flag != 2">
<foreach collection="list" item="item" separator="," close=",">
sum(UHarm_${item}_OverTime) UHarm_${item}_OverTime,sum(IHarm_${item}_OverTime)
IHarm_${item}_OverTime
</foreach>
sum(Voltage_Dev_OverTime) Voltage_Dev_OverTime,sum(UAberrance_OverTime)
UAberrance_OverTime,sum(Flicker_OverTime) Flicker_OverTime,sum(AllTime) AllTime,sum(Flicket_AllTime) Flicket_AllTime from limit_rate
where timeid between #{condition.start} and #{condition.end} and myindex = #{condition.pointIndex} and
Phasic_Type in('A','B','C','T')
<foreach collection="condition.exceptTime" index="index" item="item" open=" " separator=" " close="">
and timeid not between #{item.start} and #{item.end}
</foreach>
</when>
<otherwise>
sum(UBalance_OverTime) UBalance_OverTime,sum(Freq_Dev_OverTime) Freq_Dev_OverTime,sum(AllTime) AllTime
from limit_rate where timeid between #{condition.start} and #{condition.end} and myindex =
#{condition.pointIndex} and Phasic_Type = 'T'
<foreach collection="condition.exceptTime" index="index" item="item" open=" " separator=" " close="">
and timeid not between #{item.start} and #{item.end}
</foreach>
</otherwise>
</choose>
group by phasic_type
</select>
</mapper>