From 0e829f4a5321c10900e1f4130a80f2e8c804a08e Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期四, 19 六月 2025 17:30:47 +0800
Subject: [PATCH] 修复取消订单和更改终点货区流程与国自AGV交互的部分细节问题

---
 api/DebugController.cs |  151 --------------------------------------------------
 1 files changed, 0 insertions(+), 151 deletions(-)

diff --git a/api/DebugController.cs b/api/DebugController.cs
index 7f8d113..109a250 100644
--- a/api/DebugController.cs
+++ b/api/DebugController.cs
@@ -100,157 +100,6 @@
             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;
-
-        //        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);
-        //                }
-
-        //                // 鍒涘缓鏂拌〃
-        //                db.CodeFirst.InitTables(entityTypes);
-
-        //                //db.CodeFirst.BackupTable().InitTables(entityTypes);
-        //            }
-        //            else {
-        //                db.CodeFirst.InitTables(entityTypes);
-        //            }
-
-        //            tran.CommitTran();
-        //        }
-
-        //    }
-        //    catch (Exception ex) {
-        //        LogHelper.Info($"鍙戠敓浜嗗紓甯�);
-        //        return "鍒濆鍖栨暟鎹簱閿欒" + ex.Message;
-        //    }
-
-        //    return "鎴愬姛";
-        //}
-
-        /// <summary>
-        /// DEBUG锛氭彃鍏ヨ揣浣嶃�瀹瑰櫒銆佽揣鍝佷俊鎭�-        /// </summary>
-        /// <returns></returns>
-        [HttpPost]
-        [Route("InsertLocCntrCg")]
-        public string InsertLocCntrCg(LocCntrCg locCntrCg) {
-            var db = new SqlHelper<object>().GetInstance();
-
-            try {
-                using (var tran = db.UseTran()) {
-                    LogHelper.Info("LogCntrCg锛� + JsonConvert.SerializeObject(locCntrCg));
-                    if (string.IsNullOrEmpty(locCntrCg.LocCode)) {
-                        return "鍙傛暟闈炴硶";
-                    }
-
-                    var loc = db.Queryable<TN_Location>().First(a => a.S_CODE == locCntrCg.LocCode);
-                    if (loc == null) {
-                        var newLoc = new TN_Location {
-                            S_CODE = locCntrCg.LocCode,
-                            S_AREA_CODE = locCntrCg.LocArea ?? ""
-                        };
-
-                        if (db.Insertable<TN_Location>(newLoc).ExecuteCommand() <= 0) {
-                            tran.RollbackTran();
-                            LogHelper.Info($"鎻掑叆浣嶇疆{locCntrCg.LocCode}澶辫触");
-                            return "鎻掑叆澶辫触";
-                        }
-
-                        loc = newLoc;
-                    }
-
-                    //if (loc.N_CURRENT_NUM == 0) {
-                    //    loc.N_CURRENT_NUM = 1;
-                    //    if (db.Updateable<TN_Location>(loc).UpdateColumns(
-                    //        it => new { it.N_CURRENT_NUM, it.T_MODIFY }).ExecuteCommand() <= 0) {
-                    //        tran.RollbackTran();
-                    //        LogHelper.Info($"淇敼浣嶇疆{locCntrCg.LocCode}澶辫触");
-                    //        continue;
-                    //    }
-                    //}
-
-                    if (string.IsNullOrEmpty(locCntrCg.CntrCode)) {
-                        tran.CommitTran();
-                        LogHelper.Info("瀹瑰櫒鍙蜂负绌猴紝涓嶅啀璇诲彇鍚庨潰鐨勬暟鎹�);
-                        return "瀹瑰櫒鍙蜂负绌猴紝涓嶅啀璇诲彇鍚庨潰鐨勬暟鎹�;
-                    }
-
-                    var locCntrRel = db.Queryable<TN_Loc_Container>().First(a => a.S_LOC_CODE == locCntrCg.LocCode
-                        && a.S_CNTR_CODE == locCntrCg.CntrCode);
-
-                    if (locCntrRel == null) {
-                        var newLocCntrRel = new TN_Loc_Container {
-                            S_LOC_CODE = locCntrCg.LocCode,
-                            S_CNTR_CODE = locCntrCg.CntrCode
-                        };
-
-                        loc.N_CURRENT_NUM = 1;
-
-                        if (db.Insertable<TN_Loc_Container>(newLocCntrRel).ExecuteCommand() <= 0
-                            && db.Updateable<TN_Location>(loc).UpdateColumns(c => c.N_CURRENT_NUM).ExecuteCommand() <= 0) {
-                            tran.RollbackTran();
-                            LogHelper.Info($"鎻掑叆浣嶇疆鎵樼洏鍏崇郴{locCntrCg.LocCode}-{locCntrCg.CntrCode}澶辫触");
-                            return "鎻掑叆澶辫触";
-                        }
-                    }
-
-                    if (string.IsNullOrEmpty(locCntrCg.ItemCode)) {
-                        tran.CommitTran();
-                        LogHelper.Info("鐗╂枡鍙蜂负绌猴紝涓嶅啀璇诲彇鍚庨潰鐨勬暟鎹�);
-                        return "鐗╂枡鍙蜂负绌猴紝涓嶅啀璇诲彇鍚庨潰鐨勬暟鎹�;
-                    }
-
-                    var cgDetail = db.Queryable<TN_CG_Detail>().First(a => a.S_CNTR_CODE == locCntrCg.CntrCode
-                        && a.S_ITEM_CODE == locCntrCg.ItemCode);
-                    if (cgDetail == null) {
-                        var locList = new List<TN_CG_Detail>();
-                        locList.Add(new TN_CG_Detail { S_CNTR_CODE = locCntrCg.CntrCode, S_ITEM_CODE = locCntrCg.ItemCode, S_BATCH_NO = locCntrCg.BatchNo ?? "" });
-                        if (db.Insertable<TN_CG_Detail>(locList).ExecuteCommand() <= 0) {
-                            tran.RollbackTran();
-                            LogHelper.Info($"鎻掑叆鎵樼洏鐗╂枡鍏崇郴{locCntrCg.CntrCode}-{locCntrCg}澶辫触");
-                            return "鎻掑叆澶辫触";
-                        }
-                    }
-                    tran.CommitTran();
-                }
-
-                return "鎻掑叆鏁版嵁鎴愬姛";
-
-            }
-            catch (Exception ex) {
-                return $"{ex.Message}";
-            }
-        }
-
         /// <summary>
         /// DEBUG锛氭牴鎹换鍔″彿璁剧疆鐗╂枡閲嶉噺
         /// </summary>

--
Gitblit v1.9.1