From a3f4fe73cfc233c4a912d603344a5cb650db4c93 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 27 九月 2021 14:01:15 +0800
Subject: [PATCH] 工序流转卡、生产任务单、工艺路线新增保存组织,列表组织过滤

---
 DAL/计划管理/ClsGy_RoutingBill.cs |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBill.cs" "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBill.cs"
index a91f6db..d597519 100644
--- "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBill.cs"
+++ "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBill.cs"
@@ -38,6 +38,7 @@
                 oCn.BeginTran();
                 //鏇存柊涓昏〃
                 oCn.RunProc("UpDate Gy_RoutingBillMain set  " +
+                ",HPRDORGID=" + omodel.HPRDORGID.ToString() +
                 " HName='" + omodel.HName + "'" +
                 ",HBillNo='" + omodel.HBillNo + "'" +
                 ",HMaterTypeID=" + omodel.HMaterTypeID.ToString() +
@@ -64,6 +65,11 @@
                 ",HStdSourceQty=" + omodel.HStdSourceQty.ToString() +
                 ",HAddSourceRate=" + omodel.HAddSourceRate.ToString() +
                 ",HDelSourceRate=" + omodel.HDelSourceRate.ToString() +
+                ",HPicNumVer='" + omodel.HPicNumVer.ToString() + "'" +
+                ",HPicNumAssemble='" + omodel.HPicNumAssemble.ToString() + "'" +
+                ",HMaterTexture='" + omodel.HMaterTexture.ToString() + "'" +
+                ",HProductNum='" + omodel.HProductNum.ToString() + "'" +
+                ",HVerNum='" + omodel.HVerNum.ToString() + "'" +
 
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
@@ -179,14 +185,14 @@
                 ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" +
                 ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" +
                 ",HMainPrice,HStdSourceQty,HAddSourceRate,HDelSourceRate" +
-                ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum" +
+                ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HPRDORGID,HVerNum" +
                 ") " +
                 " values('" + this.BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()," + omodel.HMaterID.ToString() + ",'" + omodel.HName + "'," + omodel.HMaterTypeID.ToString() +
                 ",'" + omodel.HRoutingGroupID.ToString() + "'," + omodel.HUnitID.ToString() + ",'" + omodel.HMaterNumber + "','" + omodel.HUnitNumber + "'," + DBUtility.ClsPub.BoolToString(omodel.HStandard) +
                 "," + omodel.HMainGroupID.ToString() + "," + omodel.HMainProcID.ToString() + "," + omodel.HMainCenterID.ToString() + ",'" + omodel.HMainTimeUnit + "'," + omodel.HMainUnitTime.ToString() + "," + omodel.HMainWorkQty.ToString() +
                 "," + omodel.HMainPrice.ToString() + "," + omodel.HStdSourceQty.ToString() + "," + omodel.HAddSourceRate + "," + omodel.HDelSourceRate.ToString() +
-                ",'" + omodel.HPicNumVer.ToString() + "','" + omodel.HPicNumAssemble.ToString() + "','" + omodel.HMaterTexture.ToString() + "','" + omodel.HProductNum.ToString() + "','" + omodel.HVerNum.ToString() + "'"+
+                ",'" + omodel.HPicNumVer.ToString() + "','" + omodel.HPicNumAssemble.ToString() + "','" + omodel.HMaterTexture.ToString() + "','" + omodel.HProductNum.ToString() + "','"+omodel.HPRDORGID.ToString()+"','" + omodel.HVerNum.ToString() + "'"+
                 ") ");
                 //鎻掑叆瀛愯〃
                 foreach (Model.ClsGy_RoutingBillSub oSub in DetailColl)
@@ -256,7 +262,7 @@
             {
                 //鏌ヨ涓昏〃
                 DataSet Ds ;
-                Ds = oCn.RunProcReturn("Select * from Gy_RoutingBillMain Where HInterID=" + lngBillKey.ToString(), "Gy_RoutingBillMain");
+                Ds = oCn.RunProcReturn("Select * from Gy_RoutingBillMain Where HInterID=" + lngBillKey.ToString()+" and HPRDORGID='"+DBUtility.ClsPub.HOrgID.ToString()+"'", "Gy_RoutingBillMain");
                 if(Ds.Tables[0].Rows.Count==0)
                 {
                     sReturn = "鍗曟嵁鏈壘鍒帮紒";
@@ -305,6 +311,11 @@
                 omodel.HStdSourceQty = DBUtility.ClsPub.isSingle(Ds.Tables[0].Rows[0]["HStdSourceQty"].ToString());
                 omodel.HAddSourceRate = DBUtility.ClsPub.isSingle(Ds.Tables[0].Rows[0]["HAddSourceRate"].ToString());
                 omodel.HDelSourceRate = DBUtility.ClsPub.isSingle(Ds.Tables[0].Rows[0]["HDelSourceRate"].ToString());
+                omodel.HPicNumVer = Ds.Tables[0].Rows[0]["HPicNumVer"].ToString().Trim();
+                omodel.HPicNumAssemble = Ds.Tables[0].Rows[0]["HPicNumAssemble"].ToString().Trim();
+                omodel.HMaterTexture = Ds.Tables[0].Rows[0]["HMaterTexture"].ToString().Trim();
+                omodel.HProductNum = Ds.Tables[0].Rows[0]["HProductNum"].ToString().Trim();
+                omodel.HVerNum = Ds.Tables[0].Rows[0]["HVerNum"].ToString().Trim();
 
                 //寰幆
                 DataSet DsSub ;

--
Gitblit v1.9.1