Commit 41e154aa authored by suhuiguang's avatar suhuiguang

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

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