|
@@ -65,15 +65,33 @@ public class OrderDomainService : IOrderDomainService, IScopeDependency
|
|
await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 工单办理流程开始(流程开始后触发)
|
|
|
|
+ /// </summary>
|
|
|
|
+ public async Task ManageFlowStartAsync(FlowAssignMode assignMode, bool isCountersignStart, string? orderId, string workflowId,
|
|
|
|
+ DateTime? currentStepTime, string? currentStepName, DateTime expiredTime, CancellationToken cancellationToken)
|
|
|
|
+ {
|
|
|
|
+ var order = await GetOrderAsync(orderId, cancellationToken);
|
|
|
|
+ CheckOrderIfFiled(order);
|
|
|
|
+ order.WorkflowId = workflowId;
|
|
|
|
+
|
|
|
|
+ //更新指派信息
|
|
|
|
+ order.Assign(assignMode.FlowAssignType, assignMode.Handlers);
|
|
|
|
+
|
|
|
|
+ //更新流转信息
|
|
|
|
+ order.ManageFlow(isCountersignStart, false, currentStepTime, currentStepName, expiredTime);
|
|
|
|
+
|
|
|
|
+ await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 工单办理(每个节点都会触发)
|
|
/// 工单办理(每个节点都会触发)
|
|
/// </summary>
|
|
/// </summary>
|
|
public async Task ManageFlowNextAsync(FlowAssignMode assignMode,
|
|
public async Task ManageFlowNextAsync(FlowAssignMode assignMode,
|
|
bool isCountersignStart, bool isCountersignEnd,
|
|
bool isCountersignStart, bool isCountersignEnd,
|
|
- string? orderId, DateTime? currentStepTime, string? CurrentStepName, DateTime expiredTime,
|
|
|
|
|
|
+ string? orderId, DateTime? currentStepTime, string? currentStepName, DateTime expiredTime,
|
|
CancellationToken cancellationToken)
|
|
CancellationToken cancellationToken)
|
|
{
|
|
{
|
|
- _logger.LogInformation($"{nameof(ManageFlowNextAsync)}");
|
|
|
|
var order = await GetOrderAsync(orderId, cancellationToken);
|
|
var order = await GetOrderAsync(orderId, cancellationToken);
|
|
CheckOrderIfFiled(order);
|
|
CheckOrderIfFiled(order);
|
|
|
|
|
|
@@ -83,7 +101,7 @@ public class OrderDomainService : IOrderDomainService, IScopeDependency
|
|
_logger.LogInformation($"{nameof(ManageFlowNextAsync)}, after: order.AssignUserIds: {string.Join(',', order.AssignUserIds)}, order.AssignOrgs: {string.Join(',', order.AssignOrgCodes)}");
|
|
_logger.LogInformation($"{nameof(ManageFlowNextAsync)}, after: order.AssignUserIds: {string.Join(',', order.AssignUserIds)}, order.AssignOrgs: {string.Join(',', order.AssignOrgCodes)}");
|
|
|
|
|
|
//更新流转信息
|
|
//更新流转信息
|
|
- order.ManageFlow(isCountersignStart, isCountersignEnd, currentStepTime, CurrentStepName, expiredTime);
|
|
|
|
|
|
+ order.ManageFlow(isCountersignStart, isCountersignEnd, currentStepTime, currentStepName, expiredTime);
|
|
_logger.LogInformation($"更新流转信息 over, order.AssignUserIds: {string.Join(',', order.AssignUserIds)}");
|
|
_logger.LogInformation($"更新流转信息 over, order.AssignUserIds: {string.Join(',', order.AssignUserIds)}");
|
|
await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
_logger.LogInformation($"update db over, order.AssignUserIds: {string.Join(',', order.AssignUserIds)}");
|
|
_logger.LogInformation($"update db over, order.AssignUserIds: {string.Join(',', order.AssignUserIds)}");
|