|
@@ -382,10 +382,12 @@ public class OrderController : BaseController
|
|
{
|
|
{
|
|
//验证订单
|
|
//验证订单
|
|
var order = await _orderRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
|
|
var order = await _orderRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
|
|
|
|
+
|
|
|
|
|
|
if (order is null)
|
|
if (order is null)
|
|
throw UserFriendlyException.SameMessage("未找到工单,无法发布");
|
|
throw UserFriendlyException.SameMessage("未找到工单,无法发布");
|
|
|
|
|
|
|
|
+
|
|
//新增发布工单
|
|
//新增发布工单
|
|
var orderPublish = _mapper.Map<OrderPublish>(dto);
|
|
var orderPublish = _mapper.Map<OrderPublish>(dto);
|
|
orderPublish.OrderId = order.Id;
|
|
orderPublish.OrderId = order.Id;
|
|
@@ -395,9 +397,17 @@ public class OrderController : BaseController
|
|
order.Publish(orderPublish.PublishState);
|
|
order.Publish(orderPublish.PublishState);
|
|
await _orderRepository.UpdateAsync(order);
|
|
await _orderRepository.UpdateAsync(order);
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
//推省上
|
|
//推省上
|
|
var publishPublishOrder = _mapper.Map<PublishPublishOrderDto>(orderPublish);
|
|
var publishPublishOrder = _mapper.Map<PublishPublishOrderDto>(orderPublish);
|
|
publishPublishOrder.Order = _mapper.Map<OrderDto>(order);
|
|
publishPublishOrder.Order = _mapper.Map<OrderDto>(order);
|
|
|
|
+ //查询实际办理附件
|
|
|
|
+ if (!string.IsNullOrEmpty(order.ActualHandleStepId))
|
|
|
|
+ {
|
|
|
|
+ var actualHandleStep = await _workflowStepRepository.GetAsync(order.ActualHandleStepId, HttpContext.RequestAborted);
|
|
|
|
+ publishPublishOrder.FileJsons = actualHandleStep?.FileJson;
|
|
|
|
+ }
|
|
await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderPublishOrder, publishPublishOrder);
|
|
await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderPublishOrder, publishPublishOrder);
|
|
|
|
|
|
var orderVisit = new OrderVisit();
|
|
var orderVisit = new OrderVisit();
|