|
@@ -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:
|