Prechádzať zdrojové kódy

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

xf 1 mesiac pred
rodič
commit
99bba3a4e5

+ 13 - 1
src/Hotline.Api/Controllers/Snapshot/SnapshotController.cs

@@ -51,8 +51,9 @@ public class SnapshotController : BaseController
     private readonly ISessionContext _sessionContext;
     private readonly IThirdAccountRepository _thirdAccountRepository;
     private readonly ILogger<SnapshotController> _logger;
+    private readonly IRepository<SystemWebPageSetting> _webPageRepository;
 
-    public SnapshotController(IRepository<Order> orderRepository, ISnapshotApplication snapshotApplication, ISystemAreaDomainService systemAreaDomainService, IIndustryRepository industryRepository, IOrderDomainService orderDomainService, IFileRepository fileRepository, IOrderSnapshotRepository orderSnapshotRepository, ISystemDicDataCacheManager systemDicDataCacheManager, ISessionContext sessionContext, IThirdAccountRepository thirdAccountRepository, ILogger<SnapshotController> logger)
+    public SnapshotController(IRepository<Order> orderRepository, ISnapshotApplication snapshotApplication, ISystemAreaDomainService systemAreaDomainService, IIndustryRepository industryRepository, IOrderDomainService orderDomainService, IFileRepository fileRepository, IOrderSnapshotRepository orderSnapshotRepository, ISystemDicDataCacheManager systemDicDataCacheManager, ISessionContext sessionContext, IThirdAccountRepository thirdAccountRepository, ILogger<SnapshotController> logger, IRepository<SystemWebPageSetting> webPageRepository)
     {
         _orderRepository = orderRepository;
         _snapshotApplication = snapshotApplication;
@@ -65,6 +66,7 @@ public class SnapshotController : BaseController
         _sessionContext = sessionContext;
         _thirdAccountRepository = thirdAccountRepository;
         _logger = logger;
+        _webPageRepository = webPageRepository;
     }
 
     /// <summary>
@@ -76,6 +78,16 @@ public class SnapshotController : BaseController
     public async Task<HomePageOutDto> GetHomePageAsync()
         => await _snapshotApplication.GetHomePageAsync();
 
+    /// <summary>
+    /// 获取页面设置
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    [HttpGet("page/setting")]
+    [AllowAnonymous]
+    public async Task<IList<SystemWebPageSetting>> GetSystemWebPageAsync([FromQuery] SystemWebPageInDto dto)
+        => await _webPageRepository.Queryable().Where(m => m.Name == dto.Name && m.PageType == dto.PageType).ToListAsync(HttpContext.RequestAborted);
+
     /// <summary>
     /// 行业界面基础信息
     /// </summary>

+ 11 - 1
src/Hotline.Api/Controllers/WebPortalController.cs

@@ -936,7 +936,17 @@ namespace Hotline.Api.Controllers
                     orderDetail.PubFlag = "1";
                     orderDetail.FlowTitle = orderPublish.ArrangeTitle;
                     orderDetail.FlowContent = orderPublish.ArrangeContent;
-                    orderDetail.FlowResult = orderPublish.ArrangeOpinion;
+
+                    if (_appOptions.Value.IsZiGong)
+                    {
+                        if (data.Source == ESource.ProvinceStraight)
+                            orderDetail.FlowResult = orderPublish.ArrangeOpinion;
+                        if (data.Source != ESource.ProvinceStraight && data.Status >= EOrderStatus.Visited)
+                            orderDetail.FlowResult = orderPublish.ArrangeOpinion;
+                    }
+                    else
+                        orderDetail.FlowResult = orderPublish.ArrangeOpinion;
+
                     if (orderPublish.PublishState)
                         orderDetail.FlowPubFlagName = "公开";
                 }

+ 1 - 0
src/Hotline.Application/OrderApp/OrderApplication.cs

@@ -5702,6 +5702,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
         var query = _orderSendBackAuditRepository.Queryable()
             .Where(x => x.State == ESendBackAuditState.End && x.ApplyOrgId != OrgSeedData.CenterId && x.SendBackOrgId == OrgSeedData.CenterId)
             .WhereIF(dto.StartTime.HasValue && dto.EndTime.HasValue, x => x.AuditTime >= dto.StartTime && x.AuditTime <= dto.EndTime)
