fix 移除brand字段
This commit is contained in:
@@ -120,7 +120,6 @@ public class DeviceConnectService : IDeviceConnectService
|
|||||||
device = new DeviceEntity()
|
device = new DeviceEntity()
|
||||||
{
|
{
|
||||||
Code = Guid.NewGuid(),
|
Code = Guid.NewGuid(),
|
||||||
Brand = string.Empty,
|
|
||||||
ConnectionInfo = string.Empty,
|
ConnectionInfo = string.Empty,
|
||||||
TemplateCode = null,
|
TemplateCode = null,
|
||||||
UniqueNo = uniqueNo,
|
UniqueNo = uniqueNo,
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ public class DeviceService : IDeviceService
|
|||||||
{
|
{
|
||||||
var entity = request.Adapt<DeviceEntity>();
|
var entity = request.Adapt<DeviceEntity>();
|
||||||
entity.Code = Guid.NewGuid();
|
entity.Code = Guid.NewGuid();
|
||||||
entity.Brand = template.Brand;
|
|
||||||
await _dbContext.InsertAsync(entity);
|
await _dbContext.InsertAsync(entity);
|
||||||
//同时保存注册信息
|
//同时保存注册信息
|
||||||
var registry = await _dbContext.Queryable<DeviceRegistryEntity>().Where(x => x.DeviceUniqueNo == request.UniqueNo).FirstAsync();
|
var registry = await _dbContext.Queryable<DeviceRegistryEntity>().Where(x => x.DeviceUniqueNo == request.UniqueNo).FirstAsync();
|
||||||
@@ -72,7 +71,6 @@ public class DeviceService : IDeviceService
|
|||||||
entity.ThrowIfNull("设备不存在,无法更新");
|
entity.ThrowIfNull("设备不存在,无法更新");
|
||||||
|
|
||||||
request.Adapt(entity);
|
request.Adapt(entity);
|
||||||
entity.Brand = template.Brand;
|
|
||||||
|
|
||||||
await _dbContext.UpdateAsync(entity);
|
await _dbContext.UpdateAsync(entity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,12 +29,6 @@ public class DeviceEntity : SugarBaseEntity, ITenantId
|
|||||||
[SugarColumn(ColumnDescription = "心跳检查间隔")]
|
[SugarColumn(ColumnDescription = "心跳检查间隔")]
|
||||||
public int HeartbeatInterval { get; set; }
|
public int HeartbeatInterval { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 品牌
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnDescription = "品牌")]
|
|
||||||
public string Brand { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 供应商
|
/// 供应商
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public class AssignmentService : IAssignmentService
|
|||||||
deviceTask.Type,
|
deviceTask.Type,
|
||||||
deviceTask.DeviceUniqueNo,
|
deviceTask.DeviceUniqueNo,
|
||||||
DeviceConnectionInfo = deivce.ConnectionInfo,
|
DeviceConnectionInfo = deivce.ConnectionInfo,
|
||||||
deivce.Brand,
|
deivceTamplate.Brand,
|
||||||
FuncStr = deivce.Funcs.ToString(),
|
FuncStr = deivce.Funcs.ToString(),
|
||||||
deviceTask.UserNo,
|
deviceTask.UserNo,
|
||||||
deviceTask.UserCode,
|
deviceTask.UserCode,
|
||||||
|
|||||||
Reference in New Issue
Block a user