田爽 7 ヶ月 前
コミット
bbdc0b275c
1 ファイル変更4 行追加3 行削除
  1. 4 3
      src/Hotline.Api/Controllers/OrderController.cs

+ 4 - 3
src/Hotline.Api/Controllers/OrderController.cs

@@ -4066,8 +4066,9 @@ public class OrderController : BaseController
             Status = order.Status,
             TraceId = currentStep.Id
         };
-        if (dto.Files.Any())
-	        audit.FileJson = await _fileRepository.AddFileAsync(dto.Files, model.Id, "", HttpContext.RequestAborted);
+        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)
         {
             // 平均派单
@@ -4304,7 +4305,7 @@ public class OrderController : BaseController
         var resDto = _mapper.Map<SendBackDto>(res);
         if (res.FileJson != null && res.FileJson.Any())
         {
-	        var ids = order.FileJson.Select(x => x.Id).ToList();
+	        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();
         }