From 54329f0ab6bf4d87d95e37a553ffdf0b14fa4bea Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 08 八月 2024 17:31:07 +0800
Subject: [PATCH] 产品工艺参数清单, 增加 字段 HTechParamClassID int //工艺参数大类(Gy_TechnologyParameterClass) HSNO int //工艺次序 HStdNextTimes money //理论次序间隔 HTechParamIDStd int //对应设定值工艺参数(Gy_TechnologyParameter) (都是非必录),修改出战斗获取模具

---
 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