+            .WhereIF(!string.IsNullOrEmpty(dto.OrgName), x=>x.ApplyOrgName == dto.OrgName)
             .GroupBy(x => new { x.ApplyOrgId, x.ApplyOrgName })
             .Select(x => new OrgSendBackAuditListVo
             {

+ 17 - 0
src/Hotline.Share/Dtos/Snapshot/IndustryDto.cs

@@ -1,6 +1,7 @@
 using Hotline.Share.Dtos.File;
 using Hotline.Share.Dtos.Settings;
 using Hotline.Share.Enums.Order;
+using Hotline.Share.Enums.Settings;
 using Hotline.Share.Enums.Snapshot;
 using Hotline.Share.Requests;
 using Hotline.Share.Tools;
@@ -206,6 +207,22 @@ public record IndustryListInDto(string? Name, string? ApproveOrgName) : PagedReq
 public record IndustryCaseItemInDto(string? CaseName, string? IndustryName) : PagedRequest;
 
 
+public class SystemWebPageInDto
+{
+    /// <summary>
+    /// 页面类型;
+    /// 1: 正常;
+    /// 2: 关怀;
+    /// </summary>
+    [Required]
+    public EPageType PageType { get; set; }
+
+    /// <summary>
+    /// 页面名称
+    /// </summary>
+    [Required]
+    public string Name { get; set; }
+}
 public class IndustryBaseOutDto
 {
     /// <summary>

+ 23 - 0
src/Hotline.Share/Enums/Settings/EPageType.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Share.Enums.Settings;
+
+public enum EPageType
+{
+    /// <summary>
+    /// 正常
+    /// </summary>
+    [Description("正常")]
+    Normal = 1,
+
+    /// <summary>
+    /// 关怀
+    /// </summary>
+    [Description("关怀")]
+    Care = 2
+}

+ 6 - 6
src/Hotline/CallCenter/Calls/TelActionRecord.cs

@@ -8,7 +8,7 @@ using XF.Domain.Repository;
 
 namespace Hotline.CallCenter.Calls
 {
-    public class TelActionRecord: CreationEntity
+    public class TelActionRecord : CreationEntity
     {
         /// <summary>
         /// 用户ID
@@ -48,24 +48,24 @@ namespace Hotline.CallCenter.Calls
         /// <summary>
         /// 用时
         /// </summary>
-        
+
         public double Duration { get; private set; }
 
         public TelActionRecord()
         {
-            
+
         }
 
-        public TelActionRecord(string userId,string userName,string telNo,string queueId,EActionType actionType)
+        public TelActionRecord(string userId, string userName, string telNo, string queueId, EActionType actionType)
         {
-            UserId = userId;UserName = userName;TelNo = telNo;QueueId = queueId;ActionType = actionType;StartTime = DateTime.Now;
+            UserId = userId; UserName = userName; TelNo = telNo; QueueId = queueId; ActionType = actionType; StartTime = DateTime.Now;
         }
 
 
         public void EndAction()
         {
             EndTime = DateTime.Now;
-            Duration = (EndTime.Value - StartTime).TotalSeconds;
+            Duration = Math.Round(((double)(EndTime.Value - StartTime).TotalSeconds), 2);
         }
     }
 }

+ 32 - 0
src/Hotline/Settings/SystemWebPageSetting.cs

@@ -0,0 +1,32 @@
+using Hotline.Share.Enums.Settings;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using XF.Domain.Repository;
+
+namespace Hotline.Settings;
+
+public class SystemWebPageSetting : CreationEntity
+{
+    /// <summary>
+    /// 页面名字
+    /// </summary>
+    public string Name { get; set; }
+
+    /// <summary>
+    /// 页面类型
+    /// </summary>
+    public EPageType PageType { get; set; }
+
+    /// <summary>
+    /// 页面元素名称
+    /// </summary>
+    public string TagName { get; set; }
+
+    /// <summary>
+    /// 页面元素值
+    /// </summary>
+    public string TagValue { get; set; }
+}