|
|
|
@ -30,10 +30,24 @@ namespace Myshipping.Application
|
|
|
|
|
var service = _namedServiceProvider.GetService(nameof(TaskManageService));
|
|
|
|
|
|
|
|
|
|
var rlt = await service.CreateTaskJob(info);
|
|
|
|
|
|
|
|
|
|
if(!rlt.succ)
|
|
|
|
|
{
|
|
|
|
|
result.succ = false;
|
|
|
|
|
result.msg = $"提交派车失败,原因:{rlt.msg}";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
result.succ = true;
|
|
|
|
|
result.msg = "提交成功";
|
|
|
|
|
//提取任务流水号
|
|
|
|
|
result.ext = rlt.ext;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
result.succ = false;
|
|
|
|
|
result.msg = $"保存派车异常,原因:{ex.Message}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
@ -50,11 +64,14 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var service = _namedServiceProvider.GetService(nameof(TaskManageService));
|
|
|
|
|
|
|
|
|
|
var rlt = await service.CancelTaskJob(info);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
result.succ = false;
|
|
|
|
|
result.msg = $"保存派车异常,原因:{ex.Message}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|