From 08ee1a7b050d480dc28c32b42e4353fb8abf9049 Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期一, 02 九月 2024 11:05:31 +0800 Subject: [PATCH] 1 --- WebAPI/DLL/ClsSc_MESBeginWorkBill.cs | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs b/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs index 2d5d494..5a2de6c 100644 --- a/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs +++ b/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs @@ -349,14 +349,22 @@ string HSourceID = ds.Tables[0].Rows[0]["HSourceID"].ToString(); ds = oCn.RunProcReturn(@"select HMouldID from Sc_MouldUpperBillMain a -inner join Sc_MouldUpperBillSub b on a.HInterID = b.HInterID where HICMOInterID=" + HICMOInterID + " and HICMOEntryID=" + HICMOEntryID + " and HProcExchInterID=" + HSourceInterID + " and HProcExchEntryID=" + HSourceEntryID + " and HSourceID=" + HSourceID + " order by HMakeDate desc", "Sc_MouldUpperBillMain"); + inner join Sc_MouldUpperBillSub b on a.HInterID = b.HInterID where HICMOInterID=" + HICMOInterID + " and HICMOEntryID=" + HICMOEntryID + " and HProcExchInterID=" + HSourceInterID + " and HProcExchEntryID=" + HSourceEntryID + " and HSourceID=" + HSourceID + " order by HMakeDate desc", "Sc_MouldUpperBillMain"); if (ds.Tables[0].Rows.Count > 0) { oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HMouldID= " + ds.Tables[0].Rows[0]["HMouldID"].ToString() + " where HInterID=" + omodel.HMainSourceInterID.ToString()); } - + else + { + ds = oCn.RunProcReturn(@"select HMouldID from Sc_MouldUpperBillMain a + inner join Sc_MouldUpperBillSub b on a.HInterID = b.HInterID where HSourceID=" + HSourceID + " order by HMakeDate desc", "Sc_MouldUpperBillMain"); + if (ds.Tables[0].Rows.Count > 0) + { + oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HMouldID= " + ds.Tables[0].Rows[0]["HMouldID"].ToString() + " where HInterID=" + omodel.HMainSourceInterID.ToString()); + } + } } - + sReturn = omodel.HInterID.ToString(); oCn.Commit(); return true; -- Gitblit v1.9.1