Prechádzať zdrojové kódy

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

田爽 4 mesiacov pred
rodič
commit
f6a031d1d8

+ 8 - 8
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -1320,14 +1320,14 @@ namespace Hotline.Api.Controllers.Bi
             var citySumModel = new VisitAndOrgSatisfactionStatisticsDto()
             {
                 OrgName = "市直合计",
-                TotalSumCount = data.Where(x => x.OrgType == EOrgType.City).Sum(x => x.TotalSumCount),
-                VerySatisfiedCount = data.Where(x => x.OrgType == EOrgType.City).Sum(x => x.VerySatisfiedCount),
-                SatisfiedCount = data.Where(x => x.OrgType == EOrgType.City).Sum(x => x.SatisfiedCount),
-                RegardedAsSatisfiedCount = data.Where(x => x.OrgType == EOrgType.City).Sum(x => x.RegardedAsSatisfiedCount),
-                DefaultSatisfiedCount = data.Where(x => x.OrgType == EOrgType.City).Sum(x => x.DefaultSatisfiedCount),
-                NoSatisfiedCount = data.Where(x => x.OrgType == EOrgType.City).Sum(x => x.NoSatisfiedCount),
-                NoEvaluateCount = data.Where(x => x.OrgType == EOrgType.City).Sum(x => x.NoEvaluateCount),
-                NoPutThroughCount = data.Where(x => x.OrgType == EOrgType.City).Sum(x => x.NoPutThroughCount),
+                TotalSumCount = data.Where(x => x.OrgType == EOrgType.City && x.OrgCode != "001").Sum(x => x.TotalSumCount),
+                VerySatisfiedCount = data.Where(x => x.OrgType == EOrgType.City && x.OrgCode != "001").Sum(x => x.VerySatisfiedCount),
+                SatisfiedCount = data.Where(x => x.OrgType == EOrgType.City && x.OrgCode != "001").Sum(x => x.SatisfiedCount),
+                RegardedAsSatisfiedCount = data.Where(x => x.OrgType == EOrgType.City && x.OrgCode != "001").Sum(x => x.RegardedAsSatisfiedCount),
+                DefaultSatisfiedCount = data.Where(x => x.OrgType == EOrgType.City && x.OrgCode != "001").Sum(x => x.DefaultSatisfiedCount),
+                NoSatisfiedCount = data.Where(x => x.OrgType == EOrgType.City && x.OrgCode != "001").Sum(x => x.NoSatisfiedCount),
+                NoEvaluateCount = data.Where(x => x.OrgType == EOrgType.City && x.OrgCode != "001").Sum(x => x.NoEvaluateCount),
+                NoPutThroughCount = data.Where(x => x.OrgType == EOrgType.City && x.OrgCode != "001").Sum(x => x.NoPutThroughCount),
             };
             var sumModel = new VisitAndOrgSatisfactionStatisticsDto()
             {

+ 12 - 2
src/Hotline.Api/Controllers/WebPortalController.cs

@@ -722,6 +722,9 @@ namespace Hotline.Api.Controllers
             return OpenResponse.Ok(WebPortalDeResponse<OrderListReturnDto>.Success(returnDto, "成功"));
         }
 
+        /// <summary>
+
+
         /// <summary>
         /// 查询工单发布后公开的数据
         /// </summary>
@@ -789,7 +792,7 @@ namespace Hotline.Api.Controllers
             int nPageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(total) / dto.PageSize));
             OrderListReturnDto returnDto = new()
             {
-                Total=total,
+                Total = total,
                 PageNum = dto.PageIndex,
                 PageCount = nPageCount,
                 Data = _mapper.Map<IReadOnlyList<OrderListDto>>(items)
@@ -988,6 +991,12 @@ namespace Hotline.Api.Controllers
                 data.SourceChannelCode = "AP";
             }
 
+            if (dto.FromID == "3")
+            {
+                data.SourceChannel = "微信";
+                data.SourceChannelCode = "WX";
+            }
+
             data.Source = ESource.WebPortal;
             if (!string.IsNullOrEmpty(data.LicenceNo))
             {
@@ -1013,7 +1022,7 @@ namespace Hotline.Api.Controllers
                 dto.Pwd = result.Password;
                 dto.Code = result.No;
                 dto.OrderId = result.Id;
-                var dtoData= _mapper.Map<WebFlowAccept>(dto);
+                var dtoData = _mapper.Map<WebFlowAccept>(dto);
                 await _webFlowAcceptRepository.AddAsync(dtoData, HttpContext.RequestAborted);
 
             }
