解决冲突

This commit is contained in:
2026-08-28 10:41:47 +08:00
98 changed files with 1389 additions and 20 deletions
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 设备台账 服务实现
/// </summary>
public class EquipmentService : IEquipmentService
{
// TODO: 实现 设备台账 相关方法
}
}
+12
View File
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 二维码 服务实现
/// </summary>
public class QrCodeService : IQrCodeService
{
// TODO: 实现 二维码 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 证书管理 服务实现
/// </summary>
public class CertificateService : ICertificateService
{
// TODO: 实现 证书管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 采集点位配置 服务实现
/// </summary>
public class CollectionPointService : ICollectionPointService
{
// TODO: 实现 采集点位配置 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 采集策略管理 服务实现
/// </summary>
public class CollectionStrategyService : ICollectionStrategyService
{
// TODO: 实现 采集策略管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 数据清洗与转换 服务实现
/// </summary>
public class DataCleaningService : IDataCleaningService
{
// TODO: 实现 数据清洗与转换 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 设备网关 服务实现
/// </summary>
public class DeviceGatewayService : IDeviceGatewayService
{
// TODO: 实现 设备网关 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 网关管理 服务实现
/// </summary>
public class GatewayService : IGatewayService
{
// TODO: 实现 网关管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// IOT设备管理 服务实现
/// </summary>
public class IotDeviceService : IIotDeviceService
{
// TODO: 实现 IOT设备管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 网络组件与协议注册 服务实现
/// </summary>
public class NetworkComponentService : INetworkComponentService
{
// TODO: 实现 网络组件与协议注册 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 产品管理 服务实现
/// </summary>
public class ProductService : IProductService
{
// TODO: 实现 产品管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 协议管理 服务实现
/// </summary>
public class ProtocolService : IProtocolService
{
// TODO: 实现 协议管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 协议模板库 服务实现
/// </summary>
public class ProtocolTemplateService : IProtocolTemplateService
{
// TODO: 实现 协议模板库 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 时序数据存储 服务实现
/// </summary>
public class TimeSeriesStorageService : ITimeSeriesStorageService
{
// TODO: 实现 时序数据存储 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 消息告警 服务实现
/// </summary>
public class AlertMessageService : IAlertMessageService
{
// TODO: 实现 消息告警 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 告警规则 服务实现
/// </summary>
public class AlertRuleService : IAlertRuleService
{
// TODO: 实现 告警规则 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 数据大屏 服务实现
/// </summary>
public class BigScreenService : IBigScreenService
{
// TODO: 实现 数据大屏 相关方法
}
}
@@ -0,0 +1,70 @@
using Model;
using Model.Entity;
using ORM;
using Service.Interface;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Service.Implement
{
/// <summary>
/// 设备看板服务实现(温湿度)
/// </summary>
public class DeviceDashboardService : IDeviceDashboardService
{
/// <summary>
/// 获取每台设备最新一条温湿度数据(看板卡片用)
/// </summary>
public async Task<Result<List<TemperatureBoxDataEntity>>> GetRealtimeAsync()
{
try
{
var db = SqlSugarContext.DbContext;
// 雪花 Id 单调递增,每台设备取最大 Id 即最新一条
var latestIds = await db.Queryable<TemperatureBoxDataEntity>()
.Where(x => x.IsDel == 0)
.GroupBy(x => x.DeviceCode)
.Select(x => SqlFunc.AggregateMax(x.Id))
.ToListAsync();
var list = await db.Queryable<TemperatureBoxDataEntity>()
.Where(x => latestIds.Contains(x.Id))
.OrderBy(x => x.DeviceCode)
.ToListAsync();
return Result<List<TemperatureBoxDataEntity>>.Success(list);
}
catch (Exception ex)
{
return Result<List<TemperatureBoxDataEntity>>.Error("查询设备实时数据失败", ex);
}
}
/// <summary>
/// 获取指定设备最近 N 分钟的温湿度曲线数据(按时间升序)
/// </summary>
public async Task<Result<List<TemperatureBoxDataEntity>>> GetCurveAsync(string deviceCode, int minutes)
{
if (string.IsNullOrWhiteSpace(deviceCode))
return Result<List<TemperatureBoxDataEntity>>.Error("设备标识不能为空");
try
{
var start = DateTime.Now.AddMinutes(-minutes);
var list = await SqlSugarContext.DbContext.Queryable<TemperatureBoxDataEntity>()
.Where(x => x.DeviceCode == deviceCode && x.IsDel == 0 && x.CreateTime >= start)
.OrderBy(x => x.CreateTime)
.ToListAsync();
return Result<List<TemperatureBoxDataEntity>>.Success(list);
}
catch (Exception ex)
{
return Result<List<TemperatureBoxDataEntity>>.Error("查询温湿度曲线失败", ex);
}
}
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 设备效率分析 服务实现
/// </summary>
public class EfficiencyService : IEfficiencyService
{
// TODO: 实现 设备效率分析 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 巡检管理 服务实现
/// </summary>
public class PatrolService : IPatrolService
{
// TODO: 实现 巡检管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 统计报表 服务实现
/// </summary>
public class StatisticsReportService : IStatisticsReportService
{
// TODO: 实现 统计报表 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 访问日志 服务实现
/// </summary>
public class AccessLogService : IAccessLogService
{
// TODO: 实现 访问日志 相关方法
}
}
+12
View File
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 操作审计日志 服务实现
/// </summary>
public class AuditService : IAuditService
{
// TODO: 实现 操作审计日志 相关方法
}
}
+12
View File
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 数据字典管理 服务实现
/// </summary>
public class DictService : IDictService
{
// TODO: 实现 数据字典管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 文件存储管理 服务实现
/// </summary>
public class FileStorageService : IFileStorageService
{
// TODO: 实现 文件存储管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 组织架构管理 服务实现
/// </summary>
public class OrganizationService : IOrganizationService
{
// TODO: 实现 组织架构管理 相关方法
}
}
+12
View File
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 角色权限管理 服务实现
/// </summary>
public class RoleService : IRoleService
{
// TODO: 实现 角色权限管理 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 系统日志 服务实现
/// </summary>
public class SystemLogService : ISystemLogService
{
// TODO: 实现 系统日志 相关方法
}
}
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 系统参数配置 服务实现
/// </summary>
public class SystemParamService : ISystemParamService
{
// TODO: 实现 系统参数配置 相关方法
}
}
+12
View File
@@ -0,0 +1,12 @@
using Service.Interface;
namespace Service.Implement
{
/// <summary>
/// 用户管理 服务实现
/// </summary>
public class UserService : IUserService
{
// TODO: 实现 用户管理 相关方法
}
}