From 22ccc442863a838b351a2008af3cacdd72e91fd5 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 11 三月 2026 15:24:55 +0800
Subject: [PATCH] 优化自动完工

---
 WebAPI/Controllers/CJGL/Cj_SingleStationController.cs |   43 +++++++++++++++++++++++--------------------
 1 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index f181774..9d24ae1 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -376,30 +376,33 @@
                 {
                     if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�")
                     {
-                       
-                        //鍒ゆ柇褰撳墠娴佽浆鍗� 褰撳墠宸ュ簭鏄惁鏄紑宸�
-                        ds = oCN.RunProcReturn("select  * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0' and HProcID='"+ HProcID + "'", "Sc_ICMOBillStatus_Tmp");
-                        //鏌ヤ笉鍒拌瘉鏄庢病鏈夊紑宸ヨ繘鍏ヤ笅涓�鍙ユ煡璇�
-                        if (ds.Tables[0].Rows.Count == 0)
+                        if (HProcID == "90")  //娓呮磥宸ュ簭杩涘叆鑷姩寮�宸ユā寮�
                         {
-                            //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚﹀ⅷ瑗垮摜鐨�
-                            ds2 = oCN.RunProcReturn("select HPRDORGID from Sc_ProcessExchangeBillMain with(nolock) where HBillNo = '" + HBarCode + "' ", "Sc_ProcessExchangeBillMain");
-                            if (ds2.Tables[0].Rows[0]["HPRDORGID"].ToString() != "7667152")
+                            //鍒ゆ柇褰撳墠娴佽浆鍗� 褰撳墠宸ュ簭鏄惁鏄紑宸�
+                            ds = oCN.RunProcReturn("select  * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0' and HProcID='" + HProcID + "'", "Sc_ICMOBillStatus_Tmp");
+                            //鏌ヤ笉鍒拌瘉鏄庢病鏈夊紑宸ヨ繘鍏ヤ笅涓�鍙ユ煡璇�
+                            if (ds.Tables[0].Rows.Count == 0)
                             {
-                                //鑾峰彇鐢熶骇鐘舵�佷复鏃惰〃鏁版嵁
-                                ds = oCN.RunProcReturn("select  * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HProcID='" + HProcID + "'", "Sc_ICMOBillStatus_Tmp");
-                                //浼犲叆 鐢熶骇鐘舵�佷复鏃惰ˉ 鍗曟嵁绫诲瀷銆佷富id銆佹簮鍗曞瓙ID銆佹簮鍗曞崟鍙枫�佸綋鍓嶇櫥褰曚汉銆佹簮鍗曞崟鎹被鍨�
-                                objJsonResult = SaveMESBeginWorkFrom_ZD(ds.Tables[0].Rows[0]["HBillType"].ToString(),ds.Tables[0].Rows[0]["HInterID"].ToString(), ds.Tables[0].Rows[0]["HSourceEntryID"].ToString(), ds.Tables[0].Rows[0]["HSourceBillNo"].ToString(),user, ds.Tables[0].Rows[0]["HSourceBillType"].ToString());
-                                if (objJsonResult.code == "0")
+                                //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚﹀ⅷ瑗垮摜鐨�
+                                ds2 = oCN.RunProcReturn("select HPRDORGID from Sc_ProcessExchangeBillMain with(nolock) where HBillNo = '" + HBarCode + "' ", "Sc_ProcessExchangeBillMain");
+                                if (ds2.Tables[0].Rows[0]["HPRDORGID"].ToString() != "7667152")
                                 {
-                                    objJsonResult.code = "0";
-                                    objJsonResult.count = 0;
-                                    objJsonResult.Message = objJsonResult.Message;
-                                    objJsonResult.data = null;
-                                    return objJsonResult;
+                                    //鑾峰彇鐢熶骇鐘舵�佷复鏃惰〃鏁版嵁
+                                    ds = oCN.RunProcReturn("select  * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HProcID='" + HProcID + "'", "Sc_ICMOBillStatus_Tmp");
+                                    //浼犲叆 鐢熶骇鐘舵�佷复鏃惰ˉ 鍗曟嵁绫诲瀷銆佷富id銆佹簮鍗曞瓙ID銆佹簮鍗曞崟鍙枫�佸綋鍓嶇櫥褰曚汉銆佹簮鍗曞崟鎹被鍨�
+                                    objJsonResult = SaveMESBeginWorkFrom_ZD(ds.Tables[0].Rows[0]["HBillType"].ToString(), ds.Tables[0].Rows[0]["HInterID"].ToString(), ds.Tables[0].Rows[0]["HSourceEntryID"].ToString(), ds.Tables[0].Rows[0]["HSourceBillNo"].ToString(), user, ds.Tables[0].Rows[0]["HSourceBillType"].ToString());
+                                    if (objJsonResult.code == "0")
+                                    {
+                                        objJsonResult.code = "0";
+                                        objJsonResult.count = 0;
+                                        objJsonResult.Message = objJsonResult.Message;
+                                        objJsonResult.data = null;
+                                        return objJsonResult;
+                                    }
                                 }
-                            }                                                 
-                        }   
+                            }
+                        }
+                        
                     }
                 }
 

--
Gitblit v1.9.1