Commit 41e154aa authored by suhuiguang's avatar suhuiguang

1.应急大屏中间地图接口开发

parent fba009c9
......@@ -21,5 +21,5 @@ public interface AlertStatisticsMapper extends BaseMapper<AlertStatistics> {
String getOrgCodeByCompanyCode(String cityCode);
Long countEmergencyEventsByUniBizKey(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto filterParamDto);
Long countEmergencyEventsByOrgCodeAndDate(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto filterParamDto);
}
......@@ -112,14 +112,19 @@
<select id="getOrgCodeByCompanyCode" resultType="java.lang.String">
select org_code from privilege_company where company_code = #{companyCode} limit 1
</select>
<select id="countEmergencyEventsByUniBizKey" resultType="java.lang.Long">
<select id="countEmergencyEventsByOrgCodeAndDate" resultType="java.lang.Long">
SELECT
COALESCE(sum(emergency_events),0)
FROM
"tzs_alert_statistics"
where
supervisory_unit_org_code like concat(#{orgCode},'%')
and start_date=#{dto.beginDate}
and end_date=#{dto.endDate}
ifnull (SUM ( CASE WHEN father_alert IS NULL THEN 1 ELSE 0 END ), 0) AS total
FROM
tz_alert_called
WHERE
biz_org_code like concat(#{orgCode}, '%')
and (alarm_type_code = '960' or alarm_type_code = '961')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(call_time as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(call_time as date),#{dto.endDate})
</if>
</select>
</mapper>
......@@ -7,7 +7,6 @@ import com.yeejoin.amos.boot.module.common.api.constant.TZSCommonConstant;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum;
import com.yeejoin.amos.boot.module.elevator.api.dto.AlertMaintenanceUnitStatisticsDto;
import com.yeejoin.amos.boot.module.elevator.api.dto.AlertMsgDto;
import com.yeejoin.amos.boot.module.elevator.api.dto.AlertPaperInfoDto;
import com.yeejoin.amos.boot.module.elevator.api.dto.AlertUseUnitStatisticsDto;
import com.yeejoin.amos.boot.module.elevator.api.entity.AlertMaintenanceUnitStatistics;
......@@ -282,7 +281,8 @@ public class DPStatisticsServiceImpl {
private Map<String, Object> getCenterMapOverviewData(String orgCode, DPFilterParamDto filterParamDto) {
Map<String, Object> result = new HashMap<>();
Long num = alertStatisticsMapper.countEmergencyEventsByUniBizKey(orgCode,filterParamDto);
// 统计完成的事件包括困人、故障
Long num = alertStatisticsMapper.countEmergencyEventsByOrgCodeAndDate(orgCode,filterParamDto);
result.put("alarmCount",num);
return result;
}
......
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