zbj//大屏区域暂降统计

This commit is contained in:
zhangbaojian
2023-03-31 16:00:49 +08:00
parent 5f03b9a947
commit ff444e045e
7 changed files with 233 additions and 11 deletions

View File

@@ -0,0 +1,16 @@
package com.njcn.event.mapper.majornetwork;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* @version 1.0.0
* @author: zbj
* @date: 2023/03/31
*/
public interface LargeScreenMapper {
Map<String, Object> selectDownCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
}

View File

@@ -0,0 +1,22 @@
<?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.njcn.event.mapper.majornetwork.LargeScreenMapper">
<select id="selectDownCount" resultType="java.util.Map">
select
count(ed.event_id) "count"
from r_mp_event_detail ed
left join sys_dict_data dd on ed.event_type and dd.Type_Id ='c37861896dafab0883321e1d508caa51'
where
ed.measurement_point_id in
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
<if test="startTime != null and startTime != ''">
and date_format(pl.Create_Time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
</if>
<if test="endTime != null and endTime != ''">
and date_format(pl.Create_Time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if>
</select>
</mapper>