forked from dyf/fys-Multi-tenant
设备在线状态
This commit is contained in:
@ -163,6 +163,8 @@ public class Device extends TenantEntity {
|
||||
|
||||
/**
|
||||
* 在线状态(0离线,1在线,2异常)
|
||||
* online_status
|
||||
*/
|
||||
private Integer onlineStatus;
|
||||
|
||||
}
|
||||
|
||||
@ -117,7 +117,8 @@ public class DeviceQueryCriteria extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 设备在线状态
|
||||
* 0:离线;1:在线
|
||||
* 0:离线;1:在线;2:故障
|
||||
* online_status
|
||||
*/
|
||||
private Integer onlineStatus;
|
||||
|
||||
|
||||
@ -342,6 +342,9 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
|
||||
for (Long id : ids) {
|
||||
DeviceAssignments deviceAssignment = deviceAssignmentsMapper.selectById(id);
|
||||
if (deviceAssignment == null) {
|
||||
continue;
|
||||
}
|
||||
Device device = deviceMapper.selectById(deviceAssignment.getDeviceId());
|
||||
|
||||
if (StringUtils.isNotEmpty(deviceAssignment.getAssigneeName())) {
|
||||
@ -834,5 +837,4 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -71,6 +71,9 @@
|
||||
<if test="criteria.deviceStatus != null">
|
||||
and da.active = #{criteria.deviceStatus}
|
||||
</if>
|
||||
<if test="criteria.onlineStatus != null">
|
||||
and d.online_status = #{criteria.onlineStatus}
|
||||
</if>
|
||||
<if test="criteria.groupId != null">
|
||||
and d.group_id = #{criteria.groupId}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user