瀏覽代碼

解决冲突

Dun.Jason 10 月之前
父節點
當前提交
be97637f53

+ 25 - 25
src/Hotline.Api/Controllers/Bi/BiCallController.cs

@@ -291,30 +291,30 @@ public class BiCallController : BaseController
     /// <returns></returns>
     [HttpGet("hourcall")]
     [AllowAnonymous]
-    public async Task<List<TrCallHourDto>> QueryHourCall([FromQuery] DateTime beginDate, DateTime? endDate, string source)
+    public async Task<List<TrCallHourDto>> QueryHourCall([FromQuery]DateTime StartTime,DateTime? EndTime, string source)
     {
         //获取配置
         int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
         int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
         int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
-        var list = await _trCallRecordRepositoryEx.GetCallHourList(beginDate, endDate, noConnectByeTimes, effectiveTimes, connectByeTimes, source);
+        var list = await _trCallRecordRepositoryEx.GetCallHourList(StartTime, EndTime, noConnectByeTimes,effectiveTimes,connectByeTimes,source);
         return list;
     }
 
-    /// <summary>
-    /// 通话时段统计明细
-    /// </summary>
-    /// <returns></returns>
-    [HttpGet("hourcall_list")]
-    public async Task<object> QueryCallList([FromQuery] DateTime beginDate, DateTime? endDate, string type, string source, TimeSpan? startHourTo, int pageIndex, int pageSize)
-    {
-        //获取配置
-        int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
-        int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
-        int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
-        var list = await _trCallRecordRepositoryEx.GetCallList(beginDate, endDate, noConnectByeTimes, effectiveTimes, connectByeTimes, type, source, startHourTo, pageIndex, pageSize);
-        return list;
-    }
+	/// <summary>
+	/// 通话时段统计明细
+	/// </summary>
+	/// <returns></returns>
+	[HttpGet("hourcall_list")]
+	public async Task<object> QueryCallList([FromQuery] DateTime StartTime, DateTime? EndTime, string type, string source, TimeSpan? startHourTo , int pageIndex, int pageSize)
+	{
+		//获取配置
+		int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
+		int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
+		int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
+		var list = await _trCallRecordRepositoryEx.GetCallList(StartTime, EndTime, noConnectByeTimes, effectiveTimes, connectByeTimes, type, source, startHourTo,pageIndex, pageSize);
+		return list;
+	}
 
     /// <summary>
     /// 通话时段统计明细获取基本信息
@@ -332,22 +332,22 @@ public class BiCallController : BaseController
         return rsp;
     }
 
-    /// <summary>
-    /// 热线号码统计
-    /// </summary>
-    /// <param name="StartDate"></param>
-    /// <param name="EndDate"></param>
-    /// <returns></returns>
-    [AllowAnonymous]
+	/// <summary>
+	/// 热线号码统计
+	/// </summary>
+	/// <param name="StartTime"></param>
+	/// <param name="EndTime"></param>
+	/// <returns></returns>
+	[AllowAnonymous]
     [HttpGet("gateway-query")]
-    public async Task<List<CallHotLineDto>> QueryGateWay(DateTime beginDate, DateTime endDate, string gateway)
+    public async Task<List<CallHotLineDto>> QueryGateWay(DateTime StartTime, DateTime EndTime,string gateway)
     {
         //获取配置
         int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
         int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
         int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
         int ringTims = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.RingTims)?.SettingValue[0]);
-        var list = await _trCallRecordRepositoryEx.GetCallHotLineList(beginDate, endDate, gateway, noConnectByeTimes, effectiveTimes, connectByeTimes, ringTims);
+        var list = await _trCallRecordRepositoryEx.GetCallHotLineList(StartTime, EndTime, gateway, noConnectByeTimes, effectiveTimes, connectByeTimes, ringTims);
         return list;
     }
 }

+ 51 - 48
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -14,6 +14,7 @@ using Hotline.Share.Dtos;
 using Hotline.Share.Dtos.Bi;
 using Hotline.Share.Dtos.Bigscreen;
 using Hotline.Share.Dtos.CallCenter;
+using Hotline.Share.Dtos.DataSharing.PusherHotlineDto;
 using Hotline.Share.Dtos.FlowEngine.Workflow;
 using Hotline.Share.Dtos.Order;
 using Hotline.Share.Enums.CallCenter;
@@ -22,6 +23,7 @@ using Hotline.Share.Enums.Order;
 using Hotline.Share.Requests;
 using Hotline.Tools;
 using MapsterMapper;
+using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
 using NPOI.SS.Formula.Functions;
 using Org.BouncyCastle.Utilities;
@@ -31,6 +33,7 @@ using XF.Domain.Authentications;
 using XF.Domain.Constants;
 using XF.Domain.Exceptions;
 using XF.Domain.Repository;
+using XF.Utility.EnumExtensions;
 using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
 
 namespace Hotline.Api.Controllers.Bi
@@ -740,13 +743,13 @@ namespace Hotline.Api.Controllers.Bi
         /// </summary>
         /// <returns></returns>
         [HttpGet("visit-measure-statistics")]
-        public async Task<VisitMeasureStatisticsDto> VisitMeasureStatistics(DateTime StartDate, DateTime EndDate, string? VisitName)
+        public async Task<VisitMeasureStatisticsDto> VisitMeasureStatistics(DateTime StartTime, DateTime EndTime, string? VisitName)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             var list = await _orderVisitRepository.Queryable()
                 .Includes(x => x.Employee)
-                 .Where(x => x.VisitTime >= StartDate && x.VisitTime <= EndDate && x.VisitState == EVisitState.Visited)
+                 .Where(x => x.VisitTime >= StartTime && x.VisitTime <= EndTime && x.VisitState == EVisitState.Visited)
                  .WhereIF(!string.IsNullOrEmpty(VisitName), x => x.Employee.Name.Contains(VisitName))
                  .GroupBy(x => new { x.EmployeeId, x.Employee.Name })
                  .Select(x => new VisitMeasureStatisticsModelDto()
@@ -762,18 +765,18 @@ namespace Hotline.Api.Controllers.Bi
 
             //查询AIVisit
             returnModel.AiVisitCount = await _aiOrderVisitDetailRepository.Queryable()
-                .Where(x => x.AiVisitTime >= StartDate && x.AiVisitTime <= EndDate && x.IsSuccess != null).CountAsync();
+                .Where(x => x.AiVisitTime >= StartTime && x.AiVisitTime <= EndTime && x.IsSuccess != null).CountAsync();
 
             returnModel.AiVisitSatisfiedCount = await _aiOrderVisitDetailRepository.Queryable()
                 .Includes(x => x.OrderVisit)
-                .Where(x => x.AiVisitTime >= StartDate && x.AiVisitTime <= EndDate && x.IsSuccess == true && SqlFunc.JsonField(x.OrderVisit.NowEvaluate, "Key") != "1" && SqlFunc.JsonField(x.OrderVisit.NowEvaluate, "Key") != "2").CountAsync();
+                .Where(x => x.AiVisitTime >= StartTime && x.AiVisitTime <= EndTime && x.IsSuccess == true && SqlFunc.JsonField(x.OrderVisit.NowEvaluate, "Key") != "1" && SqlFunc.JsonField(x.OrderVisit.NowEvaluate, "Key") != "2").CountAsync();
 
             returnModel.AiVisitNoSatisfiedCount = await _aiOrderVisitDetailRepository.Queryable()
                 .Includes(x => x.OrderVisit)
-                .Where(x => x.AiVisitTime >= StartDate && x.AiVisitTime <= EndDate && x.IsSuccess == true && SqlFunc.JsonField(x.OrderVisit.NowEvaluate, "Key") == "1" && SqlFunc.JsonField(x.OrderVisit.NowEvaluate, "Key") == "2").CountAsync();
+                .Where(x => x.AiVisitTime >= StartTime && x.AiVisitTime <= EndTime && x.IsSuccess == true && SqlFunc.JsonField(x.OrderVisit.NowEvaluate, "Key") == "1" && SqlFunc.JsonField(x.OrderVisit.NowEvaluate, "Key") == "2").CountAsync();
 
             returnModel.AIVisitFailCount = await _aiOrderVisitDetailRepository.Queryable()
-                .Where(x => x.AiVisitTime >= StartDate && x.AiVisitTime <= EndDate && x.IsSuccess == false).CountAsync();
+                .Where(x => x.AiVisitTime >= StartTime && x.AiVisitTime <= EndTime && x.IsSuccess == false).CountAsync();
 
 
             return returnModel;
@@ -782,14 +785,14 @@ namespace Hotline.Api.Controllers.Bi
         /// <summary>
         /// 热点类型小类统计
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <param name="TypeId">0:全部 ,1:市民,2:企业</param>
         /// <returns></returns>
         [HttpGet("hotspot-statistics")]
-        public async Task<object> HotspotStatistics(DateTime StartDate, DateTime EndDate, int TypeId, string? HotspotCode)
+        public async Task<object> HotspotStatistics(DateTime StartTime, DateTime EndTime, int TypeId, string? HotspotCode)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             var IsCenter = _sessionContext.OrgIsCenter;
 
@@ -797,7 +800,7 @@ namespace Hotline.Api.Controllers.Bi
             {
                 var list = await _hotspotTypeRepository.Queryable()
                 .LeftJoin<Order>((it, o) => it.Id == o.HotspotId)
-                .Where((it, o) => o.CreationTime >= StartDate && o.CreationTime <= EndDate && o.Id != null)
+                .Where((it, o) => o.CreationTime >= StartTime && o.CreationTime <= EndTime && o.Id != null)
                 .WhereIF(TypeId == 1, (it, o) => o.IdentityType == EIdentityType.Citizen)
                 .WhereIF(TypeId == 2, (it, o) => o.IdentityType == EIdentityType.Enterprise)
                 .WhereIF(IsCenter == false, (it, o) => o.ActualHandleOrgCode.StartsWith(_sessionContext.RequiredOrgId))
@@ -826,7 +829,7 @@ namespace Hotline.Api.Controllers.Bi
                 string countx = HotspotCode.Length.ToString();
                 var list = await _hotspotTypeRepository.Queryable()
                 .LeftJoin<Order>((it, o) => it.Id == o.HotspotId)
-                .Where((it, o) => o.CreationTime >= StartDate && o.CreationTime <= EndDate && it.ParentId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>(countx)) == HotspotCode)
+                .Where((it, o) => o.CreationTime >= StartTime && o.CreationTime <= EndTime && it.ParentId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>(countx)) == HotspotCode)
                 .WhereIF(TypeId == 1, (it, o) => o.IdentityType == EIdentityType.Citizen)
                 .WhereIF(TypeId == 2, (it, o) => o.IdentityType == EIdentityType.Enterprise)
                 .WhereIF(IsCenter == false, (it, o) => o.ActualHandleOrgCode.StartsWith(_sessionContext.RequiredOrgId))
@@ -854,8 +857,8 @@ namespace Hotline.Api.Controllers.Bi
         /// <summary>
         /// 部门满意度统计
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <param name="OrgName"></param>
         /// <param name="TypeId">1:办件结果 2:办件态度</param>
         /// <param name="LineNum"></param>
