|
@@ -1,4 +1,5 @@
|
|
|
-using DataSharing.RawData;
|
|
|
+using DataSharing.HotlineWeb;
|
|
|
+using DataSharing.RawData;
|
|
|
using DataSharing.SendTask;
|
|
|
using DataSharing.Share.Consts;
|
|
|
using DataSharing.Share.Dtos;
|
|
@@ -22,6 +23,7 @@ using Hotline.Share.Enums.CallCenter;
|
|
|
using Hotline.Share.Enums.FlowEngine;
|
|
|
using Hotline.Share.Enums.Order;
|
|
|
using MapsterMapper;
|
|
|
+using Microsoft.AspNetCore.Http;
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
using System.Text.Json;
|
|
|
using XF.Domain.Cache;
|
|
@@ -55,6 +57,7 @@ namespace DataSharing.Province
|
|
|
private readonly ISharingConfigurationManager _sharingConfigurationManager;
|
|
|
private readonly IInitPushDataService _initPushDataService;
|
|
|
private readonly IRepository<DsGetCaseMaterialInfo> _getCaseMaterialInfoRepository;
|
|
|
+ private readonly IRepository<ConfigurationInformation> _configurationInformationRepository;
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
@@ -92,7 +95,8 @@ namespace DataSharing.Province
|
|
|
IRepository<DsOrderVisitSend> dsOrderVisitSendRepository,
|
|
|
ISharingConfigurationManager sharingConfigurationManager,
|
|
|
IInitPushDataService initPushDataService,
|
|
|
- IRepository<DsGetCaseMaterialInfo> getCaseMaterialInfoRepository)
|
|
|
+ IRepository<DsGetCaseMaterialInfo> getCaseMaterialInfoRepository,
|
|
|
+ IRepository<ConfigurationInformation> configurationInformationRepository)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_logger = logger;
|
|
@@ -111,6 +115,7 @@ namespace DataSharing.Province
|
|
|
_sharingConfigurationManager = sharingConfigurationManager;
|
|
|
_initPushDataService = initPushDataService;
|
|
|
_getCaseMaterialInfoRepository = getCaseMaterialInfoRepository;
|
|
|
+ _configurationInformationRepository = configurationInformationRepository;
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -1930,12 +1935,14 @@ namespace DataSharing.Province
|
|
|
var key = MissedCallKey + DateTime.Now.ToString("yyyyMMdd");
|
|
|
int missedCallCount = 0;
|
|
|
//获取系统配置
|
|
|
- var configurationInformation = await _configurationInformationCache.GetAsync(ConstantSettings.ConfigurationInformationCacheKey, cancellationToken);
|
|
|
+ var configurationInformation = await _configurationInformationCache.GetOrSetAsync(ConstantSettings.ConfigurationInformationCacheKey,
|
|
|
+ d => GetStandard().GetAwaiter().GetResult(), cancellationToken: cancellationToken);
|
|
|
if (configurationInformation != null)
|
|
|
missedCallCount = configurationInformation.MissedCallCount;
|
|
|
+
|
|
|
//如果配置为空或者配置的数量为0
|
|
|
if (configurationInformation == null && missedCallCount <= 0)
|
|
|
- return true;
|
|
|
+ return false;
|
|
|
|
|
|
_logger.LogWarning("获取到的不上传的值:------------------------" + missedCallCount);
|
|
|
|
|
@@ -2003,6 +2010,27 @@ namespace DataSharing.Province
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 获取系统配置
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private async Task<ConfigurationInformationDto> GetStandard()
|
|
|
+ {
|
|
|
+ var sandard = await _configurationInformationRepository.Queryable().FirstAsync();
|
|
|
+ if (sandard == null)
|
|
|
+ {
|
|
|
+ sandard = new()
|
|
|
+ {
|
|
|
+ CrntSeatNum = 0,
|
|
|
+ CrntTelNum = 0,
|
|
|
+ SeatNum = 0,
|
|
|
+ SeatHwyNum = 0,
|
|
|
+ MissedCallCount = 5
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return _mapper.Map<ConfigurationInformationDto>(sandard);
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 初始化上传通话记录
|
|
|
/// </summary>
|