|
@@ -4056,7 +4056,10 @@ public class OrderController : BaseController
|
|
|
Status = order.Status,
|
|
|
TraceId = currentStep.Id
|
|
|
};
|
|
|
- if (_appOptions.Value.IsZiGong && prevStep.BusinessType == EBusinessType.Send)
|
|
|
+ audit.InitId();
|
|
|
+ if (dto.Files.Any())
|
|
|
+ audit.FileJson = await _fileRepository.AddFileAsync(dto.Files, audit.Id, "", HttpContext.RequestAborted);
|
|
|
+ if (_appOptions.Value.IsZiGong && prevStep.BusinessType == EBusinessType.Send)
|
|
|
{
|
|
|
// 平均派单
|
|
|
var averageSendOrder = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.AverageSendOrder).SettingValue[0]);
|
|
@@ -4284,12 +4287,20 @@ public class OrderController : BaseController
|
|
|
/// <param name="id"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("order_previous/{id}")]
|
|
|
- public async Task<OrderSendBackAudit> OrderSendBackEntity(string id)
|
|
|
+ public async Task<SendBackDto> OrderSendBackEntity(string id)
|
|
|
{
|
|
|
- return await _orderSendBackAuditRepository.Queryable()
|
|
|
+ var res = await _orderSendBackAuditRepository.Queryable()
|
|
|
.Includes(x => x.Order)
|
|
|
.FirstAsync(x => x.Id == id);
|
|
|
- }
|
|
|
+ var resDto = _mapper.Map<SendBackDto>(res);
|
|
|
+ if (res.FileJson != null && res.FileJson.Any())
|
|
|
+ {
|
|
|
+ var ids = res.FileJson.Select(x => x.Id).ToList();
|
|
|
+ var files = await _fileRepository.GetFilesAsync(ids, HttpContext.RequestAborted);
|
|
|
+ resDto.Files = files.Where(x => x.Classify == "退回附件" && string.IsNullOrEmpty(x.FlowKey)).ToList();
|
|
|
+ }
|
|
|
+ return resDto;
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 列表页面基础数据
|