fix 数据添加有误处理,展示排序
This commit is contained in:
@@ -71,7 +71,7 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
if (request.BusinessPlaceCode.HasValue)
|
||||
{
|
||||
var businessPlace = await _dbContext.Queryable<BusinessPlaceEntity>().Where(x => x.Code == request.BusinessPlaceCode).FirstAsync();
|
||||
businessPlace.ThrowIfNull("营业点不存在,无法设置到设备注册信息中");
|
||||
businessPlace.ThrowIfNull("营业点不存在,无法设置到设备注册信息中");
|
||||
}
|
||||
|
||||
//更新营业点信息
|
||||
@@ -123,8 +123,8 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
private async Task<DeviceEntity> GetEnableDeviceAsync(string uniqueNo, bool checkExists = true, string deployPlace = "", string tenantId = "")
|
||||
{
|
||||
var device = await _dbContext.Queryable<DeviceEntity>()
|
||||
.Where(x => x.UniqueNo == uniqueNo)
|
||||
.FirstAsync();
|
||||
.Where(x => x.UniqueNo == uniqueNo)
|
||||
.FirstAsync();
|
||||
|
||||
if (checkExists)
|
||||
{
|
||||
@@ -135,7 +135,7 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
{
|
||||
if (device == null)
|
||||
{
|
||||
device = new DeviceEntity()
|
||||
device = new DeviceEntity
|
||||
{
|
||||
Code = Guid.NewGuid(),
|
||||
ConnectionInfo = string.Empty,
|
||||
@@ -144,10 +144,12 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
TenantId = tenantId,
|
||||
Supplier = string.Empty,
|
||||
Funcs = new List<DeviceFuncEnumType>(),
|
||||
Type = DeviceTypeEnumType.Meal,
|
||||
DeployPlace = deployPlace,
|
||||
HeartbeatInterval = 0,
|
||||
HeartbeatInterval = 30,
|
||||
DeployDirection = string.Empty,
|
||||
Enable = true,
|
||||
AsAttendance = false,
|
||||
DeployPosition = string.Empty,
|
||||
CreatedBy = 1,
|
||||
CreateTime = DateTime.Now,
|
||||
@@ -161,4 +163,4 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
|
||||
return device;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user