|
@@ -34,6 +34,7 @@ using Hotline.Settings.TimeLimitDomain;
|
|
|
using Hotline.Settings.TimeLimits;
|
|
|
using Hotline.Share.Dtos;
|
|
|
using Hotline.Share.Dtos.CallCenter;
|
|
|
+using Hotline.Share.Dtos.File;
|
|
|
using Hotline.Share.Dtos.FlowEngine;
|
|
|
using Hotline.Share.Dtos.FlowEngine.Workflow;
|
|
|
using Hotline.Share.Dtos.Order;
|
|
@@ -3692,6 +3693,33 @@ public class OrderController : BaseController
|
|
|
return _sessionContext.OrgIsCenter ? dto : dto.DataMask();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 上传附件
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [LogFilterAlpha("上传附件")]
|
|
|
+ public async Task UploadFiles(OrderUploadFiles dto) {
|
|
|
+
|
|
|
+ var fileJson = await _fileRepository.AddFileAsync(dto.Files, dto.Id, "", HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ if (fileJson.Any())
|
|
|
+ {
|
|
|
+ var order = await _orderRepository.GetAsync(dto.Id);
|
|
|
+ if (order.FileJson != null && order.FileJson.Any())
|
|
|
+ {
|
|
|
+ order.FileJson.AddRange(fileJson);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ order.FileJson = fileJson;
|
|
|
+ }
|
|
|
+ await _orderRepository.Updateable().SetColumns(x => new Order { FileJson = order.FileJson }).Where(x => x.Id == dto.Id).ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 新增工单
|
|
|
/// </summary>
|