TANG JIANG 1 år sedan
förälder
incheckning
f26af0904c

+ 3 - 5
src/Sharing.Api/Controllers/HotlineMessageReceiveController.cs

@@ -15,7 +15,6 @@ using Sharing.Province.HuiJu.Send;
 using Sharing.Province.XieTong.Knowledge;
 using Sharing.Province.XieTong.Receive;
 using Sharing.Province.XieTong.Send;
-using SharpCompress.Readers;
 
 namespace Sharing.Api.Controllers
 {
@@ -308,7 +307,7 @@ namespace Sharing.Api.Controllers
         public async Task ReceiveOrderCreated(OrderDto dto)
         {
             //处理数据
-            SubmitCaseInfo submitCaseInfo = new SubmitCaseInfo
+            SubmitCaseInfo submitCaseInfo = new()
             {
                 OrderID = dto.Id,
                 No = dto.No,
@@ -342,9 +341,8 @@ namespace Sharing.Api.Controllers
                 ComplainType = "",
                 ComplainDept = "",
                 PushType = "",
-
+                CaseSerial = ""
             };
-            submitCaseInfo.CaseSerial = "";
             //处理诉求渠道
             switch (dto.Channel)
             {
@@ -445,7 +443,7 @@ namespace Sharing.Api.Controllers
                     break;
             }
 
-            //  submitCaseInfo.Id = await _submitCaseInfoRepository.AddAsync(submitCaseInfo, HttpContext.RequestAborted);
+            submitCaseInfo.Id = await _submitCaseInfoRepository.AddAsync(submitCaseInfo, HttpContext.RequestAborted);
 
             await _mediator.Publish(new OrderCreatedNotification(submitCaseInfo));
         }

+ 2 - 12
src/Sharing.Application/HotlineMsgReceiver.cs

@@ -1,13 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using DotNetCore.CAP;
-using Hotline.Share.Dtos.Order;
+using DotNetCore.CAP;
 using MediatR;
 using Microsoft.Extensions.Logging;
-using Sharing.Notifications;
 using Sharing.Orders;
 
 namespace Sharing.Application
@@ -21,10 +14,7 @@ namespace Sharing.Application
         private readonly IMediator _mediator;
         private readonly ILogger<HotlineMsgReceiver> _logger;
 
-        public HotlineMsgReceiver(
-            IDataOrderRepository dataOrderRepository,
-            IMediator mediator,
-            ILogger<HotlineMsgReceiver> logger)
+        public HotlineMsgReceiver(IDataOrderRepository dataOrderRepository, IMediator mediator, ILogger<HotlineMsgReceiver> logger)
         {
             _dataOrderRepository = dataOrderRepository;
             _mediator = mediator;

+ 12 - 12
src/Sharing.Province/Controllers/ReceiveController.cs

@@ -277,7 +277,7 @@ namespace Sharing.Province.Controllers
             #endregion
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderReceiveCaseInfo, addOrderDto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderReceiveCaseInfo, addOrderDto, cancellationToken: HttpContext.RequestAborted);
 
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
@@ -310,7 +310,7 @@ namespace Sharing.Province.Controllers
             var id = await _getCaseBackResultRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderGetCaseBackResult, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderGetCaseBackResult, dto, cancellationToken: HttpContext.RequestAborted);
 
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
@@ -342,7 +342,7 @@ namespace Sharing.Province.Controllers
             var id = await _delayCaseResultRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderDelayCaseResultReceive, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderDelayCaseResultReceive, dto, cancellationToken: HttpContext.RequestAborted);
 
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
@@ -374,7 +374,7 @@ namespace Sharing.Province.Controllers
             var id = await _supplyCaseInfoRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderSupplyCaseInfoReceive, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderSupplyCaseInfoReceive, dto, cancellationToken: HttpContext.RequestAborted);
 
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
@@ -406,7 +406,7 @@ namespace Sharing.Province.Controllers
             var id = await _revokeCaseInfoRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderRevokeCaseInfo, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderRevokeCaseInfo, dto, cancellationToken: HttpContext.RequestAborted);
 
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
@@ -438,7 +438,7 @@ namespace Sharing.Province.Controllers
             var id = await _remindCaseInfoRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderRemindCaseInfo, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderRemindCaseInfo, dto, cancellationToken: HttpContext.RequestAborted);
 
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
@@ -470,7 +470,7 @@ namespace Sharing.Province.Controllers
             var id = await _sendWarnInfoRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderSendWarnInfo, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderSendWarnInfo, dto, cancellationToken: HttpContext.RequestAborted);
 
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
@@ -502,7 +502,7 @@ namespace Sharing.Province.Controllers
             var id = await _sendSuperviseInfoRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderSendSuperviseInfo, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderSendSuperviseInfo, dto, cancellationToken: HttpContext.RequestAborted);
 
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
@@ -534,7 +534,7 @@ namespace Sharing.Province.Controllers
             var id = await _screenCaseResultReceiveRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderScreenCaseResultReceive, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderScreenCaseResultReceive, dto, cancellationToken: HttpContext.RequestAborted);
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
             else
@@ -565,7 +565,7 @@ namespace Sharing.Province.Controllers
             var id = await _sendCaseEvlResultRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderSendCaseEvlResult, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderSendCaseEvlResult, dto, cancellationToken: HttpContext.RequestAborted);
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
             else
@@ -596,7 +596,7 @@ namespace Sharing.Province.Controllers
             var id = await _getCaseReultSendRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderGetCaseReultSend, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderGetCaseReultSend, dto, cancellationToken: HttpContext.RequestAborted);
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
             else
@@ -628,7 +628,7 @@ namespace Sharing.Province.Controllers
             var id = await _getVisitInfoSendRepository.AddAsync(dto, HttpContext.RequestAborted);
 
             //向业务系统推送消息
-            // await _capPublisher.PublishAsync(EventNames.HotlineOrderGetVisitInfoSend, dto,cancellationToken: HttpContext.RequestAborted);
+            await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineOrderGetVisitInfoSend, dto, cancellationToken: HttpContext.RequestAborted);
             if (!string.IsNullOrEmpty(id))
                 return Reponse.Success("您已成功提交数据!");
             else