@@ -1276,6 +1285,7 @@ namespace Hotline.Api.Controllers
             }
 
             var (total, items) = await _knowledgeRepository.Queryable()
+                .Where(p => p.IsPublic == true)
                 .WhereIF(!string.IsNullOrEmpty(dto.Title), p => p.Title.Contains(dto.Title))
                 .WhereIF(!string.IsNullOrEmpty(typeSpliceNameTags), p => p.KnowledgeType.Any(t => t.KnowledgeTypeSpliceName.EndsWith(typeSpliceNameTags)))
                 .WhereIF(!string.IsNullOrEmpty(typeSpliceName), x => x.KnowledgeType.Any(t => t.KnowledgeTypeSpliceName.EndsWith(typeSpliceName)))

+ 11 - 0
src/Hotline.Application/Handlers/FlowEngine/WorkflowEndHandler.cs

@@ -17,7 +17,9 @@ using Hotline.Settings.TimeLimits;
 using Hotline.Share.Dtos.FlowEngine.Workflow;
 using Hotline.Share.Dtos.Order;
 using Hotline.Share.Dtos.TrCallCenter;
+using Hotline.Share.Enums.CallCenter;
 using Hotline.Share.Enums.Order;
+using Hotline.Share.Tools;
 using MapsterMapper;
 using MediatR;
 using Microsoft.Extensions.Logging;
@@ -212,7 +214,16 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
                         {
                             var call = await _callApplication.GetCallAsync(order.CallId, cancellationToken);
                             if (call is not null)
+                            {
                                 orderFlowDto.TrCallRecordDto = _mapper.Map<TrCallDto>(call);
+
+                                // 工单开始办理如果获取的通话记录是呼出并且录音文件是空就不推送通话记录
+                                // 如果 通话记录是呼入, 并且没有录音文件
+                                if (_systemSettingCacheManager.OrderStartHandlerPushCallIsNull && call.Direction == ECallDirection.Out && call.AudioFile.IsNullOrEmpty())
+                                {
+                                    orderFlowDto.TrCallRecordDto = null;
+                                }
+                            }
                         }
                     }
 

+ 1 - 1
src/Hotline.Application/Mappers/WebPortalMapperConfigs.cs

@@ -75,7 +75,7 @@ namespace Hotline.Application.Mappers
             ;
 
             //门户网站写信
-            config.ForType<WebFlowAccept, AddOrderDto>()
+            config.ForType<WebFlowAcceptDto, AddOrderDto>()
             .Map(d => d.FromName, x => x.LKName)
             .Map(d => d.FromGender, x => x.Sex == "男" ? EGender.Male : x.Sex == "女" ? EGender.Female : EGender.Unknown)
             .Map(d => d.IsSecret, x => x.IsSecret == "1" ? true : false)

+ 6 - 1
src/Hotline.Share/Dtos/WebPortal/WebFlowAcceptDto.cs

@@ -81,7 +81,7 @@ namespace Hotline.Share.Dtos.WebPortal
         public string Content { get; set; }
 
         /// <summary>
-        /// 来源方式 APP来源为2,
+        /// 来源方式 APP来源为2,微信来源为3,
         /// </summary>
         public string? FromID { get; set; }
 
@@ -124,5 +124,10 @@ namespace Hotline.Share.Dtos.WebPortal
         /// 附件
         /// </summary>
         public List<FileDto>? Files { get; set; } = new();
+
+        /// <summary>
+        /// 区域编码
+        /// </summary>
+        public string? AreaCode { get; set; }
     }
 }

+ 4 - 0
src/Hotline/Caching/Interfaces/ISystemSettingCacheManager.cs

@@ -25,6 +25,10 @@ namespace Hotline.Caching.Interfaces
         /// 自动发布中心直办归档工单
         /// </summary>
         bool AutomaticPublishOrder { get; }
+
+        /// <summary>
+        /// 取消发布功能总开关
+        /// </summary>
         bool CancelPublishOrderEnabled { get; }
 
         /// <summary>

+ 6 - 0
src/Hotline/WebPortal/WebFlowAccept.cs

@@ -142,5 +142,11 @@ namespace Hotline.WebPortal
         [SugarColumn(ColumnDataType = "json", IsJson = true)]
         public List<FileDto>? Files { get; set; } = new();
 
+        /// <summary>
+        /// 区域编码
+        /// </summary>
+        [SugarColumn(ColumnDescription = "区域编码")]
+        public string? AreaCode { get; set; }
+
     }
 }