Browse Source

Merge branch 'master' of http://110.188.24.182:10023/Fengwo/hotline

田爽 1 year ago
parent
commit
aabcc8a4f8

+ 10 - 9
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -813,17 +813,18 @@ namespace Hotline.Api.Controllers.Bi
             #region 信件分布情况
             //市直部门
             var listOrgStatisticsCityAll = await _orderRepository.Queryable()
-              .LeftJoin<SystemOrganize>((it, o) => it.CurrentHandleOrgCode == o.Id)
+              .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)
              .GroupBy((it, o) => new
              {
-                 it.CurrentHandleOrgCode,
+                 it.OrgLevelOneCode,
                  o.Name
              })
               .Select((it, o) => new OrgStatistics
               {
-                  CountNum = SqlFunc.AggregateCount(it.CurrentHandleOrgCode),
-                  OrgName = o.Name
+                  CountNum = SqlFunc.AggregateCount(it.OrgLevelOneCode),
+
+                  OrgName = it.OrgLevelOneCode == "001" ? "热线中心" : o.Name
               }).ToListAsync();
 
             centerReportStatisticsDto.OrgStatisticsCityAll = new OrgStatisticsAll
@@ -833,23 +834,23 @@ namespace Hotline.Api.Controllers.Bi
 
             //区县部门
             var listOrgStatisticsAreaAll = await _orderRepository.Queryable()
-             .LeftJoin<SystemOrganize>((it, o) => it.CurrentHandleOrgCode == o.Id)
+             .LeftJoin<SystemOrganize>((it, o) => it.OrgLevelOneCode == o.Id)
              .Where((it, o) => o.OrgType == EOrgType.County && it.CreationTime >= StartDate && it.CreationTime <= EndDate)
             .GroupBy((it, o) => new
             {
-                it.CurrentHandleOrgCode,
+                it.OrgLevelOneCode,
                 o.Name
             })
              .Select((it, o) => new OrgStatistics
              {
-                 CountNum = SqlFunc.AggregateCount(it.CurrentHandleOrgCode),
-                 OrgName = o.Name
+                 CountNum = SqlFunc.AggregateCount(it.OrgLevelOneCode),
+                 OrgName = it.OrgLevelOneCode == "001" ? "热线中心" : o.Name
              }).ToListAsync();
 
             centerReportStatisticsDto.OrgStatisticsAreaAll = new OrgStatisticsAll
             {
                 OrgStatistics = listOrgStatisticsAreaAll
-            }; 
+            };
             #endregion
 
             return centerReportStatisticsDto;

+ 12 - 1
src/Hotline.Application/Subscribers/DatasharingSubscriber.cs

@@ -4,12 +4,23 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using DotNetCore.CAP;
+using Hotline.Share.Dtos.Order;
 using XF.Domain.Dependency;
 
 namespace Hotline.Application.Subscribers
 {
-    public class DataSharingSubscriber : ICapSubscribe, ISingletonDependency
+    /// <summary>
+    /// 订阅来自DataSharing的消息
+    /// </summary>
+    public class DataSharingSubscriber : ICapSubscribe, ITransientDependency
     {
+        /// <summary>
+        /// 接收工单退回结果
+        /// </summary>
+        [CapSubscribe(Hotline.Share.Mq.EventNames.SharingOrderReturnFeedback)]
+        public async Task RecOrderReturnAsync(OrderSendBackResultDto dto, CancellationToken cancellationToken)
+        {
 
+        }
     }
 }