From a0f8fee1feea1e1425f7061bbadda9a2f45f0ea1 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期五, 27 三月 2026 10:48:13 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/LMESController.cs |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index c0d5496..3ea3d32 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -871,7 +871,18 @@
                     if (hSourceID == "0" || hMoldID == "0")
                     {
                         continue;
-                    }        
+                    }
+                    //淇濆瓨鍓嶅垽鏂祦杞崱鍚屼竴涓伐搴忔淳宸ユ槸鍚︽帓浜嗕袱娆�
+                    string SQ = "select * from Sc_ICMOBillStatus_Tmp where HSourceInterID=" + hSourceInterID + " and HSourceEntryID=" + hSourceEntryID + " and HSourceID=" + hSourceID + " and HMouldID=" + hMoldID + "";
+                    ds2 = oCN.RunProcReturn(SQ, "Sc_ICMOBillStatus_Tmp");
+                    if (ds2.Tables[0].Rows.Count > 0)
+                    {
+                        oCN.RollBack();
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍚屼竴宸ュ崟涓嶈兘鍐嶇浉鍚屼骇绾跨浉鍚屾ā鍏蜂笂閲嶅娲惧伐锛�";                       
+                        return objJsonResult; 
+                    }
                     //鏇存柊娴佽浆鍗″瓙琛ㄧ敓浜ц祫婧�
                     oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=" + hSourceID + " where HInterID=" + hSourceInterID + " and HEntryID=" + hSourceEntryID);
                     // 鎻掑叆鐢熶骇鐘舵�佷复鏃惰〃
@@ -879,6 +890,7 @@
                     oCN.RunProc(SQL);
                     //鎻掑叆宸ュ簭娴佽浆鍗℃淳宸ュ崟
                     string SQL1 = $"exec h_p_Sc_ProcExchSendWorkBill_PG {hSourceInterID},{hSourceEntryID},{hSourceID},{hMoldID}";
+                   
                     oCN.RunProc(SQL1);
                     string sReturn = "";
                     if (oSystemParameter.ShowBill(ref sReturn) == true)

--
Gitblit v1.9.1