Browse Source

Merge branch 'test' of http://110.188.24.182:10023/Fengwo/hotline into test

田爽 1 tháng trước cách đây
mục cha
commit
8f2e272b84

+ 2 - 2
src/Hotline/FlowEngine/Definitions/StepDefine.cs

@@ -11,9 +11,9 @@ public class StepDefine : StepDefineBasic
 {
     #region method
 
-    public bool IsCenter() => BusinessType is EBusinessType.Seat or EBusinessType.Send;
+    public bool IsCenter() => BusinessType is EBusinessType.Seat or EBusinessType.Send or EBusinessType.CenterLeader or EBusinessType.CenterMonitor;
 
-    public bool IsOrg() => BusinessType is EBusinessType.Department;
+    public bool IsOrg() => BusinessType is EBusinessType.Department or EBusinessType.DepartmentLeader;
 
     #endregion
 }

+ 14 - 0
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -322,6 +322,20 @@ namespace Hotline.FlowEngine.Workflows
             }
             else
             {
+                //if dto.NextStepCode is empty, find nextCode, but if not only one throw it
+                if (string.IsNullOrEmpty(dto.NextStepCode))
+                {
+                    if (currentStepDefine?.NextSteps?.Count == 0)
+                        throw new UserFriendlyException(
+                            $"未选择下一办理节点且未配置下一节点, workflowId: {workflow.Id}, stepDefineName: {currentStepDefine.Name}",
+                            "未选择下一办理节点");
+                    if (currentStepDefine?.NextSteps?.Count > 1)
+                        throw new UserFriendlyException(
+                            $"未选择下一办理节点且配置有多个节点, workflowId: {workflow.Id}, stepDefineName: {currentStepDefine.Name}",
+                            "未选择下一办理节点且配置有多个节点");
+                    dto.NextStepCode = currentStepDefine.NextSteps.First().Code;
+                }
+
                 //下一步配置为下一步节点配置
                 nextStepDefine = GetStepDefine(workflow.WorkflowDefinition, dto.NextStepCode);
             }

+ 24 - 0
src/Hotline/Snapshot/ThirdAccount.cs

@@ -76,4 +76,28 @@ public class ThirdAccount : CreationSoftDeleteEntity
     /// </summary>
     [SugarColumn(ColumnDescription = "用户昵称")]
     public string? UserName { get; set; }
+
+    /// <summary>
+    /// 应用类型
+    /// </summary>
+    [SugarColumn(ColumnDescription = "应用类型", DefaultValue = "1")]
+    public EAppType AppType { get; set; }
+}
+
+public enum EAppType
+{
+    /// <summary>
+    /// 随手拍
+    /// </summary>
+    Snapshot = 1,
+
+    /// <summary>
+    /// 部门办件app
+    /// </summary>
+    Department = 2,
+
+    /// <summary>
+    /// 市民办件app
+    /// </summary>
+    Citizen = 3
 }