@@ -970,8 +973,8 @@ namespace Hotline.Api.Controllers.Bi
         /// <summary>
         /// 子部门满意度明细
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <param name="OrgCode"></param>
         /// <param name="TypeId"></param>
         /// <param name="LineNum"></param>
@@ -1138,14 +1141,14 @@ namespace Hotline.Api.Controllers.Bi
         /// <param name="EndDate"></param>
         /// <returns></returns>
         [HttpGet("center_report_forms_statistics")]
-        public async Task<CenterReportStatisticsDto> CenterReportFormsStatistics(DateTime StartDate, DateTime EndDate)
+        public async Task<CenterReportStatisticsDto> CenterReportFormsStatistics(DateTime StartTime, DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             CenterReportStatisticsDto centerReportStatisticsDto = new();
 
             //信件总量
-            int sourceChannelCount = await _orderRepository.Queryable().Where(p => p.CreationTime >= StartDate && p.CreationTime <= EndDate).CountAsync();
+            int sourceChannelCount = await _orderRepository.Queryable().Where(p => p.CreationTime >= StartTime && p.CreationTime <= EndTime).CountAsync();
 
             #region 通话记录
             //通话记录
@@ -1167,7 +1170,7 @@ namespace Hotline.Api.Controllers.Bi
             #region 工单
             //工单
             var orderData = await _orderRepository.Queryable()
-                .Where(p => p.CreationTime >= StartDate && p.CreationTime <= EndDate)
+                .Where(p => p.CreationTime >= StartTime && p.CreationTime <= EndTime)
                 .Select(x => new CenterReportOrderDto
                 {
                     EffectiveCount = SqlFunc.AggregateSum(SqlFunc.IIF(true, 1, 0)),
@@ -1183,7 +1186,7 @@ namespace Hotline.Api.Controllers.Bi
             #region 信件来源
             //信件来源
             var sourceChannelData = await _orderRepository.Queryable()
-                .Where(p => p.CreationTime >= StartDate && p.CreationTime <= EndDate)
+                .Where(p => p.CreationTime >= StartTime && p.CreationTime <= EndTime)
                 .Select(it => new
                 {
                     SourceChannelCode = SqlFunc.IIF(SqlFunc.IsNullOrEmpty(it.SourceChannelCode), "QT", it.SourceChannelCode)
@@ -1222,7 +1225,7 @@ namespace Hotline.Api.Controllers.Bi
             #region 信件分类
             //信件来源
             var acceptTypeData = await _orderRepository.Queryable(false, false, false)
-                .Where(p => p.CreationTime >= StartDate && p.CreationTime <= EndDate)
+                .Where(p => p.CreationTime >= StartTime && p.CreationTime <= EndTime)
                 .Select(it => new
                 {
                     AcceptTypeCode = SqlFunc.IIF(SqlFunc.IsNullOrEmpty(it.AcceptTypeCode), "40", it.AcceptTypeCode)
@@ -1256,15 +1259,15 @@ namespace Hotline.Api.Controllers.Bi
             CenterReportVisitdDto centerReportVisitd = new()
             {
                 Visitd = await _orderVisitRepository.Queryable()
-              .Where(x => x.VisitTime >= StartDate && x.VisitTime <= EndDate && x.VisitState == EVisitState.Visited).CountAsync(),
+              .Where(x => x.VisitTime >= StartTime && x.VisitTime <= EndTime && x.VisitState == EVisitState.Visited).CountAsync(),
                 WaitVisitd = await _orderVisitRepository.Queryable()
-             .Where(x => x.VisitTime >= StartDate && x.VisitTime <= EndDate && x.VisitState != EVisitState.None && x.VisitState != EVisitState.Visited).CountAsync()
+             .Where(x => x.VisitTime >= StartTime && x.VisitTime <= EndTime && x.VisitState != EVisitState.None && x.VisitState != EVisitState.Visited).CountAsync()
             };
 
             //部门
             var listOrg = await _orderVisitDetailRepository.Queryable()
                 .LeftJoin<OrderVisit>((it, o) => it.VisitId == o.Id)
-                .Where((it, o) => it.VisitTarget == EVisitTarget.Org && o.VisitTime >= StartDate && o.VisitTime <= EndDate && o.VisitState == EVisitState.Visited)
+                .Where((it, o) => it.VisitTarget == EVisitTarget.Org && o.VisitTime >= StartTime && o.VisitTime <= EndTime && o.VisitState == EVisitState.Visited)
                  .Select((it, o) => new Satisfaction
                  {
                      Dissatisfied = SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonListObjectAny(it.OrgProcessingResults, "key", "1") || SqlFunc.JsonListObjectAny(it.OrgProcessingResults, "key", "2"), 1, 0)),
@@ -1285,7 +1288,7 @@ namespace Hotline.Api.Controllers.Bi
             //坐席
             var listSet = await _orderVisitDetailRepository.Queryable()
                 .LeftJoin<OrderVisit>((it, o) => it.VisitId == o.Id)
-                .Where((it, o) => it.VisitTarget == EVisitTarget.Seat && o.VisitTime >= StartDate && o.VisitTime <= EndDate && o.VisitState == EVisitState.Visited)
+                .Where((it, o) => it.VisitTarget == EVisitTarget.Seat && o.VisitTime >= StartTime && o.VisitTime <= EndTime && o.VisitState == EVisitState.Visited)
                 .Select((it, o) => new Satisfaction
                 {
                     Dissatisfied = SqlFunc.AggregateSum(SqlFunc.IIF(it.SeatEvaluate == ESeatEvaluate.NoSatisfied, 1, 0)),
@@ -1309,7 +1312,7 @@ namespace Hotline.Api.Controllers.Bi
             //市直部门
             var listOrgStatisticsCityAll = await _orderRepository.Queryable()
               .LeftJoin<SystemOrganize>((it, o) => it.OrgLevelOneCode == o.Id)
-              .Where((it, o) => (o.OrgType == EOrgType.City || o.OrgType == EOrgType.Province) && it.CreationTime >= StartDate && it.CreationTime <= EndDate)
+              .Where((it, o) => (o.OrgType == EOrgType.City || o.OrgType == EOrgType.Province) && it.CreationTime >= StartTime && it.CreationTime <= EndTime)
              .GroupBy((it, o) => new
              {
                  it.OrgLevelOneCode,
@@ -1330,7 +1333,7 @@ namespace Hotline.Api.Controllers.Bi
             //区县部门
             var listOrgStatisticsAreaAll = await _orderRepository.Queryable()
              .LeftJoin<SystemOrganize>((it, o) => it.OrgLevelOneCode == o.Id)
-             .Where((it, o) => o.OrgType == EOrgType.County && it.CreationTime >= StartDate && it.CreationTime <= EndDate)
+             .Where((it, o) => o.OrgType == EOrgType.County && it.CreationTime >= StartTime && it.CreationTime <= EndTime)
             .GroupBy((it, o) => new
             {
                 it.OrgLevelOneCode,
@@ -1359,14 +1362,14 @@ namespace Hotline.Api.Controllers.Bi
         /// <param name="TypeCode">0:全部,1:中心,2:部门</param>
         /// <returns></returns>
         [HttpGet("department_acceptance_type_statistics")]
-        public async Task<List<DepartmentAcceptanceTypeStatisticsDto>> DepartmentAcceptanceTypeStatistics(DateTime StartDate, DateTime EndDate, int TypeCode)
+        public async Task<List<DepartmentAcceptanceTypeStatisticsDto>> DepartmentAcceptanceTypeStatistics(DateTime StartTime, DateTime EndTime, int TypeCode)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             var IsCenter = _sessionContext.OrgIsCenter;
 
             var orderData = await _orderRepository.Queryable()
-              .Where(it => it.CreationTime >= StartDate && it.CreationTime <= EndDate && it.Status > EOrderStatus.WaitForAccept)
+              .Where(it => it.CreationTime >= StartTime && it.CreationTime <= EndTime && it.Status > EOrderStatus.WaitForAccept)
               .Select(it => new
               {
                   OrgCode = IsCenter == true ? it.ActualHandleOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) : it.ActualHandleOrgCode.Substring(0, _sessionContext.RequiredOrgId.Length + 3),
@@ -1437,14 +1440,14 @@ namespace Hotline.Api.Controllers.Bi
         /// <param name="OrgCode"></param>
         /// <returns></returns>
         [HttpGet("department_acceptance_type_child_statistics")]
-        public async Task<object> DepartmentAcceptanceTypeChildStatistics(DateTime StartDate, DateTime EndDate, int TypeCode, string OrgCode)
+        public async Task<object> DepartmentAcceptanceTypeChildStatistics(DateTime StartTime, DateTime EndTime, int TypeCode, string OrgCode)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             // var IsCenter = _sessionContext.OrgIsCenter;
 
             var orderData = await _orderRepository.Queryable()
-              .Where(it => it.CreationTime >= StartDate && it.CreationTime <= EndDate && it.Status > EOrderStatus.WaitForAccept)// && it.Status >= EOrderStatus.Filed
+              .Where(it => it.CreationTime >= StartTime && it.CreationTime <= EndTime && it.Status > EOrderStatus.WaitForAccept)// && it.Status >= EOrderStatus.Filed
               .WhereIF(OrgCode == "001", it => it.ActualHandleOrgCode == OrgCode)
               .WhereIF(OrgCode != "001", it => it.ActualHandleOrgCode.StartsWith(OrgCode))
 
@@ -1547,9 +1550,9 @@ namespace Hotline.Api.Controllers.Bi
         [HttpGet("department_acceptance_type_order_list")]
         public async Task<PagedDto<OrderDto>> DepartmentAcceptanceTypeOrderList([FromQuery] DepartmentKeyWordRequest dto)
         {
-            dto.EndDate = dto.EndDate.AddDays(1).AddSeconds(-1);
+            dto.EndTime = dto.EndTime.AddDays(1).AddSeconds(-1);
             var (total, items) = await _orderRepository.Queryable()
-                .Where(p => p.CreationTime >= dto.StartDate && p.CreationTime <= dto.EndDate && p.Status > EOrderStatus.WaitForAccept)//&& p.Status >= EOrderStatus.Filed
+                .Where(p => p.CreationTime >= dto.StartTime && p.CreationTime <= dto.EndTime && p.Status > EOrderStatus.WaitForAccept)//&& p.Status >= EOrderStatus.Filed
                 .WhereIF(!string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == "001", p => p.ActualHandleOrgCode == dto.OrgCode)
                 .WhereIF(!string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != "001" && _sessionContext.RequiredOrgId != dto.OrgCode, p => p.ActualHandleOrgCode.StartsWith(dto.OrgCode))
                 .WhereIF(!string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != "001" && _sessionContext.RequiredOrgId == dto.OrgCode, p => p.ActualHandleOrgCode == dto.OrgCode)
@@ -1856,10 +1859,10 @@ namespace Hotline.Api.Controllers.Bi
         [HttpGet("high_frequency_call_statistics")]
         public async Task<PagedDto<HighFrequencyCallStatisticsDto>> HighFrequencyCallStatistics([FromQuery] HighFrequencyCallStatisticsRequest dto)
         {
-            if (!dto.StartDate.HasValue || !dto.EndDate.HasValue)
+            if (!dto.StartTime.HasValue || !dto.EndTime.HasValue)
                 throw UserFriendlyException.SameMessage("请选择时间!");
 
-            dto.EndDate = dto.EndDate.Value.AddDays(1).AddSeconds(-1);
+            dto.EndTime = dto.EndTime.Value.AddDays(1).AddSeconds(-1);
             int CallCount = 2;
             var HighFrequencyCallStatistics = _systemSettingCacheManager.GetSetting(SettingConstants.HighFrequencyCallStatistics)?.SettingValue[0];
             if (HighFrequencyCallStatistics != null)
@@ -1867,7 +1870,7 @@ namespace Hotline.Api.Controllers.Bi
 
             var (total, items) = await _trCallRecordRepository.Queryable()
                      .LeftJoin<Order>((p, o) => p.ExternalId == o.Id)
-                   .Where((p, o) => p.OverTime >= dto.StartDate && p.OverTime <= dto.EndDate)
+                   .Where((p, o) => p.OverTime >= dto.StartTime && p.OverTime <= dto.EndTime)
                    .Where((p, o) => p.CallOrderType == ECallOrderType.Order)
                    .Where((p, o) => p.ExternalId != null && o.Id != null)
                    .Where((p, o) => p.CallDirection == ECallDirection.In)
@@ -1900,15 +1903,15 @@ namespace Hotline.Api.Controllers.Bi
         [HttpGet("high_frequency_call_statistics_order_list")]
         public async Task<PagedDto<OrderDto>> HighFrequencyCallStatisticsOrderList([FromQuery] HighFrequencyCallStatisticsListRequest dto)
         {
-            if (!dto.StartDate.HasValue || !dto.EndDate.HasValue)
+            if (!dto.StartTime.HasValue || !dto.EndTime.HasValue)
                 throw UserFriendlyException.SameMessage("请选择时间!");
             if (string.IsNullOrEmpty(dto.FromPhone))
                 throw UserFriendlyException.SameMessage("号码不能为空!");
 
-            dto.EndDate = dto.EndDate.Value.AddDays(1).AddSeconds(-1);
+            dto.EndTime = dto.EndTime.Value.AddDays(1).AddSeconds(-1);
             var data = await _trCallRecordRepository.Queryable()
                     .LeftJoin<Order>((p, o) => p.ExternalId == o.Id)
-                   .Where((p, o) => p.OverTime >= dto.StartDate && p.OverTime <= dto.EndDate)
+                   .Where((p, o) => p.OverTime >= dto.StartTime && p.OverTime <= dto.EndTime)
                    .Where((p, o) => p.CallOrderType == ECallOrderType.Order)
                    .Where((p, o) => p.ExternalId != null && o.Id != null)
                     .Where((p, o) => p.CPN == dto.FromPhone)
@@ -1970,7 +1973,7 @@ namespace Hotline.Api.Controllers.Bi
         public async Task<PagedDto<HighMatterWarningDto>> HighMatterWarning([FromQuery] HighMatterWarningRequest dto)
         {
 
-            dto.EndDate = dto.EndDate.AddDays(1).AddSeconds(-1);
+            dto.EndTime = dto.EndTime.AddDays(1).AddSeconds(-1);
 
             List<string> filterTitle = new List<string>();
             filterTitle.Add("无声");
@@ -1979,7 +1982,7 @@ namespace Hotline.Api.Controllers.Bi
             filterTitle.Add("测试");
 
             var (total, items) = await _orderRepository.Queryable()
-                .Where(x => x.CreationTime >= dto.StartDate && x.CreationTime <= dto.EndDate)
+                .Where(x => x.CreationTime >= dto.StartTime && x.CreationTime <= dto.EndTime)
                 .Where(x => filterTitle.Any(s => x.Title.Contains(s)) == false)
                 .LeftJoin<SystemArea>((it, o) => it.AreaCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) == o.Id)
                 .WhereIF(dto.AreaCodes.Any(), (it, o) => dto.AreaCodes.Contains(it.AreaCode)) //区域
@@ -2034,7 +2037,7 @@ namespace Hotline.Api.Controllers.Bi
         [HttpGet("highmatter-warning-detail")]
         public async Task<PagedDto<OrderDto>> HighMatterWarningDetail([FromQuery] HighMatterWarningDetailRequest dto)
         {
-            dto.EndDate = dto.EndDate.AddDays(1).AddSeconds(-1);
+            dto.EndTime = dto.EndTime.AddDays(1).AddSeconds(-1);
             List<string> filterTitle = new List<string>();
             filterTitle.Add("无声");
             filterTitle.Add("骚扰");
@@ -2045,8 +2048,8 @@ namespace Hotline.Api.Controllers.Bi
             .Includes(x => x.OrderScreens)
             .Where(d => d.AcceptTypeCode == dto.AcceptTypeCode) //受理类型
             .Where(d => d.HotspotId == dto.HotspotId) //热点类型
-            .Where(d => d.CreationTime >= dto.StartDate) //受理时间开始
-            .Where(d => d.CreationTime <= dto.EndDate) //受理时间结束
+            .Where(d => d.CreationTime >= dto.StartTime) //受理时间开始
+            .Where(d => d.CreationTime <= dto.EndTime) //受理时间结束
             .Where(d => d.AreaCode == dto.AreaCode) //区域
             .Where(x => filterTitle.Any(s => x.Title.Contains(s)) == false)
             .OrderByDescending(d => d.CreationTime)

+ 44 - 48
src/Hotline.Api/Controllers/Bigscreen/DataScreenController.cs

@@ -44,14 +44,14 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("order-statistics")]
-        public async Task<OrderStatisticsDto> OrderStatistics(DateTime StartDate,DateTime EndDate)
+        public async Task<OrderStatisticsDto> OrderStatistics(DateTime StartTime,DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
             var dto = new OrderStatisticsDto();
 
             #region 办结工单
-            dto.CompletionCount =await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status>= EOrderStatus.Filed).CountAsync();
-            int CompletionSum = await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status >= EOrderStatus.Handling).CountAsync();
+            dto.CompletionCount =await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status>= EOrderStatus.Filed).CountAsync();
+            int CompletionSum = await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status >= EOrderStatus.Handling).CountAsync();
             if (CompletionSum==0)
             {
                 dto.CompletionRate = 0;
@@ -63,8 +63,8 @@ namespace Hotline.Api.Controllers.Bigscreen
             #endregion
 
             #region 待受理工单
-            dto.HaveToAcceptCount =await _orderRepository.Queryable(false, false, false).Where(x => x.CreationTime > StartDate && x.CreationTime <= EndDate && x.Status == EOrderStatus.WaitForAccept).CountAsync();
-            int HaveToAcceptSum = await _orderRepository.Queryable(false, false, false).Where(x => x.CreationTime >= StartDate && x.CreationTime <= EndDate).CountAsync();
+            dto.HaveToAcceptCount =await _orderRepository.Queryable(false, false, false).Where(x => x.CreationTime > StartTime && x.CreationTime <= EndTime && x.Status == EOrderStatus.WaitForAccept).CountAsync();
+            int HaveToAcceptSum = await _orderRepository.Queryable(false, false, false).Where(x => x.CreationTime >= StartTime && x.CreationTime <= EndTime).CountAsync();
             if (HaveToAcceptSum == 0)
             {
                 dto.HaveToAcceptRate = 0;
@@ -76,7 +76,7 @@ namespace Hotline.Api.Controllers.Bigscreen
             #endregion
 
             #region 超期工单
-            dto.OverTimeCount = await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.ExpiredStatus == EExpiredStatus.Expired).CountAsync();
+            dto.OverTimeCount = await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.ExpiredStatus == EExpiredStatus.Expired).CountAsync();
             if (CompletionSum==0)
             {
                 dto.OverTimeRate = 0;
@@ -88,7 +88,7 @@ namespace Hotline.Api.Controllers.Bigscreen
             #endregion
 
             #region 延期工单
-            dto.DelayCount = await _orderDelayRepository.Queryable().Where(x => x.ApplyDelayTime >= StartDate && x.ApplyDelayTime <= EndDate && x.DelayState == EDelayState.Pass).CountAsync();
+            dto.DelayCount = await _orderDelayRepository.Queryable().Where(x => x.ApplyDelayTime >= StartTime && x.ApplyDelayTime <= EndTime && x.DelayState == EDelayState.Pass).CountAsync();
             if (CompletionSum==0)
             {
                 dto.DelayRate = 0;
@@ -101,8 +101,8 @@ namespace Hotline.Api.Controllers.Bigscreen
             #endregion
 
             #region 满意工单
-            dto.SatisfiedCount =await _orderVisitRepository.Queryable().Where(x => x.VisitTime >= StartDate && x.VisitTime <= EndDate && x.VisitState == EVisitState.Visited && SqlFunc.JsonField(x.NowEvaluate, "Key") != "1" && SqlFunc.JsonField(x.NowEvaluate,"Key")!="2" ).CountAsync();
-            int SatisfiedSum = await _orderVisitRepository.Queryable().Where(x => x.VisitTime >= StartDate && x.VisitTime <= EndDate && x.VisitState == EVisitState.Visited).CountAsync();
+            dto.SatisfiedCount =await _orderVisitRepository.Queryable().Where(x => x.VisitTime >= StartTime && x.VisitTime <= EndTime && x.VisitState == EVisitState.Visited && SqlFunc.JsonField(x.NowEvaluate, "Key") != "1" && SqlFunc.JsonField(x.NowEvaluate,"Key")!="2" ).CountAsync();
+            int SatisfiedSum = await _orderVisitRepository.Queryable().Where(x => x.VisitTime >= StartTime && x.VisitTime <= EndTime && x.VisitState == EVisitState.Visited).CountAsync();
             if (SatisfiedSum==0)
             {
                 dto.SatisfiedRate = 0;
@@ -115,8 +115,8 @@ namespace Hotline.Api.Controllers.Bigscreen
 
             #region 省工单量
 
-            dto.ProvinceOrderCount =await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.IsProvince).CountAsync();
-            dto.ProvinceOrderCompletionCount = await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.IsProvince && x.Status >= EOrderStatus.Filed).CountAsync();
+            dto.ProvinceOrderCount =await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.IsProvince).CountAsync();
+            dto.ProvinceOrderCompletionCount = await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.IsProvince && x.Status >= EOrderStatus.Filed).CountAsync();
             #endregion
 
             return dto;
@@ -147,10 +147,10 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("ordertype-statistics")]
-        public async Task<List<OrderTypeHandleStatisticsDto>> OrderTypeHandleStatistics(DateTime StartDate,DateTime EndDate)
+        public async Task<List<OrderTypeHandleStatisticsDto>> OrderTypeHandleStatistics(DateTime StartTime,DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
-            var list =await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status > EOrderStatus.Handling && !string.IsNullOrEmpty(x.AcceptType))
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
+            var list =await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status > EOrderStatus.Handling && !string.IsNullOrEmpty(x.AcceptType))
                 .GroupBy(x=>x.AcceptType)
                 .Select(x => new OrderTypeHandleStatisticsDto
                 { 
@@ -191,16 +191,15 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("earlywarning-statistics")]
-        public async Task<List<EarlyWarningHotsPotsStatisticsDto>> EarlyWarningHotsPotsStatistics(DateTime StartDate, DateTime EndDate,string AreaCode)
+        public async Task<List<EarlyWarningHotsPotsStatisticsDto>> EarlyWarningHotsPotsStatistics(DateTime StartTime, DateTime EndTime,string AreaCode)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
             if (AreaCode.Length==6 && AreaCode.IndexOf("00") == 4)
             {
                 AreaCode = AreaCode.Remove(4);
             }
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
              var list = await _orderRepository.Queryable(false, false, false)
-                .Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.AreaCode.StartsWith(AreaCode) && !x.HotspotId.StartsWith("18"))
+                .Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.AreaCode.StartsWith(AreaCode) && !x.HotspotId.StartsWith("18"))
                 .GroupBy(x => new { x.HotspotId, x.HotspotName,x.HotspotSpliceName })
                 .Select(x => new EarlyWarningHotsPotsStatisticsDto()
                 {
@@ -283,11 +282,11 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("orderarea-accept-statistics")]
-        public async Task<List<OrderAreaAcceptStatisticsDto>> OrderAreaAcceptStatistics(DateTime StartDate,DateTime EndDate)
+        public async Task<List<OrderAreaAcceptStatisticsDto>> OrderAreaAcceptStatistics(DateTime StartTime,DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
-            var list = await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime>= StartDate && x.StartTime<= EndDate && x.Status > EOrderStatus.WaitForAccept)
+            var list = await _orderRepository.Queryable(false, false, false).Where(x => x.StartTime>= StartTime && x.StartTime<= EndTime && x.Status > EOrderStatus.WaitForAccept)
                 .LeftJoin<SystemArea>((it,o)=> it.AreaCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) == o.Id)
                 .GroupBy((it,o) => new {
                     AreaCode = it.AreaCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")),
@@ -307,15 +306,15 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <summary>
         /// 区域明细数据
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <param name="AreaCode"></param>
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("orderareaaccept-query")]
-        public async Task<List<OrderAreaAcceptQueryDto>> OrderAreaAcceptQuery(DateTime StartDate,DateTime EndDate)
+        public async Task<List<OrderAreaAcceptQueryDto>> OrderAreaAcceptQuery(DateTime StartTime,DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
 
             var areaList =await _systemAreaRepository.Queryable()
@@ -343,13 +342,13 @@ namespace Hotline.Api.Controllers.Bigscreen
                 var dto = new OrderAreaAcceptQueryDto();
                 dto.AreaCode = item.Id;
                 dto.AreaName = item.Name;
-                dto.HandlingCount = await _orderRepository.Queryable(false, false, false).Where(x => x.AreaCode == item.Id && x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status > EOrderStatus.WaitForAccept && x.Status < EOrderStatus.Filed).CountAsync();
+                dto.HandlingCount = await _orderRepository.Queryable(false, false, false).Where(x => x.AreaCode == item.Id && x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status > EOrderStatus.WaitForAccept && x.Status < EOrderStatus.Filed).CountAsync();
 
-                dto.FiledCount = await _orderRepository.Queryable(false, false, false).Where(x => x.AreaCode == item.Id && x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status >= EOrderStatus.Filed).CountAsync();
+                dto.FiledCount = await _orderRepository.Queryable(false, false, false).Where(x => x.AreaCode == item.Id && x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status >= EOrderStatus.Filed).CountAsync();
 
-                dto.OverTimeCount = await _orderRepository.Queryable(false, false, false).Where(x => x.AreaCode == item.Id && x.StartTime >= StartDate && x.StartTime <= EndDate && x.ExpiredStatus == EExpiredStatus.Expired).CountAsync();
+                dto.OverTimeCount = await _orderRepository.Queryable(false, false, false).Where(x => x.AreaCode == item.Id && x.StartTime >= StartTime && x.StartTime <= EndTime && x.ExpiredStatus == EExpiredStatus.Expired).CountAsync();
 
-                var hotsPot = await _orderRepository.Queryable(false, false, false).Where(x => x.AreaCode == item.Id && x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status > EOrderStatus.WaitForAccept).GroupBy(x => new { x.HotspotId, x.HotspotName })
+                var hotsPot = await _orderRepository.Queryable(false, false, false).Where(x => x.AreaCode == item.Id && x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status > EOrderStatus.WaitForAccept).GroupBy(x => new { x.HotspotId, x.HotspotName })
                     .Select(x => new
                     {
                         HotsPotName = x.HotspotName,
@@ -361,12 +360,12 @@ namespace Hotline.Api.Controllers.Bigscreen
                 #region 满意度
                 var SatisfiedCount = await _orderRepository.Queryable(false, false, false)
                     .LeftJoin<OrderVisit>((it, o) => it.Id == o.OrderId && o.VisitState == EVisitState.Visited)
-                    .Where((it, o) => it.AreaCode == item.Id && o.VisitTime >= StartDate && o.VisitTime <= EndDate 
+                    .Where((it, o) => it.AreaCode == item.Id && o.VisitTime >= StartTime && o.VisitTime <= EndTime
                     && SqlFunc.JsonField(o.NowEvaluate, "Key") != "1" && SqlFunc.JsonField(o.NowEvaluate, "Key") != "2")
                     .CountAsync();
                 var VisitCount = await _orderRepository.Queryable(false, false, false)
                     .LeftJoin<OrderVisit>((it, o) => it.Id == o.OrderId && o.VisitState == EVisitState.Visited)
-                    .Where((it, o) => it.AreaCode == item.Id && o.VisitTime >= StartDate && o.VisitTime <= EndDate)
+                    .Where((it, o) => it.AreaCode == item.Id && o.VisitTime >= StartTime && o.VisitTime <= EndTime)
                     .CountAsync();
 
                 if (SatisfiedCount!=0 && VisitCount!=0)
@@ -407,7 +406,7 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("highmatter-warning")]
-        public async Task<List<HighMatterWarningDto>> HighMatterWarning(DateTime StartDate,DateTime EndDate)
+        public async Task<List<HighMatterWarningDto>> HighMatterWarning(DateTime StartTime,DateTime EndTime)
         {
             //var endDate = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
             //var startDate = endDate.AddDays(-30).Date;
@@ -421,7 +420,7 @@ namespace Hotline.Api.Controllers.Bigscreen
 
 
             var list = await _orderRepository.Queryable(false, false, false)
-                .Where(x => x.CreationTime >= StartDate && x.CreationTime <= EndDate)
+                .Where(x => x.CreationTime >= StartTime && x.CreationTime <= EndTime)
                 .Where(x=> filterTitle.Any(s=> x.Title.Contains(s)) == false)
                 .LeftJoin<SystemArea>((it, o) => it.AreaCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) == o.Id)
                 .GroupBy((it, o) => new
@@ -458,16 +457,16 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <summary>
         /// 部门满意度排行榜
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("ordervisit-orgsatisfaction-rank")]
-        public async Task<List<OrderVisitOrgSatisfactionRankDto>> OrderVisitOrgSatisfactionRank(DateTime StartDate,DateTime EndDate)
+        public async Task<List<OrderVisitOrgSatisfactionRankDto>> OrderVisitOrgSatisfactionRank(DateTime StartTime,DateTime EndTime)
         {
            var list = await _orderVisitDetailRepository.Queryable()
                 .Includes(x => x.OrderVisit)
-                .Where(x => x.OrderVisit.VisitTime >= StartDate && x.OrderVisit.VisitTime <= EndDate && x.VisitTarget == EVisitTarget.Org && x.VisitOrgCode.Length >= 6 && x.OrderVisit.VisitState == EVisitState.Visited)
+                .Where(x => x.OrderVisit.VisitTime >= StartTime && x.OrderVisit.VisitTime <= EndTime && x.VisitTarget == EVisitTarget.Org && x.VisitOrgCode.Length >= 6 && x.OrderVisit.VisitState == EVisitState.Visited)
                 .GroupBy(x => new
                 {
                     VisitOrgCode = x.VisitOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")),
@@ -486,25 +485,22 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <summary>
         /// 占比分析
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <param name="IsSource"></param>
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("order-source-accepttype-statistics")]
-        public async Task<List<OrderSourceAndAcceptTtoeStatisticsDto>> OrderSourceAndAcceptTtoeStatistics(DateTime StartDate,DateTime EndDate,bool IsSource)
+        public async Task<List<OrderSourceAndAcceptTtoeStatisticsDto>> OrderSourceAndAcceptTtoeStatistics(DateTime StartTime, DateTime EndTime, bool IsSource)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
-
-
-
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             int SumCount = await _orderRepository.Queryable(false, false, false)
-               .Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status > EOrderStatus.WaitForAccept).CountAsync();
+               .Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status > EOrderStatus.WaitForAccept).CountAsync();
             if (IsSource)
             {
                 var list = await _orderRepository.Queryable(false, false, false)
-                .Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status > EOrderStatus.WaitForAccept)
+                .Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status > EOrderStatus.WaitForAccept)
                 .GroupBy(x => new { x.SourceChannelCode, x.SourceChannel })
                 .Select(x => new OrderSourceAndAcceptTtoeStatisticsDto()
                 {
@@ -517,7 +513,7 @@ namespace Hotline.Api.Controllers.Bigscreen
             else
             {
                 var list = await _orderRepository.Queryable(false, false, false)
-                .Where(x => x.StartTime >= StartDate && x.StartTime <= EndDate && x.Status > EOrderStatus.WaitForAccept)
+                .Where(x => x.StartTime >= StartTime && x.StartTime <= EndTime && x.Status > EOrderStatus.WaitForAccept)
                 .GroupBy( x => new { x.AcceptTypeCode, x.AcceptType })
                 .Select(x => new OrderSourceAndAcceptTtoeStatisticsDto()
                 {

+ 31 - 31
src/Hotline.Api/Controllers/Bigscreen/EnforcementScreenController.cs

@@ -41,15 +41,15 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("order-module-statistics")]
-        public async Task<OrderModuleDto> GetOrderModuleStatisticsAsync(DateTime StartDate, DateTime EndDate)
+        public async Task<OrderModuleDto> GetOrderModuleStatisticsAsync(DateTime StartTime, DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
             var dto = new OrderModuleDto();
 
             var data = await _enforcementOrdersRepository.Queryable()
                 .LeftJoin<Order>((x, o) => x.Id == o.Id)
                 .Where((x, o) => o.Id != null)
-                .Where((x, o) => o.StartTime >= StartDate && o.StartTime <= EndDate)
+                .Where((x, o) => o.StartTime >= StartTime && o.StartTime <= EndTime)
                 .Select((x, o) => new
                 {
                     x.Id,
@@ -79,7 +79,7 @@ namespace Hotline.Api.Controllers.Bigscreen
             dto.SatisfiedCount = await _enforcementOrdersRepository.Queryable()
                 .LeftJoin<OrderVisit>((x, o) => x.Id == o.OrderId)
                 .LeftJoin<OrderVisitDetail>((x, o, p) => o.Id == p.VisitId)
-               .Where((x, o, p) => o.VisitTime >= StartDate && o.VisitTime <= EndDate && p.VisitTarget == EVisitTarget.Org)
+               .Where((x, o, p) => o.VisitTime >= StartTime && o.VisitTime <= EndTime && p.VisitTarget == EVisitTarget.Org)
                .Where((x, o, p) => o.VisitState == EVisitState.Visited && !string.IsNullOrEmpty(p.VisitOrgCode))
                .Where((x, o, p) => SqlFunc.JsonField(o.NowEvaluate, "Key") != "1" && SqlFunc.JsonField(o.NowEvaluate, "Key") != "2")
                .CountAsync();
@@ -90,19 +90,19 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <summary>
         /// 左中受理类型
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("order-accept-type-statistics")]
-        public async Task<List<OrderAcceptTypeStatisticsDto>> GetOrderAcceptTypeStatisticsAsync(DateTime StartDate, DateTime EndDate)
+        public async Task<List<OrderAcceptTypeStatisticsDto>> GetOrderAcceptTypeStatisticsAsync(DateTime StartTime, DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             var list = await _enforcementOrdersRepository.Queryable()
                 .LeftJoin<Order>((x, o) => x.Id == o.Id)
                 .Where((x, o) => o.Id != null && o.Status > EOrderStatus.Handling && !string.IsNullOrEmpty(o.AcceptType))
-                .Where((x, o) => o.StartTime >= StartDate && o.StartTime <= EndDate)
+                .Where((x, o) => o.StartTime >= StartTime && o.StartTime <= EndTime)
                 .Select((x, o) => new
                 {
                     x.Id,
@@ -127,15 +127,15 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <summary>
         /// 左下高频事项统计
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <param name="AreaCode"></param>
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("order-event-type-statistics")]
-        public async Task<List<OrderEventTypeStatisticsDto>> GetOrderEventTypeStatisticsAsync(DateTime StartDate, DateTime EndDate, string AreaCode)
+        public async Task<List<OrderEventTypeStatisticsDto>> GetOrderEventTypeStatisticsAsync(DateTime StartTime, DateTime EndTime, string AreaCode)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
             if (AreaCode.Length == 6 && AreaCode.IndexOf("00") == 4)
                 AreaCode = AreaCode.Remove(4);
 
@@ -143,7 +143,7 @@ namespace Hotline.Api.Controllers.Bigscreen
                .LeftJoin<Order>((x, o) => x.Id == o.Id)
                .LeftJoin<JudicialComplaintsEventType>((x, o, j) => x.EventTypeOneLevelId == j.Id)
                .Where((x, o, j) => o.Id != null && x.EventTypeOneLevelId != null && j.Id != null)
-               .Where((x, o, j) => o.StartTime >= StartDate && o.StartTime <= EndDate && o.AreaCode.StartsWith(AreaCode))
+               .Where((x, o, j) => o.StartTime >= StartTime && o.StartTime <= EndTime && o.AreaCode.StartsWith(AreaCode))
                .Select((x, o, j) => new
                {
                    x.Id,
@@ -168,14 +168,14 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <summary>
         /// 中上区域地图数据
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("order-area-query")]
-        public async Task<List<OrderAreaQueryDto>> GetOrderAreaQueryAsync(DateTime StartDate, DateTime EndDate)
+        public async Task<List<OrderAreaQueryDto>> GetOrderAreaQueryAsync(DateTime StartTime, DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             var areaList = await _systemAreaRepository.Queryable()
                 .Where(x => !x.Id.EndsWith("00"))
@@ -211,7 +211,7 @@ namespace Hotline.Api.Controllers.Bigscreen
                 var data = await _enforcementOrdersRepository.Queryable()
                 .LeftJoin<Order>((x, o) => x.Id == o.Id)
                 .Where((x, o) => o.Id != null)
-                .Where((x, o) => o.StartTime >= StartDate && o.StartTime <= EndDate && o.AreaCode.StartsWith(item.Id))
+                .Where((x, o) => o.StartTime >= StartTime && o.StartTime <= EndTime && o.AreaCode.StartsWith(item.Id))
                 .Select((x, o) => new
                 {
                     x.Id,
@@ -289,19 +289,19 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <summary>
         /// 右上部门满意度排行榜
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("order-visitorg-statistics")]
-        public async Task<List<OrderVisitOrgStatisticsDto>> GetOrderVisitOrgStatisticsAsync(DateTime StartDate, DateTime EndDate)
+        public async Task<List<OrderVisitOrgStatisticsDto>> GetOrderVisitOrgStatisticsAsync(DateTime StartTime, DateTime EndTime)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             var list = await _enforcementOrdersRepository.Queryable()
                  .LeftJoin<OrderVisit>((x, o) => x.Id == o.OrderId)
                  .LeftJoin<OrderVisitDetail>((x, o, p) => o.Id == p.VisitId)
-                .Where((x, o, p) => o.VisitTime >= StartDate && o.VisitTime <= EndDate && p.VisitTarget == EVisitTarget.Org &&
+                .Where((x, o, p) => o.VisitTime >= StartTime && o.VisitTime <= EndTime && p.VisitTarget == EVisitTarget.Org &&
                 o.VisitState == EVisitState.Visited && !string.IsNullOrEmpty(p.VisitOrgCode) && p.VisitOrgCode.Length >= 6)
                 .Select((x, o, p) => new
                 {
@@ -380,20 +380,20 @@ namespace Hotline.Api.Controllers.Bigscreen
         /// <summary>
         /// 右下占比分析
         /// </summary>
-        /// <param name="StartDate"></param>
-        /// <param name="EndDate"></param>
+        /// <param name="StartTime"></param>
+        /// <param name="EndTime"></param>
         /// <param name="IsSource"></param>
         /// <returns></returns>
         [AllowAnonymous]
         [HttpGet("order-proportion-statistics")]
-        public async Task<List<OrderProportionStatisticsDto>> GetOrderProportionStatisticsAsync(DateTime StartDate, DateTime EndDate, bool IsSource)
+        public async Task<List<OrderProportionStatisticsDto>> GetOrderProportionStatisticsAsync(DateTime StartTime, DateTime EndTime, bool IsSource)
         {
-            EndDate = EndDate.AddDays(1).AddSeconds(-1);
+            EndTime = EndTime.AddDays(1).AddSeconds(-1);
 
             var SumCount = await _enforcementOrdersRepository.Queryable()
                .LeftJoin<Order>((x, o) => x.Id == o.Id)
                 .Where((x, o) => o.Id != null)
-               .Where((x, o) => o.StartTime >= StartDate && o.StartTime <= EndDate && o.Status > EOrderStatus.WaitForAccept)
+               .Where((x, o) => o.StartTime >= StartTime && o.StartTime <= EndTime && o.Status > EOrderStatus.WaitForAccept)
                .CountAsync();
 
             if (IsSource)
@@ -401,7 +401,7 @@ namespace Hotline.Api.Controllers.Bigscreen
                 var list = await _enforcementOrdersRepository.Queryable()
                 .LeftJoin<Order>((x, o) => x.Id == o.Id)
                 .Where((x, o) => o.Id != null)
-                .Where((x, o) => o.StartTime >= StartDate && o.StartTime <= EndDate && o.Status > EOrderStatus.WaitForAccept)
+                .Where((x, o) => o.StartTime >= StartTime && o.StartTime <= EndTime && o.Status > EOrderStatus.WaitForAccept)
                 .GroupBy((x, o) => new { o.SourceChannelCode, o.SourceChannel })
                 .Select((x, o) => new OrderProportionStatisticsDto()
                 {
@@ -417,7 +417,7 @@ namespace Hotline.Api.Controllers.Bigscreen
                 var list = await _enforcementOrdersRepository.Queryable()
                 .LeftJoin<Order>((x, o) => x.Id == o.Id)
                 .Where((x, o) => o.Id != null)
-                .Where((x, o) => o.StartTime >= StartDate && o.StartTime <= EndDate && o.Status > EOrderStatus.WaitForAccept)
+                .Where((x, o) => o.StartTime >= StartTime && o.StartTime <= EndTime && o.Status > EOrderStatus.WaitForAccept)
                 .GroupBy((x, o) => new { o.AcceptTypeCode, o.AcceptType })
                 .Select((x, o) => new OrderProportionStatisticsDto()
                 {

+ 75 - 72
src/Hotline.Api/Controllers/OrderController.cs

@@ -487,10 +487,11 @@ public class OrderController : BaseController
             ActualOpinion = order.ActualOpinion,
             NetizenEvaluateType = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.NetizenEvaluateType).Select(x => new Kv { Key = x.DicDataValue, Value = x.DicDataName }).ToList()
         };
-        var (idName, idNames) =
-            await _workflowDomainService.GetUnvisitOrgsAsync(order.WorkflowId, HttpContext.RequestAborted);
+        var (idName, idNames) = await _workflowDomainService.GetHandleOrgsAsync(order.WorkflowId, HttpContext.RequestAborted);
         res.ActualHandleOrgName = idName;
-        res.idNames = idNames.ToList();
+        res.idNames = order.CounterSignType == null
+            ? null
+            : idNames.Where(d => d.Key != idName.Key).ToList();
         return res;
     }
 
@@ -1349,7 +1350,7 @@ public class OrderController : BaseController
             startDto.DefinitionModuleCode = WorkflowModuleConsts.OrderDelay;
             startDto.Opinion = model.DelayReason;
             startDto.Title = "申请延期流程";
-			string workFlowId = await _workflowApplication.StartWorkflowAsync(startDto, _sessionContext, model.Id,
+            string workFlowId = await _workflowApplication.StartWorkflowAsync(startDto, _sessionContext, model.Id,
                     cancellationToken: HttpContext.RequestAborted);
             //model.WorkflowId = workFlowId;
             //await _orderDelayRepository.UpdateAsync(model, HttpContext.RequestAborted);
@@ -1719,8 +1720,8 @@ public class OrderController : BaseController
             startDto.DefinitionModuleCode = WorkflowModuleConsts.OrderScreen;
             startDto.Opinion = dto.Data.Content;
             startDto.Title = "申请甄别流程";
-		   workflowId = await _workflowApplication.StartWorkflowAsync(startDto, _sessionContext, model.Id,
-                    cancellationToken: HttpContext.RequestAborted);
+            workflowId = await _workflowApplication.StartWorkflowAsync(startDto, _sessionContext, model.Id,
+                     cancellationToken: HttpContext.RequestAborted);
             //var screen = await _orderScreenRepository.GetAsync(model.Id, HttpContext.RequestAborted);
             //if (screen != null)
             //{
@@ -2423,18 +2424,19 @@ public class OrderController : BaseController
                 _sessionContext.RequiredOrgId, _sessionContext.OrgName,
                 _sessionContext.OrgAreaCode, _sessionContext.OrgAreaName));
         }
-		var setting = _systemSettingCacheManager.GetSetting(SettingConstants.SeatsMonitor);
-		var settingStr = setting?.SettingValue;
-		var roles = _sessionContext.Roles;
-		foreach (var item in settingStr)
-		{
-			if (roles != null && roles.Contains(item)) dto.CanHandle = true;
-		}
+        //班长代办
+        //var setting = _systemSettingCacheManager.GetSetting(SettingConstants.SeatsMonitor);
+        //var settingStr = setting?.SettingValue;
+        //var roles = _sessionContext.Roles;
+        //foreach (var item in settingStr)
+        //{
+        //	if (roles != null && roles.Contains(item)) dto.CanHandle = true;
+        //}
 
-		//var dto = _mapper.Map<OrderDto>(order!);
-		//dto.CountersignId = countersignId;
-		//dto.CanHandle = order.CanHandle(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgId);
-		dto.IsCanDelay = !order.OrderDelays.Any(x => x.DelayState == EDelayState.Examining);
+        //var dto = _mapper.Map<OrderDto>(order!);
+        //dto.CountersignId = countersignId;
+        //dto.CanHandle = order.CanHandle(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgId);
+        dto.IsCanDelay = !order.OrderDelays.Any(x => x.DelayState == EDelayState.Examining);
         if (order.OrderDelays.Any(x => x.DelayState == EDelayState.Examining && x.ApplyOrgCode == _sessionContext.RequiredOrgId))
         {
             dto.CanHandle = false;
@@ -3184,7 +3186,7 @@ public class OrderController : BaseController
                 ((step.FlowAssignType == EFlowAssignType.User && !string.IsNullOrEmpty(step.HandlerId) && step.HandlerId == _sessionContext.RequiredUserId) ||
                  (step.FlowAssignType == EFlowAssignType.Org && !string.IsNullOrEmpty(step.HandlerOrgId) && step.HandlerOrgId == _sessionContext.RequiredOrgId) ||
                  (step.FlowAssignType == EFlowAssignType.Role && !string.IsNullOrEmpty(step.RoleId) && _sessionContext.Roles.Contains(step.RoleId))) &&
-                 (((dto.IsHandled.HasValue && dto.IsHandled == false) && step.Status != EWorkflowStepStatus.Handled)||
+                 (((dto.IsHandled.HasValue && dto.IsHandled == false) && step.Status != EWorkflowStepStatus.Handled) ||
                 ((dto.IsHandled.HasValue && dto.IsHandled == true) && step.Status == EWorkflowStepStatus.Handled)))))
             .WhereIF(dto.IsProvince.HasValue, d => d.IsProvince == dto.IsProvince)
             .WhereIF(dto.IsHandled.HasValue, d => handleStatuses.Contains(d.Status))
@@ -3232,7 +3234,7 @@ public class OrderController : BaseController
             //  )))
             //.Where(d => d.Workflow.Steps.Any(s => s.Status < EWorkflowStepStatus.Handled && s.HandlerOrgId == OrgSeedData.CenterId))
             .LeftJoin<WorkflowStep>((d, step) => d.Id == step.ExternalId)
-            .Where((d, step) => (step.Id == null || (step.HandlerOrgId == OrgSeedData.CenterId && step.Status < EWorkflowStepStatus.Handled )))
+            .Where((d, step) => (step.Id == null || (step.HandlerOrgId == OrgSeedData.CenterId && step.Status < EWorkflowStepStatus.Handled)))
             .Where(d => d.Source < ESource.MLSQ || d.Source > ESource.WZSC)
             .Where(d => d.Status != EOrderStatus.BackToProvince && d.Status < EOrderStatus.Filed)
             .WhereIF(!string.IsNullOrEmpty(dto.No), d => d.No!.Contains(dto.No!))
@@ -3311,35 +3313,35 @@ public class OrderController : BaseController
                     : d is EOrderStatus.WaitForAccept or EOrderStatus.BackToUnAccept or EOrderStatus.SpecialToUnAccept)
             .ToArray();
 
-		var (total2, items2) = await _orderRepository.Queryable()
-		.LeftJoin<WorkflowStep>((d, step) => d.Id == step.ExternalId)
-		.Where((d, step) =>
-			((string.IsNullOrEmpty(d.WorkflowId) && (string.IsNullOrEmpty(d.SignerId) || d.SignerId == _sessionContext.RequiredUserId)) ||
-			(!string.IsNullOrEmpty(d.WorkflowId) &&
-			((step.FlowAssignType == EFlowAssignType.User && !string.IsNullOrEmpty(step.HandlerId) && step.HandlerId == _sessionContext.RequiredUserId) ||
-			 (step.FlowAssignType == EFlowAssignType.Org && !string.IsNullOrEmpty(step.HandlerOrgId) && step.HandlerOrgId == _sessionContext.RequiredOrgId) ||
-			 (step.FlowAssignType == EFlowAssignType.Role && !string.IsNullOrEmpty(step.RoleId) && _sessionContext.Roles.Contains(step.RoleId))) &&
-			 (((dto.IsHandled.HasValue && dto.IsHandled == false) && step.Status != EWorkflowStepStatus.Handled) ||
-			((dto.IsHandled.HasValue && dto.IsHandled == true) && step.Status == EWorkflowStepStatus.Handled)))))
-		.WhereIF(dto.IsProvince.HasValue, d => d.IsProvince == dto.IsProvince)
-		.WhereIF(dto.IsHandled.HasValue, d => handleStatuses.Contains(d.Status))
-		.WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Title.StartsWith(dto.Keyword!))
-		.WhereIF(!string.IsNullOrEmpty(dto.No), d => d.No == dto.No)
-		.WhereIF(dto.IsCounterSign.HasValue && dto.IsCounterSign == true, d => d.CounterSignType.HasValue)
-		.WhereIF(dto.IsCounterSign.HasValue && dto.IsCounterSign == false, d => !d.CounterSignType.HasValue)
-		.WhereIF(dto.ExpiredOrAlmostOverdue.HasValue && dto.ExpiredOrAlmostOverdue == true, d => (d.ExpiredTime < DateTime.Now && d.Status < EOrderStatus.Filed) || (d.ExpiredTime < d.ActualHandleTime && d.Status >= EOrderStatus.Filed)) //超期 未办
-		.WhereIF(dto.ExpiredOrAlmostOverdue.HasValue && dto.ExpiredOrAlmostOverdue == false, d => d.NearlyExpiredTime < DateTime.Now && d.ExpiredTime > DateTime.Now)//即将超期 未办
-		.WhereIF(dto.StartTime.HasValue, d => d.CreationTime >= dto.StartTime)
-		.WhereIF(dto.EndTime.HasValue, d => d.CreationTime <= dto.EndTime)
-		.Where(d => d.Source < ESource.MLSQ || d.Source > ESource.WZSC)
-		.Where(d => d.Status != EOrderStatus.BackToProvince && d.Status < EOrderStatus.Filed)
-		.OrderBy(d => d.Status)
-		.OrderByIF(dto.IsHandled == true, d => d.StartTime, OrderByType.Desc)
-		.OrderByIF(dto.IsHandled == false, d => d.CreationTime, OrderByType.Desc)
-		.Select((d, step) => d)
-		.ToPagedListAsync(dto, HttpContext.RequestAborted);
-
-		var page2 = new PagedDto<OrderDto>(total2, _mapper.Map<IReadOnlyList<OrderDto>>(items2));
+        var (total2, items2) = await _orderRepository.Queryable()
+        .LeftJoin<WorkflowStep>((d, step) => d.Id == step.ExternalId)
+        .Where((d, step) =>
+            ((string.IsNullOrEmpty(d.WorkflowId) && (string.IsNullOrEmpty(d.SignerId) || d.SignerId == _sessionContext.RequiredUserId)) ||
+            (!string.IsNullOrEmpty(d.WorkflowId) &&
+            ((step.FlowAssignType == EFlowAssignType.User && !string.IsNullOrEmpty(step.HandlerId) && step.HandlerId == _sessionContext.RequiredUserId) ||
+             (step.FlowAssignType == EFlowAssignType.Org && !string.IsNullOrEmpty(step.HandlerOrgId) && step.HandlerOrgId == _sessionContext.RequiredOrgId) ||
+             (step.FlowAssignType == EFlowAssignType.Role && !string.IsNullOrEmpty(step.RoleId) && _sessionContext.Roles.Contains(step.RoleId))) &&
+             (((dto.IsHandled.HasValue && dto.IsHandled == false) && step.Status != EWorkflowStepStatus.Handled) ||
+            ((dto.IsHandled.HasValue && dto.IsHandled == true) && step.Status == EWorkflowStepStatus.Handled)))))
+        .WhereIF(dto.IsProvince.HasValue, d => d.IsProvince == dto.IsProvince)
+        .WhereIF(dto.IsHandled.HasValue, d => handleStatuses.Contains(d.Status))
+        .WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Title.StartsWith(dto.Keyword!))
+        .WhereIF(!string.IsNullOrEmpty(dto.No), d => d.No == dto.No)
+        .WhereIF(dto.IsCounterSign.HasValue && dto.IsCounterSign == true, d => d.CounterSignType.HasValue)
+        .WhereIF(dto.IsCounterSign.HasValue && dto.IsCounterSign == false, d => !d.CounterSignType.HasValue)
+        .WhereIF(dto.ExpiredOrAlmostOverdue.HasValue && dto.ExpiredOrAlmostOverdue == true, d => (d.ExpiredTime < DateTime.Now && d.Status < EOrderStatus.Filed) || (d.ExpiredTime < d.ActualHandleTime && d.Status >= EOrderStatus.Filed)) //超期 未办
+        .WhereIF(dto.ExpiredOrAlmostOverdue.HasValue && dto.ExpiredOrAlmostOverdue == false, d => d.NearlyExpiredTime < DateTime.Now && d.ExpiredTime > DateTime.Now)//即将超期 未办
+        .WhereIF(dto.StartTime.HasValue, d => d.CreationTime >= dto.StartTime)
+        .WhereIF(dto.EndTime.HasValue, d => d.CreationTime <= dto.EndTime)
+        .Where(d => d.Source < ESource.MLSQ || d.Source > ESource.WZSC)
+        .Where(d => d.Status != EOrderStatus.BackToProvince && d.Status < EOrderStatus.Filed)
+        .OrderBy(d => d.Status)
+        .OrderByIF(dto.IsHandled == true, d => d.StartTime, OrderByType.Desc)
+        .OrderByIF(dto.IsHandled == false, d => d.CreationTime, OrderByType.Desc)
+        .Select((d, step) => d)
+        .ToPagedListAsync(dto, HttpContext.RequestAborted);
+
+        var page2 = new PagedDto<OrderDto>(total2, _mapper.Map<IReadOnlyList<OrderDto>>(items2));
 
         return new { Waited = page1, Sign = page2 };
     }
@@ -3778,8 +3780,8 @@ public class OrderController : BaseController
             //if (dto.AlterTime)
             //{
             var expiredTime = _timeLimitDomainService.CalcEndTime(DateTime.Now, order.AcceptTypeCode);
-            var processType = dto.FlowDirection is EFlowDirection.OrgToCenter or EFlowDirection.CenterToCenter or EFlowDirection.FiledToCenter 
-                ? EProcessType.Zhiban 
+            var processType = dto.FlowDirection is EFlowDirection.OrgToCenter or EFlowDirection.CenterToCenter or EFlowDirection.FiledToCenter
+                ? EProcessType.Zhiban
                 : EProcessType.Jiaoban;
             //var expiredTime = _timeLimitDomainService.CalcEndTime(DateTime.Now,
             //	ETimeType.WorkDay,
@@ -5036,7 +5038,7 @@ public class OrderController : BaseController
         order.Sign(_sessionContext.RequiredUserId, _sessionContext.UserName);
         order.AutoAccept(_sessionContext.RequiredUserId, _sessionContext.UserName, _sessionContext.StaffNo);
 
-		if (!string.IsNullOrEmpty(order.WorkflowId))
+        if (!string.IsNullOrEmpty(order.WorkflowId))
         {
             var workflow = await _workflowDomainService.SignToSomebodyAsync(
                 order.WorkflowId,
@@ -5631,7 +5633,7 @@ public class OrderController : BaseController
 
                 orderData.SourceChannel = "其他";
                 orderData.SourceChannelCode = "QT";
-                await _orderRepository.UpdateAsync(orderData, HttpContext.RequestAborted);
+                // await _orderRepository.UpdateAsync(orderData, HttpContext.RequestAborted);
 
                 //向省上推送数据
                 if (dto.IsPush)
@@ -5692,7 +5694,7 @@ public class OrderController : BaseController
         {
             StepId = step.Id,
             OrderId = orderId,
-			Handlers = users.Select(d => new OrderMigrationHandler
+            Handlers = users.Select(d => new OrderMigrationHandler
             {
                 UserId = d.Id,
                 Username = d.Name,
@@ -5704,28 +5706,29 @@ public class OrderController : BaseController
     }
 
 
-	/// <summary>
-	/// 工单平移
-	/// </summary>
-	[HttpPost("change-handler")]
+    /// <summary>
+    /// 工单平移
+    /// </summary>
+    [HttpPost("change-handler")]
     public async Task ChangeHandler([FromBody] ChangeHandlerDto dto)
     {
         if (string.IsNullOrEmpty(dto.StepId))
         {
-	        await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { SignerId = dto.Handler.UserId, SignerName = dto.Handler.Username })
-		        .Where(o => o.Id == dto.OrderId).ExecuteCommandAsync(HttpContext.RequestAborted);
-		}
-        else {
-			var step = await _workflowStepRepository.Queryable()
-				.Includes(d => d.WorkflowTrace)
-				.FirstAsync(d => d.Id == dto.StepId, HttpContext.RequestAborted);
-			if (step is null)
-				throw new UserFriendlyException("无效节点编号");
-			await _workflowDomainService.ChangeHandlerBatchAsync(new List<(string userId, string username, string orgId, string orgName, ICollection<WorkflowStep> steps)>
-			{
-				new(dto.Handler.UserId,dto.Handler.Username,dto.Handler.OrgId,dto.Handler.OrgName, new List<WorkflowStep>{step})
-			}, HttpContext.RequestAborted);
-		}
+            await _orderRepository.Updateable().SetColumns(o => new Orders.Order() { SignerId = dto.Handler.UserId, SignerName = dto.Handler.Username })
+                .Where(o => o.Id == dto.OrderId).ExecuteCommandAsync(HttpContext.RequestAborted);
+        }
+        else
+        {
+            var step = await _workflowStepRepository.Queryable()
+                .Includes(d => d.WorkflowTrace)
+                .FirstAsync(d => d.Id == dto.StepId, HttpContext.RequestAborted);
+            if (step is null)
+                throw new UserFriendlyException("无效节点编号");
+            await _workflowDomainService.ChangeHandlerBatchAsync(new List<(string userId, string username, string orgId, string orgName, ICollection<WorkflowStep> steps)>
+            {
+                new(dto.Handler.UserId,dto.Handler.Username,dto.Handler.OrgId,dto.Handler.OrgName, new List<WorkflowStep>{step})
+            }, HttpContext.RequestAborted);
+        }
     }
-	#endregion
+    #endregion
 }

+ 0 - 105
src/Hotline.Api/config/appsettings.Development.json

@@ -98,111 +98,6 @@
     "Password": "12345678aa",
     "Ip": "222.213.23.229"
   },
-  "ChannelConfiguration": {
-    //省12345配置
-    "Province": {
-      "HuiJu": "http://103.203.219.157/cns-sccthj-job-test/rest/",
-      "XieTong": "http://103.203.219.157/cns-scxthj-rest-test/rest/",
-      "ClientId": "6384f475-2e1e-4985-9e34-51a3379452d0",
-      "ClientSecret": "3e92b698-d640-4056-be94-128710ac1a7e"
-    },
-    //企业服务
-    "Enterprise": {
-      "AddressUrl": "http://10.12.185.227:8834/",
-      "ClientId": "1462598736",
-      "ClientSecret": "6nZtVK4rKfnsncGymUHB",
-      "TenantId": "000000"
-    },
-    //市州数据交换
-    "CityHandOver": {
-      "SecretKey": "AA9FF92A-5040-442A-BDFF-A50AD536BF3D",
-      "SendCityName": "宜宾",
-      "ReceiveCityName": "泸州",
-      "BaseUrl": "http://localhost:6028/",
-      "UrlAddress": "CityHandOver.asmx/FlowWrite"
-    },
-    //融媒体
-    "MediaCode": {
-      "MediaCode": "FWYB0828"
-    },
-    //系统市州编码
-    "CityCode": {
-      "AreaCode": "511500"
-    },
-    "WebPortal": {
-      // "SystemSettingsTheme": "class=gray2",
-      "SystemSettingsTheme": ""
-    },
-    //业务系统附件上传配置
-    "BusinessFile": {
-      "BaseUrl": "http://open.fs.12345lm.cn/",
-      "UploadUrlAddress": "file/upload",
-      "DownloadUrlAddress": "file/downloadfile",
-      "Source": "数据共享系统"
-    },
-    //110对接
-    "PoliceDS": {
-      //1、非警情分流推送服务_宜宾市
-      //   receive-工单受理
-      //   http://10.12.185.168:8001/service/api/ds/110To12345/chainAlarm
-      "token1_token": "b8aae0a998f5b79c9a35aecb888e1a58",
-      "token1_dcsm": "c9bc4e718d1917a9a68add90fecbe5bb60920e5ab85d9ecb6a6167db4352f42b8ae21ac67a6e2aab48b4c99cd9f93ec5fb017e202df969a91f74456c14e8770a",
-      "token1_sm2_public": "BS/H9JVlRdo8vbsZYQLTkeGGZBVjdkX+VJ82CX7n6i4NubmynRIaxvzoSsEAhbbvTDGm2DS96l95nK6Dkd0UZg==",
-      "token1_sm2_private": "GbjU4GFk0yaa/wTdzxeh5BOh8VNlqvnTcb7EUtDVvOY=",
-      "token1_sm4": "BKrW/v4jeRgsFg3HSbxEKnDi6rPceW0AdRiaa1rhEwAnraf8MnHdXzUQoQ7+zyjfghaK5G+zDz+wW+Ob27Jgxt91HkVmyL6+SjqV9ZnqNeGFgTBkQrHDySGz6jHKa12Sv7PZs8pjc716he3NNHZAkCI=",
-      "token1_sm4_mw": "4034d80c19bbd01d",
-
-      //4、警务警情分流推送服务_宜宾市
-      //   receive-工单办结
-      //   http://10.12.185.168:8001/service/api/ds/110To12345/chainDeal
-      "token4_token": "8806bfba29b997853bdb059a9ba9a3ae",
-      "token4_dcsm": "f5dce079e0f4acd6b6627b89fb5e72af5fa5775d3ee3b8c7876f546c5ebe723888df4a70c09f9aa5e096bb342d73e0c4793c851a7a8035e8683b07430f132bd3",
-      "token4_sm2_public": "P2IVWpFx38GQTDV3hgrxjlOdfPhLQNW2LyvAKmYqMz9UYHCtm/l3K73UIouMXs4jcmZjXyItepvKFv44g3YnXA==",
-      "token4_sm2_private": "yxIkRALHoOTxpiZ/jrvCDQatcR7k11Xhps7c92peU9w=",
-      "token4_sm4": "BCD88AXnIfMxe8PrUcubSbFRr07cOuDDEPzy754W3CzhOqjcpAcu1B9B6U46jyM4hEFPqkx+SS1PUAfRlG5tzYD1Z8SKsJTBUDGR6bTMRvCc+C/aps+IcRBfzjjRchtT1c5iok4CfiT4LoK5cmOHKKU=",
-      "token4_sm4_mw": "d731ff1282dda792",
-
-      //3、警务警情分流查询服务_宜宾市
-      //   send-工单受理
-      //   http://10.12.185.168:8001/service/api/ds/12345To110/chainAlarm
-      "token3_token": "b76ba1896c4880998a86b829cf79888a",
-      "token3_dcsm": "3cccc86e021c0ff7827537053ec1b6e4a57cbb49b77c9492257123703c5a6b711000f0842c035fe6d33eb2a947915af53a1ef501916ec7128bff9514d6184e2c",
-      "token3_sm2_public": "qaao4Xh8/eyYGeVOj1K8D7p3+OriP55azWDAbYVoZelMdluNrJuQWM2qPn+hjTHTBnIMAVK2HlHBx4oGfCxGdA==",
-      "token3_sm2_private": "8bSYM8P3b4I94qGt3XVx3bQddNCy/xVKo7o1b5LI4/M=",
-      "token3_sm4": "BIDhFaEu5NILR7byg/JfaPlJEm4dYWC+u9J1IqhtYeYY1AktOxp7cZWqfk/mWjw72pYGT7YRENCULbjZ2bxVG6UUv2pYukZWtYog34Vicu5IgC8ti4VpED9eGzGgtKJ/CT0KtAnjQPQL0PsVbCjTY5M=",
-      "token3_sm4_mw": "bbeb56d247354360",
-
-      //2、非警情分流查询服务_宜宾市
-      //   send-工单办结
-      //   http://10.12.185.168:8001/service/api/ds/12345To110/chainDeal
-      "token2_token": "1fbbac1b09b89d11bc569168aabb3c8b",
-      "token2_dcsm": "3873c1b1ff0ce3b8120d63509d3b85169cda4856b0a0d89625a4744641a343951d8ced868bd5c7fc60826403bd6314a02e5a26ba8808dae5a9d9f851555338d0",
-      "token2_sm2_public": "VgjJ7FfA23vY3Hr1pVrdbi3MZt7X0k/nMf9kwEyyC32CXgT2ccWBlxf3kGPXLO56HSBoo9IA7sSEG3eJYVQmLw==",
-      "token2_sm2_private": "QNTPy2nPBe2JY308G0LHO4r42iomDWcdedf81FapkWA=",
-      "token2_sm4": "BKNpLwBCT2MvXwhLRcZ6FoMm4GaXs6LXqVmEa5hMJ3d9G+vC/5j7xtQh9HRKIfSfXkDQI0EQS7UR4inEXks/AnKsLYGhmhRjyzM7AGpEsujr2vJTwcwIWpBmpuc7k0uBQ34bN+kopafIo5UVyk7rIek=",
-      "token2_sm4_mw": "2938d7acb2754a09",
-
-      //5、从公安网侧获取12345政务服务热线平台知识库列表
-      //   send-知识库列表
-      //   http://10.12.185.168:8001/service/api/ds/get_knowledge_info
-      "token5_token": "1fbbac1b09b89d11bc569168aabb3c8b",
-      "token5_dcsm": "3873c1b1ff0ce3b8120d63509d3b85169cda4856b0a0d89625a4744641a343951d8ced868bd5c7fc60826403bd6314a02e5a26ba8808dae5a9d9f851555338d0",
-      "token5_sm2_public": "VgjJ7FfA23vY3Hr1pVrdbi3MZt7X0k/nMf9kwEyyC32CXgT2ccWBlxf3kGPXLO56HSBoo9IA7sSEG3eJYVQmLw==",
-      "token5_sm2_private": "QNTPy2nPBe2JY308G0LHO4r42iomDWcdedf81FapkWA=",
-      "token5_sm4": "BKNpLwBCT2MvXwhLRcZ6FoMm4GaXs6LXqVmEa5hMJ3d9G+vC/5j7xtQh9HRKIfSfXkDQI0EQS7UR4inEXks/AnKsLYGhmhRjyzM7AGpEsujr2vJTwcwIWpBmpuc7k0uBQ34bN+kopafIo5UVyk7rIek=",
-      "token5_sm4_mw": "2938d7acb2754a09",
-
-      //6、从公安网侧获取12345政务服务热线平台知识内容
-      //   send-知识库内容
-      //   http://10.12.185.168:8001/service/api/ds/get_knowledge_content
-      "token6_token": "1fbbac1b09b89d11bc569168aabb3c8b",
-      "token6_dcsm": "3873c1b1ff0ce3b8120d63509d3b85169cda4856b0a0d89625a4744641a343951d8ced868bd5c7fc60826403bd6314a02e5a26ba8808dae5a9d9f851555338d0",
-      "token6_sm2_public": "VgjJ7FfA23vY3Hr1pVrdbi3MZt7X0k/nMf9kwEyyC32CXgT2ccWBlxf3kGPXLO56HSBoo9IA7sSEG3eJYVQmLw==",
-      "token6_sm2_private": "QNTPy2nPBe2JY308G0LHO4r42iomDWcdedf81FapkWA=",
-      "token6_sm4": "BKNpLwBCT2MvXwhLRcZ6FoMm4GaXs6LXqVmEa5hMJ3d9G+vC/5j7xtQh9HRKIfSfXkDQI0EQS7UR4inEXks/AnKsLYGhmhRjyzM7AGpEsujr2vJTwcwIWpBmpuc7k0uBQ34bN+kopafIo5UVyk7rIek=",
-      "token6_sm4_mw": "2938d7acb2754a09"
-    }
-  },
   //智能回访
   "AiVisit": {
     "Url": "http://118.122.73.80:19061",

+ 11 - 11
src/Hotline.Share/Dtos/Bi/BiOrderDto.cs

@@ -4,11 +4,11 @@ namespace Hotline.Share.Dtos.Bi
 {
     public record VisitAndOrgSatisfactionDetailDto : PagedRequest
     {
-        public DateTime StartDate { get; set; }
-        public DateTime EndDate { get; set; }
-        public string? OrgCode { get; set; }
-        public int? TypeId { get; set; }
-        public string? DateValue { get; set; }
+        public DateTime StartTime { get; set; }
+        public DateTime EndTime { get; set; }
+        public string OrgCode { get; set; }
+        public int TypeId { get; set; }
+        public string DateValue { get; set; }
 
         public string? LineNum { get; set; }
 
@@ -20,16 +20,16 @@ namespace Hotline.Share.Dtos.Bi
 
     public record HighFrequencyCallStatisticsRequest : PagedRequest
     {
-        public DateTime? StartDate { get; set; }
-        public DateTime? EndDate { get; set; }
+        public DateTime? StartTime { get; set; }
+        public DateTime? EndTime { get; set; }
 
         public string? PhoneNum { get; set; }
     }
 
     public record HighMatterWarningRequest : PagedRequest
     {
-        public DateTime StartDate { get; set; }
-        public DateTime EndDate { get; set; }
+        public DateTime StartTime { get; set; }
+        public DateTime EndTime { get; set; }
 
         public List<string> HotspotIds { get; set; } = new();
 
@@ -40,8 +40,8 @@ namespace Hotline.Share.Dtos.Bi
 
     public record HighMatterWarningDetailRequest : PagedRequest
     {
-        public DateTime StartDate { get; set; }
-        public DateTime EndDate { get; set; }
+        public DateTime StartTime { get; set; }
+        public DateTime EndTime { get; set; }
 
         public string HotspotId { get; set; }
 

+ 161 - 0
src/Hotline.Share/Dtos/Order/OrderBiDto.cs

@@ -861,4 +861,165 @@ namespace Hotline.Share.Dtos.Order
 		public int? Iyb { get; set; }
 	}
 
+
+    public class QueryTempDto
+    {
+        /// <summary>
+        /// 信件状态
+        /// </summary>
+        public EOrderStatus Status { get; set; }
+
+        /// <summary>
+        /// 是否超期
+        /// </summary>
+        public string IsOverTime { get; set; }
+
+        /// <summary>
+        /// 来源
+        /// </summary>
+        public string Source { get; set; }
+
+        /// <summary>
+        /// 转接来源
+        /// </summary>
+        public string TransferPhone { get; set; }
+
+        /// <summary>
+        /// 当前节点
+        /// </summary>
+        public string ActualHandleStepName { get; set; }
+
+        /// <summary>
+        /// 重办次数
+        /// </summary>
+        public int? ReTransactNum { get; set; }
+
+        /// <summary>
+        /// 甄别状态
+        /// </summary>
+        public string? OrderScreenStatus { get; set; }
+
+        /// <summary>
+        /// 受理编号
+        /// </summary>
+        public string? No { get; set; }
+
+        /// <summary>
+        /// 省编号
+        /// </summary>
+        public string? ProvinceNo { get; set; }
+
+        /// <summary>
+        /// 受理时间
+        /// </summary>
+        public DateTime? StartTime { get; set; }
+
+        /// <summary>
+        /// 标题
+        /// </summary>
+        public string Title { get; set; }
+
+        /// <summary>
+        /// 超期时间(期满时间)
+        /// </summary>
+        public DateTime? ExpiredTime { get; set; }
+
+        /// <summary>
+        /// 一级部门
+        /// </summary>
+        public string? OrgLevelOneName { get; set; }
+
+        /// <summary>
+        /// 二级部门
+        /// </summary>
+        public string? OrgLevelTwoName { get; set; }
+
+        /// <summary>
+        /// 受理人部门名称
+        /// </summary>
+        public string? AcceptorOrgName { get; set; }
+
+        /// <summary>
+        /// 归档时间(暂为流程结束时间,因流程结束自动归档)
+        /// </summary>
+        public DateTime? FiledTime { get; set; }
+
+        /// <summary>
+        /// 受理类型
+        /// </summary>
+        public string? AcceptType { get; set; }
+
+        /// <summary>
+        /// 热点全称
+        /// </summary>
+        public string? HotspotSpliceName { get; set; }
+
+        /// <summary>
+        /// 区域全称
+        /// </summary>
+        public string? FullAddress { get; set; }
+
+        /// <summary>
+        /// 受理人名称
+        /// </summary>
+        public string? AcceptorName { get; set; }
+
+        /// <summary>
+        /// 来电/信人姓名
+        /// </summary>
+        public string? FromName { get; set; }
+
+        /// <summary>
+        /// 联系电话
+        /// </summary>
+        public string? Contact { get; set; }
+
+        /// <summary>
+        /// 来电号码
+        /// </summary>
+        public string? FromPhone { get; set; }
+
+        /// <summary>
+        /// 来电/信人身份
+        /// </summary>
+        public EIdentityType? IdentityType { get; set; }
+
+        /// <summary>
+        /// 来电/信人性别
+        /// </summary>
+        public EGender FromGender { get; set; }
+
+        /// <summary>
+        /// 第一次评价结果
+        /// </summary>
+        public string? FirstVisitResult { get; set; }
+
+        /// <summary>
+        /// 推送分类
+        /// </summary>
+        public string? PushType { get; set; }
+
+
+        /// <summary>
+        /// 诉求内容
+        /// </summary>
+        public string Content { get; set; }
+
+        /// <summary>
+        /// 实际办理意见
+        /// </summary>
+        public string ActualOpinion { get; set; }
+
+        /// <summary>
+        /// 归档意见
+        /// </summary>
+        public string? FileOpinion { get; set; }
+
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        public DateTime CreationTime { get; set; }
+
+
+    }
 }

+ 2 - 2
src/Hotline.Share/Requests/DepartmentKeyWordRequest.cs

@@ -5,12 +5,12 @@
         /// <summary>
         /// 开始时间
         /// </summary>
-        public DateTime StartDate { get; set; }
+        public DateTime StartTime { get; set; }
 
         /// <summary>
         /// 结束时间
         /// </summary>
-        public DateTime EndDate { get; set; }
+        public DateTime EndTime { get; set; }
 
         /// <summary>
         /// 部门编码

+ 2 - 2
src/Hotline.Share/Requests/DepartmentalProcessingStatisticsDto.cs

@@ -219,12 +219,12 @@ namespace Hotline.Share.Requests
         /// <summary>
         /// 开始日期
         /// </summary>
-        public DateTime StartDate { get; set; }
+        public DateTime StartTime { get; set; }
 
         /// <summary>
         /// 结束日期
         /// </summary>
-        public DateTime EndDate { get; set; }
+        public DateTime EndTime { get; set; }
 
         /// <summary>
         /// 部门Code

+ 2 - 2
src/Hotline.Share/Requests/HighFrequencyCallStatisticsListRequest.cs

@@ -7,11 +7,11 @@ namespace Hotline.Share.Requests
         /// <summary>
         /// 查询时间段--开始
         /// </summary>
-        public DateTime? StartDate { get; set; }
+        public DateTime? StartTime { get; set; }
 
         /// <summary>
         /// 查询时间段--结束
         /// </summary>
-        public DateTime? EndDate { get; set; }
+        public DateTime? EndTime { get; set; }
     }
 }

+ 2 - 2
src/Hotline/FlowEngine/Workflows/IWorkflowDomainService.cs

@@ -122,9 +122,9 @@ namespace Hotline.FlowEngine.Workflows
         Task<WorkflowStep?> FindLastStepAsync(string workflowId, CancellationToken cancellationToken);
 
         /// <summary>
-        /// 查询待回访部门
+        /// 查询所有办理部门及实际办理部门
         /// </summary>
-        Task<(Kv, IReadOnlyList<Kv>)> GetUnvisitOrgsAsync(string workflowId, CancellationToken cancellationToken);
+        Task<(Kv, IReadOnlyList<Kv>)> GetHandleOrgsAsync(string workflowId, CancellationToken cancellationToken);
 
         /// <summary>
         /// 依据配置过滤下一节点

+ 4 - 5
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -1224,15 +1224,14 @@ namespace Hotline.FlowEngine.Workflows
         }
 
         /// <summary>
-        /// 查询待回访部门
+        /// 查询所有办理部门及实际办理部门
         /// </summary>
         /// <returns></returns>
-        public async Task<(Kv, IReadOnlyList<Kv>)> GetUnvisitOrgsAsync(string workflowId,
-            CancellationToken cancellationToken)
+        public async Task<(Kv, IReadOnlyList<Kv>)> GetHandleOrgsAsync(string workflowId, CancellationToken cancellationToken)
         {
             var workflow = await GetWorkflowAsync(workflowId, withSteps: true, cancellationToken: cancellationToken);
-            if (workflow.CounterSignType is not ECounterSignType.Center)
-                return new(new Kv(workflow.ActualHandleOrgCode, workflow.ActualHandleOrgName), new List<Kv>());
+            //if (workflow.CounterSignType is not ECounterSignType.Center)
+            //    return new(new Kv(workflow.ActualHandleOrgCode, workflow.ActualHandleOrgName), new List<Kv>());
             var steps = workflow.Steps
                 .Where(d => d.StepType is EStepType.Normal)
                 .ToList();