|
@@ -50,6 +50,7 @@ using Microsoft.Extensions.Options;
|
|
using MiniExcelLibs;
|
|
using MiniExcelLibs;
|
|
using NETCore.Encrypt;
|
|
using NETCore.Encrypt;
|
|
using SqlSugar;
|
|
using SqlSugar;
|
|
|
|
+using System.Threading;
|
|
using XC.RSAUtil;
|
|
using XC.RSAUtil;
|
|
using XF.Domain.Authentications;
|
|
using XF.Domain.Authentications;
|
|
using XF.Domain.Cache;
|
|
using XF.Domain.Cache;
|
|
@@ -69,11 +70,9 @@ namespace Hotline.Api.Controllers;
|
|
public class TestController : BaseController
|
|
public class TestController : BaseController
|
|
{
|
|
{
|
|
private readonly ILogger<TestController> _logger;
|
|
private readonly ILogger<TestController> _logger;
|
|
- //private readonly IAuthorizeGenerator _authorizeGenerator;
|
|
|
|
private readonly IOptionsSnapshot<CallCenterConfiguration> _options;
|
|
private readonly IOptionsSnapshot<CallCenterConfiguration> _options;
|
|
private readonly ISessionContext _sessionContext;
|
|
private readonly ISessionContext _sessionContext;
|
|
private readonly IRepository<User> _userRepository;
|
|
private readonly IRepository<User> _userRepository;
|
|
-
|
|
|
|
private readonly ITypedCache<User> _cache;
|
|
private readonly ITypedCache<User> _cache;
|
|
private readonly IRealtimeService _realtimeService;
|
|
private readonly IRealtimeService _realtimeService;
|
|
private readonly IBlacklistDomainService _blacklistDomainService;
|
|
private readonly IBlacklistDomainService _blacklistDomainService;
|
|
@@ -81,25 +80,18 @@ public class TestController : BaseController
|
|
private readonly ISugarUnitOfWork<HotlineDbContext> _uow;
|
|
private readonly ISugarUnitOfWork<HotlineDbContext> _uow;
|
|
private readonly IRepository<Identity.Roles.Role> _roleRepository;
|
|
private readonly IRepository<Identity.Roles.Role> _roleRepository;
|
|
private readonly IMediator _mediator;
|
|
private readonly IMediator _mediator;
|
|
-
|
|
|
|
private readonly IDistributedLock _distributedLock;
|
|
private readonly IDistributedLock _distributedLock;
|
|
private readonly IRepository<OrderUrge> _orderUrgeRepository;
|
|
private readonly IRepository<OrderUrge> _orderUrgeRepository;
|
|
private readonly IRepositoryTextSearch<OrderTs> _repositoryts;
|
|
private readonly IRepositoryTextSearch<OrderTs> _repositoryts;
|
|
-
|
|
|
|
private readonly ITimeLimitDomainService _timeLimitDomainService;
|
|
private readonly ITimeLimitDomainService _timeLimitDomainService;
|
|
private readonly IWfModuleDomainService _wfModuleDomainService;
|
|
private readonly IWfModuleDomainService _wfModuleDomainService;
|
|
private readonly IDaySettingRepository _daySettingRepository;
|
|
private readonly IDaySettingRepository _daySettingRepository;
|
|
- //private readonly ITrClient _trClient;
|
|
|
|
private readonly ICapPublisher _capPublisher;
|
|
private readonly ICapPublisher _capPublisher;
|
|
private readonly IQueue _queue;
|
|
private readonly IQueue _queue;
|
|
private readonly IExportApplication _exportApplication;
|
|
private readonly IExportApplication _exportApplication;
|
|
private readonly IRepository<WorkflowTrace> _workflowTraceRepository;
|
|
private readonly IRepository<WorkflowTrace> _workflowTraceRepository;
|
|
-
|
|
|
|
private readonly IRepository<WorkflowStep> _workflowStepRepository;
|
|
private readonly IRepository<WorkflowStep> _workflowStepRepository;
|
|
-
|
|
|
|
private readonly IWorkflowRepository _workflowRepository;
|
|
private readonly IWorkflowRepository _workflowRepository;
|
|
- //private readonly IRepository<WorkflowStepHandler> _workflowStepHandleRepository;
|
|
|
|
-
|
|
|
|
private readonly IRepository<SystemOrganize> _systemOrganizeRepository;
|
|
private readonly IRepository<SystemOrganize> _systemOrganizeRepository;
|
|
private readonly IOrderRepository _orderRepository;
|
|
private readonly IOrderRepository _orderRepository;
|
|
private readonly IRepository<TrCallRecord> _trCallRecordRepository;
|
|
private readonly IRepository<TrCallRecord> _trCallRecordRepository;
|
|
@@ -112,7 +104,6 @@ public class TestController : BaseController
|
|
private readonly IRepository<JudicialManagementOrders> _judicialManagementOrdersRepository;
|
|
private readonly IRepository<JudicialManagementOrders> _judicialManagementOrdersRepository;
|
|
private readonly IRepository<EnforcementOrdersHandler> _enforcementOrdersHandlerRepository;
|
|
private readonly IRepository<EnforcementOrdersHandler> _enforcementOrdersHandlerRepository;
|
|
private readonly IWorkflowApplication _workflowApplication;
|
|
private readonly IWorkflowApplication _workflowApplication;
|
|
-
|
|
|
|
private readonly IRepository<ContingencyManagementHotspot> _contingencyManagementHotspotRepository;
|
|
private readonly IRepository<ContingencyManagementHotspot> _contingencyManagementHotspotRepository;
|
|
private readonly IRepository<Hotspot> _hotspotRepository;
|
|
private readonly IRepository<Hotspot> _hotspotRepository;
|
|
private readonly IOrderApplication _orderApplication;
|
|
private readonly IOrderApplication _orderApplication;
|
|
@@ -120,10 +111,7 @@ public class TestController : BaseController
|
|
private readonly IOrderDomainService _orderDomainService;
|
|
private readonly IOrderDomainService _orderDomainService;
|
|
private readonly ICallApplication _callApplication;
|
|
private readonly ICallApplication _callApplication;
|
|
private readonly IOptionsSnapshot<AppConfiguration> _appOptions;
|
|
private readonly IOptionsSnapshot<AppConfiguration> _appOptions;
|
|
-
|
|
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
- //private readonly ITypedCache<List<User>> _cache;
|
|
|
|
- //private readonly ICacheManager<User> _cache;
|
|
|
|
private readonly ICalcExpireTime _expireTime;
|
|
private readonly ICalcExpireTime _expireTime;
|
|
private readonly ICallNativeRepository _callNativeRepository;
|
|
private readonly ICallNativeRepository _callNativeRepository;
|
|
private readonly IRepository<OldSendProData> _oldSendProDataRepository;
|
|
private readonly IRepository<OldSendProData> _oldSendProDataRepository;
|
|
@@ -132,6 +120,7 @@ public class TestController : BaseController
|
|
private readonly IThirdIdentiyService _thirdIdentiyService;
|
|
private readonly IThirdIdentiyService _thirdIdentiyService;
|
|
private readonly IServiceProvider _serviceProvider;
|
|
private readonly IServiceProvider _serviceProvider;
|
|
private readonly IRepository<OrderDelay> _orderDelayRepository;
|
|
private readonly IRepository<OrderDelay> _orderDelayRepository;
|
|
|
|
+ private readonly IRepository<OrderSecondaryHandling> _orderSecondaryHandlingRepository;
|
|
|
|
|
|
|
|
|
|
public TestController(
|
|
public TestController(
|
|
@@ -156,14 +145,12 @@ public class TestController : BaseController
|
|
ITimeLimitDomainService timeLimitDomainService,
|
|
ITimeLimitDomainService timeLimitDomainService,
|
|
IWfModuleDomainService wfModuleDomainService,
|
|
IWfModuleDomainService wfModuleDomainService,
|
|
IDaySettingRepository daySettingRepository,
|
|
IDaySettingRepository daySettingRepository,
|
|
- //ITrClient trClient,
|
|
|
|
ICapPublisher capPublisher,
|
|
ICapPublisher capPublisher,
|
|
IQueue queue,
|
|
IQueue queue,
|
|
IExportApplication exportApplication,
|
|
IExportApplication exportApplication,
|
|
IRepository<WorkflowTrace> workflowTraceRepository,
|
|
IRepository<WorkflowTrace> workflowTraceRepository,
|
|
IRepository<WorkflowStep> workflowStepRepository,
|
|
IRepository<WorkflowStep> workflowStepRepository,
|
|
IWorkflowRepository workflowRepository,
|
|
IWorkflowRepository workflowRepository,
|
|
- //IRepository<WorkflowStepHandler> workflowStepHandleRepository,
|
|
|
|
IRepository<SystemOrganize> systemOrganizeRepository,
|
|
IRepository<SystemOrganize> systemOrganizeRepository,
|
|
IOrderRepository orderRepository,
|
|
IOrderRepository orderRepository,
|
|
IRepository<TrCallRecord> trCallRecordRepository,
|
|
IRepository<TrCallRecord> trCallRecordRepository,
|
|
@@ -173,14 +160,14 @@ public class TestController : BaseController
|
|
IMapper mapper,
|
|
IMapper mapper,
|
|
IOrderApplication orderApplication,
|
|
IOrderApplication orderApplication,
|
|
IRepository<Tel> telRepository,
|
|
IRepository<Tel> telRepository,
|
|
- IOrderReportApplication orderReportApplication,
|
|
|
|
-IRepository<EnforcementOrders> enforcementOrdersRepository,
|
|
|
|
-IRepository<JudicialManagementOrders> judicialManagementOrdersRepository,
|
|
|
|
-IRepository<EnforcementOrdersHandler> enforcementOrdersHandlerRepository,
|
|
|
|
-IRepository<ContingencyManagementHotspot> contingencyManagementHotspotRepository,
|
|
|
|
-IRepository<Hotspot> hotspotRepository,
|
|
|
|
-IOrderDomainService orderDomainService,
|
|
|
|
-ICallApplication callApplication,
|
|
|
|
|
|
+ IOrderReportApplication orderReportApplication,
|
|
|
|
+ IRepository<EnforcementOrders> enforcementOrdersRepository,
|
|
|
|
+ IRepository<JudicialManagementOrders> judicialManagementOrdersRepository,
|
|
|
|
+ IRepository<EnforcementOrdersHandler> enforcementOrdersHandlerRepository,
|
|
|
|
+ IRepository<ContingencyManagementHotspot> contingencyManagementHotspotRepository,
|
|
|
|
+ IRepository<Hotspot> hotspotRepository,
|
|
|
|
+ IOrderDomainService orderDomainService,
|
|
|
|
+ ICallApplication callApplication,
|
|
IOptionsSnapshot<AppConfiguration> appOptions,
|
|
IOptionsSnapshot<AppConfiguration> appOptions,
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
ICalcExpireTime expireTime,
|
|
ICalcExpireTime expireTime,
|
|
@@ -190,11 +177,11 @@ ICallApplication callApplication,
|
|
IThirdIdentiyService thirdIdentiyService,
|
|
IThirdIdentiyService thirdIdentiyService,
|
|
IOrderScreenRepository orderScreenRepository,
|
|
IOrderScreenRepository orderScreenRepository,
|
|
IRepository<OrderVisit> orderVisitRepository,
|
|
IRepository<OrderVisit> orderVisitRepository,
|
|
- IServiceProvider serviceProvider
|
|
|
|
|
|
+ IServiceProvider serviceProvider,
|
|
|
|
+ IRepository<OrderSecondaryHandling> orderSecondaryHandlingRepository
|
|
)
|
|
)
|
|
{
|
|
{
|
|
_logger = logger;
|
|
_logger = logger;
|
|
- //_authorizeGenerator = authorizeGenerator;
|
|
|
|
_options = options;
|
|
_options = options;
|
|
_sessionContext = sessionContext;
|
|
_sessionContext = sessionContext;
|
|
_userRepository = userRepository;
|
|
_userRepository = userRepository;
|
|
@@ -211,14 +198,12 @@ ICallApplication callApplication,
|
|
_timeLimitDomainService = timeLimitDomainService;
|
|
_timeLimitDomainService = timeLimitDomainService;
|
|
_wfModuleDomainService = wfModuleDomainService;
|
|
_wfModuleDomainService = wfModuleDomainService;
|
|
_daySettingRepository = daySettingRepository;
|
|
_daySettingRepository = daySettingRepository;
|
|
- //_trClient = trClient;
|
|
|
|
_capPublisher = capPublisher;
|
|
_capPublisher = capPublisher;
|
|
_queue = queue;
|
|
_queue = queue;
|
|
_exportApplication = exportApplication;
|
|
_exportApplication = exportApplication;
|
|
_workflowTraceRepository = workflowTraceRepository;
|
|
_workflowTraceRepository = workflowTraceRepository;
|
|
_workflowStepRepository = workflowStepRepository;
|
|
_workflowStepRepository = workflowStepRepository;
|
|
_workflowRepository = workflowRepository;
|
|
_workflowRepository = workflowRepository;
|
|
- //_workflowStepHandleRepository = workflowStepHandleRepository;
|
|
|
|
_systemOrganizeRepository = systemOrganizeRepository;
|
|
_systemOrganizeRepository = systemOrganizeRepository;
|
|
_orderRepository = orderRepository;
|
|
_orderRepository = orderRepository;
|
|
_trCallRecordRepository = trCallRecordRepository;
|
|
_trCallRecordRepository = trCallRecordRepository;
|
|
@@ -246,6 +231,7 @@ ICallApplication callApplication,
|
|
_orderVisitRepository = orderVisitRepository;
|
|
_orderVisitRepository = orderVisitRepository;
|
|
_serviceProvider = serviceProvider;
|
|
_serviceProvider = serviceProvider;
|
|
_orderDelayRepository = orderDelayRepository;
|
|
_orderDelayRepository = orderDelayRepository;
|
|
|
|
+ _orderSecondaryHandlingRepository = orderSecondaryHandlingRepository;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -258,7 +244,7 @@ ICallApplication callApplication,
|
|
{
|
|
{
|
|
var order = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.ReceiveProvinceNo == "");
|
|
var order = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.ReceiveProvinceNo == "");
|
|
|
|
|
|
- var order1 = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.ReceiveProvinceNo =="20202020202020");
|
|
|
|
|
|
+ var order1 = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.ReceiveProvinceNo == "20202020202020");
|
|
var order2 = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.ReceiveProvinceNo == "ZMHD995100002024111101317");
|
|
var order2 = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.ReceiveProvinceNo == "ZMHD995100002024111101317");
|
|
|
|
|
|
var inDto = new ThirdTokenDto
|
|
var inDto = new ThirdTokenDto
|
|
@@ -549,7 +535,7 @@ ICallApplication callApplication,
|
|
//var query = _userRepository.Queryable().Where(x => false);
|
|
//var query = _userRepository.Queryable().Where(x => false);
|
|
//await _capPublisher.PublishDelay(EventNames.OrderRelateCall, "123", cancellationToken: HttpContext.RequestAborted);
|
|
//await _capPublisher.PublishDelay(EventNames.OrderRelateCall, "123", cancellationToken: HttpContext.RequestAborted);
|
|
var times = await _expireTime.CalcWorkTimeEx(
|
|
var times = await _expireTime.CalcWorkTimeEx(
|
|
- DateTime.Parse("2025-02-21 16:00:11.154098"),DateTime.Parse("2025-02-28 11:27:11.441577"),false);
|
|
|
|
|
|
+ DateTime.Parse("2025-02-21 16:00:11.154098"), DateTime.Parse("2025-02-28 11:27:11.441577"), false);
|
|
return OpenResponse.Ok(times);
|
|
return OpenResponse.Ok(times);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1249,7 +1235,38 @@ ICallApplication callApplication,
|
|
creationTimeHandleDurationWorkday = creationTimeHandleDurationWorkday <= 0 ? 10 : creationTimeHandleDurationWorkday;
|
|
creationTimeHandleDurationWorkday = creationTimeHandleDurationWorkday <= 0 ? 10 : creationTimeHandleDurationWorkday;
|
|
centerToOrgHandleDurationWorkday = centerToOrgHandleDurationWorkday <= 0 ? 10 : centerToOrgHandleDurationWorkday;
|
|
centerToOrgHandleDurationWorkday = centerToOrgHandleDurationWorkday <= 0 ? 10 : centerToOrgHandleDurationWorkday;
|
|
|
|
|
|
- order.File(now, handleDuration, fileDuration, allDuration, creationTimeHandleDurationWorkday, centerToOrgHandleDurationWorkday);
|
|
|
|
|
|
+ double? secondaryHandlingDurationWorkday = null;
|
|
|
|
+ DateTime? secondaryHandlingAuditTime = null;
|
|
|
|
+
|
|
|
|
+ //计算二次办理时长
|
|
|
|
+ if (_appOptions.Value.IsZiGong)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ //查询是否有二次办理申请通过的
|
|
|
|
+ var orderSecondaryData = await _orderSecondaryHandlingRepository.GetAsync(p => p.OrderId == order.Id &&
|
|
|
|
+ p.IsHandel == false && p.State == ESecondaryHandlingState.End, HttpContext.RequestAborted);
|
|
|
|
+ if (orderSecondaryData != null)
|
|
|
|
+ {
|
|
|
|
+ orderSecondaryData.IsHandel = true;
|
|
|
|
+ await _orderSecondaryHandlingRepository.UpdateAsync(orderSecondaryData, HttpContext.RequestAborted);
|
|
|
|
+ if (orderSecondaryData.AuditTime.HasValue)
|
|
|
|
+ {
|
|
|
|
+ secondaryHandlingAuditTime = orderSecondaryData.AuditTime;
|
|
|
|
+ secondaryHandlingDurationWorkday = orderSecondaryData.AuditTime.HasValue
|
|
|
|
+ ?
|
|
|
|
+ await _expireTime.CalcWorkTimeEx(
|
|
|
|
+ orderSecondaryData.AuditTime.Value, now,
|
|
|
|
+ false)
|
|
|
|
+ : null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //处理办理时长
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ order.File(now, handleDuration, fileDuration, allDuration, creationTimeHandleDurationWorkday, centerToOrgHandleDurationWorkday,
|
|
|
|
+ secondaryHandlingDurationWorkday, secondaryHandlingAuditTime);
|
|
|
|
+
|
|
|
|
+ // order.File(now, handleDuration, fileDuration, allDuration, creationTimeHandleDurationWorkday, centerToOrgHandleDurationWorkday, null, null);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1335,8 +1352,36 @@ ICallApplication callApplication,
|
|
: 0;
|
|
: 0;
|
|
creationTimeHandleDurationWorkday = creationTimeHandleDurationWorkday <= 0 ? 10 : creationTimeHandleDurationWorkday;
|
|
creationTimeHandleDurationWorkday = creationTimeHandleDurationWorkday <= 0 ? 10 : creationTimeHandleDurationWorkday;
|
|
centerToOrgHandleDurationWorkday = centerToOrgHandleDurationWorkday <= 0 ? 10 : centerToOrgHandleDurationWorkday;
|
|
centerToOrgHandleDurationWorkday = centerToOrgHandleDurationWorkday <= 0 ? 10 : centerToOrgHandleDurationWorkday;
|
|
|
|
+ double? secondaryHandlingDurationWorkday = null;
|
|
|
|
+ DateTime? secondaryHandlingAuditTime = null;
|
|
|
|
+
|
|
|
|
+ //计算二次办理时长
|
|
|
|
+ if (_appOptions.Value.IsZiGong)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ //查询是否有二次办理申请通过的
|
|
|
|
+ var orderSecondaryData = await _orderSecondaryHandlingRepository.GetAsync(p => p.OrderId == order.Id &&
|
|
|
|
+ p.IsHandel == false && p.State == ESecondaryHandlingState.End, HttpContext.RequestAborted);
|
|
|
|
+ if (orderSecondaryData != null)
|
|
|
|
+ {
|
|
|
|
+ orderSecondaryData.IsHandel = true;
|
|
|
|
+ await _orderSecondaryHandlingRepository.UpdateAsync(orderSecondaryData, HttpContext.RequestAborted);
|
|
|
|
+ if (orderSecondaryData.AuditTime.HasValue)
|
|
|
|
+ {
|
|
|
|
+ secondaryHandlingAuditTime = orderSecondaryData.AuditTime;
|
|
|
|
+ secondaryHandlingDurationWorkday = orderSecondaryData.AuditTime.HasValue
|
|
|
|
+ ?
|
|
|
|
+ await _expireTime.CalcWorkTimeEx(
|
|
|
|
+ orderSecondaryData.AuditTime.Value, now,
|
|
|
|
+ false)
|
|
|
|
+ : null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //处理办理时长
|
|
|
|
+ }
|
|
|
|
|
|
- order.File(now, handleDuration, fileDuration, allDuration, creationTimeHandleDurationWorkday, centerToOrgHandleDurationWorkday);
|
|
|
|
|
|
+ order.File(now, handleDuration, fileDuration, allDuration, creationTimeHandleDurationWorkday, centerToOrgHandleDurationWorkday,
|
|
|
|
+ secondaryHandlingDurationWorkday, secondaryHandlingAuditTime);
|
|
order.FileUserId = notification.HandlerId;
|
|
order.FileUserId = notification.HandlerId;
|
|
order.FileUserName = notification.HandlerName;
|
|
order.FileUserName = notification.HandlerName;
|
|
order.FileUserOrgId = notification.HandlerOrgId;
|
|
order.FileUserOrgId = notification.HandlerOrgId;
|