You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BookingHeChuan/Myshipping.Application/Service/BookingTruck/TaskManageExternalService.cs

64 lines
1.7 KiB
C#

using Furion.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class TaskManageExternalService : ITaskManageExternalService, ITransient
{
private readonly INamedServiceProvider<ITaskManageService> _namedServiceProvider;
public TaskManageExternalService(INamedServiceProvider<ITaskManageService> namedServiceProvider)
{
_namedServiceProvider = namedServiceProvider;
}
/// <summary>
/// 提交派车
/// </summary>
/// <param name="info">请求派车报文</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> SubmitTruckDispatchAsync(TaskManageOrderMessageInfo info)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try
{
var service = _namedServiceProvider.GetService(nameof(TaskManageService));
var rlt = await service.CreateTaskJob(info);
}
catch(Exception ex)
{
}
return result;
}
/// <summary>
/// 撤销派车
/// </summary>
/// <param name="info">请求派车报文</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> CancelTruckDispatchAsync(TaskManageOrderMessageInfo info)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try
{
}
catch (Exception ex)
{
}
return result;
}
}
}