|
@@ -1,20 +1,22 @@
|
|
using DotNetCore.CAP;
|
|
using DotNetCore.CAP;
|
|
using Hotline.Share.Enums.Order;
|
|
using Hotline.Share.Enums.Order;
|
|
using MapsterMapper;
|
|
using MapsterMapper;
|
|
|
|
+using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
-using Sharing.Province.Dtos.XieTong;
|
|
|
|
-using Sharing.Province.XieTong;
|
|
|
|
|
|
+using Sharing.Province.Dtos;
|
|
|
|
+using Sharing.Province.Dtos.XieTong.Receive;
|
|
|
|
+using Sharing.Province.XieTong.Receive;
|
|
using Sharing.WebCore;
|
|
using Sharing.WebCore;
|
|
-using System.IO.Pipelines;
|
|
|
|
|
|
|
|
namespace Sharing.Province.Controllers
|
|
namespace Sharing.Province.Controllers
|
|
{
|
|
{
|
|
- #region 注入
|
|
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
///
|
|
///
|
|
/// </summary>
|
|
/// </summary>
|
|
public class ReceiveController : BaseController
|
|
public class ReceiveController : BaseController
|
|
{
|
|
{
|
|
|
|
+ #region 注入
|
|
private readonly IMapper _mapper;
|
|
private readonly IMapper _mapper;
|
|
private readonly ICapPublisher _capPublisher;
|
|
private readonly ICapPublisher _capPublisher;
|
|
private readonly IReceiveCaseInfoRepository _receiveCaseInfoRepository;
|
|
private readonly IReceiveCaseInfoRepository _receiveCaseInfoRepository;
|
|
@@ -26,6 +28,9 @@ namespace Sharing.Province.Controllers
|
|
private readonly ISendWarnInfoRepository _sendWarnInfoRepository;
|
|
private readonly ISendWarnInfoRepository _sendWarnInfoRepository;
|
|
private readonly ISendSuperviseInfoRepository _sendSuperviseInfoRepository;
|
|
private readonly ISendSuperviseInfoRepository _sendSuperviseInfoRepository;
|
|
private readonly IScreenCaseResultReceiveRepository _screenCaseResultReceiveRepository;
|
|
private readonly IScreenCaseResultReceiveRepository _screenCaseResultReceiveRepository;
|
|
|
|
+ private readonly ISendCaseEvlResultRepository _sendCaseEvlResultRepository;
|
|
|
|
+ private readonly IGetCaseReultSendRepository _getCaseReultSendRepository;
|
|
|
|
+ private readonly IGetVisitInfoSendRepository _getVisitInfoSendRepository;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
///
|
|
///
|
|
@@ -39,11 +44,18 @@ namespace Sharing.Province.Controllers
|
|
/// <param name="revokeCaseInfoRepository"></param>
|
|
/// <param name="revokeCaseInfoRepository"></param>
|
|
/// <param name="remindCaseInfoRepository"></param>
|
|
/// <param name="remindCaseInfoRepository"></param>
|
|
/// <param name="sendWarnInfoRepository"></param>
|
|
/// <param name="sendWarnInfoRepository"></param>
|
|
|
|
+ /// <param name="sendSuperviseInfoRepository"></param>
|
|
|
|
+ /// <param name="screenCaseResultReceiveRepository"></param>
|
|
|
|
+ /// <param name="sendCaseEvlResultRepository"></param>
|
|
|
|
+ /// <param name="getCaseReultSendRepository"></param>
|
|
|
|
+ /// <param name="getVisitInfoSendRepository"></param>
|
|
public ReceiveController(IMapper mapper, ICapPublisher capPublisher, IReceiveCaseInfoRepository receiveCaseInfoRepository,
|
|
public ReceiveController(IMapper mapper, ICapPublisher capPublisher, IReceiveCaseInfoRepository receiveCaseInfoRepository,
|
|
IGetCaseBackResultRepository getCaseBackResultRepository, IDelayCaseResultRepository delayCaseResultRepository
|
|
IGetCaseBackResultRepository getCaseBackResultRepository, IDelayCaseResultRepository delayCaseResultRepository
|
|
, ISupplyCaseInfoRepository supplyCaseInfoRepository, IRevokeCaseInfoRepository revokeCaseInfoRepository
|
|
, ISupplyCaseInfoRepository supplyCaseInfoRepository, IRevokeCaseInfoRepository revokeCaseInfoRepository
|
|
, IRemindCaseInfoRepository remindCaseInfoRepository, ISendWarnInfoRepository sendWarnInfoRepository
|
|
, IRemindCaseInfoRepository remindCaseInfoRepository, ISendWarnInfoRepository sendWarnInfoRepository
|
|
- , ISendSuperviseInfoRepository sendSuperviseInfoRepository, IScreenCaseResultReceiveRepository screenCaseResultReceiveRepository)
|
|
|
|
|
|
+ , ISendSuperviseInfoRepository sendSuperviseInfoRepository, IScreenCaseResultReceiveRepository screenCaseResultReceiveRepository
|
|
|
|
+ , ISendCaseEvlResultRepository sendCaseEvlResultRepository, IGetCaseReultSendRepository getCaseReultSendRepository
|
|
|
|
+ , IGetVisitInfoSendRepository getVisitInfoSendRepository)
|
|
{
|
|
{
|
|
_mapper = mapper;
|
|
_mapper = mapper;
|
|
_capPublisher = capPublisher;
|
|
_capPublisher = capPublisher;
|
|
@@ -56,6 +68,9 @@ namespace Sharing.Province.Controllers
|
|
_sendWarnInfoRepository = sendWarnInfoRepository;
|
|
_sendWarnInfoRepository = sendWarnInfoRepository;
|
|
_sendSuperviseInfoRepository = sendSuperviseInfoRepository;
|
|
_sendSuperviseInfoRepository = sendSuperviseInfoRepository;
|
|
_screenCaseResultReceiveRepository = screenCaseResultReceiveRepository;
|
|
_screenCaseResultReceiveRepository = screenCaseResultReceiveRepository;
|
|
|
|
+ _sendCaseEvlResultRepository = sendCaseEvlResultRepository;
|
|
|
|
+ _getCaseReultSendRepository = getCaseReultSendRepository;
|
|
|
|
+ _getVisitInfoSendRepository = getVisitInfoSendRepository;
|
|
}
|
|
}
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
@@ -65,18 +80,19 @@ namespace Sharing.Province.Controllers
|
|
/// <param name="receiveCaseInfo"></param>
|
|
/// <param name="receiveCaseInfo"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("receive_case_info")]
|
|
[HttpPost("receive_case_info")]
|
|
- public async Task<string> ReceiveCaseInfo([FromBody] ReceiveCaseInfoRequest receiveCaseInfo)
|
|
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> ReceiveCaseInfo([FromBody] ReceiveCaseInfoRequest receiveCaseInfo)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveCaseInfo is null || receiveCaseInfo.paras is null)
|
|
if (receiveCaseInfo is null || receiveCaseInfo.paras is null)
|
|
{
|
|
{
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ Reponse.Failed("数据解析失败");
|
|
}
|
|
}
|
|
|
|
|
|
//验证接收的数据是否正确
|
|
//验证接收的数据是否正确
|
|
string strResult = receiveCaseInfo.paras.Validate();
|
|
string strResult = receiveCaseInfo.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<ReceiveCaseInfo>(receiveCaseInfo.paras);
|
|
var dto = _mapper.Map<ReceiveCaseInfo>(receiveCaseInfo.paras);
|
|
@@ -263,7 +279,10 @@ namespace Sharing.Province.Controllers
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, addOrderDto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, addOrderDto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -272,16 +291,17 @@ namespace Sharing.Province.Controllers
|
|
/// <param name="receiveBackResult">退回反馈</param>
|
|
/// <param name="receiveBackResult">退回反馈</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("get_case_back_result")]
|
|
[HttpPost("get_case_back_result")]
|
|
- public async Task<string> GetCaseBackResult([FromBody] GetCaseBackResultRequest receiveBackResult)
|
|
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> GetCaseBackResult([FromBody] GetCaseBackResultRequest receiveBackResult)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveBackResult is null || receiveBackResult.paras is null)
|
|
if (receiveBackResult is null || receiveBackResult.paras is null)
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ Reponse.Failed("数据解析失败");
|
|
|
|
|
|
//验证接收的数据是否正确
|
|
//验证接收的数据是否正确
|
|
string strResult = receiveBackResult.paras.Validate();
|
|
string strResult = receiveBackResult.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<GetCaseBackResult>(receiveBackResult.paras);
|
|
var dto = _mapper.Map<GetCaseBackResult>(receiveBackResult.paras);
|
|
@@ -292,7 +312,10 @@ namespace Sharing.Province.Controllers
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -301,15 +324,16 @@ namespace Sharing.Province.Controllers
|
|
/// <param name="receiveDelayCaseResult">延时审核结果对象</param>
|
|
/// <param name="receiveDelayCaseResult">延时审核结果对象</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("delay_case_result_receive")]
|
|
[HttpPost("delay_case_result_receive")]
|
|
- public async Task<string> DelayCaseResultReceive([FromBody] DelayCaseResultRequest receiveDelayCaseResult)
|
|
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> DelayCaseResultReceive([FromBody] DelayCaseResultRequest receiveDelayCaseResult)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveDelayCaseResult is null || receiveDelayCaseResult.paras is null)
|
|
if (receiveDelayCaseResult is null || receiveDelayCaseResult.paras is null)
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ Reponse.Failed("数据解析失败");
|
|
|
|
|
|
string strResult = receiveDelayCaseResult.paras.Validate();
|
|
string strResult = receiveDelayCaseResult.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<DelayCaseResult>(receiveDelayCaseResult.paras);
|
|
var dto = _mapper.Map<DelayCaseResult>(receiveDelayCaseResult.paras);
|
|
@@ -320,7 +344,10 @@ namespace Sharing.Province.Controllers
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -329,15 +356,16 @@ namespace Sharing.Province.Controllers
|
|
/// <param name="receiveSupplyCaseInfo">交办补充诉求对象</param>
|
|
/// <param name="receiveSupplyCaseInfo">交办补充诉求对象</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("supply_case_info_receive")]
|
|
[HttpPost("supply_case_info_receive")]
|
|
- public async Task<string> SupplyCaseInfoReceive([FromBody] SupplyCaseInfoRequest receiveSupplyCaseInfo)
|
|
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> SupplyCaseInfoReceive([FromBody] SupplyCaseInfoRequest receiveSupplyCaseInfo)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveSupplyCaseInfo is null || receiveSupplyCaseInfo.paras is null)
|
|
if (receiveSupplyCaseInfo is null || receiveSupplyCaseInfo.paras is null)
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ Reponse.Failed("数据解析失败");
|
|
|
|
|
|
string strResult = receiveSupplyCaseInfo.paras.Validate();
|
|
string strResult = receiveSupplyCaseInfo.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<SupplyCaseInfo>(receiveSupplyCaseInfo.paras);
|
|
var dto = _mapper.Map<SupplyCaseInfo>(receiveSupplyCaseInfo.paras);
|
|
@@ -348,7 +376,10 @@ namespace Sharing.Province.Controllers
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -357,15 +388,16 @@ namespace Sharing.Province.Controllers
|
|
/// <param name="receiveRevokeCaseInfo">撤单对象</param>
|
|
/// <param name="receiveRevokeCaseInfo">撤单对象</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("revoke_case_info")]
|
|
[HttpPost("revoke_case_info")]
|
|
- public async Task<string> RevokeCaseInfo([FromBody] RevokeCaseInfoRequest receiveRevokeCaseInfo)
|
|
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> RevokeCaseInfo([FromBody] RevokeCaseInfoRequest receiveRevokeCaseInfo)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveRevokeCaseInfo is null || receiveRevokeCaseInfo.paras is null)
|
|
if (receiveRevokeCaseInfo is null || receiveRevokeCaseInfo.paras is null)
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ Reponse.Failed("数据解析失败");
|
|
|
|
|
|
string strResult = receiveRevokeCaseInfo.paras.Validate();
|
|
string strResult = receiveRevokeCaseInfo.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<RevokeCaseInfo>(receiveRevokeCaseInfo.paras);
|
|
var dto = _mapper.Map<RevokeCaseInfo>(receiveRevokeCaseInfo.paras);
|
|
@@ -376,7 +408,10 @@ namespace Sharing.Province.Controllers
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -384,17 +419,17 @@ namespace Sharing.Province.Controllers
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="receiveRemindCaseInfo">催单对象</param>
|
|
/// <param name="receiveRemindCaseInfo">催单对象</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- [HttpPost]
|
|
|
|
- [Route("remind_case_info")]
|
|
|
|
- public async Task<string> RemindCaseInfo([FromBody] RemindCaseInfoRequest receiveRemindCaseInfo)
|
|
|
|
|
|
+ [HttpPost("remind_case_info")]
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> RemindCaseInfo([FromBody] RemindCaseInfoRequest receiveRemindCaseInfo)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveRemindCaseInfo is null || receiveRemindCaseInfo.paras is null)
|
|
if (receiveRemindCaseInfo is null || receiveRemindCaseInfo.paras is null)
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ Reponse.Failed("数据解析失败");
|
|
|
|
|
|
string strResult = receiveRemindCaseInfo.paras.Validate();
|
|
string strResult = receiveRemindCaseInfo.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<RemindCaseInfo>(receiveRemindCaseInfo.paras);
|
|
var dto = _mapper.Map<RemindCaseInfo>(receiveRemindCaseInfo.paras);
|
|
@@ -405,7 +440,10 @@ namespace Sharing.Province.Controllers
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -413,17 +451,17 @@ namespace Sharing.Province.Controllers
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="receiveSendWarnInfo">预警对象</param>
|
|
/// <param name="receiveSendWarnInfo">预警对象</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- [HttpPost]
|
|
|
|
- [Route("send_warn_info")]
|
|
|
|
- public async Task<string> SendWarnInfo([FromBody] SendWarnInfoRequest receiveSendWarnInfo)
|
|
|
|
|
|
+ [HttpPost("send_warn_info")]
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> SendWarnInfo([FromBody] SendWarnInfoRequest receiveSendWarnInfo)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveSendWarnInfo is null || receiveSendWarnInfo.paras is null)
|
|
if (receiveSendWarnInfo is null || receiveSendWarnInfo.paras is null)
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ Reponse.Failed("数据解析失败");
|
|
|
|
|
|
string strResult = receiveSendWarnInfo.paras.Validate();
|
|
string strResult = receiveSendWarnInfo.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<SendWarnInfo>(receiveSendWarnInfo.paras);
|
|
var dto = _mapper.Map<SendWarnInfo>(receiveSendWarnInfo.paras);
|
|
@@ -434,7 +472,10 @@ namespace Sharing.Province.Controllers
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -442,17 +483,17 @@ namespace Sharing.Province.Controllers
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="receiveSendSuperviseInfo">督办工单对象</param>
|
|
/// <param name="receiveSendSuperviseInfo">督办工单对象</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- [HttpPost]
|
|
|
|
- [Route("send_supervise_info")]
|
|
|
|
- public async Task<string> SendSuperviseInfo([FromBody] SendSuperviseInfoRequest receiveSendSuperviseInfo)
|
|
|
|
|
|
+ [HttpPost("send_supervise_info")]
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> SendSuperviseInfo([FromBody] SendSuperviseInfoRequest receiveSendSuperviseInfo)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveSendSuperviseInfo is null || receiveSendSuperviseInfo.paras is null)
|
|
if (receiveSendSuperviseInfo is null || receiveSendSuperviseInfo.paras is null)
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ Reponse.Failed("数据解析失败");
|
|
|
|
|
|
string strResult = receiveSendSuperviseInfo.paras.Validate();
|
|
string strResult = receiveSendSuperviseInfo.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<SendSuperviseInfo>(receiveSendSuperviseInfo.paras);
|
|
var dto = _mapper.Map<SendSuperviseInfo>(receiveSendSuperviseInfo.paras);
|
|
@@ -463,7 +504,10 @@ namespace Sharing.Province.Controllers
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -471,17 +515,17 @@ namespace Sharing.Province.Controllers
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="receiveScreenCaseResultReceive">服务工单甄别结果对象</param>
|
|
/// <param name="receiveScreenCaseResultReceive">服务工单甄别结果对象</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- [HttpPost]
|
|
|
|
- [Route("screen_case_result_receive")]
|
|
|
|
- public async Task<string> ScreenCaseResultReceive([FromBody] ScreenCaseResultReceiveRequest receiveScreenCaseResultReceive)
|
|
|
|
|
|
+ [HttpPost("screen_case_result_receive")]
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> ScreenCaseResultReceive([FromBody] ScreenCaseResultReceiveRequest receiveScreenCaseResultReceive)
|
|
{
|
|
{
|
|
// 验证
|
|
// 验证
|
|
if (receiveScreenCaseResultReceive is null || receiveScreenCaseResultReceive.paras is null)
|
|
if (receiveScreenCaseResultReceive is null || receiveScreenCaseResultReceive.paras is null)
|
|
- return "数据解析失败";
|
|
|
|
|
|
+ return Reponse.Failed("数据解析失败");
|
|
|
|
|
|
string strResult = receiveScreenCaseResultReceive.paras.Validate();
|
|
string strResult = receiveScreenCaseResultReceive.paras.Validate();
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
if (!string.IsNullOrEmpty(strResult))
|
|
- return strResult;
|
|
|
|
|
|
+ return Reponse.Failed(strResult);
|
|
|
|
|
|
//转换数据
|
|
//转换数据
|
|
var dto = _mapper.Map<ScreenCaseResultReceive>(receiveScreenCaseResultReceive.paras);
|
|
var dto = _mapper.Map<ScreenCaseResultReceive>(receiveScreenCaseResultReceive.paras);
|
|
@@ -491,8 +535,105 @@ namespace Sharing.Province.Controllers
|
|
|
|
|
|
//向业务系统推送消息
|
|
//向业务系统推送消息
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
// await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 交办工单满意度接收接口
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="receiveSendCaseEvlResult">交办工单满意度对象</param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost("send_case_evl_result")]
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ public async Task<Reponse> SendCaseEvlResult([FromBody] SendCaseEvlResultRequest receiveSendCaseEvlResult)
|
|
|
|
+ {
|
|
|
|
+ // 验证
|
|
|
|
+ if (receiveSendCaseEvlResult is null || receiveSendCaseEvlResult.paras is null)
|
|
|
|
+ return Reponse.Failed("数据解析失败");
|
|
|
|
+
|
|
|
|
+ string strResult = receiveSendCaseEvlResult.paras.Validate();
|
|
|
|
+ if (!string.IsNullOrEmpty(strResult))
|
|
|
|
+ return Reponse.Failed(strResult);
|
|
|
|
+
|
|
|
|
+ //转换数据
|
|
|
|
+ var dto = _mapper.Map<SendCaseEvlResult>(receiveSendCaseEvlResult.paras);
|
|
|
|
+
|
|
|
|
+ //添加数据
|
|
|
|
+ var id = await _sendCaseEvlResultRepository.AddAsync(dto, HttpContext.RequestAborted);
|
|
|
|
+
|
|
|
|
+ //向业务系统推送消息
|
|
|
|
+ // await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 上报工单处理结果/退回接口
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="receiveGetCaseReultSend">上报工单处理结果/退回对象</param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [Route("get_case_result_send")]
|
|
|
|
+ public async Task<Reponse> GetCaseReultSend([FromBody] GetCaseReultSendRequest receiveGetCaseReultSend)
|
|
|
|
+ {
|
|
|
|
+ // 验证
|
|
|
|
+ if (receiveGetCaseReultSend is null || receiveGetCaseReultSend.paras is null)
|
|
|
|
+ return Reponse.Failed("数据解析失败");
|
|
|
|
+
|
|
|
|
+ string strResult = receiveGetCaseReultSend.paras.Validate();
|
|
|
|
+ if (!string.IsNullOrEmpty(strResult))
|
|
|
|
+ return Reponse.Failed(strResult);
|
|
|
|
+
|
|
|
|
+ //转换数据
|
|
|
|
+ var dto = _mapper.Map<GetCaseReultSend>(receiveGetCaseReultSend.paras);
|
|
|
|
+
|
|
|
|
+ //添加数据
|
|
|
|
+ var id = await _getCaseReultSendRepository.AddAsync(dto, HttpContext.RequestAborted);
|
|
|
|
+
|
|
|
|
+ //向业务系统推送消息
|
|
|
|
+ // await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 上报工单评价接口
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="receiveGetVisitInfoSend">上报工单评价对象</param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [Route("get_visit_info_send")]
|
|
|
|
+ public async Task<Reponse> GetVisitInfoSend([FromBody] GetCaseReultSendRequest receiveGetVisitInfoSend)
|
|
|
|
+ {
|
|
|
|
+ // 验证
|
|
|
|
+ if (receiveGetVisitInfoSend is null || receiveGetVisitInfoSend.paras is null)
|
|
|
|
+ return Reponse.Failed("数据解析失败");
|
|
|
|
+
|
|
|
|
+ string strResult = receiveGetVisitInfoSend.paras.Validate();
|
|
|
|
+ if (!string.IsNullOrEmpty(strResult))
|
|
|
|
+ return Reponse.Failed(strResult);
|
|
|
|
+
|
|
|
|
+ //转换数据
|
|
|
|
+ var dto = _mapper.Map<GetVisitInfoSend>(receiveGetVisitInfoSend.paras);
|
|
|
|
|
|
- return id;
|
|
|
|
|
|
+ //添加数据
|
|
|
|
+ var id = await _getVisitInfoSendRepository.AddAsync(dto, HttpContext.RequestAborted);
|
|
|
|
+
|
|
|
|
+ //向业务系统推送消息
|
|
|
|
+ // await _capPublisher.PublishAsync(EventNames.HotlineOrderCreated, dto,cancellationToken: HttpContext.RequestAborted);
|
|
|
|
+ if (!string.IsNullOrEmpty(id))
|
|
|
|
+ return Reponse.Success("您已成功提交数据!");
|
|
|
|
+ else
|
|
|
|
+ return Reponse.Failed("接口调用失败!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|