|
@@ -13,9 +13,12 @@ using Sharing.Province.Dtos.HuiJu.Send;
|
|
|
using Sharing.Province.Dtos.XieTong.Send;
|
|
|
using Sharing.Province.Extend;
|
|
|
using Sharing.Province.HuiJu.Send;
|
|
|
+using Sharing.Province.Other;
|
|
|
using Sharing.Province.XieTong.Knowledge;
|
|
|
using Sharing.Province.XieTong.Receive;
|
|
|
using Sharing.Province.XieTong.Send;
|
|
|
+using Sharing.Repository.Province.Other;
|
|
|
+using static System.Runtime.InteropServices.JavaScript.JSType;
|
|
|
|
|
|
namespace Sharing.Api.Controllers
|
|
|
{
|
|
@@ -67,6 +70,7 @@ namespace Sharing.Api.Controllers
|
|
|
private readonly IConfiguration _config;
|
|
|
private readonly string AreaCode = "";
|
|
|
private readonly IKnowledgeRawDataRepository _knowledgeRawDataRepository;
|
|
|
+ private readonly IWaitingPushDataRepository _waitingPushDataRepository;
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
@@ -112,6 +116,7 @@ namespace Sharing.Api.Controllers
|
|
|
/// <param name="provinceService"></param>
|
|
|
/// <param name="config"></param>
|
|
|
/// <param name="knowledgeRawDataRepository"></param>
|
|
|
+ /// <param name="waitingPushDataRepository"></param>
|
|
|
public HotlineMessageReceiveController(IMediator mediator, ILogger<HotlineMsgReceiver> logger, IMapper mapper
|
|
|
, IGetCaseResultReceiveRepository getCaseResultReceiveRepository, IGetCaseProcessReceiveRepository getCaseProcessReceiveRepository
|
|
|
, IGetVisitInfoReceiveRepository getVisitInfoReceiveRepository, IGetCaseBackApplyRepository getCaseBackApplyRepository
|
|
@@ -130,7 +135,8 @@ namespace Sharing.Api.Controllers
|
|
|
, IFormMedicalRepository formMedicalRepository, IFormNetWorktecRepository formNetWorktecRepository
|
|
|
, IFormPostRepository formPostRepository, IFormReturnexChangeRepository formReturnexChangeRepository
|
|
|
, IFormShamPubRepository formShamPubRepository, IFormTaxationComplaintRepository formTaxationComplaintRepository
|
|
|
- , IFormMarketRepository formMarketRepository, IProvinceService provinceService, IConfiguration config, IKnowledgeRawDataRepository knowledgeRawDataRepository)
|
|
|
+ , IFormMarketRepository formMarketRepository, IProvinceService provinceService, IConfiguration config
|
|
|
+ , IKnowledgeRawDataRepository knowledgeRawDataRepository, IWaitingPushDataRepository waitingPushDataRepository)
|
|
|
{
|
|
|
_mediator = mediator;
|
|
|
_logger = logger;
|
|
@@ -174,6 +180,7 @@ namespace Sharing.Api.Controllers
|
|
|
_config = config;
|
|
|
AreaCode = _config.GetSection("AreaCode").Get<string>();//获取区域配置信息
|
|
|
_knowledgeRawDataRepository = knowledgeRawDataRepository;
|
|
|
+ _waitingPushDataRepository = waitingPushDataRepository;
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -416,8 +423,19 @@ namespace Sharing.Api.Controllers
|
|
|
//将上报信息写入本地库
|
|
|
data.Id = await _submitCaseProcessRepository.AddAsync(data);
|
|
|
|
|
|
+ //将待推送数据写入待推送表
|
|
|
+ WaitingPushData pushData = new()
|
|
|
+ {
|
|
|
+ ServiceInterface = "SubmitCaseProcess",
|
|
|
+ Data = System.Text.Json.JsonSerializer.Serialize(data),
|
|
|
+ Priority = 0,
|
|
|
+ PushUrl = "submit_case_process",
|
|
|
+ Method = HttpMethods.Post
|
|
|
+ };
|
|
|
+ await _waitingPushDataRepository.AddAsync(pushData);
|
|
|
+
|
|
|
//信息上报
|
|
|
- await _mediator.Publish(new SubmitCaseProcessNotification(data));
|
|
|
+ // await _mediator.Publish(new SubmitCaseProcessNotification(data));
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -438,8 +456,19 @@ namespace Sharing.Api.Controllers
|
|
|
//将上报信息写入本地库
|
|
|
data.Id = await _submitCaseResultRepository.AddAsync(data);
|
|
|
|
|
|
+
|
|
|
+ //将待推送数据写入待推送表
|
|
|
+ WaitingPushData pushData = new()
|
|
|
+ {
|
|
|
+ ServiceInterface = "SubmitCaseResult",
|
|
|
+ Data = System.Text.Json.JsonSerializer.Serialize(data),
|
|
|
+ Priority = 0,
|
|
|
+ PushUrl = "submit_case_result",
|
|
|
+ Method = HttpMethods.Post
|
|
|
+ };
|
|
|
+ await _waitingPushDataRepository.AddAsync(pushData);
|
|
|
//信息上报
|
|
|
- await _mediator.Publish(new SubmitCaseResultNotification(data));
|
|
|
+ //await _mediator.Publish(new SubmitCaseResultNotification(data));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -457,8 +486,20 @@ namespace Sharing.Api.Controllers
|
|
|
var id = await _submitVisitInfoRepository.AddAsync(data);
|
|
|
|
|
|
data.Id = id;
|
|
|
+
|
|
|
+ //将待推送数据写入待推送表
|
|
|
+ WaitingPushData pushData = new()
|
|
|
+ {
|
|
|
+ ServiceInterface = "SubmitVisitInfo",
|
|
|
+ Data = System.Text.Json.JsonSerializer.Serialize(data),
|
|
|
+ Priority = 0,
|
|
|
+ PushUrl = "submit_visit_info",
|
|
|
+ Method = HttpMethods.Post
|
|
|
+ };
|
|
|
+ await _waitingPushDataRepository.AddAsync(pushData);
|
|
|
+
|
|
|
//信息上报
|
|
|
- await _mediator.Publish(new SubmitVisitInfoNotification(data));
|
|
|
+ //await _mediator.Publish(new SubmitVisitInfoNotification(data));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -611,7 +652,8 @@ namespace Sharing.Api.Controllers
|
|
|
};
|
|
|
|
|
|
//信息上报
|
|
|
- await _mediator.Publish(new SubmitCaseExtendsNotification(Newtonsoft.Json.JsonConvert.SerializeObject(submitCaseExtendsInfoId)));
|
|
|
+ //await _mediator.Publish(new SubmitCaseExtendsNotification(Newtonsoft.Json.JsonConvert.SerializeObject(submitCaseExtendsInfoId)));
|
|
|
+ await _mediator.Publish(new SubmitCaseExtendsNotification(System.Text.Json.JsonSerializer.Serialize(submitCaseExtendsInfoId)));
|
|
|
}
|
|
|
#endregion
|
|
|
|