Commit a983c80f authored by 李秀明's avatar 李秀明

fix: BUG#21595 异常系统占比图例错误,显示的应该是系统类型名称、不是系统名称

parent 3e208227
......@@ -59,10 +59,10 @@ public class SystemStatisticController extends AbstractBaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/alarm/panel", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取系统告警统计信息", notes = "获取系统告警统计信息")
public ResponseModel getAbnormalSystemInfo(@RequestParam(required = false) String bizOrgCode) {
List<Map<String, Object>> list = fireFightingSystemMapper.getAbnormalSystemInfo(bizOrgCode);
@RequestMapping(value = "/system-types-num-stats", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取系统类型数据统计", notes = "获取系统类型数据统计")
public ResponseModel getSystemTypesNumStats(@RequestParam(required = false) String bizOrgCode) {
List<Map<String, Object>> list = fireFightingSystemMapper.getSystemTypesNumStats(bizOrgCode);
return CommonResponseUtil.success(list);
}
......
......@@ -754,7 +754,7 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Map<String, Object> getCenterEquipState(@Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> getAbnormalSystemInfo(@Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> getSystemTypesNumStats(@Param("bizOrgCode") String bizOrgCode);
Page<Map<String, Object>> getSystemInfoPage(Page page,
@Param("bizOrgCode") String bizOrgCode,
......
......@@ -6905,30 +6905,32 @@
) d
</select>
<select id="getAbnormalSystemInfo" resultType="Map">
<select id="getSystemTypesNumStats" resultType="Map">
SELECT
d.id,
d.`name`,
SUM(IF( d.VALUE > 0, 1, 0 )) AS sysNum
FROM
(
SELECT
`fs`.`id` AS `id`,
`fs`.`name` AS `name`,
fs.system_type_code,
( SELECT count( 1 ) FROM `wl_equipment_specific_alarm_log` WHERE 0 <![CDATA[<>]]> find_in_set( `fs`.`id`, `wl_equipment_specific_alarm_log`.`system_ids` ) ) AS `value`
FROM
`f_fire_fighting_system` `fs`
WHERE
fs.system_type_code IS NOT NULL
AND LENGTH(
trim( fs.system_type_code )) != 0
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND fs.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
d.id,
d.system_type_code AS code,
d.name,
SUM(IF( d.VALUE > 0, 1, 0 )) AS num
FROM (
SELECT
t1.id AS id,
t2.name AS name,
t1.system_type_code,
(SELECT count(1) FROM wl_equipment_specific_alarm_log t WHERE 0 <![CDATA[<>]]> find_in_set( t1.id, t.system_ids ) ) AS value
FROM
f_fire_fighting_system t1
LEFT JOIN wl_equipment_category t2 on t1.system_type = t2.id
WHERE
t1.system_type_code IS NOT NULL AND LENGTH(TRIM(t1.system_type_code)) != 0
AND t2.name IS NOT NULL AND LENGTH(TRIM(t2.name)) != 0
<if test="bizOrgCode != null and bizOrgCode != ''">
AND t1.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
) d
WHERE d.value != 0
GROUP BY d.system_type_code
WHERE
d.value != 0
GROUP BY
d.system_type_code
</select>
<select id="getSystemInfoPage" resultType="Map">
......@@ -7049,8 +7051,8 @@
f_fire_fighting_system t1
left join wl_equipment_category t2 on t1.system_type = t2.id
<where>
t1.system_type_code IS NOT NULL
AND t2.name IS NOT NULL
t1.system_type_code IS NOT NULL AND LENGTH(TRIM(t1.system_type_code)) != 0
AND t2.name IS NOT NULL AND LENGTH(TRIM(t2.name)) != 0
<if test="bizOrgCode != null and bizOrgCode != ''">
AND t1.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment