You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.5 KiB
65 lines
2.5 KiB
<?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.zc.business.mapper.DcTrafficIncidentsMapper">
|
|
|
|
|
|
<select id="getTrafficIncidentsProcessing" resultType="Integer">
|
|
select count(*) from dc_event
|
|
where event_type = '1' and event_state != '2' and date_format(create_time,'%y%m%d') = date_format(now(),'%y%m%d')
|
|
</select>
|
|
|
|
|
|
<select id="getTrafficIncidentsAll" resultType="Integer">
|
|
select count(*) from dc_event
|
|
where event_type = '1' and date_format(create_time,'%y%m%d') = date_format(now(),'%y%m%d')
|
|
</select>
|
|
|
|
<select id="getConstructionNum" resultType="java.lang.Integer">
|
|
select count(*) from dc_event
|
|
where event_type = '7' and event_state != '2'
|
|
</select>
|
|
|
|
<select id="getEventListByType" resultType="java.util.Map" parameterType="String">
|
|
select t1.id,t1.stake_mark stakeMark,t1.direction, t2.longitude,t2.latitude
|
|
from dc_event t1 left join dc_stake_mark t2 on t1.stake_mark = t2.id and t1.direction = t2.direction
|
|
where t1.event_type = #{eventType}
|
|
</select>
|
|
|
|
<select id="selectTrafficIncidentsDay" resultType="Long">
|
|
select count(*) from dc_event
|
|
where date_format(create_time,'%y%m%d') = date_format(now(),'%y%m%d')
|
|
</select>
|
|
|
|
<select id="selectTrafficIncidentsWeek" resultType="Long">
|
|
select count(*) from dc_event
|
|
where YEARWEEK(create_time, 1) = YEARWEEK(now(), 1)
|
|
</select>
|
|
|
|
<select id="selectTrafficIncidentsMonth" resultType="Long">
|
|
select count(*) from dc_event
|
|
where date_format(create_time,'%y%m') = date_format(now(),'%y%m')
|
|
</select>
|
|
|
|
<select id="selectTrafficIncidentsYear" resultType="Long">
|
|
select count(*) from dc_event
|
|
where date_format(create_time,'%y') = date_format(now(),'%y')
|
|
</select>
|
|
|
|
<select id="selectTrafficIncidentsAllProcessing" resultType="java.lang.Long">
|
|
select count(*) from dc_event
|
|
where event_state != '2'
|
|
</select>
|
|
|
|
<select id="selectEventTypeList" resultType="java.util.Map">
|
|
select event_type eventType,event_name eventName from dc_event_type
|
|
</select>
|
|
|
|
<select id="selectStatusCountByEventType" resultType="java.util.Map" parameterType="String">
|
|
select event_state eventState,count(*) num from dc_event
|
|
where event_type = #{eventType} and date_format(create_time,'%y%m%d') = date_format(now(),'%y%m%d')
|
|
group by event_state
|
|
</select>
|
|
|
|
</mapper>
|