|
@@ -45,6 +45,7 @@ using Hotline.Users;
|
|
|
using MapsterMapper;
|
|
|
using MediatR;
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
+using Microsoft.AspNetCore.Builder.Extensions;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using Microsoft.Extensions.Options;
|
|
|
using MiniExcelLibs;
|
|
@@ -174,7 +175,8 @@ IRepository<Hotspot> hotspotRepository,
|
|
|
IOrderDomainService orderDomainService,
|
|
|
ICallApplication callApplication,
|
|
|
IOptionsSnapshot<AppConfiguration> appOptions,
|
|
|
-ICalcExpireTime expireTime)
|
|
|
+ ISystemSettingCacheManager systemSettingCacheManager
|
|
|
+ )
|
|
|
{
|
|
|
_logger = logger;
|
|
|
//_authorizeGenerator = authorizeGenerator;
|
|
@@ -221,7 +223,7 @@ ICalcExpireTime expireTime)
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_callApplication = callApplication;
|
|
|
_appOptions = appOptions;
|
|
|
- _expireTime = expireTime;
|
|
|
+ _systemSettingCacheManager = systemSettingCacheManager;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -706,7 +708,7 @@ ICalcExpireTime expireTime)
|
|
|
}
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
- [HttpPost("republish")]
|
|
|
+ [HttpGet("republish")]
|
|
|
public async Task Republish()
|
|
|
{
|
|
|
var provinceNos = new List<string>
|
|
@@ -911,7 +913,7 @@ ICalcExpireTime expireTime)
|
|
|
_logger.LogWarning($"推送数据共:{provinceNos.Count}");
|
|
|
|
|
|
var unpublishOrders = await _orderRepository.Queryable()
|
|
|
- .Includes(d => d.Workflow, w => w.Steps.Where(s => s.StepType == EStepType.End))
|
|
|
+ //.Includes(d => d.Workflow, w => w.Traces)
|
|
|
.Where(d => provinceNos.Contains(d.ProvinceNo) &&
|
|
|
!string.IsNullOrEmpty(d.ProvinceNo) &&
|
|
|
d.Status >= EOrderStatus.Filed)
|
|
@@ -921,10 +923,13 @@ ICalcExpireTime expireTime)
|
|
|
|
|
|
foreach (var order in unpublishOrders)
|
|
|
{
|
|
|
+ var trace = await _workflowTraceRepository.Queryable()
|
|
|
+ .FirstAsync(d => d.WorkflowId == order.WorkflowId && d.StepType == EStepType.End,
|
|
|
+ HttpContext.RequestAborted);
|
|
|
var orderFlowDto = new OrderFlowDto
|
|
|
{
|
|
|
Order = _mapper.Map<OrderDto>(order),
|
|
|
- WorkflowTrace = _mapper.Map<WorkflowTraceDto>(order.Workflow.Traces.First())
|
|
|
+ WorkflowTrace = _mapper.Map<WorkflowTraceDto>(trace)
|
|
|
};
|
|
|
|
|
|
if (order.SourceChannelCode == AppDefaults.SourceChannel.DianHua &&
|
|
@@ -954,5 +959,4 @@ ICalcExpireTime expireTime)
|
|
|
|
|
|
_logger.LogWarning($"推送完成");
|
|
|
}
|
|
|
-
|
|
|
}
|