From 9cba325e0d7c30644606e63e5df01faba0c42038 Mon Sep 17 00:00:00 2001
From: lss <2538410689@qq.com>
Date: 星期三, 06 八月 2025 17:18:41 +0800
Subject: [PATCH] 优化

---
 HH.WCS.Mobox3 - 大车间/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git "a/HH.WCS.Mobox3 - \345\244\247\350\275\246\351\227\264/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs" "b/HH.WCS.Mobox3 - \345\244\247\350\275\246\351\227\264/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs"
index 00d8e37..ce27583 100644
--- "a/HH.WCS.Mobox3 - \345\244\247\350\275\246\351\227\264/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs"
+++ "b/HH.WCS.Mobox3 - \345\244\247\350\275\246\351\227\264/HH.WCS.Mobox3.JiaTong/api/ApiHelper.cs"
@@ -303,7 +303,7 @@
         /// <returns></returns>
         internal static Result CreatTask(CreatTask model)
         {
-            Result result = new Result() { code = "200", msg = "鐐瑰鐐逛换鍔″垱寤烘垚鍔� };
+            Result result = new Result() { code = "0", msg = "鐐瑰鐐逛换鍔″垱寤烘垚鍔� };
             string Source = "MES";
             if (model == null)
             {
@@ -326,17 +326,13 @@
                 if (startloc != null)
                 {
                     Start = model.InitialLocation;
-
-
                 }
                 else
                 {
-
                     result.code = "1";
                     result.msg = $"鏍规嵁璧风偣{model.InitialLocation},鎵句笉鍒板搴旇揣浣嶏紝璇锋鏌ヨ揣浣嶈〃";
                     AddErrorInfo("璐т綅鏌ユ壘澶辫触", result.msg, Source);
                     return result;
-
                 }
                 endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == model.TargetLocation).First();
                 if (endloc != null)
@@ -388,6 +384,7 @@
                         //LocationHelper.LockLoc(Start, 2);
                         //LocationHelper.LockLoc(End, 1);
                         LogHelper.Info("鍒涘缓浠诲姟鎴愬姛");
+                        return result;
                     }
                     else
                     {

--
Gitblit v1.9.1