From 6b5d94e8697f0e73ea7430b1d7041cca18e76de7 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期三, 28 八月 2024 15:53:48 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- 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