From d23feff4aef10e539e9f5926dd0e496c0612b4e6 Mon Sep 17 00:00:00 2001
From: 杨张扬 <634643841@qq.com>
Date: 星期五, 23 五月 2025 17:26:45 +0800
Subject: [PATCH] 双钱-优化字段的类型,自动不合格出库复检测试

---
 core/Monitor.cs               |   23 +++++++++++++----------
 models/TN_YearProDetail.cs    |    2 +-
 models/TN_TN_SPE.cs           |    2 +-
 models/TN_RemeltDetail.cs     |    2 +-
 models/TN_InventoryM.cs       |    2 +-
 models/TN_EquipProDetail.cs   |    2 +-
 models/TN_DayProDetail.cs     |    2 +-
 models/TN_MonthProDetail.cs   |    2 +-
 models/TN_WeekProDetail.cs    |    2 +-
 models/TN_SurplusDetail.cs    |    2 +-
 models/TN_Operator_info.cs    |    2 +-
 models/TN_Component_Detail.cs |    2 +-
 12 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/core/Monitor.cs b/core/Monitor.cs
index ed34896..b0de987 100644
--- a/core/Monitor.cs
+++ b/core/Monitor.cs
@@ -701,21 +701,24 @@
             var db = new SqlHelper<object>().GetInstance();
             try
             {
-                var endLoc = db.Queryable<TN_Location>().First(a => a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.S_AREA_CODE == Settings.Areas[7]);
-                if (endLoc == null)
-                {
-                    LogHelper.Info($"鏈壘鍒板悎閫傜殑缁堢偣璐т綅锛岃姹俛.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == 鏃�&& a.S_AREA_CODE == Settings.Areas[7]");
-                    return;
-                }
+                
                 var startLoc = db.Queryable<TN_Location>().
                     LeftJoin<TN_Loc_Container>((o, i) => o.S_CODE == i.S_LOC_CODE).
                     LeftJoin<TN_CG_Detail>((o, i, s) => i.S_CNTR_CODE == s.S_CNTR_CODE).
                     Where((o, i, s) => o.N_CURRENT_NUM == 1 && o.N_LOCK_STATE == 0 && o.S_LOCK_STATE == "鏃� && o.S_AREA_CODE == Settings.Areas[1]
                     && s.N_ITEM_STATE == 2 && s.S_ITEM_STATE == "涓嶅悎鏍�).First();
-
-                if (endLoc == null)
+                
+                if (startLoc == null)
                 {
                     LogHelper.Info($"鏈壘鍒板悎閫傜殑璧风偣璐т綅锛岃姹俹.N_CURRENT_NUM == 1 && o.N_LOCK_STATE == 0 && o.S_LOCK_STATE == 鏃�&& o.S_AREA_CODE == Settings.Areas[1] && s.N_ITEM_STATE ==2 && s.S_ITEM_STATE==涓嶅悎鏍�);
+                    return;
+                }
+
+
+                var endLoc = db.Queryable<TN_Location>().First(a => a.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == "鏃� && a.S_AREA_CODE == Settings.Areas[7]);
+                if (endLoc == null)
+                {
+                    LogHelper.Info($"鏈壘鍒板悎閫傜殑缁堢偣璐т綅锛岃姹俛.N_CURRENT_NUM == 0 && a.N_LOCK_STATE == 0 && a.S_LOCK_STATE == 鏃�&& a.S_AREA_CODE == Settings.Areas[7]");
                     return;
                 }
 
@@ -733,7 +736,7 @@
                     LocationHelper.LockLoc(startLoc.S_CODE, 2);//璧风偣鍑哄簱閿侊紝
                     LocationHelper.LockLoc(endLoc.S_CODE, 1);//缁堢偣鍏ュ簱閿� 
-                    LogHelper.Info($"鐢熸垚婊℃墭鍑哄簱澶嶆浠诲姟鎴愬姛锛屽鍣細{cntId.S_CNTR_CODE}锛岃捣鐐癸細{startLoc.S_CODE}");
+                    LogHelper.Info($"鐢熸垚婊℃墭鍑哄簱澶嶆浠诲姟鎴愬姛锛屽鍣細{cntId.S_CNTR_CODE}锛岃捣鐐癸細{startLoc.S_CODE}锛岀粓鐐癸細{endLoc.S_CODE}");
 
                     Task task27 = Task.Run(() =>
                     {
@@ -742,7 +745,7 @@
                 }
                 else
                 {
-                    LogHelper.Info($"鐢熸垚婊℃墭鍑哄簱澶嶆浠诲姟澶辫触锛屽鍣細{cntId.S_CNTR_CODE}锛岃捣鐐癸細{startLoc.S_CODE}");
+                    LogHelper.Info($"鐢熸垚婊℃墭鍑哄簱澶嶆浠诲姟澶辫触锛屽鍣細{cntId.S_CNTR_CODE}锛岃捣鐐癸細{startLoc.S_CODE}锛岀粓鐐癸細{endLoc.S_CODE}");
                 }
 
 
diff --git a/models/TN_Component_Detail.cs b/models/TN_Component_Detail.cs
index 9ee6890..03c98f5 100644
--- a/models/TN_Component_Detail.cs
+++ b/models/TN_Component_Detail.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 閮ㄤ欢鐢ㄦ枡鏄庣粏
     /// </summary>
-    [SugarTable("TN_Component_Detail")]
+    [SugarTable("TN_TN_Component_Detail")]
     public class TN_Component_Detail : BaseModel
     {
         /// <summary>
diff --git a/models/TN_DayProDetail.cs b/models/TN_DayProDetail.cs
index 8cba30d..cca369e 100644
--- a/models/TN_DayProDetail.cs
+++ b/models/TN_DayProDetail.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 姣忔棩浜ч噺鍚堣
     /// </summary>
-    [SugarTable("TN_DayProDetail")]
+    [SugarTable("TN_TN_DayProDetail")]
     public class TN_DayProDetail : BaseModel
     {
         /// <summary>
diff --git a/models/TN_EquipProDetail.cs b/models/TN_EquipProDetail.cs
index eb440db..b5e0141 100644
--- a/models/TN_EquipProDetail.cs
+++ b/models/TN_EquipProDetail.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 璁惧鐢熶骇鏄庣粏
     /// </summary>
-    [SugarTable("TN_EquipProDetail")]
+    [SugarTable("TN_TN_EquipProDetail")]
     public class TN_EquipProDetail : BaseModel
     {
         /// <summary>
diff --git a/models/TN_InventoryM.cs b/models/TN_InventoryM.cs
index 9e32a23..d961b2f 100644
--- a/models/TN_InventoryM.cs
+++ b/models/TN_InventoryM.cs
@@ -6,7 +6,7 @@
     /// <summary>
     /// WMS搴撳瓨绠$悊
     /// </summary>
-    [SugarTable("TN_InventoryM")]
+    [SugarTable("TN_TN_InventoryM")]
     public class TN_InventoryM : BaseModel
     {
         /// <summary>
diff --git a/models/TN_MonthProDetail.cs b/models/TN_MonthProDetail.cs
index b8ea43a..df54725 100644
--- a/models/TN_MonthProDetail.cs
+++ b/models/TN_MonthProDetail.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 姣忔湀浜ч噺鍚堣
     /// </summary>
-    [SugarTable("TN_MonthProDetail")]
+    [SugarTable("TN_TN_MonthProDetail")]
     public class TN_MonthProDetail : BaseModel
     {
         /// <summary>
diff --git a/models/TN_Operator_info.cs b/models/TN_Operator_info.cs
index 253b60b..ee33443 100644
--- a/models/TN_Operator_info.cs
+++ b/models/TN_Operator_info.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// PDA鎿嶄綔浜哄憳淇℃伅
     /// </summary>
-    [SugarTable("TN_Operator_Info")]
+    [SugarTable("TN_TN_Operator_Info")]
     public class TN_Operator_Info : BaseModel
     {
         /// <summary>
diff --git a/models/TN_RemeltDetail.cs b/models/TN_RemeltDetail.cs
index f02aaf7..a700a76 100644
--- a/models/TN_RemeltDetail.cs
+++ b/models/TN_RemeltDetail.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 鍥炵倝鏂欐槑缁�     /// </summary>
-    [SugarTable("TN_RemeltDetail")]
+    [SugarTable("TN_TN_RemeltDetail")]
     public class TN_RemeltDetail:BaseModel
     {
         /// <summary>
diff --git a/models/TN_SurplusDetail.cs b/models/TN_SurplusDetail.cs
index 627e248..90f1064 100644
--- a/models/TN_SurplusDetail.cs
+++ b/models/TN_SurplusDetail.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 浣欐枡鍥炲簱(杩斿洖鑳�鏄庣粏
     /// </summary>
-    [SugarTable("TN_SurplusDetail")]
+    [SugarTable("TN_TN_SurplusDetail")]
     public class TN_SurplusDetail : BaseModel
     {
         /// <summary>
diff --git a/models/TN_TN_SPE.cs b/models/TN_TN_SPE.cs
index 1fde398..5681a05 100644
--- a/models/TN_TN_SPE.cs
+++ b/models/TN_TN_SPE.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 瑙勬牸鏃堕棿閰嶇疆琛�     /// </summary>
-    [SugarTable("TN_TN_SPE")]
+    [SugarTable("TN_TN_TN_SPE")]
     public class TN_TN_SPE : BaseModel
     {
         /// <summary>
diff --git a/models/TN_WeekProDetail.cs b/models/TN_WeekProDetail.cs
index 9e13157..048edc2 100644
--- a/models/TN_WeekProDetail.cs
+++ b/models/TN_WeekProDetail.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 姣忓懆浜ч噺鍚堣
     /// </summary>
-    [SugarTable("TN_WeekProDetail")]
+    [SugarTable("TN_TN_WeekProDetail")]
     public class TN_WeekProDetail : BaseModel
     {
         /// <summary>
diff --git a/models/TN_YearProDetail.cs b/models/TN_YearProDetail.cs
index 633e307..35e64e6 100644
--- a/models/TN_YearProDetail.cs
+++ b/models/TN_YearProDetail.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// 姣忓勾浜ч噺鍚堣
     /// </summary>
-    [SugarTable("TN_YearProDetail")]
+    [SugarTable("TN_TN_YearProDetail")]
     public class TN_YearProDetail : BaseModel
     {
         /// <summary>

--
Gitblit v1.9.1