jingquan #10

Merged
dyf merged 27 commits from liwenlong/fys-Multi-tenant:jingquan into main 2025-09-11 14:40:24 +08:00
31 changed files with 982 additions and 165 deletions
Showing only changes of commit ebd8668178 - Show all commits

View File

@ -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;
}
}

View File

@ -630,6 +630,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
@Override
public EquipmentClassificationVo getEquipmentClassification() {
EquipmentClassificationVo equipmentClassification = deviceMapper.getEquipmentClassification();
equipmentClassification.getTotal();
return equipmentClassification;
}

View File

@ -321,11 +321,11 @@
<!-- 获取数据总览 -->
<select id="getDataOverview" resultType="com.fuyuanshen.equipment.domain.vo.DataOverviewVo">
SELECT (SELECT COUNT(1) FROM device) AS devicesNumber,
(SELECT COUNT(1) FROM device WHERE device_status = 1) AS equipmentOnline,
(SELECT COUNT(1) FROM device WHERE online_status = 1) AS equipmentOnline,
(SELECT COUNT(1) FROM device WHERE DATE (create_time) = CURDATE()) AS bindingNew, (
SELECT COUNT (1)
FROM device
WHERE device_status = 2) AS equipmentAbnormal
WHERE online_status = 2) AS equipmentAbnormal
</select>
<!-- 获取设备分类 -->