Переглянути джерело

Merge branch 'test_feature_task363' into dev

Dun.Jason 1 місяць тому
батько
коміт
f875f97a2d
29 змінених файлів з 1128 додано та 68 видалено
  1. 23 5
      src/Hotline.Api/Controllers/EarlyController.cs
  2. 48 5
      src/Hotline.Api/Controllers/OrderController.cs
  3. 24 2
      src/Hotline.Api/Controllers/SpecialController.cs
  4. 28 6
      src/Hotline.Api/Controllers/TestController.cs
  5. 0 13
      src/Hotline.Api/Hotline.Api.csproj
  6. 25 4
      src/Hotline.Application/CallCenter/DefaultCallApplication.cs
  7. 4 3
      src/Hotline.Application/CallCenter/XingTangCallApplication.cs
  8. 393 0
      src/Hotline.Application/Early/EarlyReportProvider.cs
  9. 14 0
      src/Hotline.Application/Early/IEarlyReportProvder.cs
  10. 218 0
      src/Hotline.Application/ExportWord/IWordExportTemplateExtensions.cs
  11. 12 1
      src/Hotline.Application/OrderApp/IOrderApplication.cs
  12. 44 3
      src/Hotline.Application/OrderApp/OrderApplication.cs
  13. 3 2
      src/Hotline.Application/SpecialNumber/ISpecialNumberApplication.cs
  14. 10 9
      src/Hotline.Application/SpecialNumber/SpecialNumberApplication.cs
  15. 2 1
      src/Hotline.Application/StatisticalReport/OrderReportApplication.cs
  16. 2 0
      src/Hotline.Share/Dtos/CallCenter/QueryCallsFixedDto.cs
  17. 14 4
      src/Hotline.Share/Dtos/Early/EarlyDto.cs
  18. 122 0
      src/Hotline.Share/Dtos/ExportWord/ReportDto.cs
  19. 29 5
      src/Hotline.Share/Dtos/Order/OrderDto.cs
  20. 19 1
      src/Hotline.Share/Dtos/Order/QueryOrderDto.cs
  21. 31 1
      src/Hotline.Share/Dtos/Special/SpecialNumberDto.cs
  22. 24 0
      src/Hotline.Share/Enums/Early/ENextWhere.cs
  23. 12 1
      src/Hotline/Early/EarlyWarningSetting.cs
  24. 1 0
      src/Hotline/Early/OrderEarlyWarning.cs
  25. 1 1
      src/Hotline/Orders/Order.cs
  26. 1 1
      src/Hotline/Orders/OrderDomainService.cs
  27. 6 0
      src/Hotline/Settings/SettingConstants.cs
  28. 6 0
      src/Hotline/Settings/SysDicTypeConsts.cs
  29. 12 0
      src/Hotline/Special/SpecialNumber.cs

+ 23 - 5
src/Hotline.Api/Controllers/EarlyController.cs

@@ -1,15 +1,24 @@
-using DocumentFormat.OpenXml.Drawing.Diagrams;
+using DocumentFormat.OpenXml.Drawing.Charts;
+using DocumentFormat.OpenXml.Drawing.Diagrams;
+using DocumentFormat.OpenXml.Vml;
+using DocumentFormat.OpenXml.Wordprocessing;
+using Hotline.Application.Early;
+using Hotline.Application.Tools;
 using Hotline.Caching.Interfaces;
 using Hotline.Caching.Services;
 using Hotline.Early;
+using Hotline.File;
 using Hotline.Orders;
 using Hotline.Repository.SqlSugar.Extensions;
 using Hotline.Settings;
 using Hotline.Share.Dtos;
 using Hotline.Share.Dtos.Early;
+using Hotline.Share.Dtos.ExportWord;
 using Hotline.Share.Dtos.Order;
+using Hotline.Share.Enums.Article;
 using Hotline.Share.Enums.Early;
 using Hotline.Share.Enums.Order;
+using Hotline.Share.Tools;
 using MapsterMapper;
 using Microsoft.AspNetCore.Mvc;
 using SqlSugar;
@@ -31,12 +40,14 @@ namespace Hotline.Api.Controllers
         private readonly IRepository<EarlyWarningOrderDetail> _earlyWarningOrderDetailRepository;
         private readonly IRepository<EarlyWarningPush> _earlyWarningPushRepository;
         private readonly IRepository<EarlyWarningPushDetail> _earlyWarningPushDetailRepository;
+        private readonly IEarlyReportProvder _earlyReportProvder;
+        private readonly IFileDomainService _fileDomainService;
         private readonly ISessionContext _sessionContext;
         private readonly IOrderRepository _orderRepository;
 
 
 
-        public EarlyController(IRepository<EarlyWarningSetting> earlyWarningRepository, IMapper mapper, ISystemDicDataCacheManager sysDicDataCacheManager, IRepository<OrderWord> orderWrodRepository, IRepository<EarlyWarningOrder> earlyWarningOrderRepository, IRepository<EarlyWarningOrderDetail> earlyWarningOrderDetailRepository, IRepository<EarlyWarningPush> earlyWarningPushRepository, IRepository<EarlyWarningPushDetail> earlyWarningPushDetailRepository, ISessionContext sessionContext, IOrderRepository orderRepository)
+        public EarlyController(IRepository<EarlyWarningSetting> earlyWarningRepository, IMapper mapper, ISystemDicDataCacheManager sysDicDataCacheManager, IRepository<OrderWord> orderWrodRepository, IRepository<EarlyWarningOrder> earlyWarningOrderRepository, IRepository<EarlyWarningOrderDetail> earlyWarningOrderDetailRepository, IRepository<EarlyWarningPush> earlyWarningPushRepository, IRepository<EarlyWarningPushDetail> earlyWarningPushDetailRepository, IEarlyReportProvder earlyReportProvder,IFileDomainService fileDomainService, ISessionContext sessionContext, IOrderRepository orderRepository)
         {
             _earlyWarningRepository = earlyWarningRepository;
             _mapper = mapper;
@@ -46,6 +57,8 @@ namespace Hotline.Api.Controllers
             _earlyWarningOrderDetailRepository = earlyWarningOrderDetailRepository;
             _earlyWarningPushRepository = earlyWarningPushRepository;
             _earlyWarningPushDetailRepository = earlyWarningPushDetailRepository;
+            this._earlyReportProvder = earlyReportProvder;
+            this._fileDomainService = fileDomainService;
             _sessionContext = sessionContext;
             _orderRepository = orderRepository;
         }
@@ -216,8 +229,14 @@ namespace Hotline.Api.Controllers
             if (dto.OperateModel == 3)
             {
                 //准备数据
-                var reportDto = GetEarlyReport(dto.EarlyWarningPushDetails,earlySettingPush);
-                
+                var reportDto = await GetEarlyReport(dto.EarlyWarningPushDetails,earlySettingPush);               
+               
+                // 生成推送文件流
+                var html = _earlyReportProvder.PushReport(reportDto);
+
+                // 推送文件
+                var fileJson =  await _fileDomainService.UploadFileFromMemoryAsync(html.HtmlToWord(), "报表" + EFileType.word.GetFileExtension(), EFileType.word);
+               
                 //推送生成报告消息TODO
                 earlySettingPush.PushReportUrl = "";
             }
@@ -249,7 +268,6 @@ namespace Hotline.Api.Controllers
 
             return reportDto;
         }
-
         /// <summary>
         /// 获取推送报告
         /// </summary>

+ 48 - 5
src/Hotline.Api/Controllers/OrderController.cs

@@ -166,6 +166,7 @@ public class OrderController : BaseController
     private readonly IRepository<SystemOrganize> _systemOrganizeRepository;
     private readonly IRepository<OrderComplement> _orderComplementRepository;
     private readonly ICircularRecordDomainService _circularRecordDomainService;
+    private readonly IRepository<Hotline.Special.SpecialNumber> _specialNumberRepository;
 
     public OrderController(
         IOrderDomainService orderDomainService,
@@ -241,7 +242,8 @@ public class OrderController : BaseController
         IRepository<SystemDicData> sysDicDataRepository,
         IRepository<SystemOrganize> systemOrganizeRepository,
         IRepository<OrderComplement> orderComplementRepository,
-        ICircularRecordDomainService circularRecordDomainService)
+        ICircularRecordDomainService circularRecordDomainService,
+        IRepository<Hotline.Special.SpecialNumber> specialNumberRepository)
     {
         _orderDomainService = orderDomainService;
         _orderRepository = orderRepository;
@@ -317,6 +319,7 @@ public class OrderController : BaseController
         _systemOrganizeRepository = systemOrganizeRepository;
         _orderComplementRepository = orderComplementRepository;
         _circularRecordDomainService = circularRecordDomainService;
+        _specialNumberRepository = specialNumberRepository;
     }
 
     #endregion
@@ -3058,7 +3061,7 @@ public class OrderController : BaseController
                     {
                         newPrevStep.FlowAssignType = EFlowAssignType.Org;
                     }
