feat 手动上传,手动设置时间范围

This commit is contained in:
2024-12-19 15:21:45 +08:00
parent e8632b0d49
commit 0f69c56a93
39 changed files with 458 additions and 304 deletions

View File

@@ -23,7 +23,7 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
/// <summary>
/// 上级设备组code
/// </summary>
[SugarColumn(ColumnDescription = "上级设备组code")]
[SugarColumn(IsNullable = true, ColumnDescription = "上级设备组code")]
public Guid? PCode { get; set; }
/// <summary>
@@ -37,20 +37,20 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
/// <summary>
/// 设备组名称
/// </summary>
[SugarColumn(ColumnDescription = "设备组名称")]
[SugarColumn(IsNullable = false, ColumnDescription = "设备组名称")]
public string Name { get; set; }
/// <summary>
/// 是否可编辑
/// </summary>
[SugarColumn(ColumnDataType = "bit", DefaultValue = "1", ColumnDescription = "是否可编辑")]
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "1", ColumnDescription = "是否可编辑")]
public bool Editable { get; set; } = true;
/// <summary>
/// 可设置下级
/// </summary>
[SugarColumn(ColumnDataType = "bit", DefaultValue = "1")]
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "1")]
public bool AbleSetNext { get; set; } = true;
/// <summary>
@@ -62,16 +62,17 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
/// <summary>
/// 可作为预约分组
/// </summary>
[SugarColumn(ColumnDataType = "bit", DefaultValue = "0")]
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "0")]
public bool AsAppointment { get; set; } = false;
/// <summary>
/// 是否为出差分组
/// </summary>
[SugarColumn(ColumnDataType = "bit", DefaultValue = "0")]
[SugarColumn(IsNullable = false, ColumnDataType = "bit", DefaultValue = "0")]
public bool IsBusinessTrip { get; set; } = false;
[SugarColumn(IsNullable = true)]
public string TenantId { get; set; }

View File

@@ -15,7 +15,7 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
/// <summary>
/// 任务类型
/// </summary>
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Type" })]
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Type" })]
public DeviceTaskEnumType Type { get; set; }
/// <summary>
@@ -44,27 +44,22 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
/// <summary>
/// 任务下发状态
/// </summary>
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Status" })]
[SugarColumn(IsNullable = false, ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Status" })]
public DeviceTaskStatusEnumType Status { get; set; }
/// <summary>
/// 数据版本
/// </summary>
[SugarColumn(IsNullable = false)]
public int Version { get; set; }
/// <summary>
/// 处理结果
/// </summary>
[SugarColumn(ColumnDataType = "longtext")]
[SugarColumn(IsNullable = true, ColumnDataType = "longtext")]
public string ResultMessage { get; set; }
/// <summary>
/// 取消id
/// </summary>
[SugarColumn(DefaultValue = "0")]
public long CancellationId { get; set; } = 0;
/// <summary>
/// 任务来源
/// </summary>
@@ -74,7 +69,7 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
/// <summary>
/// 优先级
/// </summary>
[SugarColumn(IsNullable = true, DefaultValue = "0")]
[SugarColumn(IsNullable = false, DefaultValue = "0")]
public int Priority { get; set; } = 0;

View File

@@ -49,6 +49,6 @@ public class DeviceUploadLogEntity : SugarBaseEntity, ITenantId
public bool Status { get; set; }
[SugarColumn(IndexGroupNameList = new string[] { "idx_DeviceUploadLog_TenantId" })]
[SugarColumn(IndexGroupNameList = new[] { "idx_DeviceUploadLog_TenantId" })]
public string TenantId { get; set; }
}

View File

@@ -0,0 +1,24 @@
using Kurisu.AspNetCore.DataAccess.Entity;
using Kurisu.AspNetCore.DataAccess.SqlSugar;
using SqlSugar;
namespace Dlhis.Entity.Device.Entities;
[SugarTable(TableName = "DeviceUploadLogManually", TableDescription = "设备上传记录")]
public class DeviceUploadLogManuallyEntity : SugarBaseEntity, ITenantId
{
[SugarColumn(IsNullable = false, IndexGroupNameList = new[] { "idx_DeviceUploadLogManually_deviceNo" })]
public string DeviceNo { get; set; }
[SugarColumn(IsNullable = false)]
public DateTime Start { get; set; }
[SugarColumn(IsNullable = false)]
public DateTime End { get; set; }
[SugarColumn(IsNullable = false, ColumnDataType = "bit")]
public bool IsFinished { get; set; }
/// <inheritdoc />
public string TenantId { get; set; }
}