|
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Mvc;
|
|
|
using Sharing.Province.Dtos.XieTong;
|
|
|
using Sharing.Province.XieTong;
|
|
|
using Sharing.WebCore;
|
|
|
+using System.IO.Pipelines;
|
|
|
|
|
|
namespace Sharing.Province.Controllers
|
|
|
{
|
|
@@ -24,6 +25,7 @@ namespace Sharing.Province.Controllers
|
|
|
private readonly IRemindCaseInfoRepository _remindCaseInfoRepository;
|
|
|
private readonly ISendWarnInfoRepository _sendWarnInfoRepository;
|
|
|
private readonly ISendSuperviseInfoRepository _sendSuperviseInfoRepository;
|
|
|
+ private readonly IScreenCaseResultReceiveRepository _screenCaseResultReceiveRepository;
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
@@ -41,7 +43,7 @@ namespace Sharing.Province.Controllers
|
|
|
IGetCaseBackResultRepository getCaseBackResultRepository, IDelayCaseResultRepository delayCaseResultRepository
|
|
|
, ISupplyCaseInfoRepository supplyCaseInfoRepository, IRevokeCaseInfoRepository revokeCaseInfoRepository
|
|
|
, IRemindCaseInfoRepository remindCaseInfoRepository, ISendWarnInfoRepository sendWarnInfoRepository
|
|
|
- , ISendSuperviseInfoRepository sendSuperviseInfoRepository)
|
|
|
+ , ISendSuperviseInfoRepository sendSuperviseInfoRepository, IScreenCaseResultReceiveRepository screenCaseResultReceiveRepository)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_capPublisher = capPublisher;
|
|
@@ -53,6 +55,7 @@ namespace Sharing.Province.Controllers
|
|
|
_remindCaseInfoRepository = remindCaseInfoRepository;
|
|
|
_sendWarnInfoRepository = sendWarnInfoRepository;
|
|
|
_sendSuperviseInfoRepository = sendSuperviseInfoRepository;
|
|
|
+ _screenCaseResultReceiveRepository = screenCaseResultReceiveRepository;
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -462,5 +465,34 @@ namespace Sharing.Province.Controllers
|
|
|
|
|
|
return id;
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 服务工单甄别结果接口
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="receiveScreenCaseResultReceive">服务工单甄别结果对象</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [Route("screen_case_result_receive")]
|
|
|
+ public async Task<string> ScreenCaseResultReceive([FromBody] ScreenCaseResultReceiveRequest receiveScreenCaseResultReceive)
|
|
|
+ {
|
|
|
+ // 验证
|
|
|
+ if (receiveScreenCaseResultReceive is null || receiveScreenCaseResultReceive.paras is null)
|
|
|
+ return "数据解析失败";
|
|
|
+
|
|
|
+ string strResult = receiveScreenCaseResultReceive.paras.Validate();
|
|
|
+ if (!string.IsNullOrEmpty(strResult))
|
|
|
+ return strResult;
|
|
|
+
|
|
|
+ //转换数据
|
|
|
+ var dto = _mapper.Map<ScreenCaseResultReceive>(receiveScreenCaseResultReceive.paras);
|
|
|
+
|
|
|
+ //添加数据
|
|
|
+ var id = await _screenCaseResultReceiveRepository.AddAsync(dto, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ //向业务系统推送消息
|
|
|
+ // await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ return id;
|
|
|
+ }
|
|
|
}
|
|
|
}
|