Squashed commit of the following:

commit 528cdd51c05d26437f0b23f415e06311b667e9f7
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Wed Apr 17 15:37:30 2024 +0800

    feat 访客预约

commit e73a3fcd9307f86aba2c39578495c03cde1d41f9
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Tue Apr 16 16:15:16 2024 +0800

    feat 业务curd

commit b98b6e2764fea875866e11f790f388ccf3c234b5
Merge: a3dcec3 965e84b
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Tue Apr 16 14:56:30 2024 +0800

    Merge branch 'feat-visitorAppointments' of https://git.dlhis.com/liguoyang/jinko.yikatong into feat-visitorAppointments

commit a3dcec30e1289fbb09de8f85009d3931d971337a
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:57:49 2024 +0800

    fix appsettings

commit 766fbec0c45a3852a75a7a37686b885ac3b0a77a
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:37:01 2024 +0800

    add dockerfile

commit 86731d41fee97ba073065ed1b807987760a371a7
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Sun Apr 14 20:11:56 2024 +0800

    fix 测试websocket链接

commit 1301b126a9ba9a7d97cf45967cf2915e1169c505
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:57:49 2024 +0800

    fix appsettings

commit 081f3a67896c67891c3f80edde82a440b8736851
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:37:01 2024 +0800

    add dockerfile

commit 271b6c5898b5732a35ccfa0629ce89442ac49143
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:34:26 2024 +0800

    test 提交测试代码

commit 965e84b6f3b7f925f8021c9b996cce961b896dea
Merge: 578eb6a 6a6fad1
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Mon Apr 15 17:06:45 2024 +0800

    Merge branch 'feat-visitorAppointments' of https://git.dlhis.com/liguoyang/jinko.yikatong into feat-visitorAppointments

commit 578eb6afbd96f0bfe4aaf8058fd4743309c74d62
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Sun Apr 14 20:11:56 2024 +0800

    fix 测试websocket链接

commit 114511f1daea64b7dbf9c3c38b73e28b6d0301e6
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:57:49 2024 +0800

    fix appsettings

commit 5eacfa8af8087eade8553266a12a2cf42305716b
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:37:01 2024 +0800

    add dockerfile

commit b2ffff1f099be343d89690014d05cb859776acbb
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:34:26 2024 +0800

    test 提交测试代码

commit 6a6fad1d1b8772eebf5df12cd74cfd5c955ff560
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Sun Apr 14 20:11:56 2024 +0800

    fix 测试websocket链接

commit 9ce3c4d6f63957c175d65370d9a6b80e10f4254f
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:57:49 2024 +0800

    fix appsettings

commit c637fd89850cf289d7da457c6c6f47354b5beed3
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:37:01 2024 +0800

    add dockerfile

commit 58c39815b1c45a99aea0caf503fcb1365c957f03
Author: liguoyang <Ligy.97@foxmail.com>
Date:   Fri Apr 12 17:34:26 2024 +0800

    test 提交测试代码
This commit is contained in:
2024-04-17 15:38:25 +08:00
parent 4b6d29291f
commit f8d1997ddd
68 changed files with 2086 additions and 412 deletions

View File

@@ -62,7 +62,7 @@ public class GainfoEntity : SugarBaseEntity
/// <summary>
/// 身份证号
/// </summary>
[SugarColumn(ColumnDescription = "身份证号")]
[SugarColumn(ColumnDescription = "身份证号", UniqueGroupNameList = new[] { "idx_Gainfo_IdNo" })]
public string IdNo { get; set; }
/// <summary>
@@ -211,22 +211,4 @@ public class GainfoExternalEntity : GainfoEntity
/// </summary>
[SugarColumn(ColumnDescription = "公司", IsNullable = false)]
public string Company { get; set; }
/// <summary>
/// 到达时间
/// </summary>
[SugarColumn(ColumnDescription = "到达时间")]
public DateTime From { get; set; }
/// <summary>
/// 离开时间
/// </summary>
[SugarColumn(ColumnDescription = "离开时间")]
public DateTime To { get; set; }
/// <summary>
/// 对接人<see cref="GainfoEntity"/>No
/// </summary>
[SugarColumn(ColumnDescription = "对接人", IsNullable = false)]
public string JinkoNo { get; set; }
}

View File