-                    else if(prevStepDefine.HandlerType is EHandlerType.Role)
+                    else if (prevStepDefine.HandlerType is EHandlerType.Role)
                     {
                         newPrevStep.Assign(
                             new StepAssignInfo
@@ -4257,6 +4260,21 @@ public class OrderController : BaseController
     {
         dto.InitAddress();
 
+        //工单保存特殊身份验证
+        var specialIdentityVerification = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.SpecialIdentityVerification).SettingValue[0]);
+        if (specialIdentityVerification)
+        {
+            var specialNumber = await _specialNumberRepository.GetAsync(p => p.PhoneNumber == dto.FromPhone, HttpContext.RequestAborted);
+            if (specialNumber != null && specialNumber.PoliticalIdentityValue == "1")
+            {
+                if (dto.OrderPushTypes == null || dto.OrderPushTypes.Count() == 0)
+                    throw UserFriendlyException.SameMessage("人大代表来电,请选择推送分类人大代表意见快办!");
+
+                if (dto.OrderPushTypes.Exists(p => p.PushTypeCode == "9") == false)
+                    throw UserFriendlyException.SameMessage("人大代表来电,请选择推送分类人大代表意见快办!");
+            }
+        }
+
         //泸州任务 311 投诉件需限制受理内容的字数等需求
         if (_appOptions.Value.IsLuZhou && dto.AcceptTypeCode == "35")
         {
@@ -4308,9 +4326,11 @@ public class OrderController : BaseController
             var orderPushTypes = _mapper.Map<List<OrderPushType>>(dto.OrderPushTypes);
             await _orderPushTypeRepository.AddRangeAsync(orderPushTypes);
             var pushTypes = dto.OrderPushTypes.Select(x => x.PushType);
+            var pushTypeCode = dto.OrderPushTypes.Select(x => x.PushTypeCode);
+            order.PushTypeCode = string.Join(",", pushTypeCode);
             order.PushType = string.Join(",", pushTypes);
         }
-
+        
         if (dto.Tags != null && dto.Tags.Any())
         {
             var orderTags = new List<SystemDicData>();
@@ -4376,9 +4396,14 @@ public class OrderController : BaseController
         //内容分词
         await _orderApplication.OrderParticiple(dto.Content, order.Id, order.No, order.Title, order.CreationTime, HttpContext.RequestAborted);
         //敏感分词
-        await _orderApplication.OrderSensitiveParticiple(dto.Content, order.Id, HttpContext.RequestAborted);
+        var intersect = await _orderApplication.OrderSensitiveParticiple(dto.Content, order.Id, HttpContext.RequestAborted);
         //知识库引用
         await _orderApplication.AddKnowledgeQuote(order.Id, order.Title, order.No, order.KnowledgeQuote, HttpContext.RequestAborted);
+        if (false)
+        {
+            //坐席预警
+            await _orderApplication.SeatEarly(order.Id, intersect, dto.SeatEarlyWarningLevelValue, dto.SeatEarlyWarningLevelName, dto.SeatEarlyWarningTypeValue, dto.SeatEarlyWarningTypeName, HttpContext.RequestAborted);
+        }
         ////sms
         //try
         //{
@@ -4490,6 +4515,21 @@ public class OrderController : BaseController
     {
         dto.InitAddress();
 
+        //工单保存特殊身份验证
+        var specialIdentityVerification = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.SpecialIdentityVerification).SettingValue[0]);
+        if (specialIdentityVerification)
+        {
+            var specialNumber = await _specialNumberRepository.GetAsync(p => p.PhoneNumber == dto.FromPhone, HttpContext.RequestAborted);
+            if (specialNumber != null && specialNumber.PoliticalIdentityValue == "1")
+            {
+                if (dto.OrderPushTypes == null || dto.OrderPushTypes.Count() == 0)
+                    throw UserFriendlyException.SameMessage("人大代表来电,请选择推送分类人大代表意见快办!");
+
+                if (dto.OrderPushTypes.Exists(p => p.PushTypeCode == "9") == false)
+                    throw UserFriendlyException.SameMessage("人大代表来电,请选择推送分类人大代表意见快办!");
+            }
+        }
+
         //泸州任务 311 投诉件需限制受理内容的字数等需求
         if (_appOptions.Value.IsLuZhou && dto.AcceptTypeCode == "35")
         {
@@ -4566,6 +4606,7 @@ public class OrderController : BaseController
         {
             await _orderPushTypeRepository.RemoveAsync(x => x.OrderId == order.Id);
             order.PushType = string.Empty;
+            order.PushTypeCode = string.Empty;
         }
 
         // 工单推送分类
@@ -4575,6 +4616,8 @@ public class OrderController : BaseController
             var orderPushTypes = _mapper.Map<List<OrderPushType>>(dto.OrderPushTypes);
             await _orderPushTypeRepository.AddRangeAsync(orderPushTypes);
             var pushTypes = dto.OrderPushTypes.Select(x => x.PushType);
+            var pushTypeCode = dto.OrderPushTypes.Select(x => x.PushTypeCode);
+            order.PushTypeCode = string.Join(",", pushTypeCode);
             order.PushType = string.Join(",", pushTypes);
         }
 
@@ -6607,7 +6650,7 @@ public class OrderController : BaseController
                 //})
                 //    .Where(o => o.Id == order.Id).ExecuteCommandAsync(HttpContext.RequestAborted);
 
-                if ((expiredTime?.ExpiredTime > order.ExpiredTime ) || _appOptions.Value.IsLuZhou)
+                if ((expiredTime?.ExpiredTime > order.ExpiredTime) || _appOptions.Value.IsLuZhou)
                 {
                     order.ExpiredTime = expiredTime.ExpiredTime;
                     order.NearlyExpiredTime = expiredTime.NearlyExpiredTime;

+ 24 - 2
src/Hotline.Api/Controllers/SpecialController.cs

@@ -5,6 +5,10 @@ using Hotline.Share.Dtos;
 using Hotline.Share.Tools;
 using Hotline.Application.SpecialNumber;
 using Hotline.Share.Dtos.Special;
+using Hotline.Settings;
+using Hotline.Caching.Interfaces;
+using Hotline.Repository.SqlSugar.Extensions;
+using Hotline.Share.Dtos.Order;
 
 namespace Hotline.Api.Controllers
 {
@@ -18,16 +22,19 @@ namespace Hotline.Api.Controllers
         private readonly IMapper _mapper;
         private readonly ISessionContext _sessionContext;
         private readonly ISpecialNumberApplication _specialNumberApplication;
+        private readonly ISystemDicDataCacheManager _sysDicDataCacheManager;
 
 
         public SpecialController(
            IMapper mapper,
            ISessionContext sessionContext,
-           ISpecialNumberApplication specialNumberApplication)
+           ISpecialNumberApplication specialNumberApplication,
+           ISystemDicDataCacheManager sysDicDataCacheManager)
         {
             _mapper = mapper;
             _sessionContext = sessionContext;
             _specialNumberApplication = specialNumberApplication;
+            _sysDicDataCacheManager = sysDicDataCacheManager;
         }
 
         #endregion
@@ -42,7 +49,9 @@ namespace Hotline.Api.Controllers
         [HttpGet("number/list")]
         public async Task<PagedDto<SpecialNumberInfoDto>> QueryAllSpecialNumberListAsync([FromQuery] SpecialNumberDto pagedDto)
         {
-            return (await _specialNumberApplication.QueryAllSpecialNumberListAsync(pagedDto, HttpContext.RequestAborted)).ToPaged();
+            var (total, items) = await _specialNumberApplication.QueryAllSpecialNumberListAsync(pagedDto)
+                 .ToPagedListAsync(pagedDto.PageIndex, pagedDto.PageSize, HttpContext.RequestAborted);
+            return new PagedDto<SpecialNumberInfoDto>(total, _mapper.Map<IReadOnlyList<SpecialNumberInfoDto>>(items));
         }
 
         /// <summary>
@@ -100,6 +109,19 @@ namespace Hotline.Api.Controllers
             return await _specialNumberApplication.GetSpecialNumberByAsync(PhoneNumber, HttpContext.RequestAborted);
         }
 
+        /// <summary>
+        /// 特殊号码[政治身份]basedata
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet("number/basedata")]
+        public Dictionary<string, dynamic> GetBaseData()
+        {
+            return new Dictionary<string, dynamic>
+            {
+                { "PoliticalIdentity", _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.PoliticalIdentity)}
+            };
+        }
+
         #endregion
     }
 }

+ 28 - 6
src/Hotline.Api/Controllers/TestController.cs

@@ -1,9 +1,11 @@
-using DotNetCore.CAP;
+using DocumentFormat.OpenXml.Office.CustomUI;
+using DotNetCore.CAP;
 using Hotline.Ai.Quality;
 using Hotline.Application.CallCenter;
 using Hotline.Application.ExportExcel;
 using Hotline.Application.FlowEngine;
 using Hotline.Application.JudicialManagement;
+using Hotline.Application.OrderApp;
 using Hotline.Application.Quality;
 using Hotline.Application.StatisticalReport;
 using Hotline.Caching.Interfaces;
@@ -27,11 +29,11 @@ using Hotline.Settings.Hotspots;
 using Hotline.Settings.TimeLimitDomain;
 using Hotline.Settings.TimeLimits;
 using Hotline.Share.Dtos;
+using Hotline.Share.Dtos.ExportWord;
 using Hotline.Share.Dtos.FlowEngine.Workflow;
 using Hotline.Share.Dtos.Home;
 using Hotline.Share.Dtos.Order;
 using Hotline.Share.Dtos.Realtime;
