|
@@ -380,8 +380,6 @@ public class OrderController : BaseController
|
|
|
throw UserFriendlyException.SameMessage("未找到工单,无法发布");
|
|
|
|
|
|
//新增发布工单
|
|
|
-
|
|
|
-
|
|
|
var orderPublish = _mapper.Map<OrderPublish>(dto);
|
|
|
|
|
|
orderPublish.OrderId = order.Id;
|
|
@@ -557,7 +555,10 @@ public class OrderController : BaseController
|
|
|
[LogFilter("修改发布内容")]
|
|
|
public async Task PublishedModify([FromBody] PublishOrderModifyDto dto)
|
|
|
{
|
|
|
- var publishOrder = await _orderPublishRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
|
|
|
+ var publishOrder = await _orderPublishRepository.Queryable()
|
|
|
+ .Includes(x=>x.Order)
|
|
|
+ .Where(x => x.Id == dto.Id)
|
|
|
+ .FirstAsync(HttpContext.RequestAborted);
|
|
|
|
|
|
if (publishOrder is null)
|
|
|
{
|
|
@@ -585,6 +586,11 @@ public class OrderController : BaseController
|
|
|
|
|
|
await _orderPublishRepository.UpdateAsync(publishOrder, HttpContext.RequestAborted);
|
|
|
await _orderPublishHistoryRepository.AddAsync(history, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ //推省上
|
|
|
+ var publishPublishOrder = _mapper.Map<PublishPublishOrderDto>(publishOrder);
|
|
|
+ publishPublishOrder.Order = _mapper.Map<OrderDto>(publishOrder.Order);
|
|
|
+ await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderPublishOrder, publishPublishOrder);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|