@@ -55,6 +55,12 @@ public class DeviceGroupEntity : SugarBaseEntity, ITenantId, ISoftDeleted
[SugarColumn(IsNullable = true)]
public string Remark { get; set; }
/// <summary>
/// 可作为预约分组
/// </summary>
[SugarColumn(ColumnDataType = "bit", DefaultValue = "0")]
public bool AsAppointment { get; set; } = false;
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))]
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Type" })]
public DeviceTaskEnumType Type { get; set; }
/// <summary>
@@ -44,7 +44,7 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
/// <summary>
/// 任务下发状态
/// </summary>
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
[SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), IndexGroupNameList = new[] { "idx_DeviceTask_Status" })]
public DeviceTaskStatusEnumType Status { get; set; }
/// <summary>
@@ -69,7 +69,7 @@ public class DeviceTaskEntity : SugarBaseEntity, ITenantId, IVersion
/// 优先级
/// </summary>
[SugarColumn(IsNullable = true, DefaultValue = "0")]
public int Priority { get; set; } = 0;
public int Priority { get; set; } = 0;
public string TenantId { get; set; }

View File

@@ -6,10 +6,6 @@
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Kurisu.SqlSugar" Version="0.3.2" />
</ItemGroup>

View File

@@ -0,0 +1,28 @@
using Kurisu.Core.DataAccess.Entity;
using Kurisu.SqlSugar;
using SqlSugar;
namespace Dlhis.Entity.Visitor.Entity;
/// <summary>
/// 预约区域分配
/// </summary>
[SugarTable(TableName = "AppointmentAreaAssignment", TableDescription = "预约区域分配")]
public class AppointmentAreaAssignmentEntity : SugarBaseEntity, ITenantId
{
/// <summary>
/// 预约区域编码
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "预约区域编码")]
public string CustomCode { get; set; }
/// <summary>
/// 分组code
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "分组code")]
public Guid GroupCode { get; set; }
//UniqueGroupNameList = new[] { "idx_aaa_cc_grpc_tid" }
[SugarColumn()]
public string TenantId { get; set; }
}

View File

@@ -0,0 +1,54 @@
using Dlhis.Entity.Visitor.Enums;
using Kurisu.Core.DataAccess.Entity;
using Kurisu.SqlSugar;
using Mapster;
using SqlSugar;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Visitor.Entity;
/// <summary>
/// 预约区域
/// </summary>
[SugarTable(TableName = "AppointmentArea", TableDescription = "预约区域")]
public class AppointmentAreaEntity : SugarBaseEntity, ITenantId, ISoftDeleted
{
/// <summary>
/// 区域类型
/// </summary>
[AdaptIgnore(MemberSide.Destination)]
[SugarColumn(IsNullable = false, ColumnDescription = "区域类型", ColumnDataType = "varchar(50)",
SqlParameterDbType = typeof(EnumToStringConvert),
UniqueGroupNameList = new[] { "idx_ApponintmentArea_t_cc_tid" })]
public AppointmentAreaEnumType Type { get; set; }
/// <summary>
/// 自定义编码
/// </summary>
[AdaptIgnore(MemberSide.Destination)]
[SugarColumn(IsNullable = false, ColumnDescription = "自定义编码",
UniqueGroupNameList = new[] { "idx_ApponintmentArea_t_cc_tid" })]
public string CustomCode { get; set; }
/// <summary>
/// 名称
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "名称")]
public string Name { get; set; }
/// <summary>
/// 备注
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
public string Remark { get; set; }
/// <summary>
/// 基地/租户
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = " 基地/租户",
UniqueGroupNameList = new[] { "idx_ApponintmentArea_t_cc_tid" })]
public string TenantId { get; set; }
public bool IsDeleted { get; set; }
}

View File

@@ -0,0 +1,44 @@
using Dlhis.Entity.Visitor.Enums;
using Kurisu.Core.DataAccess.Entity;
using Kurisu.SqlSugar;
using SqlSugar;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Visitor.Entity;
/// <summary>
/// 预约区域
/// </summary>
[SugarTable(TableName = "ApponintmentArea", TableDescription = "预约区域")]
public class ApponintmentAreaEntity : SugarBaseEntity, ITenantId
{
/// <summary>
/// 区域类型
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "区域类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public AppointmentAreaEnumType Type { get; set; }
/// <summary>
/// 自定义编码
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "自定义编码", UniqueGroupNameList = new[] { "idx_aa_cc_tid" })]
public string CustomCode { get; set; }
/// <summary>
/// 名称
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "名称")]
public string Name { get; set; }
/// <summary>
/// 备注
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
public string Remark { get; set; }
/// <summary>
/// 基地/租户
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = " 基地/租户", UniqueGroupNameList = new[] { "idx_aa_cc_tid" })]
public string TenantId { get; set; }
}

