feat 设备和设备组功能属性
This commit is contained in:
@@ -41,6 +41,12 @@ public class DeviceEntity : SugarBaseEntity, ITenantId
|
||||
[SugarColumn(ColumnDataType = "varchar(150)", IsJson = true, ColumnDescription = "设备功能", DefaultValue = "[]")]
|
||||
public List<DeviceFuncEnumType> Funcs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备机功能类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(150)", ColumnDescription = "设备机功能类型")]
|
||||
public DeviceGroupFunctionEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部署点
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Kurisu.Core.DataAccess.Entity;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Kurisu.Core.DataAccess.Entity;
|
||||
using Kurisu.SqlSugar;
|
||||
using SqlSugar;
|
||||
|
||||
@@ -10,6 +11,13 @@ namespace Dlhis.Entity.Device.Entities;
|
||||
[SugarTable(TableName = "DeviceGroup", TableDescription = "设备组")]
|
||||
public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 设备组功能类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "varchar(150)", ColumnDescription = "设备组功能类型")]
|
||||
public DeviceGroupFunctionEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上级设备组code
|
||||
/// </summary>
|
||||
|
||||
33
Src/Dlhis.Entity/Device/Enums/DeviceGroupFunctionEnumType.cs
Normal file
33
Src/Dlhis.Entity/Device/Enums/DeviceGroupFunctionEnumType.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Dlhis.Entity.Device.Enums;
|
||||
|
||||
/// <summary>
|
||||
/// 设备/设备组功能类型
|
||||
/// </summary>
|
||||
[Description("设备/设备组功能类型")]
|
||||
public enum DeviceGroupFunctionEnumType
|
||||
{
|
||||
/// <summary>
|
||||
/// 门禁
|
||||
/// </summary>
|
||||
[Description("门禁")]
|
||||
Door = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 就餐
|
||||
/// </summary>
|
||||
[Description("就餐")]
|
||||
Meal = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 考勤
|
||||
/// </summary>
|
||||
[Description("考勤")]
|
||||
Attendance = 3 ,
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class DeviceTaskAssignmentService : IDeviceTaskAssignmentService
|
||||
{
|
||||
//获取启用的功能设备
|
||||
var devices = await _dbContext.Queryable<DeviceEntity>()
|
||||
.Where(x => x.Enable && x.Funcs.Contains(request.type))
|
||||
.Where(x => x.Funcs.Contains(request.type))
|
||||
//.Where(x=>x.UniqueNo == "717840555")
|
||||
.Select(x => x.UniqueNo)
|
||||
.ToListAsync();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"EnableSqlLog": false
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"HangfireConnection": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=hangfire;charset=utf8mb4;Allow User Variables=true;"
|
||||
"HangfireConnection": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=hangfire;default command timeout=100;Connection Timeout=30;Charset=utf8mb4;Allow User Variables=true;IgnoreCommandTransaction=true"
|
||||
},
|
||||
"FaceUrlOptions": {
|
||||
"Url": "https://yikatong.isawesome.cn/api/basic/gainfos/face?token=",
|
||||
|
||||
Reference in New Issue
Block a user