From 4be709a6d9a409f7768aec844947295e5b6b9fc1 Mon Sep 17 00:00:00 2001 From: SoulStar Date: Fri, 20 Dec 2024 17:42:39 +0800 Subject: [PATCH] =?UTF-8?q?add-=20=20=E4=BF=AE=E6=94=B9return?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service_New/Hw_WarehouseServices.cs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Admin.Core.Service/Service_New/Hw_WarehouseServices.cs b/Admin.Core.Service/Service_New/Hw_WarehouseServices.cs index 4f9bfb1..8ac84ee 100644 --- a/Admin.Core.Service/Service_New/Hw_WarehouseServices.cs +++ b/Admin.Core.Service/Service_New/Hw_WarehouseServices.cs @@ -461,7 +461,6 @@ namespace Admin.Core.Service Console.WriteLine($"批次[{plan.Batch}];配方[{item.Recipe}],导入数据失败!"); } - return "成功"; //Console.WriteLine($"{item.PId}——{item.ProductName}——{item.Recipe};状态:{r}"); } catch (Exception ex) @@ -472,14 +471,14 @@ namespace Admin.Core.Service } } + return "成功"; } catch (Exception ex) { - return ex.Message; + return "执行失败" + ex.Message; } - return "执行失败"; } public async Task DownZBPlanAsync(List MesDownLoadPlanList) @@ -656,7 +655,7 @@ namespace Admin.Core.Service //Console.WriteLine($"批次[{plan.Batch}];配方[{item.Recipe}],导入数据失败!"); } //Console.WriteLine($"{item.PId}——{item.ProductName}——{item.Recipe};状态:{r}"); - return "成功"; + } catch (Exception ex) { @@ -665,13 +664,12 @@ namespace Admin.Core.Service //Console.WriteLine($"配方[{item.Recipe}] 导入失败!异常信息:{ex.Message}"); } } + return "成功"; } catch (Exception ex) { - return ex.Message; + return "执行失败" + ex.Message; } - - return "执行失败"; } @@ -846,7 +844,7 @@ namespace Admin.Core.Service } else { - return "成功"; + continue; } //Console.WriteLine($"{item.PId}——{item.ProductName}——{item.Recipe};状态:{r}"); } @@ -859,14 +857,13 @@ namespace Admin.Core.Service } - + return "成功"; } catch (Exception ex) { - return ex.Message; + return "执行失败" + ex.Message; } - return "执行失败"; } #region 保存配方、计划物料信息