-using Hotline.Share.Dtos.Settings;
 using Hotline.Share.Dtos.Snapshot;
 using Hotline.Share.Dtos.TrCallCenter;
 using Hotline.Share.Enums.CallCenter;
@@ -40,8 +42,9 @@ using Hotline.Share.Enums.JudicialManagement;
 using Hotline.Share.Enums.Order;
 using Hotline.Share.Mq;
 using Hotline.ThirdAccountDomainServices.Interfaces;
-using Hotline.Tools;
 using Hotline.Users;
+using J2N.Text;
+using JiebaNet.Segmenter.Common;
 using Mapster;
 using MapsterMapper;
 using MediatR;
@@ -50,10 +53,8 @@ using Microsoft.AspNetCore.Mvc;
 using Microsoft.Extensions.Options;
 using MiniExcelLibs;
 using NETCore.Encrypt;
-using Senparc.Weixin.MP.AdvancedAPIs.MerChant;
 using SqlSugar;
-using System.Threading;
-using Hotline.Application.OrderApp;
+using System.Text;
 using XC.RSAUtil;
 using XF.Domain.Authentications;
 using XF.Domain.Cache;
@@ -1477,5 +1478,26 @@ public class TestController : BaseController
     //    await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderFiled, orderFlowDto, cancellationToken: cancellationToken);
     //}
 
+
+    /// <summary>
+    /// 工单 PushTypeCode 重推处理
+    /// </summary>
+    /// <returns></returns>
+    [HttpPost("order_push_type_code")]
+    [AllowAnonymous]
+    public async Task OrderPushTypeCode([FromBody] OrderPushTypeCodeDto dto)
+    {
+        var orders = await _orderRepository.Queryable()
+            .Where(d => d.PushTypeCode.Contains(dto.PushTypeCode))
+            .WhereIF(dto.StartTime.HasValue, d => d.CreationTime >= dto.StartTime) //受理时间开始
+            .WhereIF(dto.EndTime.HasValue, d => d.CreationTime <= dto.EndTime) //受理时间结束
+            .ToListAsync(HttpContext.RequestAborted);
+        foreach (var order in orders)
+        {
+            var orderDto = _mapper.Map<OrderDto>(order);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderExpiredTimeUpdate, orderDto,
+                cancellationToken: HttpContext.RequestAborted);
+        }
+    }
 }
 

+ 0 - 13
src/Hotline.Api/Hotline.Api.csproj

@@ -43,17 +43,4 @@
     <None Remove="logs\**" />
   </ItemGroup>
 
-  <ItemGroup>
-    <Compile Remove="Controllers\Order\OrderComplementController.cs" />
-    <Compile Remove="logs\**" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <EmbeddedResource Remove="logs\**" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Content Remove="logs\**" />
-  </ItemGroup>
-
 </Project>

+ 25 - 4
src/Hotline.Application/CallCenter/DefaultCallApplication.cs

@@ -54,6 +54,7 @@ public abstract class DefaultCallApplication : ICallApplication
     private readonly IOrderRepository _orderRepository;
     private readonly IOrderVisitRepository _orderVisitRepository;
     private readonly ISystemLogRepository _systemLogRepository;
+    private readonly IRepository<TelActionRecord> _telActionRecordRepository;
 
     public DefaultCallApplication(
         IRepository<Tel> telRepository,
@@ -74,7 +75,8 @@ public abstract class DefaultCallApplication : ICallApplication
         ISystemSettingCacheManager systemSettingCacheManager,
         ICapPublisher capPublisher,
         IOrderRepository orderRepository,
-        ISystemLogRepository systemLogRepository)
+        ISystemLogRepository systemLogRepository,
+        IRepository<TelActionRecord> telActionRecordRepository)
     {
         _telRepository = telRepository;
         _telGroupRepository = telGroupRepository;
@@ -95,6 +97,7 @@ public abstract class DefaultCallApplication : ICallApplication
         _capPublisher = capPublisher;
         _orderRepository = orderRepository;
         _systemLogRepository = systemLogRepository;
+        _telActionRecordRepository = telActionRecordRepository;
     }
 
     public DefaultCallApplication()
@@ -108,7 +111,7 @@ public abstract class DefaultCallApplication : ICallApplication
     public virtual async Task<IReadOnlyList<TelGroupDto>> QueryGroupTel(CancellationToken cancellationToken)
     {
         var data = await _telGroupRepository.Queryable().Includes(d => d.Tels)
-         // .Select<TelGroupDto>()
+          // .Select<TelGroupDto>()
           .ToListAsync(cancellationToken);
         return _mapper.Map<IReadOnlyList<TelGroupDto>>(data);
     }
@@ -198,6 +201,22 @@ public abstract class DefaultCallApplication : ICallApplication
             dto.GroupId, _sessionContext.StaffNo, null);
         await _workRepository.AddAsync(work, cancellationToken);
 
