Kaynağa Gözat

Merge branch 'release' of http://110.188.24.182:10023/Fengwo/hotline into release

tangjiang 6 ay önce
ebeveyn
işleme
ad8f5aebf3

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

@@ -6132,12 +6132,20 @@ public class OrderController : BaseController
                     }
 
                     var SourceCode = (ESource)Enum.Parse(typeof(ESource), allowSource);
+                    var acceptType = _sysDicDataCacheManager.AcceptType
+                        .FirstOrDefault(m => m.DicDataName == item.AcceptType);
+
+                    if (acceptType == null)
+                    {
+                        errorMessage.Append($"第{i + 1}行: 不能通过受理类型 {item.AcceptType} 查询到对应的受理类型Code\r\n");
+                        continue;
+                    }
 
                     var order = await _orderRepository.GetAsync(x => x.ExternalId == item.ExternalId && x.Source == SourceCode,
                         HttpContext.RequestAborted) ?? new Orders.Order();
                     item.Source = SourceCode.ToString();
                     order = _mapper.Map(item, order);
-
+                    order.AcceptTypeCode = acceptType.DicDataValue;
                     order.SourceChannel = SourceCode.GetDescription();
                     order.SourceChannelCode = ((int)SourceCode).ToString();
 

+ 1 - 0
src/Hotline/Caching/Interfaces/ISysDicDataCacheManager.cs

@@ -12,5 +12,6 @@ namespace Hotline.Caching.Interfaces
         IReadOnlyList<SystemDicData> GetSysDicDataCache(string code);
         IReadOnlyList<SystemDicData> GetVisitSatisfaction();
         void RemoveSysDicDataCache(string code);
+        IReadOnlyList<SystemDicData> AcceptType { get; }
     }
 }

+ 3 - 0
src/Hotline/Caching/Services/SysDicDataCacheManager.cs

@@ -17,6 +17,7 @@ namespace Hotline.Caching.Services
             _cacheSysDicData = cacheSysDicData;
         }
 
+
         public IReadOnlyList<SystemDicData> GetSysDicDataCache(string code)
         {
             var sysDicDataList = _cacheSysDicData.GetOrSet(code, k =>
@@ -29,6 +30,8 @@ namespace Hotline.Caching.Services
         public IReadOnlyList<SystemDicData> GetVisitSatisfaction()
             => GetSysDicDataCache(SysDicTypeConsts.VisitSatisfaction);
 
+        public IReadOnlyList<SystemDicData> AcceptType => GetSysDicDataCache(SysDicTypeConsts.AcceptType);
+
         public void RemoveSysDicDataCache(string code)
         {
             _cacheSysDicData.Remove(code);