forked from dyf/fys-Multi-tenant
在线设备
This commit is contained in:
@ -26,4 +26,24 @@ public class EquipmentClassificationVo {
|
||||
*/
|
||||
private Integer devices4GAndBluetooth = 0;
|
||||
|
||||
/**
|
||||
* 设备总数
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
|
||||
/**
|
||||
* 计算设备总数
|
||||
*
|
||||
* @return 设备总数
|
||||
*/
|
||||
public Integer getTotal() {
|
||||
if (total == null) {
|
||||
total = (equipment4G == null ? 0 : equipment4G) +
|
||||
(deviceBluetooth == null ? 0 : deviceBluetooth) +
|
||||
(devices4GAndBluetooth == null ? 0 : devices4GAndBluetooth);
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -630,6 +630,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
@Override
|
||||
public EquipmentClassificationVo getEquipmentClassification() {
|
||||
EquipmentClassificationVo equipmentClassification = deviceMapper.getEquipmentClassification();
|
||||
equipmentClassification.getTotal();
|
||||
return equipmentClassification;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user