+        //如果有未结束的小休,先结束
+        var telRest = await _telRestRepository.GetAsync(x => x.TelNo == work.TelNo && !x.EndTime.HasValue, cancellationToken);
+        if (telRest != null)
+        {
+            telRest.EndRest();
+            await _telRestRepository.UpdateAsync(telRest, cancellationToken);
+        }
+
+        //如果有未结束的话机动作先结束话机动作
+        var telAction = await _telActionRecordRepository.GetAsync(x => x.TelNo == work.TelNo && x.ActionType == EActionType.TelRest && !x.EndTime.HasValue, cancellationToken);
+        if (telAction != null)
+        {
+            telAction.EndAction();
+            await _telActionRecordRepository.UpdateAsync(telAction);
+        }
+
         return new TrOnDutyResponseDto
         {
             TelNo = dto.TelNo,
@@ -295,12 +314,13 @@ public abstract class DefaultCallApplication : ICallApplication
             .WhereIF(dto.IsMissOrder != null && dto.IsMissOrder.Value == true, (d, o, v) => string.IsNullOrEmpty(o.Id) == true)
             .WhereIF(dto.IsMissOrder != null && dto.IsMissOrder.Value == false, (d, o, v) => string.IsNullOrEmpty(o.Id) == false)
             .OrderByIF(dto.SortField.IsNullOrEmpty(), (d, o, v) => d.BeginIvrTime, OrderByType.Desc)
-            .OrderByIF(dto is { SortField: "waitduration", SortRule: 0 }, (d, o, v) =>  d.WaitDuration , OrderByType.Asc)
+            .OrderByIF(dto is { SortField: "waitduration", SortRule: 0 }, (d, o, v) => d.WaitDuration, OrderByType.Asc)
             .OrderByIF(dto is { SortField: "waitduration", SortRule: 1 }, (d, o, v) => d.WaitDuration, OrderByType.Desc);
 
         query = query.WhereIF(dto.Type == 3, (d, o, v) => d.AnsweredTime == null);
         query = query.WhereIF(dto.Type == 1, (d, o, v) => d.Direction == ECallDirection.In && d.AnsweredTime != null);
         query = query.WhereIF(dto.Type == 2, (d, o, v) => d.Direction == ECallDirection.Out && d.AnsweredTime != null);
+        query = query.WhereIF(dto.Type != 3 && !string.IsNullOrEmpty(dto.StaffNo), p => p.StaffNo == dto.StaffNo);
 
         if (dto.Type == 2)
         {
@@ -336,7 +356,8 @@ public abstract class DefaultCallApplication : ICallApplication
                         .Where(m => m.CallNo == d.CallNo && m.TelNo != "0")
                         .Max(m => m.TelNo)
                     ),
-            }, true);
+            }, true)
+                .WhereIF(!string.IsNullOrEmpty(dto.StaffNo), p => p.StaffNo == dto.StaffNo);
         }
         return query.Select((d, o, v) => new CallNativeDto
         {

+ 4 - 3
src/Hotline.Application/CallCenter/XingTangCallApplication.cs

@@ -66,11 +66,12 @@ namespace Hotline.Application.CallCenter
             ISystemSettingCacheManager systemSettingCacheManager,
             ICapPublisher capPublisher,
             ISystemLogRepository systemLogRepository,
-            IOrderRepository orderRepository
+            IOrderRepository orderRepository,
+            IRepository<TelActionRecord> telActionRecordRepository
         ) : base(telRepository, telGroupRepository, workRepository, telRestRepository, callNativeRepository,
             teloperationRepository, callidRelationRepository, cacheWork, userCacheManager, sessionContext, mapper,
-            logger, orderVisitDomainService,callDomainService
-            , orderVisitRepository, systemSettingCacheManager, capPublisher, orderRepository, systemLogRepository)
+            logger, orderVisitDomainService, callDomainService
+            , orderVisitRepository, systemSettingCacheManager, capPublisher, orderRepository, systemLogRepository, telActionRecordRepository)
         {
             // _telRepository = telRepository;
             // _telGroupRepository = telGroupRepository;

+ 393 - 0
src/Hotline.Application/Early/EarlyReportProvider.cs

@@ -0,0 +1,393 @@
+using Hotline.Application.ExportWord;
+using Hotline.Share.Dtos.Early;
+using Hotline.Share.Dtos.ExportWord;
+using XF.Domain.Dependency;
+
+namespace Hotline.Application.Early
+{
+    public class EarlyReportProvider : IEarlyReportProvder, IScopeDependency
+    {
+        public string PushReport(EarlyReportDto earlyReportDtoreportDto)
+        {
+            string summarize = CreateSummarize(earlyReportDtoreportDto);
+
+            var reportDto = new ReportDto
+            {
+                CssStyle = "padding-left: 10%;padding-right: 10%;padding-top: 10px;",
+                Title = new TitleDto
+                {
+                    Content = earlyReportDtoreportDto.ReportName,
+                    CssStyle = "font-weight:bolder;color: red;font-size: 50px;font-family:宋体; width: 100 %; text-align: center; word-spacing: 10px;letter-spacing: 2px; margin-bottom: 10; line-height: 2; "
+                },
+                SubTitleDtos = new List<SubTitleDto>
+                {
+                    new SubTitleDto
+                    {
+                        CssStyle = "font-weight: bold; font-size: 24px;font-family:方正楷体_GBK;width: 100%;\r\n text-align: center;letter-spacing: 5px;line-height: 1.5;",
+                        Content = "2025年第32期"
+                    },
+                    new SubTitleDto
+                    {
+                        CssStyle = "font-weight: bold; font-size: 24px;font-family:方正楷体_GBK;width: 100%;\r\n        text-align: center;letter-spacing: 5px;line-height: 1.5;",
+                        Content = "(截至3月17日12时)"
+                    },
+                    new SubTitleDto
+                    {
+                        CssStyle = "font-weight: bold; font-size: 20px;font-family:楷体_GB2312;\r\n    width: 100%;letter-spacing: 5px;line-height: 1.5;\r\n    border-bottom:2px solid red;float: left;margin-bottom: 20px;",
+                        Children =  new List<SubTitleDto>
+                        {
+                             new SubTitleDto
+                             {
+                                 CssStyle = "float: left;",
+                                 Content = "市政务服务非公经济局"
+                             },
+                            new SubTitleDto
+                            {
+                                CssStyle="float: right;",
+                                Content = earlyReportDtoreportDto.ReportPushTime.ToString()
+                            }
+                        }
+                    }
+                },
+                ContentDto = new ContentDto
+                {
+                    CssStyle = "font-weight: normal; font-size: 18px;font-family:宋体;width: 100%;letter-spacing: 5px;line-height: 1.5;",
+                    TitleDto = new TitleDto
+                    {
+                        Content = "领导批示:",
+                        CssStyle = "font-weight: normal; font-size: 22px;font-family:黑体;width: 100%;letter-spacing: 5px;line-height: 1.5;"
+                    },
+                    ParagraphDtos = new List<ParagraphDto>
+                    {
+                        new ParagraphDto
+                        {
+                            CssStyle = "text-indent: 2rem;",
+                            Content = summarize
+                        }
+                    }
+                }
+            };
+            int index = FillParagraphes(earlyReportDtoreportDto, reportDto);
+
+            var olderOrderName = $"{earlyReportDtoreportDto.ReportPushTime.Month}月{earlyReportDtoreportDto.ReportPushTime.Day}日重点诉求处置情况";
+
+            reportDto.ContentDto.ParagraphDtos.Add(new ParagraphDto
+            {
+                Content = $"附件1:{olderOrderName}",
+                CssStyle = "text-indent: 2rem;",
+                SortIndex = ++index
+            });
+
+            var orderName = "前期重点问题办结情况";
+            reportDto.ContentDto.ParagraphDtos.Add(new ParagraphDto
+            {
+                Content = $"附件2:{orderName}",
+                CssStyle = "text-indent: 2rem;",
+                SortIndex = ++index
+            });
+
+            reportDto.AttachmentDtos = [];
+            AttachmentDto orderAttachmentDto = CreateOrderAttachment(earlyReportDtoreportDto, olderOrderName);
+            reportDto.AttachmentDtos.Add(orderAttachmentDto);
+            AttachmentDto fileOrderAttachmentDto = CreateFileOrderAttachment(earlyReportDtoreportDto, orderName);
+            reportDto.AttachmentDtos.Add(fileOrderAttachmentDto);
+
+            reportDto.BottomDtos = new List<BaseReportDto>
+            {
+                new BaseReportDto
+                {
+                    CssStyle = "font-weight: normal; font-size: 18px;font-family:楷体_GB2312;\r\n    width: 100%;letter-spacing: 2px;line-height: 1;\r\n    border-bottom:1px solid #000;float: left;margin-bottom: 20px;",
+                    Children = new List<BaseReportDto>
+                    {
+                        new BaseReportDto
+                        {
+                            CssStyle = "float: left;",
+                            Content = "信息公开属性:"
+                        },new BaseReportDto
+                        {
+                            CssStyle = "font-weight: bolder;float: left;",
+                            Content = "不予公开"
+                        }
+                    }
+                },
+                new BaseReportDto
+                {
+                    CssStyle = "font-weight: normal; font-size: 18px;font-family:楷体_GB2312;\r\n    width: 100%;letter-spacing: 2px;line-height: 1;\r\n    border-bottom:1px solid #000;float: left;margin-bottom: 20px;",
+                    Content = "主送:市长,常务副市长、分管副市长,联系副秘书长。"
+                },new BaseReportDto
+                {
+                    CssStyle="font-weight: normal; font-size: 18px;font-family:楷体_GB2312;\r\n    width: 100%;letter-spacing: 2px;line-height: 1;float: left;margin-bottom: 20px;",
+                    Children = new List<BaseReportDto>
+                    {
+                        new BaseReportDto
+                        {
+                            CssStyle = "float:left;",
+                            Content = "市政务服务非公经济发展局"
+                        },
+                        new BaseReportDto
+                        {
+                            CssStyle = "float:right;",
+                            Content = $"{earlyReportDtoreportDto.ReportPushTime.ToString()}印发"
+                        }
+                    }
+                }
+            };
+
+            return reportDto.RenderHtml();
+        }
+
+        private static AttachmentDto CreateOrderAttachment(EarlyReportDto earlyReportDtoreportDto, string olderOrderName)
+        {
+            TableDto orderTableDto = CreateOrderTable(earlyReportDtoreportDto);
+            var attachmentDto = new AttachmentDto
+            {
+                Title = new TitleDto
+                {
+                    CssStyle = "font-weight: bold; font-size: 18px;font-family:宋体;width: 100%; float:right;",
+                    Content = "附件1"
+                },
+                SubTitleDtos = new List<SubTitleDto>
+               {
+                   new SubTitleDto
+                   {
+                       CssStyle = "font-weight: bold; font-size: 24px;font-family:宋体;width: 100%; text-align: center;margin-bottom: 20px;",
+                       Content = olderOrderName
+                   }
+               },
+                TableDtos = new List<TableDto>
+                {
+                   orderTableDto
+                }
+            };
+            return attachmentDto;
+        }
+
+        private static AttachmentDto CreateFileOrderAttachment(EarlyReportDto earlyReportDtoreportDto, string olderOrderName)
+        {
+            TableDto orderTableDto = CreateFileOrderTable(earlyReportDtoreportDto);
+            var attachmentDto = new AttachmentDto
+            {
+                Title = new TitleDto
+                {
+                    CssStyle = "font-weight: bold; font-size: 18px;font-family:宋体;width: 100%; float:right;",
+                    Content = "附件2"
+                },
+                SubTitleDtos = new List<SubTitleDto>
+               {
+                   new SubTitleDto
+                   {
+                       CssStyle = "font-weight: bold; font-size: 24px;font-family:宋体;width: 100%; text-align: center;margin-bottom: 20px;",
+                       Content = olderOrderName
+                   }
+               },
+                TableDtos = new List<TableDto>
+                {
+                   orderTableDto
+                }
+            };
+            return attachmentDto;
+        }
+
+        private static TableDto CreateFileOrderTable(EarlyReportDto earlyReportDtoreportDto)
+        {
+            var tableDto = new TableDto
+            {
+                CssStyle = "border-collapse: collapse;"
+            };
+            tableDto.HeadDto.RowDtos.Add(new RowDto
+            {
+                ColumnDtos = new List<ColumnDto>
+                {
+                    new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 10%;text-align: center;",
+                            Content = "序号",
+                        },
+                    new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 10%;text-align: center;",
+                            Content = "期刊",
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 10%;text-align: center;",
+                            Content = "诉求来源",
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 20%;text-align: center;",
+                            Content = "问题类型",
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 25%;text-align: center;",
+                            Content = "诉求内容",
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 25%;text-align: center;",
+                            Content = "答复情况",
+                        }
+                }
+            });
+            var number = 1;
+            earlyReportDtoreportDto.ReportFiledOrderDetails.ForEach(item =>
+            {
+                tableDto.BodyDto.RowDtos.Add(new RowDto
+                {
+                    CssStyle = "border: solid 1px #000;",
+                    ColumnDtos = new List<ColumnDto>
+                    {
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;text-align: center;",
+                            Content = number.ToString(),
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;text-align: center;",
+                            Content = item.ReportName,
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;text-align: center;",
+                            Content = item.OneHotSportName,
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;text-align: center;",
+                            Content = item.HotSportName,
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;",
+                            Content = item.Content,
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;",
+                            Content = item.ActualOpinion,
+                        }
+                    }
+                });
+                number++;
+            });
+            return tableDto;
+        }
+
+        private static TableDto CreateOrderTable(EarlyReportDto earlyReportDtoreportDto)
+        {
+            var tableDto = new TableDto
+            {
+                CssStyle = "border-collapse: collapse;"
+            };
+            tableDto.HeadDto.RowDtos.Add(new RowDto
+            {
+                ColumnDtos = new List<ColumnDto>
+                {
+                    new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 10%;text-align: center;",
+                            Content = "序号",
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 20%;text-align: center;",
+                            Content = "诉求来源",
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 20%;text-align: center;",
+                            Content = "问题类型",
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 25%;text-align: center;",
+                            Content = "诉求内容",
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;width: 25%;text-align: center;",
+                            Content = "办理情况",
+                        }
+                }
+            });
+            var number = 1;
+            earlyReportDtoreportDto.ReportOrderDetails.ForEach(item =>
+            {
+                tableDto.BodyDto.RowDtos.Add(new RowDto
+                {
+                    CssStyle = "border: solid 1px #000;",
+                    ColumnDtos = new List<ColumnDto>
+                    {
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;text-align: center;",
+                            Content = number.ToString(),
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;text-align: center;",
+                            Content = item.OneHotSportName,
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;text-align: center;",
+                            Content = item.HotSportName,
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;",
+                            Content = item.Content,
+                        },
+                        new ColumnDto
+                        {
+                            CssStyle = "border: solid 1px #000;",
+                            Content = item.ActualOpinion,
+                        }
+                    }
+                });
+                number++;
+            });
+            return tableDto;
+        }
+
+        private static int FillParagraphes(EarlyReportDto earlyReportDtoreportDto, ReportDto reportDto)
+        {
+            var index = 1;
+            earlyReportDtoreportDto.ReportHotDetails.ForEach(item =>
+            {
+                reportDto.ContentDto.ParagraphDtos.Add(new ParagraphDto
+                {
+                    titleDto = new TitleDto
+                    {
+                        Content = item.HotName,
+                        CssStyle = "text-indent: 2rem;font-weight: bolder;",
+                    },
+                    Content = item.Content,
+                    CssStyle = "text-indent: 2rem;",
+                    SortIndex = index
+                });
+                index++;
+            });
+            return index;
+        }
+
+        private static string CreateSummarize(EarlyReportDto earlyReportDtoreportDto)
+        {
+            var hotDetails = new List<string>();
+            earlyReportDtoreportDto.ReportHotDetails.ForEach(item =>
+            {
+                hotDetails.Add($"{item.HotName}{item.Content}件");
+            });
+            var areaDetails = new List<string>();
+            earlyReportDtoreportDto.ReportAreaDetails.ForEach(item =>
+            {
+                areaDetails.Add($"{item.AreaName}{item.Count}件");
+            });
+            var summarize = $"{earlyReportDtoreportDto.ReportPushTime},市12345热线共受理重点领域问题{earlyReportDtoreportDto.ReportHotDetails.Sum(x => x.Count)}件,其中,{string.Join("、", hotDetails)}。从区域分布来看,{string.Join(",", areaDetails)}。";
+            return summarize;
+        }
+
+    }
+}

