tangjiang hai 7 meses
pai
achega
0e0171dcb7
Modificáronse 1 ficheiros con 7 adicións e 10 borrados
  1. 7 10
      src/DataSharing/Province/ProvinceService.cs

+ 7 - 10
src/DataSharing/Province/ProvinceService.cs

@@ -711,7 +711,7 @@ namespace DataSharing.Province
             //验证是否需要推送未接数据
             if (dto != null && dto.TrCallRecordDto != null && dto.TrCallRecordDto.OnState == EOnState.NoOn && dto.Order == null)
             {
-                if (!await IsPublishMissedCall(dto.TrCallRecordDto, cancellationToken))
+                if (await IsPublishMissedCall(dto.TrCallRecordDto, cancellationToken) == false)
                     return;
             }
 
@@ -1868,17 +1868,14 @@ namespace DataSharing.Province
         private async Task<bool> IsPublishMissedCall(TrCallDto dto, CancellationToken cancellationToken)
         {
             var key = MissedCallKey + DateTime.Now.ToString("yyyyMMdd");
-            int missedCallCount;
+            int missedCallCount = 0;
             //获取系统配置
             var configurationInformation = await _configurationInformationCache.GetAsync(ConstantSettings.ConfigurationInformationCacheKey, cancellationToken);
-            if (configurationInformation == null)
-            {
-                //获取配置信息
-                var provinceConfiguration = _channelConfigurationManager.GetConfigurationProvince();
-                missedCallCount = provinceConfiguration.MissedCallCount;
-            }
-            else
+            if (configurationInformation != null)
                 missedCallCount = configurationInformation.MissedCallCount;
+            //如果配置为空或者配置的数量为0
+            if (configurationInformation == null && missedCallCount <= 0)
+                return true;
 
             _logger.LogWarning("获取到的不上传的值:------------------------" + missedCallCount);
 
@@ -1887,7 +1884,7 @@ namespace DataSharing.Province
             if (dataCache != null)
             {
                 //如果存在值,检查是否已经达到推送最大值
-                if (!dataCache.IsMax && dataCache.DateTimeList.Count > 0)
+                if (dataCache.IsMax==false && dataCache.DateTimeList.Count > 0)
                 {
                     //没有达到最大值
                     //检查第一条数据是否匹配当前推送时间