Commit 2ebdbdb3 by 杨林龙

Merge remote-tracking branch 'origin/master'

2 parents 9ccfcc23 51b135a6
......@@ -26,7 +26,7 @@ public interface AlarmElectricFenceMapper extends CommonBaseMapper<AlarmElectric
List<FenceAlarmVO> getFenceAlarmInfo();
/**
* 获取当前用户有权限的报警数量
* 获取当前用户有权限的报警 数量
* @param query 查询条件
* @return 当前用户有权限的报警数量
*/
......
......@@ -162,6 +162,9 @@ public class DashboardService extends AbstractCommonService {
RangeTimeDTO today = new RangeTimeDTO(DateUtil.getTodayFirstDateTimeStr(), DateUtil.getTodayLastDateTimeStr());
Integer todayActiveDevice = vehicleDeviceMapper.countDeviceWithAuth(today, activeSearch);
//在线率
String onLineRate = getOnLineRate(totalActiveDevice);
//断电报警
AlarmTrackRecQueryBO queryBO = new AlarmTrackRecQueryBO();
queryBO.setStartTime(DateUtil.getTodayFirstDateTimeStr());
......@@ -169,15 +172,12 @@ public class DashboardService extends AbstractCommonService {
queryBO.setAlarmType(Constants.ALARM_TYPE_POWER_OFF);
Integer powerOffCount = alarmTrackRecMapper.countAlarmByType(queryBO);
//围栏报警
Integer fenceCount = alarmElectricFenceMapper.countActiveDeviceFenceAlarm(today);
//光感报警
queryBO.setAlarmType(Constants.ALARM_TYPE_LIGHT);
Integer lightCount = alarmTrackRecMapper.countAlarmByType(queryBO);
//在线率
String onLineRate = getOnLineRate(totalActiveDevice);
//围栏报警
Integer fenceCount = alarmElectricFenceMapper.countActiveDeviceFenceAlarm(today);
return new StatisticalInfoVO(totalActiveDevice, totalVehicle, todayActiveDevice, powerOffCount, fenceCount, lightCount, onLineRate);
}
......
......@@ -61,9 +61,11 @@
<select id="countActiveDeviceFenceAlarm" resultType="java.lang.Integer">
select count(taef.id)
from t_alarm_electric_fence taef
left join t_electric_fence tef on tef.id = taef.fence_id
inner join t_vehicle_device tvd on tvd.id = taef.vd_id
<where>
and taef.del_flag = 0
and tef.del_flag = 0
and tvd.del_flag = 0
and tvd.bind_status = 1
<if test="startTime != null">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!