+ 14 - 0
src/Hotline.Application/Early/IEarlyReportProvder.cs

@@ -0,0 +1,14 @@
+using Hotline.Share.Dtos.Early;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Application.Early
+{
+    public interface IEarlyReportProvder
+    {
+        public string PushReport(EarlyReportDto earlyReportDto);
+    }
+}

+ 218 - 0
src/Hotline.Application/ExportWord/IWordExportTemplateExtensions.cs

@@ -1,5 +1,6 @@
 using Hotline.Share.Dtos.ExportWord;
 using Hotline.Share.Enums.ExportWord;
+using JiebaNet.Segmenter.Common;
 using System.Reflection;
 
 namespace Hotline.Application.ExportWord
@@ -65,5 +66,222 @@ namespace Hotline.Application.ExportWord
 
             return list;
         }
+
+        public static string RenderHtml(this ReportDto reportDto)
+        {
+            var body = string.Empty;
+            if (reportDto != null)
+            {
+                var content = string.Empty;
+                content = CreateTitle(reportDto.Title, content);
+                content = CreateSubTitles(reportDto, content);
+                content = CreateParagraphes(reportDto, content);
+                content = CreateAttachments(reportDto, content);
+                content = CreateBottoms(reportDto, content);
+                body = $"<body style=\"{reportDto.CssStyle}\">{content}</body>";
+            }
+            var result = $"<html>{body}</html>";
+
+            return result;
+        }
+
+        #region 渲染HTML
+        private static string CreateBottoms(ReportDto reportDto, string content)
+        {
+            if (reportDto.BottomDtos != null && reportDto.BottomDtos.Any())
+            {
+                reportDto.BottomDtos.OrderBy(x => x.SortIndex).ToList().ForEach(item =>
+                {
+
+                    content = CreateBottoms(item, content);
+                });
+            }
+
+            return content;
+        }
+
+        private static string CreateAttachments(ReportDto reportDto, string content)
+        {
+            if (reportDto.AttachmentDtos != null && reportDto.AttachmentDtos.Any())
+            {
+                var attachments = string.Empty;
+                reportDto.AttachmentDtos.ForEach(item =>
+                {
+                    var attachment = string.Empty;
+                    if (item.Title != null)
+                    {
+                        attachment = $"<div style=\"{item.Title}\">{item.Content}</div>";
+                    }
+
+                    if (item.SubTitleDtos != null && item.SubTitleDtos.Any())
+                    {
+                        item.SubTitleDtos.ForEach(sub =>
+                        {
+                            attachment = CreateSubTitle(sub, attachment);
+                        });
+                    }
+
+                    if (item.TableDtos != null && item.TableDtos.Any())
+                    {
+                        item.TableDtos.ForEach(tab =>
+                        {
+                            var body = $"";
+                            var head = $"";
+                            var table = $"<table style=\"{tab.CssStyle}\">{head}{body}</div>";
+                            if (tab.HeadDto != null)
+                            {
+                                tab.HeadDto.RowDtos.ForEach(row =>
+                                {
+                                    string rowStr = CreateRow(row);
+
+                                    head += rowStr;
+                                });
+
+                                head = $"<thead style=\"{tab.HeadDto.CssStyle}\">{head}</thead>";
+                            }
+
+                            if (tab.BodyDto != null)
+                            {
+                                tab.BodyDto.RowDtos.ForEach(row =>
+                                {
+                                    string rowStr = CreateRow(row);
+
+                                    body += rowStr;
+                                });
+
+                                body = $"<tbody style=\"{tab.BodyDto.CssStyle}\">{body}</tbody>";
+                            }
+
+                        });
+                    }
+
+                    attachments += attachment;
+                });
+                content += attachments;
+            }
+
+            return content;
+        }
+
+        private static string CreateRow(RowDto row)
+        {
+            var colStr = $"";
+            var rowStr = $"<tr style=\"{row.CssStyle}\">{colStr}</tr>";
+            row.ColumnDtos.ForEach(col =>
+            {
+                colStr += $"<td style=\"{col.CssStyle}\">{col.Content}</td>";
+            });
+            return rowStr;
+        }
+
+        private static string CreateParagraphes(ReportDto reportDto, string content)
+        {
+            if (reportDto.ContentDto != null)
+            {
+                if(reportDto.Title != null)
+                {
+                    content = CreateTitle(reportDto.Title, content);
+                }
+
+                var paragraphes = string.Empty;
+
+                if (reportDto.ContentDto.ParagraphDtos != null && reportDto.ContentDto.ParagraphDtos.Any())
+                {
+                    reportDto.ContentDto.ParagraphDtos.OrderBy(x => x.SortIndex).ToList().ForEach(item =>
+                    {
+                        var paragraph = string.Empty;
+                        if (item.titleDto != null)
+                        {
+                            paragraph = $"<p style=\"{item.titleDto.CssStyle}\">{item.titleDto.Content}</p>";
+                        }
+                        if (item.Content.IsNotEmpty())
+                        {
+                            paragraph += $"<p style=\"{item.CssStyle}\">{item.Content}</p>";
+                        }
+                        paragraphes += paragraph;
+                    });
+                }
+
+                content += $"<div style=\"{reportDto.ContentDto.CssStyle}\">{paragraphes}</div>";
+            }
+
+            return content;
+        }
+
+        private static string CreateSubTitles(ReportDto reportDto, string content)
+        {
+            if (reportDto.SubTitleDtos != null && reportDto.SubTitleDtos.Any())
+            {
+                reportDto.SubTitleDtos.OrderBy(x => x.SortIndex).ToList().ForEach(item =>
+                {
+                    content = CreateSubTitle(item, content);
+
+                });
+            }
+
+            return content;
+        }
+
+        private static string CreateSubTitle(SubTitleDto subTitleDto, string content)
+        {
+            var children = string.Empty;
+
+            if (subTitleDto.Children != null && subTitleDto.Children.Any())
+            {
+                subTitleDto.Children.OrderBy(x => x.SortIndex).ToList().ForEach(item =>
+                {
+                    children = CreateSubTitle(item, children);
+                });
+            }
+            else if (subTitleDto.Content.IsNotEmpty())
+            {
+                children = subTitleDto.Content;
+            }
+            else
+            {
+                return content;
+            }
+
+            content += $"<div style=\"{subTitleDto.CssStyle}\">{children}</div>";
+
+            return content;
+        }
+
+        private static string CreateBottoms(BaseReportDto baseReportDto, string content)
+        {
+            var children = string.Empty;
+
+            if (baseReportDto.Children != null && baseReportDto.Children.Any())
+            {
+                baseReportDto.Children.OrderBy(x => x.SortIndex).ToList().ForEach(item =>
+                {
+                    children = CreateBottoms(item, children);
+                });
+            }
+            else if (baseReportDto.Content.IsNotEmpty())
+            {
+                children = baseReportDto.Content;
+            }
+            else
+            {
+                return content;
+            }
+
+            content += $"<div style=\"{baseReportDto.CssStyle}\">{children}</div>";
+
+            return content;
+        }
+
+
+        private static string CreateTitle(TitleDto titleDto, string content)
+        {
+            if (titleDto != null)
+            {
+                content += $"<div style=\"{titleDto.CssStyle}\">{titleDto.Content}</div>";
+            }
+
+            return content;
+        }
+        #endregion
     }
 }

