فهرست منبع

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

tangjiang 2 ماه پیش
والد
کامیت
179125cdb9

+ 22 - 12
src/Hotline.Api/Controllers/OrderController.cs

@@ -6175,6 +6175,12 @@ public class OrderController : BaseController
                 //     .ExecuteCommandAsync(HttpContext.RequestAborted);
             }
 
+            _mapper.Map(workflow, order);
+            order.FileEmpty();
+            order.Status = targetStepDefine.StepType is EStepType.Start
+                ? EOrderStatus.SpecialToUnAccept
+                : EOrderStatus.Special;
+
             if (order.Status >= EOrderStatus.Filed)
             {
                 var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == dto.OrderId);
@@ -6200,6 +6206,8 @@ public class OrderController : BaseController
                 }
             }
 
+            await _orderRepository.UpdateAsync(order, HttpContext.RequestAborted);
+
             var setting = _systemSettingCacheManager.GetSetting(SettingConstants.CityBaseConfiguration)?.SettingValue[0];
             CityBaseConfiguration cityBase = JsonSerializer.Deserialize<CityBaseConfiguration>(setting);
             if (order != null && (cityBase.CityProvince.OrgId.Equals(model.OrgId) ||
@@ -6214,18 +6222,20 @@ public class OrderController : BaseController
                 }
             }
 
