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 _namedServiceProvider; public TaskManageExternalService(INamedServiceProvider namedServiceProvider) { _namedServiceProvider = namedServiceProvider; } /// /// 提交派车 /// /// 请求派车报文 /// 返回回执 public async Task 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; } /// /// 撤销派车 /// /// 请求派车报文 /// 返回回执 public async Task CancelTruckDispatchAsync(TaskManageOrderMessageInfo info) { TaskManageOrderResultDto result = new TaskManageOrderResultDto(); try { } catch (Exception ex) { } return result; } } }