|
@@ -1191,21 +1191,21 @@ public class OrderController : BaseController
|
|
|
[LogFilter("开始工单延期流程")]
|
|
|
public async Task InitialNextFlow([FromBody] DelayNextFlowDto dto)
|
|
|
{
|
|
|
- var delay = await _orderDelayRepository.GetAsync(dto.Data.Id);
|
|
|
- _mapper.Map(dto.Data, delay);
|
|
|
- if (dto.Data.Files.Any())
|
|
|
- delay.FileJson = await _fileRepository.AddFileAsync(dto.Data.Files, delay.Id, "", HttpContext.RequestAborted);
|
|
|
- await _orderDelayRepository.UpdateAsync(delay, HttpContext.RequestAborted);
|
|
|
- try
|
|
|
- {
|
|
|
- dto.NextWorkflow.WorkflowId = delay.WorkflowId;
|
|
|
- await _workflowApplication.NextAsync(dto.NextWorkflow,
|
|
|
- cancellationToken: HttpContext.RequestAborted);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- throw new UserFriendlyException($"工单延期下一步流程失败!, {e.Message}", "工单延期下一步流程失败");
|
|
|
- }
|
|
|
+ var delay = await _orderDelayRepository.GetAsync(dto.Data.Id);
|
|
|
+ _mapper.Map(dto.Data, delay);
|
|
|
+ if (dto.Data.Files.Any())
|
|
|
+ delay.FileJson = await _fileRepository.AddFileAsync(dto.Data.Files, delay.Id, "", HttpContext.RequestAborted);
|
|
|
+ await _orderDelayRepository.UpdateAsync(delay, HttpContext.RequestAborted);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ dto.NextWorkflow.WorkflowId = delay.WorkflowId;
|
|
|
+ await _workflowApplication.NextAsync(dto.NextWorkflow,
|
|
|
+ cancellationToken: HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ throw new UserFriendlyException($"工单延期下一步流程失败!, {e.Message}", "工单延期下一步流程失败");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -1282,7 +1282,7 @@ public class OrderController : BaseController
|
|
|
var rspModel = _mapper.Map<OrderDelayDto>(model);
|
|
|
rspModel.IsCanHandle = model.CanHandle(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgId);
|
|
|
rspModel.Handle = await _workflowDomainService.CheckCurrentIsStartStepAsync(rspModel.WorkflowId, _sessionContext.RequiredUserId, _sessionContext.RequiredOrgId, HttpContext.RequestAborted);
|
|
|
- if (rspModel.FileJson != null && rspModel.FileJson.Any())
|
|
|
+ if (rspModel.FileJson != null && rspModel.FileJson.Any())
|
|
|
{
|
|
|
var ids = rspModel.FileJson.Select(x => x.Id).ToList();
|
|
|
rspModel.Files = await _fileRepository.GetFilesAsync(ids, HttpContext.RequestAborted);
|
|
@@ -1390,7 +1390,7 @@ public class OrderController : BaseController
|
|
|
var view = dto.source == 1;
|
|
|
var handler = dto.source == 1 && dto.Status is EScreenStatus.Apply;
|
|
|
|
|
|
- var query = _orderScreenRepository.Queryable(viewFilter: view, handlerFilter: handler)
|
|
|
+ var query = _orderScreenRepository.Queryable(viewFilter: view, handlerFilter: handler)
|
|
|
.Includes(x => x.Order)
|
|
|
.Includes(x => x.VisitDetail)
|
|
|
.Includes(x => x.Visit, d => d.Order)
|
|
@@ -1417,10 +1417,10 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 开始工单甄别流程
|
|
|
- /// </summary>
|
|
|
- [Permission(EPermission.ApplyScreen)]
|
|
|
+ /// <summary>
|
|
|
+ /// 开始工单甄别流程
|
|
|
+ /// </summary>
|
|
|
+ [Permission(EPermission.ApplyScreen)]
|
|
|
[HttpPost("screen/startflow")]
|
|
|
[LogFilter("开始工单甄别流程")]
|
|
|
public async Task StartFlow([FromBody] ScreenStartFlowDto dto)
|
|
@@ -1648,7 +1648,7 @@ public class OrderController : BaseController
|
|
|
};
|
|
|
await _mediator.Publish(new PushMessageNotify(messageDto), HttpContext.RequestAborted);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
catch { }
|
|
|
}
|
|
@@ -2173,13 +2173,13 @@ public class OrderController : BaseController
|
|
|
OrderId = order.Id,
|
|
|
PushPlatform = EPushPlatform.Sms,
|
|
|
//Content =
|
|
|
- // $"温馨提示:您的来电已受理(流水号:{order.No};提取码:{order.Password},可通过网站(http://hotline.12345lm.cn)进行查询,谢谢。【宜宾12345热线平台】)",
|
|
|
+ // $"温馨提示:您的来电已受理(流水号:{order.No};提取码:{order.Password},可通过网站(http://hotline.12345lm.cn)进行查询,谢谢。【宜宾12345热线平台】)",
|
|
|
Remark = order.Title,
|
|
|
Name = order.FromName,
|
|
|
TemplateCode = "1005",
|
|
|
Params = new List<string>() { order.No, order.Password },
|
|
|
TelNumber = order.Contact,
|
|
|
-
|
|
|
+
|
|
|
};
|
|
|
await _mediator.Publish(new PushMessageNotify(messageDto), HttpContext.RequestAborted);
|
|
|
//await _pushDomainService.PushAsync(MessageDto, HttpContext.RequestAborted);
|
|
@@ -2307,18 +2307,6 @@ public class OrderController : BaseController
|
|
|
await _workflowApplication.NextAsync(dto, HttpContext.RequestAborted);
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 结束会签
|
|
|
- /// </summary>
|
|
|
- [HttpPost("cs-end")]
|
|
|
- public async Task EndCountersign([FromBody] EndCountersignDto dto)
|
|
|
- {
|
|
|
- var order = await _orderDomainService.GetOrderAsync(dto.OrderId, cancellationToken: HttpContext.RequestAborted);
|
|
|
- if (string.IsNullOrEmpty(order.WorkflowId))
|
|
|
- throw new UserFriendlyException("该工单未开启流程");
|
|
|
- await _workflowDomainService.EndCountersignAsync(order.WorkflowId, HttpContext.RequestAborted);
|
|
|
- }
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 查询工单办理下一步可选节点(带推荐部门)
|
|
|
/// </summary>
|
|
@@ -2327,7 +2315,7 @@ public class OrderController : BaseController
|
|
|
{
|
|
|
var order = await _orderDomainService.GetOrderAsync(orderId, cancellationToken: HttpContext.RequestAborted);
|
|
|
if (string.IsNullOrEmpty(order.WorkflowId))
|
|
|
- throw new UserFriendlyException("该工单无关联流程id");
|
|
|
+ throw UserFriendlyException.SameMessage("该工单未开启流程");
|
|
|
var dto = await _workflowApplication.GetNextStepsAsync(order.WorkflowId, HttpContext.RequestAborted);
|
|
|
var rsp = _mapper.Map<NextStepsDto<RecommendStepOption>>(dto);
|
|
|
foreach (var step in rsp.Steps)
|
|
@@ -2343,6 +2331,18 @@ public class OrderController : BaseController
|
|
|
return rsp;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 结束会签
|
|
|
+ /// </summary>
|
|
|
+ [HttpPost("cs-end")]
|
|
|
+ public async Task EndCountersign([FromBody] EndCountersignDto dto)
|
|
|
+ {
|
|
|
+ var order = await _orderDomainService.GetOrderAsync(dto.OrderId, cancellationToken: HttpContext.RequestAborted);
|
|
|
+ if (string.IsNullOrEmpty(order.WorkflowId))
|
|
|
+ throw new UserFriendlyException("该工单未开启流程");
|
|
|
+ await _workflowDomainService.EndCountersignAsync(order.WorkflowId, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 查询工单办理的期满时间配置
|
|
|
/// </summary>
|
|
@@ -2583,7 +2583,7 @@ public class OrderController : BaseController
|
|
|
{
|
|
|
await _workflowApplication.OrderPreviousAsync(sendBack.SendBackData, sendBack.WorkflowUserId, HttpContext.RequestAborted);
|
|
|
//发送短信TODO
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
await _orderSendBackAuditRepository.UpdateAsync(sendBack, HttpContext.RequestAborted);
|
|
|
}
|