فهرست منبع

Merge branch 'master' of http://git.fwt.com/Hotline/hotline

dss 2 سال پیش
والد
کامیت
0fb0d1562e

+ 0 - 0
src/Hotline.Share/Enums/Order/EFromStatus.cs → src/Hotline.Share/Enums/Order/EFromIdentity.cs


+ 5 - 0
src/Hotline/FlowEngine/Definitions/NextStepDefine.cs

@@ -4,4 +4,9 @@ public class NextStepDefine : StepBasic
 {
     //todo 进入到当前下一节点的条件,默认无条件即为人工判定
     public string? Predicate { get; set; }
+
+    /// <summary>
+    /// 是否为返回的节点
+    /// </summary>
+    public bool IsPrevious { get; set; }
 }

+ 24 - 38
src/Hotline/Orders/Order.cs

@@ -7,7 +7,7 @@ namespace Hotline.Orders
     /// <summary>
     /// 工单
     /// </summary>
-    public partial class Order : FullStateEntity
+    public partial class Order : PositionEntity
     {
         #region 来电信息
 
@@ -16,6 +16,16 @@ namespace Hotline.Orders
         /// </summary>
         public EChannel Channel { get; set; }
 
+        /// <summary>
+        /// 服务人姓名(冗余)
+        /// </summary>
+        public string ServiceName { get; set; }
+
+        /// <summary>
+        /// 服务人工号(冗余)
+        /// </summary>
+        public string StaffNo { get; set; }
+
         /// <summary>
         /// 来电/信人姓名
         /// </summary>
@@ -47,8 +57,9 @@ namespace Hotline.Orders
         public EAgeRange? AgeRange { get; set; }
 
         /// <summary>
-        /// 联系电话,null表示无需联系
+        /// 联系电话
         /// </summary>
+        [SugarColumn(ColumnDescription = "联系电话", IsNullable = true)]
         public string? Contact { get; set; }
 
         /// <summary>
@@ -56,9 +67,15 @@ namespace Hotline.Orders
         /// </summary>
         public bool AcceptSms { get; set; }
 
+        /// <summary>
+        /// 是否需要联系
+        /// </summary>
+        public bool NeedContact { get; set; }
+
         /// <summary>
         /// 工作单位(当“来电/信人身份”为“企业”时必填,其他情况非必填)
         /// </summary>
+        [SugarColumn(ColumnDescription = "工作单位", IsNullable = true)]
         public string? Company { get; set; }
 
         #endregion
@@ -73,7 +90,7 @@ namespace Hotline.Orders
         /// <summary>
         /// 工单类型
         /// </summary>
-        public EOrderType OrderType { get; set; }
+        public EOrderType OrderType { get; set; }//todo
 
         /// <summary>
         /// 受理类型
@@ -96,44 +113,13 @@ namespace Hotline.Orders
         /// </summary>
         public DateTime? IncidentTime { get; set; }
 
-        ///// <summary>
-        ///// 事发地址
-        ///// </summary>
-        //[SugarColumn(ColumnDataType = "varchar(4000)", IsJson = true)]
-        //public Position IncidentPosition { get; set; } = new();
-
-        ///// <summary>
-        ///// 附件
-        ///// </summary>
-        //[SugarColumn(ColumnDataType = "varchar(4000)", IsJson = true)]
-        //public List<string> Additions { get; set; } = new();
-
-        #endregion
-    }
-
-    public class Position
-    {
         /// <summary>
-        /// 经度
+        /// 附件
         /// </summary>
-        public double Longitude { get; set; }
+        [SugarColumn(ColumnDataType = "varchar(2000)", IsJson = true)]
+        public List<string> Additions { get; set; } = new();
 
-        /// <summary>
-        /// 维度
-        /// </summary>
-        public double Latitude { get; set; }
-
-        /// <summary>
-        /// 行政区划编码
-        /// </summary>
-        public string AreaCode { get; set; }
-        public string Province { get; set; }
-        public string City { get; set; }
-        public string County { get; set; }
-        public string Street { get; set; }
-
-        [SugarColumn(IsIgnore = true)]
-        public string Address => $"{Province}{City}{County}{Street}";
+        #endregion
     }
 
     /// <summary>

+ 28 - 0
src/Hotline/Position.cs

@@ -0,0 +1,28 @@
+using SqlSugar;
+
+namespace Hotline;
+
+public class Position
+{
+    /// <summary>
+    /// 经度
+    /// </summary>
+    public double Longitude { get; set; }
+
+    /// <summary>
+    /// 维度
+    /// </summary>
+    public double Latitude { get; set; }
+
+    /// <summary>
+    /// 行政区划编码
+    /// </summary>
+    public string AreaCode { get; set; }
+    public string Province { get; set; }
+    public string City { get; set; }
+    public string County { get; set; }
+    public string Street { get; set; }
+
+    [SugarColumn(IsIgnore = true)]
+    public string Address => $"{Province}{City}{County}{Street}";
+}

+ 38 - 2
src/XF.Domain.Repository/Entity.cs

@@ -13,7 +13,7 @@ public abstract class Entity : IEntity<string>, IDomainEvents, IDataPermission
     /// <summary>
     /// 组织Id
     /// </summary>
-    [SugarColumn(ColumnDescription ="组织Id",IsNullable = true)]
+    [SugarColumn(ColumnDescription = "组织Id", IsNullable = true)]
     public string OrgId { get; private set; }
     /// <summary>
     /// 组织编码
@@ -32,7 +32,7 @@ public abstract class Entity : IEntity<string>, IDomainEvents, IDataPermission
     [SugarColumn(ColumnDescription = "数据权限区域Id", IsNullable = true)]
     public string AreaId { get; private set; }
 
-    public void CreateDataPermission(string orgId,string departmentCode, string creatorId, string? areaId)
+    public void CreateDataPermission(string orgId, string departmentCode, string creatorId, string? areaId)
     {
         OrgId = OrgId;
         AutoOrgCode = departmentCode;
@@ -141,3 +141,39 @@ public abstract class FullStateEntity : CreationSoftDeleteEntity, IHasModificati
     public List<string> AssignUserIds { get; set; } = new();
 }
 
+public class PositionEntity : FullStateEntity
+{
+    /// <summary>
+    /// 经度
+    /// </summary>
+    [SugarColumn(ColumnDescription = "经度")]
+    public double? Longitude { get; set; }
+
+    /// <summary>
+    /// 维度
+    /// </summary>
+    [SugarColumn(ColumnDescription = "维度")]
+    public double? Latitude { get; set; }
+
+    /// <summary>
+    /// 行政区划编码
+    /// </summary>
+    [SugarColumn(ColumnDescription = "行政区划编码", IsNullable = true)]
+    public string? AreaCode { get; set; }
+
+    [SugarColumn(IsNullable = true)]
+    public string? Province { get; set; }
+
+    [SugarColumn(IsNullable = true)]
+    public string? City { get; set; }
+
+    [SugarColumn(IsNullable = true)]
+    public string? County { get; set; }
+
+    [SugarColumn(IsNullable = true)]
+    public string? Street { get; set; }
+
+    [SugarColumn(IsIgnore = true)]
+    public string Address => $"{Province ?? string.Empty}{City ?? string.Empty}{County ?? string.Empty}{Street ?? string.Empty}";
+}
+