diff --git a/PVDEMCS/.vs/PVDEMCS/v17/.suo b/PVDEMCS/.vs/PVDEMCS/v17/.suo index 691c933..e318c28 100644 Binary files a/PVDEMCS/.vs/PVDEMCS/v17/.suo and b/PVDEMCS/.vs/PVDEMCS/v17/.suo differ diff --git a/PVDEMCS/PVDEMCS/Services/Repositories/Impl/DeviceRepository.cs b/PVDEMCS/PVDEMCS/Services/Repositories/Impl/DeviceRepository.cs index f894ace..7e631e8 100644 --- a/PVDEMCS/PVDEMCS/Services/Repositories/Impl/DeviceRepository.cs +++ b/PVDEMCS/PVDEMCS/Services/Repositories/Impl/DeviceRepository.cs @@ -126,12 +126,12 @@ namespace PVDEMCS.Services.Repositories.Impl var query = context.DeviceInfos.Where(f => !f.IsDelete); if (query.Where(f => f.DeviceName == entity.DeviceName).FirstOrDefault() != null) { - result.Message = $"没有找到Id:【{entity.DeviceName}】的数据"; + result.Message = $"已存在DeviceName:【{entity.DeviceName}】的数据"; return result; } if (query.Where(f => f.DeviceCode == entity.DeviceCode).FirstOrDefault() != null) { - result.Message = $"没有找到Id:【{entity.DeviceCode}】的数据"; + result.Message = $"已存在DeviceCode:【{entity.DeviceCode}】的数据"; return result; } @@ -163,12 +163,12 @@ namespace PVDEMCS.Services.Repositories.Impl } if (query.Where(f => f.DeviceName == entity.DeviceName && f.Id != entity.Id).FirstOrDefault() != null) { - result.Message = $"没有找到Id:【{entity.DeviceName}】的数据"; + result.Message = $"已存在DeviceName:【{entity.DeviceName}】的数据"; return result; } if (query.Where(f => f.DeviceCode == entity.DeviceCode && f.Id != entity.Id).FirstOrDefault() != null) { - result.Message = $"没有找到Id:【{entity.DeviceCode}】的数据"; + result.Message = $"已存在DeviceCode:【{entity.DeviceCode}】的数据"; return result; } @@ -355,12 +355,12 @@ namespace PVDEMCS.Services.Repositories.Impl var query = context.DevicePoints.Where(f => !f.IsDelete); if (query.Where(f => f.PointName == entity.PointName).FirstOrDefault() != null) { - result.Message = $"没有找到Id:【{entity.PointName}】的数据"; + result.Message = $"已存在PointName:【{entity.PointName}】的数据"; return result; } if (query.Where(f => f.PointCode == entity.PointCode).FirstOrDefault() != null) { - result.Message = $"没有找到Id:【{entity.PointCode}】的数据"; + result.Message = $"已存在PointCode:【{entity.PointCode}】的数据"; return result; } @@ -393,12 +393,12 @@ namespace PVDEMCS.Services.Repositories.Impl } if (query.Where(f => f.PointName == entity.PointName && f.Id != entity.Id).FirstOrDefault() != null) { - result.Message = $"没有找到Id:【{entity.PointName}】的数据"; + result.Message = $"已存在PointName:【{entity.PointName}】的数据"; return result; } if (query.Where(f => f.PointCode == entity.PointCode && f.Id != entity.Id).FirstOrDefault() != null) { - result.Message = $"没有找到Id:【{entity.PointCode}】的数据"; + result.Message = $"已存在PointCode:【{entity.PointCode}】的数据"; return result; } update.DeviceId = entity.DeviceId;