+ 12 - 1
src/Hotline.Application/OrderApp/IOrderApplication.cs

@@ -54,7 +54,7 @@ namespace Hotline.Application.OrderApp
 
         //Task<PagedDto<WorkflowOrderDto>> GetAboutToExpireNodeAsync(AboutToExpireListDto dto, CancellationToken cancellationToken);
         Task OrderParticiple(string inputStr, string orderId, string no, string title, DateTime time, CancellationToken cancellationToken);
-        Task OrderSensitiveParticiple(string inputStr, string orderId, CancellationToken cancellationToken);
+        Task<List<string>?> OrderSensitiveParticiple(string inputStr, string orderId, CancellationToken cancellationToken);
 
         /// <summary>
         /// 接收外部平台工单
@@ -403,6 +403,17 @@ namespace Hotline.Application.OrderApp
         /// <returns></returns>
         Task AddKnowledgeQuote(string orderId, string title, string no, List<Kv> knowledgeQuote, CancellationToken cancellationToken);
 
+        /// <summary>
+        /// 坐席预警
+        /// </summary>
+        /// <param name="orderId"></param>
+        /// <param name="seatEarlyWarningLevelValue"></param>
+        /// <param name="seatEarlyWarningLevelName"></param>
+        /// <param name="seatEarlyWarningTypeValue"></param>
+        /// <param name="seatEarlyWarningTypeName"></param>
+        /// <returns></returns>
+        Task SeatEarly(string orderId,List<string> intersect, string seatEarlyWarningLevelValue, string seatEarlyWarningLevelName, string seatEarlyWarningTypeValue, string seatEarlyWarningTypeName,CancellationToken cancellationToken);
+
         /// <summary>
         /// 知识库引用
         /// </summary>

+ 44 - 3
src/Hotline.Application/OrderApp/OrderApplication.cs

@@ -8,6 +8,7 @@ using Hotline.Article;
 using Hotline.Authentications;
 using Hotline.Caching.Interfaces;
 using Hotline.Configurations;
+using Hotline.Early;
 using Hotline.File;
 using Hotline.FlowEngine.Definitions;
 using Hotline.FlowEngine.Notifications;
@@ -111,6 +112,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
     private readonly ICircularRecordDomainService _circularRecordDomainService;
     private readonly ISessionContextManager _sessionContextManager;
     private readonly IOrderVisitApplication _orderVisitApplication;
+    private readonly IRepository<OrderEarlyWarning> _orderEarlyWarningRepository;
 
     public OrderApplication(
         IOrderDomainService orderDomainService,
@@ -162,8 +164,8 @@ public class OrderApplication : IOrderApplication, IScopeDependency
         ISessionContextCreator sessionContextCreator,
         ISessionContextManager sessionContextManager,
         IOrderVisitApplication orderVisitApplication,
-        IRepository<Role> roleRepository
-        )
+        IRepository<Role> roleRepository,
+        IRepository<OrderEarlyWarning> orderEarlyWarningRepository)
     {
         _orderDomainService = orderDomainService;
         _workflowDomainService = workflowDomainService;
@@ -214,6 +216,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
         _sessionContextManager = sessionContextManager;
         _orderVisitApplication = orderVisitApplication;
         _roleRepository = roleRepository;
+        _orderEarlyWarningRepository = orderEarlyWarningRepository;
     }
 
     /// <summary>
@@ -691,7 +694,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
         //}
     }
 
-    public async Task OrderSensitiveParticiple(string inputStr, string orderId, CancellationToken cancellationToken)
+    public async Task<List<string>?> OrderSensitiveParticiple(string inputStr, string orderId, CancellationToken cancellationToken)
     {
         var words = await _orderWrodRepository.Queryable().Where(x => x.IsEnable == 1 && x.Classify.Contains("敏感标签")).Select(x => x.Tag)
             .ToListAsync(cancellationToken);
@@ -702,7 +705,9 @@ public class OrderApplication : IOrderApplication, IScopeDependency
             var intersect = words.Intersect(res).ToList();
             await _orderRepository.Updateable().SetColumns(o => new Order() { Sensitive = intersect }).Where(o => o.Id == orderId)
                 .ExecuteCommandAsync(cancellationToken);
+            return intersect;
         }
+        return null;
     }
 
     /// <summary>
@@ -5156,6 +5161,42 @@ public class OrderApplication : IOrderApplication, IScopeDependency
         }
     }
 
+    /// <summary>
+    /// 坐席预警
+    /// </summary>
+    /// <param name="orderId"></param>
+    /// <param name="seatEarlyWarningLevelValue"></param>
+    /// <param name="seatEarlyWarningLevelName"></param>
+    /// <param name="seatEarlyWarningTypeValue"></param>
+    /// <param name="seatEarlyWarningTypeName"></param>
+    /// <returns></returns>
+    public async Task SeatEarly(string orderId,List<string> intersect, string seatEarlyWarningLevelValue, string seatEarlyWarningLevelName, string seatEarlyWarningTypeValue, string seatEarlyWarningTypeName,CancellationToken cancellationToken)
+    {
+        var model = await _orderEarlyWarningRepository.GetAsync(orderId, cancellationToken);
+        if (model!=null)
+        {
+            model.SeatEarlyWarningLevelValue = seatEarlyWarningLevelValue;
+            model.SeatEarlyWarningLevelName = seatEarlyWarningLevelName;
+            model.SeatEarlyWarningTypeValue = seatEarlyWarningTypeValue;
+            model.SeatEarlyWarningTypeName = seatEarlyWarningTypeName;
+            await _orderEarlyWarningRepository.UpdateAsync(model, cancellationToken);
+        }
+        else
+        {
+            model = new OrderEarlyWarning();
+            model.SeatEarlyWarningLevelValue = seatEarlyWarningLevelValue;
+            model.SeatEarlyWarningLevelName = seatEarlyWarningLevelName;
+            model.SeatEarlyWarningTypeValue = seatEarlyWarningTypeValue;
+            model.SeatEarlyWarningTypeName = seatEarlyWarningTypeName;
+            //预警预选信息
+
+            model.CanChooseEarlyWarning = null;
+
+            await _orderEarlyWarningRepository.AddAsync(model, cancellationToken);
+        }
+        
+    }
+
     /// <summary>
     /// 知识库引用
     /// </summary>

+ 3 - 2
src/Hotline.Application/SpecialNumber/ISpecialNumberApplication.cs

@@ -1,4 +1,5 @@
 using Hotline.Share.Dtos.Special;
