fix 枚举调整
This commit is contained in:
@@ -9,16 +9,16 @@ namespace Dlhis.Common.FileOperation.Response
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 地址
|
|
||||||
/// </summary>
|
|
||||||
public string Url { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版本号
|
/// 版本号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int VersionCode { get; set; }
|
public int VersionCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 版本名称
|
||||||
|
/// </summary>
|
||||||
|
public int VersionName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改信息
|
/// 修改信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Kurisu.Core.DataAccess.Entity;
|
using Kurisu.Core.DataAccess.Entity;
|
||||||
using Kurisu.SqlSugar;
|
using Kurisu.SqlSugar;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using SqlSugar.DbConvert;
|
||||||
|
|
||||||
namespace Dlhis.Entity.Basic.Entity;
|
namespace Dlhis.Entity.Basic.Entity;
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@ public class DeviceEntity : SugarBaseEntity, ITenantId
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备机功能类型
|
/// 设备机功能类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDataType = "varchar(150)", ColumnDescription = "设备机功能类型")]
|
[SugarColumn(ColumnDescription = "设备机功能类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||||
public DeviceGroupFunctionEnumType Type { get; set; }
|
public DeviceGroupFunctionEnumType Type { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Kurisu.Core.DataAccess.Entity;
|
using Kurisu.Core.DataAccess.Entity;
|
||||||
using Kurisu.SqlSugar;
|
using Kurisu.SqlSugar;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using SqlSugar.DbConvert;
|
||||||
|
|
||||||
namespace Dlhis.Entity.Device.Entities;
|
namespace Dlhis.Entity.Device.Entities;
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备组功能类型
|
/// 设备组功能类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDataType = "varchar(150)", ColumnDescription = "设备组功能类型")]
|
[SugarColumn(ColumnDescription = "设备组功能类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||||
public DeviceGroupFunctionEnumType Type { get; set; }
|
public DeviceGroupFunctionEnumType Type { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ namespace Dlhis.ScheduledTask.TaskAssignment.Request
|
|||||||
public string GainfoNo { get; set; }
|
public string GainfoNo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备功能
|
/// 设备机功能类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
[EnumDataType(typeof(DeviceFuncEnumType))]
|
[EnumDataType(typeof(DeviceGroupFunctionEnumType))]
|
||||||
public DeviceFuncEnumType type { get; set; }
|
public DeviceGroupFunctionEnumType type { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public class DeviceTaskAssignmentService : IDeviceTaskAssignmentService
|
|||||||
{
|
{
|
||||||
//获取启用的功能设备
|
//获取启用的功能设备
|
||||||
var devices = await _dbContext.Queryable<DeviceEntity>()
|
var devices = await _dbContext.Queryable<DeviceEntity>()
|
||||||
.Where(x => x.Funcs.Contains(request.type))
|
.Where(x => x.Type == request.type)
|
||||||
.Select(x => x.UniqueNo)
|
.Select(x => x.UniqueNo)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
devices.ThrowIfNull($"{request.type.GetDescription}功能机器为空");
|
devices.ThrowIfNull($"{request.type.GetDescription}功能机器为空");
|
||||||
|
|||||||
Reference in New Issue
Block a user