Dun.Jason 1 月之前
父節點
當前提交
f06e6422dd

+ 1 - 1
src/Hotline.Api/Controllers/OrderController.cs

@@ -4950,7 +4950,7 @@ public class OrderController : BaseController
         {
             if (dto.Data.DispatchEarlyWarning != null && dto.Data.DispatchEarlyWarning.Count > 0)
             {
-                var model = await _orderEarlyWarningRepository.Queryable().Where(x=>x.OrderId == order.Id).FirstAsync(HttpContext.RequestAborted);
+                var model = await _orderEarlyWarningRepository.Queryable().Where(x => x.OrderId == order.Id).FirstAsync(HttpContext.RequestAborted);
                 if (model != null)
                 {
                     model.DispatchEarlyWarning = _mapper.Map<List<EarlyWarningSetting>>(dto.Data.DispatchEarlyWarning);

+ 5 - 1
src/Hotline.Application/Mappers/OrderMapperConfigs.cs

@@ -1,4 +1,5 @@
-using Hotline.FlowEngine.Workflows;
+using Hotline.Early;
+using Hotline.FlowEngine.Workflows;
 using Hotline.Orders;
 using Hotline.Share.Dtos.Ai;
 using Hotline.Share.Dtos.Order;
@@ -266,5 +267,8 @@ public class OrderMapperConfigs : IRegister
             .IgnoreIf((s, d) => s.OrgHandledAttitude == null, d => d.OrgHandledAttitude)
             .Map(d => d.OrgHandledAttitude, s => s.OrgHandledAttitude.Value)
             ;
+
+        config.ForType<EarlyWarningSettingDto, EarlyWarningSetting>()
+            .Map(d => d.Id, s => s.Id);
     }
 }