-            await _orderRepository.Updateable(order)
-                .UpdateColumns(d => new
-                {
-                    d.CenterToOrgHandlerId,
-                    d.CenterToOrgHandlerName,
-                    d.ExpiredTime,
-                    d.NearlyExpiredTime,
-                    d.NearlyExpiredTimeOne,
-                    d.ProcessType,
-                    d.Status,
-                })
-                .ExecuteCommandAsync(HttpContext.RequestAborted);
+            //await _orderRepository.Updateable(order)
+            //    .UpdateColumns(d => new
+            //    {
+            //        d.CenterToOrgHandlerId,
+            //        d.CenterToOrgHandlerName,
+            //        d.ExpiredTime,
+            //        d.NearlyExpiredTime,
+            //        d.NearlyExpiredTimeOne,
+            //        d.ProcessType,
+            //        d.Status,
+            //    })
+            //    .ExecuteCommandAsync(HttpContext.RequestAborted);
+
+            
         }
         else
         {

+ 55 - 55
src/Hotline.Application/Handlers/FlowEngine/WorkflowRecallHandler.cs

@@ -74,62 +74,62 @@ public class WorkflowRecallHandler : INotificationHandler<RecallNotify>
             switch (workflow.ModuleCode)
             {
                 case WorkflowModuleConsts.OrderHandle:
-                    var order = await _orderDomainService.GetOrderAsync(workflow.ExternalId, withHotspot: true, withAcceptor: true,
-                        withExtension: true, cancellationToken: cancellationToken);
-                    //order.UpdateHandlingStatus(workflow.IsInCountersign);
-                    _mapper.Map(workflow, order);
-                    order.FileEmpty();
-					if (notification.TargetStep.StepType is EStepType.Start)
-                    {
-                        //if (!bool.TryParse(
-                        //        _systemSettingCacheManager.GetSetting(SettingConstants.IsRecallToSeatDesignated)?.SettingValue[0],
-                        //        out var isRecallToSeatDesignated))
-                        //    isRecallToSeatDesignated = false;
-                        //var isRecallToSeatDesignated = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.IsRecallToSeatDesignated).SettingValue[0]);
-                        order.Status = EOrderStatus.SpecialToUnAccept;
-                        //if (isRecallToSeatDesignated)
-                        //{
-                        //    if (data.HandlerType is EHandlerType.Role or EHandlerType.AssignedUser)
-                        //    {
-                        //        var handler = data.NextHandlers.FirstOrDefault();
-                        //        if (handler != null)
-                        //        {
-                        //            order.SignerId = handler.Key;
-                        //            order.SignerName = handler.Value;
-                        //        }
-                        //    }
-                        //}
-                        //else
-                        //{
-                        //    //order.BackToUnsign();
-                        //}
-                    }
-                    else
-                    {
-	                    order.Status = EOrderStatus.Special;
-                    }
-					await _orderRepository.UpdateAsync(order, false, cancellationToken);
-                    var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == order.Id, cancellationToken);
-                    if (publish != null)
-                    {
-                        var publishHistory = _mapper.Map<OrderPublishHistory>(publish);
-                        publishHistory.OrderPublishId = publish.Id;
-                        publishHistory.ArrangeTitleAfter = publish.ArrangeTitle;
-                        publishHistory.ArrangeTitleBefor = publish.ArrangeTitle;
-                        publishHistory.ArrangeContentAfter = publish.ArrangeContent;
-                        publishHistory.ArrangeContentBefor = publish.ArrangeContent;
-                        publishHistory.ArrangeOpinionAfter = publish.ArrangeOpinion;
-                        publishHistory.ArrangeOpinionBefor = publish.ArrangeOpinion;
-                        await _orderPublishHistoryRepository.AddAsync(publishHistory, cancellationToken);
-                        await _orderPublishRepository.RemoveAsync(publish, false, cancellationToken);
-                    }
+     //               var order = await _orderDomainService.GetOrderAsync(workflow.ExternalId, withHotspot: true, withAcceptor: true,
+     //                   withExtension: true, cancellationToken: cancellationToken);
+     //               //order.UpdateHandlingStatus(workflow.IsInCountersign);
+     //               _mapper.Map(workflow, order);
+     //               order.FileEmpty();
+					//if (notification.TargetStep.StepType is EStepType.Start)
+     //               {
+     //                   //if (!bool.TryParse(
+     //                   //        _systemSettingCacheManager.GetSetting(SettingConstants.IsRecallToSeatDesignated)?.SettingValue[0],
+     //                   //        out var isRecallToSeatDesignated))
+     //                   //    isRecallToSeatDesignated = false;
+     //                   //var isRecallToSeatDesignated = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.IsRecallToSeatDesignated).SettingValue[0]);
+     //                   order.Status = EOrderStatus.SpecialToUnAccept;
+     //                   //if (isRecallToSeatDesignated)
+     //                   //{
+     //                   //    if (data.HandlerType is EHandlerType.Role or EHandlerType.AssignedUser)
+     //                   //    {
+     //                   //        var handler = data.NextHandlers.FirstOrDefault();
+     //                   //        if (handler != null)
+     //                   //        {
+     //                   //            order.SignerId = handler.Key;
+     //                   //            order.SignerName = handler.Value;
+     //                   //        }
+     //                   //    }
+     //                   //}
+     //                   //else
+     //                   //{
+     //                   //    //order.BackToUnsign();
+     //                   //}
+     //               }
+     //               else
+     //               {
+	    //                order.Status = EOrderStatus.Special;
+     //               }
+					//await _orderRepository.UpdateAsync(order, false, cancellationToken);
+                    //var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == order.Id, cancellationToken);
+                    //if (publish != null)
+                    //{
+                    //    var publishHistory = _mapper.Map<OrderPublishHistory>(publish);
+                    //    publishHistory.OrderPublishId = publish.Id;
+                    //    publishHistory.ArrangeTitleAfter = publish.ArrangeTitle;
+                    //    publishHistory.ArrangeTitleBefor = publish.ArrangeTitle;
+                    //    publishHistory.ArrangeContentAfter = publish.ArrangeContent;
+                    //    publishHistory.ArrangeContentBefor = publish.ArrangeContent;
+                    //    publishHistory.ArrangeOpinionAfter = publish.ArrangeOpinion;
+                    //    publishHistory.ArrangeOpinionBefor = publish.ArrangeOpinion;
+                    //    await _orderPublishHistoryRepository.AddAsync(publishHistory, cancellationToken);
+                    //    await _orderPublishRepository.RemoveAsync(publish, false, cancellationToken);
+                    //}
 
-                    var visit = await _orderVisitRepository.GetAsync(x => x.OrderId == order.Id && x.VisitState != EVisitState.None, cancellationToken);
-                    if (visit != null)
-                    {
-                        visit.VisitState = EVisitState.None;
-                        await _orderVisitRepository.UpdateAsync(visit, cancellationToken);
-                    }
+                    //var visit = await _orderVisitRepository.GetAsync(x => x.OrderId == order.Id && x.VisitState != EVisitState.None, cancellationToken);
+                    //if (visit != null)
+                    //{
+                    //    visit.VisitState = EVisitState.None;
+                    //    await _orderVisitRepository.UpdateAsync(visit, cancellationToken);
+                    //}
                     break;
                 case WorkflowModuleConsts.KnowledgeAdd:
                 case WorkflowModuleConsts.KnowledgeUpdate:

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

@@ -1266,6 +1266,8 @@ namespace Hotline.FlowEngine.Workflows
                     {
                         EBusinessType.Seat => EFlowDirection.CenterToCenter,
                         EBusinessType.Send => EFlowDirection.CenterToCenter,
+                        EBusinessType.CenterMonitor => EFlowDirection.CenterToCenter,
+                        EBusinessType.CenterLeader => EFlowDirection.CenterToCenter,
                         EBusinessType.Department => EFlowDirection.CenterToOrg,
                         EBusinessType.DepartmentLeader => EFlowDirection.CenterToOrg,
                         EBusinessType.File => EFlowDirection.CenterToFile,
@@ -1278,6 +1280,8 @@ namespace Hotline.FlowEngine.Workflows
                     {
                         EBusinessType.Seat => EFlowDirection.OrgToCenter,
                         EBusinessType.Send => EFlowDirection.OrgToCenter,
+                        EBusinessType.CenterMonitor => EFlowDirection.OrgToCenter,
+                        EBusinessType.CenterLeader => EFlowDirection.OrgToCenter,
                         EBusinessType.Department => EFlowDirection.OrgToOrg,
                         EBusinessType.DepartmentLeader => EFlowDirection.OrgToOrg,
                         EBusinessType.File => EFlowDirection.OrgToFile,
@@ -1291,6 +1295,8 @@ namespace Hotline.FlowEngine.Workflows
                         EBusinessType.Send => EFlowDirection.FiledToCenter,
                         EBusinessType.Department => EFlowDirection.FiledToOrg,
                         EBusinessType.DepartmentLeader => EFlowDirection.FiledToOrg,
+                        EBusinessType.CenterMonitor => EFlowDirection.FiledToCenter,
+                        EBusinessType.CenterLeader => EFlowDirection.FiledToCenter,
                         _ => throw new ArgumentOutOfRangeException(nameof(directionStepBusinessType), directionStepBusinessType, null)
                     };
                 case EBusinessType.Unknown: