From e1bd5a87bc9eb58a99e97220954de2f059b340b3 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 20 Apr 2023 11:09:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B4=BE=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingTruck/TaskManageExternalService.cs | 21 +++++++++++++++++-- .../Dtos/TaskManageOrderMessageMainInfo.cs | 1 + .../TaskManagePlat/TaskManageTruckService.cs | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Myshipping.Application/Service/BookingTruck/TaskManageExternalService.cs b/Myshipping.Application/Service/BookingTruck/TaskManageExternalService.cs index c40ff753..7c375d54 100644 --- a/Myshipping.Application/Service/BookingTruck/TaskManageExternalService.cs +++ b/Myshipping.Application/Service/BookingTruck/TaskManageExternalService.cs @@ -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; diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs index 620334de..a0d91a8c 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskManageOrderMessageMainInfo.cs @@ -26,6 +26,7 @@ namespace Myshipping.Application /// 船公司代号 /// public string CarrierId { get; set; } + /// /// 任务标题 /// diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs index c3a2ccd1..6bb89999 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageTruckService.cs @@ -82,7 +82,7 @@ namespace Myshipping.Application /// /// 派车主键 /// 返回回执 - [HttpGet("/BookingTruck/Print")] + [HttpGet("/TaskManageTruck/Print")] public async Task Print(long id) { TaskManageOrderResultDto result = new TaskManageOrderResultDto();