|
@@ -1,5 +1,6 @@
|
|
using Amazon.Runtime.Internal.Transform;
|
|
using Amazon.Runtime.Internal.Transform;
|
|
using Hotline.Application.FlowEngine;
|
|
using Hotline.Application.FlowEngine;
|
|
|
|
+using Hotline.Application.Orders;
|
|
using Hotline.Application.Snapshot;
|
|
using Hotline.Application.Snapshot;
|
|
using Hotline.Caching.Interfaces;
|
|
using Hotline.Caching.Interfaces;
|
|
using Hotline.Caching.Services;
|
|
using Hotline.Caching.Services;
|
|
@@ -15,6 +16,7 @@ using Hotline.Share.Enums.FlowEngine;
|
|
using Hotline.Share.Enums.Order;
|
|
using Hotline.Share.Enums.Order;
|
|
using Hotline.Share.Enums.Snapshot;
|
|
using Hotline.Share.Enums.Snapshot;
|
|
using Hotline.Share.Tools;
|
|
using Hotline.Share.Tools;
|
|
|
|
+using Hotline.Snapshot;
|
|
using Hotline.Snapshot.Interfaces;
|
|
using Hotline.Snapshot.Interfaces;
|
|
using Mapster;
|
|
using Mapster;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
@@ -43,8 +45,9 @@ public class SnapshotOrderController : BaseController
|
|
private readonly IOrderRepository _orderRepository;
|
|
private readonly IOrderRepository _orderRepository;
|
|
private readonly IWorkflowApplication _workflowApplication;
|
|
private readonly IWorkflowApplication _workflowApplication;
|
|
private readonly IRepository<WorkflowDefinition> _workflowDefinitionRepository;
|
|
private readonly IRepository<WorkflowDefinition> _workflowDefinitionRepository;
|
|
|
|
+ private readonly IOrderApplication _orderApplication;
|
|
|
|
|
|
- public SnapshotOrderController(IOrderSnapshotRepository orderSnapshotRepository, IOrderSnapshotApplication orderSnapshotApplication, ISystemAreaDomainService systemAreaDomainService, ISystemDicDataCacheManager systemDicDataCacheManager, IIndustryRepository industryRepository, ISessionContext sessionContext, IWorkflowDomainService workflowDomainService, IOrderRepository orderRepository, IWorkflowApplication workflowApplication, IRepository<WorkflowDefinition> workflowDefinitionRepository)
|
|
|
|
|
|
+ public SnapshotOrderController(IOrderSnapshotRepository orderSnapshotRepository, IOrderSnapshotApplication orderSnapshotApplication, ISystemAreaDomainService systemAreaDomainService, ISystemDicDataCacheManager systemDicDataCacheManager, IIndustryRepository industryRepository, ISessionContext sessionContext, IWorkflowDomainService workflowDomainService, IOrderRepository orderRepository, IWorkflowApplication workflowApplication, IRepository<WorkflowDefinition> workflowDefinitionRepository, IOrderApplication orderApplication)
|
|
{
|
|
{
|
|
_orderSnapshotRepository = orderSnapshotRepository;
|
|
_orderSnapshotRepository = orderSnapshotRepository;
|
|
_orderSnapshotApplication = orderSnapshotApplication;
|
|
_orderSnapshotApplication = orderSnapshotApplication;
|
|
@@ -56,6 +59,7 @@ public class SnapshotOrderController : BaseController
|
|
_orderRepository = orderRepository;
|
|
_orderRepository = orderRepository;
|
|
_workflowApplication = workflowApplication;
|
|
_workflowApplication = workflowApplication;
|
|
_workflowDefinitionRepository = workflowDefinitionRepository;
|
|
_workflowDefinitionRepository = workflowDefinitionRepository;
|
|
|
|
+ _orderApplication = orderApplication;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -116,6 +120,15 @@ public class SnapshotOrderController : BaseController
|
|
public async Task<PagedDto<SignOrderSnapshotItemsOutDto>> GetSignOrderSnapshotItemsAsync([FromQuery] SignOrderSnapshotItemsInDto dto)
|
|
public async Task<PagedDto<SignOrderSnapshotItemsOutDto>> GetSignOrderSnapshotItemsAsync([FromQuery] SignOrderSnapshotItemsInDto dto)
|
|
=> (await _orderSnapshotApplication.GetSignOrderSnapshotItemsAsync(dto).ToPagedListAsync(dto)).ToPaged();
|
|
=> (await _orderSnapshotApplication.GetSignOrderSnapshotItemsAsync(dto).ToPagedListAsync(dto)).ToPaged();
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 获取工单已经标记集合
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpGet("signed")]
|
|
|
|
+ public async Task<PagedDto<SignedOrderSnapshotItemsOutDto>> GetSignedOrderSnapshotItemsAsync([FromQuery] SignedOrderSnapshotItemsInDto dto)
|
|
|
|
+ => (await _orderSnapshotApplication.GetSignedOrderSnapshotItemsAsync(dto).ToPagedListAsync(dto)).ToPaged();
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 标记详情
|
|
/// 标记详情
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -125,10 +138,11 @@ public class SnapshotOrderController : BaseController
|
|
public async Task<SignOrderSnapshotDetailOutDto> GetSignOrderSnapshotDetailAsync(string id)
|
|
public async Task<SignOrderSnapshotDetailOutDto> GetSignOrderSnapshotDetailAsync(string id)
|
|
{
|
|
{
|
|
var order = await _orderRepository.Queryable()
|
|
var order = await _orderRepository.Queryable()
|
|
- .Where(m => m.Id == id)
|
|
|
|
- .Select(m => new SignOrderSnapshotDetailOutDto { Id = m.Id, Title = m.Title})
|
|
|
|
|
|
+ .LeftJoin<OrderSnapshot>((order, snapshot) => order.Id == snapshot.Id)
|
|
|
|
+ .Where((order, snapshot) => order.Id == id)
|
|
|
|
+ .Select((order, snapshot) => new SignOrderSnapshotDetailOutDto { Id = order.Id, Title = order.Title, Lables =snapshot.Labels })
|
|
.FirstAsync();
|
|
.FirstAsync();
|
|
- order.Lables = _systemDicDataCacheManager.SnapshotOrderLabel;
|
|
|
|
|
|
+ order.LabelsBaseData = _systemDicDataCacheManager.SnapshotOrderLabel;
|
|
return order;
|
|
return order;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -230,4 +244,14 @@ public class SnapshotOrderController : BaseController
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 网格员超时未回复, 处理工单
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="id">工单Id</param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPut("guider/timeout/{id}")]
|
|
|
|
+ public async Task HandleFromWanggeyuanToMaskAsync(string id)
|
|
|
|
+ {
|
|
|
|
+ await _orderApplication.HandleFromWanggeyuanToMaskAsync(id, HttpContext.RequestAborted);
|
|
|
|
+ }
|
|
}
|
|
}
|