View File

@@ -0,0 +1,73 @@
using Dlhis.Entity.Visitor.Enums;
using Kurisu.SqlSugar;
using SqlSugar;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Visitor.Entity;
/// <summary>
/// 预约明细
/// </summary>
[SugarTable(TableName = "VisitorAppointmentDetail", TableDescription = "访客预约")]
public class VisitorAppointmentDetailEntity : SugarBaseEntity
{
[SugarColumn(IsNullable = false, ColumnDescription = "父id")]
public long AppointmentId { get; set; }
/// <summary>
/// 流水号
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "流水号")]
public string FlowId { get; set; }
/// <summary>
/// 访客名称
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "访客名称")]
public string Name { get; set; }
/// <summary>
/// 手机号
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "手机号")]
public string Phone { get; set; }
/// <summary>
/// 是否外部人员
/// </summary>
[SugarColumn(IsNullable = false, ColumnDataType = "bit")]
public bool IsExternal { get; set; }
/// <summary>
/// 身份证
/// </summary>
/// <remarks>
/// 使用身份证字段作为申请人唯一标识
/// </remarks>
[SugarColumn(IsNullable = false, ColumnDescription = "身份证")]
public string IdNo { get; set; }
/// <summary>
/// 预计到达
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "预计到达")]
public DateTime Start { get; set; }
/// <summary>
/// 预计离开
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "预计离开")]
public DateTime End { get; set; }
/// <summary>
/// 状态
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "状态", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public AppointmentDetailEnumType Status { get; set; }
/// <summary>
/// 备注
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
public string Remark { get; set; }
}

View File

@@ -0,0 +1,30 @@
using Kurisu.SqlSugar;
using SqlSugar;
namespace Dlhis.Entity.Visitor.Entity;
[SugarTable(TableName = "VisitorAppointment", TableDescription = "访客预约")]
public class VisitorAppointmentEntity : SugarBaseEntity
{
/// <summary>
/// 流水号
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "流水号", UniqueGroupNameList = new[] { "idx_VisitorAppointment_FlowId" })]
public string FlowId { get; set; }
public string Title { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string DepartmentNo { get; set; }
public string Company { get; set; }
public DateTime ApplyTime { get; set; }
public string AreaCustomCode { get; set; }
}

View File

@@ -0,0 +1,22 @@
using System.ComponentModel;
namespace Dlhis.Entity.Visitor.Enums;
/// <summary>
/// 预约区域类型
/// </summary>
[Description("预约区域类型")]
public enum AppointmentAreaEnumType
{
/// <summary>
/// 门岗
/// </summary>
[Description("门岗")]
Door = 1,
/// <summary>
/// 车间
/// </summary>
[Description("车间")]
Workshop = 2,
}

View File

@@ -0,0 +1,35 @@
using System.ComponentModel;
namespace Dlhis.Entity.Visitor.Enums;
/// <summary>
/// 访客预约明细状态
/// </summary>
[Description("预约状态")]
public enum AppointmentDetailEnumType
{
/// <summary>
/// 待来访
/// </summary>
[Description("待来访")]
Wait = 0,
/// <summary>
/// 取消
/// </summary>
[Description("取消")]
Cancel = 5,
/// <summary>
/// 到达
/// </summary>
[Description("到达")]
Arrived = 10,
/// <summary>
/// 离开
/// </summary>
[Description("离开")]
Leave = 99
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel;
namespace Dlhis.Entity.Visitor.Enums;
[Description("预约区域")]
public enum ApponintmentAreaEnumType
{
/// <summary>
/// 门岗
/// </summary>
[Description("门岗")]
Door = 1,
/// <summary>
/// 车间
/// </summary>
[Description("车间")]
Workshop = 2,
}

View File

@@ -0,0 +1,22 @@
using System.ComponentModel;
namespace Dlhis.Entity.Visitor.Enums;
/// <summary>
/// 访客预约明细状态
/// </summary>
[Description("访客预约状态")]
public enum VisitorAppointmentDetailEnumType
{
/// <summary>
/// 到达
/// </summary>
[Description("到达")]
Arrived = 1,
/// <summary>
/// 离开
/// </summary>
[Description("离开")]
Leave = 99
}