|
|
@ -78,6 +78,7 @@ |
|
|
|
FROM dc_warning AS warning |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id |
|
|
|
WHERE DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d') |
|
|
|
AND warning.direction=#{direction} |
|
|
|
AND mark.`section_id`=#{sectionId} |
|
|
|
GROUP BY time |
|
|
|
</select> |
|
|
@ -86,6 +87,7 @@ |
|
|
|
FROM dc_warning as warning |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id |
|
|
|
WHERE DATE_FORMAT(warning.create_time,'%Y-%m') =DATE_FORMAT(#{createTime},'%Y-%m') |
|
|
|
AND warning.direction=#{direction} |
|
|
|
and mark.`section_id`=#{sectionId} |
|
|
|
GROUP BY DAY |
|
|
|
ORDER BY DAY |
|
|
@ -103,6 +105,7 @@ |
|
|
|
FROM dc_warning as warning |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id |
|
|
|
WHERE YEAR(warning.create_time) =DATE_FORMAT(#{createTime},'%Y') |
|
|
|
AND warning.direction=#{direction} |
|
|
|
and mark.`section_id`=#{sectionId} |
|
|
|
GROUP BY QUARTER, MONTH |
|
|
|
ORDER BY QUARTER, MONTH; |
|
|
@ -112,7 +115,7 @@ |
|
|
|
SELECT YEAR(warning.create_time) AS YEAR, COUNT(*) AS number |
|
|
|
FROM dc_warning as warning |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id |
|
|
|
where mark.`section_id`=#{sectionId} |
|
|
|
where mark.`section_id`=#{sectionId} AND warning.direction=#{direction} |
|
|
|
GROUP BY YEAR |
|
|
|
</select> |
|
|
|
<select id="selectWarningSectionTypeDay" resultType="java.util.HashMap"> |
|
|
@ -120,6 +123,7 @@ |
|
|
|
FROM dc_warning as warning |
|
|
|
LEFT JOIN dc_stake_mark as mark on warning.stake_mark_id=mark.id |
|
|
|
where DATE_FORMAT(warning.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d') |
|
|
|
AND warning.direction=#{direction} |
|
|
|
and mark.`section_id`=#{sectionId} |
|
|
|
GROUP BY warning_type |
|
|
|
ORDER BY number DESC |
|
|
@ -129,6 +133,7 @@ |
|
|
|
FROM dc_warning as warning |
|
|
|
LEFT JOIN dc_stake_mark as mark on warning.stake_mark_id=mark.id |
|
|
|
where DATE_FORMAT(warning.create_time,'%Y-%m') =DATE_FORMAT(#{createTime},'%Y-%m') |
|
|
|
AND warning.direction=#{direction} |
|
|
|
and mark.`section_id`=#{sectionId} |
|
|
|
GROUP BY warning_type |
|
|
|
ORDER BY number DESC |
|
|
@ -146,6 +151,7 @@ |
|
|
|
FROM dc_warning as warning |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id |
|
|
|
WHERE YEAR(warning.create_time) =DATE_FORMAT(#{createTime},'%Y') |
|
|
|
AND warning.direction=#{direction} |
|
|
|
and mark.`section_id`=#{sectionId} |
|
|
|
GROUP BY QUARTER, warningType |
|
|
|
ORDER BY QUARTER; |
|
|
@ -155,7 +161,7 @@ |
|
|
|
DATE_FORMAT(warning.create_time, '%Y') as createTime |
|
|
|
FROM dc_warning as warning |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON warning.stake_mark_id=mark.id |
|
|
|
where mark.`section_id`=#{sectionId} |
|
|
|
where mark.`section_id`=#{sectionId} AND warning.direction=#{direction} |
|
|
|
GROUP BY warningType |
|
|
|
</select> |
|
|
|
|
|
|
@ -163,7 +169,7 @@ |
|
|
|
SELECT id FROM dc_stake_mark AS mark WHERE mark.section_id=#{sectionId} |
|
|
|
</select> |
|
|
|
<select id="selectSectionNumber" resultType="java.lang.String"> |
|
|
|
select count(1) from dc_warning where stake_mark_id=#{stakeMarkId} |
|
|
|
select count(1) from dc_warning where stake_mark_id=#{stakeMarkId} AND warning.direction=#{direction} |
|
|
|
</select> |
|
|
|
<select id="selectWarningEscalation" resultType="java.util.HashMap"> |
|
|
|
select org.organization_name,warning.warning_type,warning.warning_subclass, |
|
|
|