From bb09e7affb602791af4064cda8cddcfae8b3f3aa Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期四, 22 五月 2025 13:17:46 +0800
Subject: [PATCH] 内部联调测试,修复产品入库货区判断逻辑等问题

---
 api/DebugController.cs |   95 ++++++++++++++++++++++++++---------------------
 1 files changed, 52 insertions(+), 43 deletions(-)

diff --git a/api/DebugController.cs b/api/DebugController.cs
index b59eb96..b113cf7 100644
--- a/api/DebugController.cs
+++ b/api/DebugController.cs
@@ -100,57 +100,61 @@
             return gzResults;
         }
 
-        /// <summary>
-        /// 鍒濆鍖栨暟鎹簱
-        /// </summary>
-        /// <returns></returns>
-        [HttpPost]
-        [Route("CreateDatabase")]
-        public string CreateDatabase(CoverInfo model) {
-            try {
-                var db = new SqlHelper<object>().GetInstance();
-                var cover = model.IsCover;
+        ///// <summary>
+        ///// 鍒濆鍖栨暟鎹簱
+        ///// </summary>
+        ///// <returns></returns>
+        //[HttpPost]
+        //[Route("CreateDatabase")]
+        //public string CreateDatabase(CoverInfo model) {
+        //    try {
+        //        var db = new SqlHelper<object>().GetInstance();
+        //        var cover = model.IsCover;
 
-                var entityTypes = new Type[] {
-                    typeof(TN_CAR_IN),
-                    typeof(TN_CG_Detail),
-                    typeof(TN_Container),
-                    typeof(TN_Loc_Container),
-                    typeof(TN_Location),
-                    typeof(TN_Task),
-                    typeof(TN_Task_Action),
-                    typeof(SYSHelper.OI_SYS_MAXID),
+        //        var entityTypes = new Type[] {
+        //            typeof(TN_CAR_IN),
+        //            typeof(TN_CG_Detail),
+        //            typeof(TN_Container),
+        //            typeof(TN_Loc_Container),
+        //            typeof(TN_Location),
+        //            typeof(TN_Task),
+        //            typeof(TN_Task_Action),
+        //            typeof(SYSHelper.OI_SYS_MAXID),
 
-                };
+        //            typeof(TN_Count_Plan),
+        //            typeof(TN_Count_Order),
+        //            typeof(TN_Count_CG_Detail),
+        //            typeof(TN_Count_Diff),
+        //        };
 
-                using (var tran = db.Ado.UseTran()) {
-                    if (cover) {
-                        // 鍒犻櫎鎵�湁琛紙鎸変緷璧栧叧绯诲�搴忥級
-                        var tables = db.DbMaintenance.GetTableInfoList();
-                        foreach (var table in tables.OrderByDescending(t => t.Name)) {
-                            db.DbMaintenance.DropTable(table.Name);
-                        }
+        //        using (var tran = db.Ado.UseTran()) {
+        //            if (cover) {
+        //                // 鍒犻櫎鎵�湁琛紙鎸変緷璧栧叧绯诲�搴忥級
+        //                var tables = db.DbMaintenance.GetTableInfoList();
+        //                foreach (var table in tables.OrderByDescending(t => t.Name)) {
+        //                    db.DbMaintenance.DropTable(table.Name);
+        //                }
 
-                        // 鍒涘缓鏂拌〃
-                        db.CodeFirst.InitTables(entityTypes);
+        //                // 鍒涘缓鏂拌〃
+        //                db.CodeFirst.InitTables(entityTypes);
 
-                        //db.CodeFirst.BackupTable().InitTables(entityTypes);
-                    }
-                    else {
-                        db.CodeFirst.InitTables(entityTypes);
-                    }
+        //                //db.CodeFirst.BackupTable().InitTables(entityTypes);
+        //            }
+        //            else {
+        //                db.CodeFirst.InitTables(entityTypes);
+        //            }
 
-                    tran.CommitTran();
-                }
+        //            tran.CommitTran();
+        //        }
 
-            }
-            catch (Exception ex) {
-                LogHelper.Info($"鍙戠敓浜嗗紓甯�);
-                return "鍒濆鍖栨暟鎹簱閿欒" + ex.Message;
-            }
+        //    }
+        //    catch (Exception ex) {
+        //        LogHelper.Info($"鍙戠敓浜嗗紓甯�);
+        //        return "鍒濆鍖栨暟鎹簱閿欒" + ex.Message;
+        //    }
 
-            return "鎴愬姛";
-        }
+        //    return "鎴愬姛";
+        //}
 
         /// <summary>
         /// DEBUG锛氭彃鍏ヨ揣浣嶃�瀹瑰櫒銆佽揣鍝佷俊鎭�@@ -247,6 +251,11 @@
             }
         }
 
+        /// <summary>
+        /// DEBUG锛氭牴鎹换鍔″彿璁剧疆鐗╂枡閲嶉噺
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
         [HttpPost]
         [Route("SetTaskWeight")]
         public string SetTaskWeight(SetTaskWeightInfo model) {

--
Gitblit v1.9.1