|
@@ -117,6 +117,9 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="gradeSiteList" resultType="java.util.Map">
|
|
|
+ SELECT aa.siteId,aa.siteName,MAX(aa.oneGrade) as oneGrade,MAX(aa.otherGrade) as otherGrade,MAX(aa.countGrade) as
|
|
|
+ countGrade FROM
|
|
|
+ (
|
|
|
SELECT us.site_id as siteId,s.site_name as siteName,
|
|
|
(select count(*)
|
|
|
FROM alarm_power as ap
|
|
@@ -160,8 +163,8 @@
|
|
|
<if test="siteId != null and siteId != 0">
|
|
|
and us.site_id = #{siteId}
|
|
|
</if>
|
|
|
- </where>
|
|
|
- group by us.site_id
|
|
|
+ </where>) as aa
|
|
|
+ group by aa.siteId
|
|
|
</select>
|
|
|
<select id="gradeList" resultType="com.bizmatics.model.AlarmPower">
|
|
|
select ap.*
|