+using SqlSugar;
 
 namespace Hotline.Application.SpecialNumber
 {
@@ -9,9 +10,9 @@ namespace Hotline.Application.SpecialNumber
         /// <summary>
         /// 特殊号码 - 列表
         /// </summary>
-        /// <param name="pagedDto"></param>
+        /// <param name="dto"></param>
         /// <returns></returns>
-        Task<(int, IList<SpecialNumberInfoDto>)> QueryAllSpecialNumberListAsync(SpecialNumberDto pagedDto, CancellationToken cancellationToken);
+        ISugarQueryable<Hotline.Special.SpecialNumber> QueryAllSpecialNumberListAsync(SpecialNumberDto dto);
 
         /// <summary>
         /// 特殊号码 - 新增

+ 10 - 9
src/Hotline.Application/SpecialNumber/SpecialNumberApplication.cs

@@ -6,6 +6,7 @@ using XF.Domain.Exceptions;
 using XF.Domain.Repository;
 using Hotline.Repository.SqlSugar.Extensions;
 using Hotline.Share.Dtos.Special;
+using Hotline.Orders;
 
 namespace Hotline.Application.SpecialNumber
 {
@@ -36,25 +37,23 @@ namespace Hotline.Application.SpecialNumber
         /// <summary>
         /// 特殊号码 - 列表
         /// </summary>
-        /// <param name="pagedDto"></param>
+        /// <param name="dto"></param>
         /// <returns></returns>
-        public async Task<(int, IList<SpecialNumberInfoDto>)> QueryAllSpecialNumberListAsync(SpecialNumberDto dto, CancellationToken cancellationToken)
+        public ISugarQueryable<Hotline.Special.SpecialNumber> QueryAllSpecialNumberListAsync(SpecialNumberDto dto)
         {
-            var typeSpliceName = string.Empty;
-
             //单表分页
-            var (total, temp) = await _specialNumberRepository.Queryable()
-
+            var query = _specialNumberRepository.Queryable()
                 .WhereIF(!string.IsNullOrEmpty(dto.PhoneNumber), x => x.PhoneNumber.Contains(dto.PhoneNumber))
                 .WhereIF(!string.IsNullOrEmpty(dto.Notes), x => x.Notes.Contains(dto.Notes))
+                .WhereIF(!string.IsNullOrEmpty(dto.PoliticalIdentityValue), x => x.PoliticalIdentityValue == dto.PoliticalIdentityValue)
+                .WhereIF(!string.IsNullOrEmpty(dto.PoliticalIdentityName), x => x.PoliticalIdentityName == dto.PoliticalIdentityName)
                 .WhereIF(dto.CreationTimeStart.HasValue, x => x.CreationTime >= dto.CreationTimeStart)
                 .WhereIF(dto.CreationTimeEnd.HasValue, x => x.CreationTime <= dto.CreationTimeEnd)
                 .OrderByIF(dto is { SortField: "creationTime", SortRule: 0 }, x => x.CreationTime, OrderByType.Asc)  //创建时间升序
                 .OrderByIF(dto is { SortField: "creationTime", SortRule: 1 }, x => x.CreationTime, OrderByType.Desc) //创建时间降序
                 .OrderByIF(string.IsNullOrEmpty(dto.SortField), x => x.CreationTime, OrderByType.Desc) //创建时间降序
-                .ToPagedListAsync(dto.PageIndex, dto.PageSize, cancellationToken);
-            return (total, _mapper.Map<IList<SpecialNumberInfoDto>>(temp));
-            //return (total, temp);
+              ;
+            return query;
         }
 
         #endregion
@@ -103,6 +102,8 @@ namespace Hotline.Application.SpecialNumber
 
             data.PhoneNumber = dto.PhoneNumber;
             data.Notes = dto.Notes;
+            data.PoliticalIdentityValue = dto.PoliticalIdentityValue;
+            data.PoliticalIdentityName = dto.PoliticalIdentityName;
 
             await _specialNumberRepository.UpdateAsync(data, cancellationToken);
         }

+ 2 - 1
src/Hotline.Application/StatisticalReport/OrderReportApplication.cs

@@ -2353,7 +2353,7 @@ namespace Hotline.Application.StatisticalReport
               })
               .WhereIF(dto.OrgType == 1, (it, o) => o.OrgType != EOrgType.County)
               .WhereIF(dto.OrgType == 2, (it, o) => o.OrgType == EOrgType.County)
-              .WhereIF(!string.IsNullOrEmpty(dto.OrgName), (it, o) => o.Name.StartsWith(dto.OrgName))
+              .WhereIF(!string.IsNullOrEmpty(dto.OrgName), (it, o) => o.Name.Contains(dto.OrgName))
               .Select((it, o) => new DepartmentAcceptanceTypeStatisticsV1Dto
               {
                   OrgName = o.Id == "001" ? centerOrgName : o.Name,
@@ -2414,6 +2414,7 @@ namespace Hotline.Application.StatisticalReport
                  .LeftJoin<SystemOrganize>((x, o) => x.ActualHandleOrgCode == o.Id)
                  .WhereIF(dto.OrgType == 1, (x, o) => o.OrgType != EOrgType.County)
                  .WhereIF(dto.OrgType == 2, (x, o) => o.OrgType == EOrgType.County)
+                 .WhereIF(!string.IsNullOrEmpty(dto.OrgName), (x, o) => o.Name.Contains(dto.OrgName))
                  .OrderByDescending(x => x.CreationTime);
         }
 

+ 2 - 0
src/Hotline.Share/Dtos/CallCenter/QueryCallsFixedDto.cs

@@ -23,6 +23,8 @@ namespace Hotline.Share.Dtos.CallCenter
 
         public EEndBy? EndBy { get; set; }
 
+        public string? StaffNo {  get; set; }
+
         /// <summary>
         /// 呼入时间
         /// </summary>

+ 14 - 4
src/Hotline.Share/Dtos/Early/EarlyDto.cs

@@ -173,6 +173,16 @@ namespace Hotline.Share.Dtos.Early
         /// 次数
         /// </summary>
         public int Times { get; set; }
+
+        /// <summary>
+        /// 顺序
+        /// </summary>
+        public int Sort { get; set; }
+
+        /// <summary>
+        /// 下一节点条件
+        /// </summary>
+        public ENextWhere? NextWhere { get; set; }
     }
 
     #endregion
@@ -413,22 +423,22 @@ namespace Hotline.Share.Dtos.Early
         /// <summary>
         /// 热点汇报简介
         /// </summary>
-        public ReportHotDetailDto ReportHotDetail { get; set; }
+        public List<ReportHotDetailDto> ReportHotDetails { get; set; }
 
         /// <summary>
         /// 区域汇报简介
         /// </summary>
-        public ReportAreaDetailDto ReportAreaDetail { get; set; }
+        public List<ReportAreaDetailDto> ReportAreaDetails { get; set; }
 
         /// <summary>
         /// 工单明细表
         /// </summary>
-        public ReportOrderDetailDto ReportOrderDetail { get; set; }
+        public List<ReportOrderDetailDto> ReportOrderDetails { get; set; }
 
         /// <summary>
         /// 往期明细工单
         /// </summary>
-        public ReportFiledOrderDetailDto ReportFiledOrderDetail { get; set; }
+        public List<ReportFiledOrderDetailDto> ReportFiledOrderDetails { get; set; }
     }
 
     public class ReportAreaDetailDto

+ 122 - 0
src/Hotline.Share/Dtos/ExportWord/ReportDto.cs

@@ -0,0 +1,122 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Share.Dtos.ExportWord
+{
+    /// <summary>
+    /// 报表实体
+    /// </summary>
+    public class ReportDto: BaseReportDto
+    {
+        public TitleDto Title { get; set; }
+
+        public List<SubTitleDto> SubTitleDtos { get; set; }
+
+        public ContentDto ContentDto { get; set; }
+
+        public List<AttachmentDto> AttachmentDtos { get; set; }
+
+        public List<BaseReportDto> BottomDtos { get; set; }
+    }
+
+    /// <summary>
+    /// 标题实体
+    /// </summary>
+    public class TitleDto: BaseReportDto
+    {
+        
+    }
+
+    /// <summary>
+    /// 内容实体
+    /// </summary>
+    public class ContentDto : BaseReportDto
+    {
+        public TitleDto TitleDto { get; set; }
+        public List<ParagraphDto> ParagraphDtos { get; set; }
+    }
+
+    /// <summary>
+    /// 段落实体
+    /// </summary>
+    public class ParagraphDto : BaseReportDto
+    {
+        /// <summary>
+        /// 标题
+        /// </summary>
+        public TitleDto titleDto { get; set; }
+    }
+
+    /// <summary>
+    /// 子标题
+    /// </summary>
+    public class SubTitleDto: BaseReportDto
+    {
+        /// <summary>
+        /// 子元素
+        /// </summary>
+        public new List<SubTitleDto> Children { get; set; }
+    }
+
+    /// <summary>
+    /// 附件
+    /// </summary>
+    public class AttachmentDto : BaseReportDto
+    {
+        public TitleDto Title { get; set; }
+
+        public List<SubTitleDto> SubTitleDtos { get; set; }
+
+        public List<TableDto> TableDtos { get; set; }
+    }
+
+    public class TableDto : BaseReportDto
+    {
+       public TableDto()
+        {
+            HeadDto = new HeadDto();
+            BodyDto = new TBodyDto();
+        }
+        public HeadDto HeadDto { get; set; }
+
+        public TBodyDto BodyDto { get; set; }
+    }
+
+    public class HeadDto : BaseReportDto
+    {
+        public List<RowDto> RowDtos { get; set; }
+    }
+
+    public class TBodyDto : BaseReportDto
+    {
+        public TBodyDto()
+        {
+            RowDtos = new List<RowDto>();
+        }
+        public List<RowDto> RowDtos { get; set; }
+    }
+
+    public class RowDto : BaseReportDto
+    {
+        public List<ColumnDto> ColumnDtos;
+    }
+
+    public class ColumnDto : BaseReportDto
+    {
+
+    }
+
+    public class BaseReportDto
+    {
+        public string Content { get; set; }
+
+        public string CssStyle { get; set; }
+
+        public int SortIndex { get; set; }
+
+        public List<BaseReportDto> Children { get; set; }
+    }
+}

+ 29 - 5
src/Hotline.Share/Dtos/Order/OrderDto.cs

@@ -610,27 +610,27 @@ namespace Hotline.Share.Dtos.Order
         /// <summary>
         /// 一级热点
         /// </summary>
-        public string OneHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && !string.IsNullOrEmpty(HotspotId) && HotspotId.Length >= 2 ? HotspotSpliceName.Split("-")[0] : string.Empty;
+        public string OneHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && HotspotSpliceName.Split("-").Length >= 1 ? HotspotSpliceName.Split("-")[0] : string.Empty;
 
         /// <summary>
         /// 二级热点
         /// </summary>
-		public string TwoHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && !string.IsNullOrEmpty(HotspotId) && HotspotId.Length >= 4 ? HotspotSpliceName.Split("-")[1] : string.Empty;
+		public string TwoHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && HotspotSpliceName.Split("-").Length >= 2 ? HotspotSpliceName.Split("-")[1] : string.Empty;
 
         /// <summary>
         /// 三级热点
         /// </summary>
