fix 枚举调整
This commit is contained in:
@@ -15,10 +15,10 @@ namespace Dlhis.ScheduledTask.TaskAssignment.Request
|
||||
public string GainfoNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备功能
|
||||
/// 设备机功能类型
|
||||
/// </summary>
|
||||
[Required]
|
||||
[EnumDataType(typeof(DeviceFuncEnumType))]
|
||||
public DeviceFuncEnumType type { get; set; }
|
||||
[EnumDataType(typeof(DeviceGroupFunctionEnumType))]
|
||||
public DeviceGroupFunctionEnumType type { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class DeviceTaskAssignmentService : IDeviceTaskAssignmentService
|
||||
{
|
||||
//获取启用的功能设备
|
||||
var devices = await _dbContext.Queryable<DeviceEntity>()
|
||||
.Where(x => x.Funcs.Contains(request.type))
|
||||
.Where(x => x.Type == request.type)
|
||||
.Select(x => x.UniqueNo)
|
||||
.ToListAsync();
|
||||
devices.ThrowIfNull($"{request.type.GetDescription}功能机器为空");
|
||||
|
||||
Reference in New Issue
Block a user