zbj//1.大屏中间稳态越线信息

This commit is contained in:
zhangbaojian
2023-04-06 16:04:49 +08:00
parent 3bc015d338
commit b0f3824d7c
6 changed files with 104 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package com.njcn.event.mapper.majornetwork;
import com.njcn.device.pq.pojo.vo.AllDataVO;
import com.njcn.device.pq.pojo.vo.EventVO;
import com.njcn.device.pq.pojo.vo.MiddleLimitRateVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -29,4 +30,6 @@ public interface LargeScreenMapper {
List<EventVO> getMiddleDown (@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
List<Map<String, Object>> getMiddleTerminal (@Param("deviceIds") List<String> deviceIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
List<MiddleLimitRateVO> getMiddleLimitRate (@Param("lineIds") List<String> deviceIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
}

View File

@@ -170,5 +170,30 @@
</if>
</select>
<select id="getMiddleLimitRate" resultType="com.njcn.device.pq.pojo.vo.MiddleLimitRateVO">
select pl.`Name` mName,
pl3.`Name` subName,
t.count from pq_line pl
inner join(select rslr.my_index,
sum(rslr.all_time) count
from r_stat_limit_rate_d rslr
WHERE
rslr.my_index IN
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
<if test="startTime != null and startTime != ''">
and date_format(rslr.Time_Id,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
</if>
<if test="endTime != null and endTime != ''">
and date_format(rslr.Time_Id,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if>
group by rslr.my_index)t on pl.Id = t.my_index
left join pq_line pl1 on pl.Pid = pl1.Id
left join pq_line pl2 on pl1.Pid = pl2.Id
left join pq_line pl3 on pl2.Pid = pl3.Id
</select>
</mapper>