-		public string ThreeHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && !string.IsNullOrEmpty(HotspotId) && HotspotId.Length >= 6 ? HotspotSpliceName.Split("-")[2] : string.Empty;
+		public string ThreeHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && HotspotSpliceName.Split("-").Length >= 3 ? HotspotSpliceName.Split("-")[2] : string.Empty;
 
 		/// <summary>
 		/// 四级热点
 		/// </summary>
-		public string FourHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && !string.IsNullOrEmpty(HotspotId) && HotspotId.Length >= 8 ? HotspotSpliceName.Split("-")[3] : string.Empty;
+		public string FourHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && HotspotSpliceName.Split("-").Length >=4 ? HotspotSpliceName.Split("-")[3] : string.Empty;
 
 		/// <summary>
 		/// 五级热点
 		/// </summary>
-		public string FiveHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && !string.IsNullOrEmpty(HotspotId) && HotspotId.Length >= 10 ? HotspotSpliceName.Split("-")[4] : string.Empty;
+		public string FiveHotspotName => !string.IsNullOrEmpty(HotspotSpliceName) && HotspotSpliceName.Split("-").Length >= 5 ? HotspotSpliceName.Split("-")[4] : string.Empty;
 
 		/// <summary>
 		/// 特提次数
@@ -1502,6 +1502,30 @@ namespace Hotline.Share.Dtos.Order
         /// </summary>
         public List<string>? Tags { get; set; }
 
+        #region 预警信息
+
+        /// <summary>
+        /// 坐席预警级别值
+        /// </summary>
+        public string SeatEarlyWarningLevelValue { get; set; }
+
+        /// <summary>
+        /// 坐席预警级别名称
+        /// </summary>
+        public string SeatEarlyWarningLevelName { get; set; }
+
+        /// <summary>
+        /// 坐席预警类型值
+        /// </summary>
+        public string SeatEarlyWarningTypeValue { get; set; }
+
+        /// <summary>
+        /// 坐席预警类型名称
+        /// </summary>
+        public string SeatEarlyWarningTypeName { get; set; }
+
+        #endregion
+
     }
 
     public record CanLinkCallRecordOrderDto : PagedKeywordRequest

+ 19 - 1
src/Hotline.Share/Dtos/Order/QueryOrderDto.cs

@@ -301,7 +301,25 @@ namespace Hotline.Share.Dtos.Order
         public bool IsReviewPass { get; set; }
     }
 
-    public class PublishOrderDelayDto
+	public record OrderPushTypeCodeDto
+	{
+		/// <summary>
+		/// 开始时间
+		/// </summary>
+		public DateTime? StartTime { get; set; }
+
+		/// <summary>
+		/// 结束时间
+		/// </summary>
+		public DateTime? EndTime { get; set; }
+
+		/// <summary>
+		/// pushTypeCode
+		/// </summary>
+		public string PushTypeCode { get; set; }
+	}
+
+	public class PublishOrderDelayDto
     {
         public string Id { get; set; }
 

+ 31 - 1
src/Hotline.Share/Dtos/Special/SpecialNumberDto.cs

@@ -13,6 +13,16 @@ namespace Hotline.Share.Dtos.Special
         /// 备注
         /// </summary>
         public string? Notes { get; set; }
+
+        /// <summary>
+        /// 政治身份ID
+        /// </summary>
+        public string? PoliticalIdentityValue { get; set; }
+
+        /// <summary>
+        /// 政治身份
+        /// </summary>
+        public string? PoliticalIdentityName { get; set; }
     }
 
     public record UpdateSpecialNumberDto : AddSpecialNumberDto
@@ -41,6 +51,16 @@ namespace Hotline.Share.Dtos.Special
 
         public string? Notes { get; set; }
 
+        /// <summary>
+        /// 政治身份ID
+        /// </summary>
+        public string? PoliticalIdentityValue { get; set; }
+
+        /// <summary>
+        /// 政治身份
+        /// </summary>
+        public string? PoliticalIdentityName { get; set; }
+
         /// <summary>
         /// 创建开始时间
         /// </summary>
@@ -54,7 +74,7 @@ namespace Hotline.Share.Dtos.Special
         /// <summary>
         /// 排序字段
         /// </summary>
-        public string? SortField { get; set; } = "creationTime";
+        public string? SortField { get; set; }
 
         /// <summary>
         /// 排序方式 // 0 升序 1 降序
@@ -79,6 +99,16 @@ namespace Hotline.Share.Dtos.Special
         /// </summary>
         public string? Notes { get; set; }
 
+        /// <summary>
+        /// 政治身份ID
+        /// </summary>
+        public string? PoliticalIdentityValue { get; set; }
+
+        /// <summary>
+        /// 政治身份
+        /// </summary>
+        public string? PoliticalIdentityName { get; set; }
+
         /// <summary>
         /// 创建时间
         /// </summary>

+ 24 - 0
src/Hotline.Share/Enums/Early/ENextWhere.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Share.Enums.Early
+{
+    public enum ENextWhere
+    {
+        /// <summary>
+        /// 并且
+        /// </summary>
+        [Description("并且")]
+        And = 1,
+
+        /// <summary>
+        /// 或者
+        /// </summary>
+        [Description("或者")]
+        Or = 2,
+    }
+}

+ 12 - 1
src/Hotline/Early/EarlyWarningSetting.cs

@@ -1,4 +1,5 @@
 using Hotline.Share.Enums.Early;
+using SqlSugar;
 using XF.Domain.Repository;
 
 namespace Hotline.Early
@@ -43,7 +44,7 @@ namespace Hotline.Early
         /// <summary>
         /// 预警规则
         /// </summary>
-        
+        [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
         public List<EarlyWarningRule> EarlyWarningRules { get; set; }
 
         /// <summary>
@@ -68,5 +69,15 @@ namespace Hotline.Early
         /// 次数
         /// </summary>
         public int Times { get; set; }
+
+        /// <summary>
+        /// 顺序
+        /// </summary>
+        public int Sort { get; set; }
+
+        /// <summary>
+        /// 下一节点条件
+        /// </summary>
+        public ENextWhere? NextWhere { get; set; }
     }
 }

+ 1 - 0
src/Hotline/Early/OrderEarlyWarning.cs

@@ -55,6 +55,7 @@ namespace Hotline.Early
         /// <summary>
         /// 可选择预警设置
         /// </summary>
+        
         public List<EarlyWarningSetting> CanChooseEarlyWarning { get; set; }
     }
 }

+ 1 - 1
src/Hotline/Orders/Order.cs

@@ -256,7 +256,7 @@ namespace Hotline.Orders
         public List<string>? DuplicateIds { get; set; }
 
         /// <summary>
-        /// 推送分类 -- 弃用 转为表存储
+        /// 推送分类 --  转为表存储
         /// </summary>
         [SugarColumn(ColumnDescription = "推送分类代码")]
         public string? PushTypeCode { get; set; }

+ 1 - 1
src/Hotline/Orders/OrderDomainService.cs

@@ -445,7 +445,7 @@ public class OrderDomainService : IOrderDomainService, IScopeDependency
         if (string.IsNullOrEmpty(orderId))
             throw UserFriendlyException.SameMessage("无效工单编号");
 
-        var query = _orderRepository.Queryable();
+        var query = _orderRepository.Queryable().Includes(d=>d.OrderPushTypes);
         if (withHotspot)
             query = query.Includes(d => d.Hotspot);
         if (withAcceptor)

+ 6 - 0
src/Hotline/Settings/SettingConstants.cs

@@ -1,5 +1,6 @@
 using Hotline.Share.Enums.Order;
 using Hotline.Users;
+using IdentityModel;
 using Org.BouncyCastle.Bcpg.OpenPgp;
 
 namespace Hotline.Settings
@@ -748,5 +749,10 @@ namespace Hotline.Settings
         /// 泸州好差评系统对接功能
         /// </summary>
         public const string LuZhouHaoChaPing = "lzhcp";
+
+        /// <summary>
+        /// 工单保存特殊身份验证
+        /// </summary>
+        public const string SpecialIdentityVerification = "SpecialIdentityVerification";
     }
 }

+ 6 - 0
src/Hotline/Settings/SysDicTypeConsts.cs

@@ -326,4 +326,10 @@ public class SysDicTypeConsts
     /// 预警类型
     /// </summary>
     public static string EarlyWarningType = "EarlyWarningType";
+
+    /// <summary>
+    /// 政治身份
+    /// </summary>
+    public static string PoliticalIdentity = "PoliticalIdentity";
+    
 }

+ 12 - 0
src/Hotline/Special/SpecialNumber.cs

@@ -18,5 +18,17 @@ namespace Hotline.Special
         /// </summary>
         [SugarColumn(ColumnDescription = "备注")]
         public string? Notes { get; set; }
+
+        /// <summary>
+        /// 政治身份ID
+        /// </summary>
+        [SugarColumn(ColumnDescription = "政治身份ID")]
+        public string? PoliticalIdentityValue { get; set; }
+
+        /// <summary>
+        /// 政治身份
+        /// </summary>
+        [SugarColumn(ColumnDescription = "政治身份")]
+        public string? PoliticalIdentityName { get; set; }
     }
 }