From b14d014e39c97d339ee83c0e272afd4e7a6ee709 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期四, 14 十月 2021 16:54:57 +0800
Subject: [PATCH] 分布式调入调出

---
 WebAPI/DLL/ClsSc_MouldMoveStockStepOutBill.cs                         |   13 +++++++------
 WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs     |   13 +++++++------
 Model/生产管理/模具管理/ClsSc_MouldMoveStockStepInBillMain.cs                 |    1 +
 Model/生产管理/模具管理/ClsSc_MouldMoveStockStepOutBillMain.cs                |    1 +
 WebAPI/Controllers/WebAPIController.cs                                |    2 +-
 WebAPI/DLL/ClsSc_MouldMoveStockStepInBill.cs                          |   17 +++++++++--------
 WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs |    6 +++---
 Model/生产管理/模具管理/ClsSc_MouldStockBillSub.cs                            |    2 ++
 8 files changed, 31 insertions(+), 24 deletions(-)

diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMoveStockStepInBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMoveStockStepInBillMain.cs"
index ddcabc9..a081701 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMoveStockStepInBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMoveStockStepInBillMain.cs"
@@ -18,5 +18,6 @@
         public string HInnerBillNo;//  varchar(50)     	--内部单据号
         public string HRemark; //加工要求
         public bool HRedBlueFlag;//  bit    		--红蓝单
+        public string HStockStyle;//  bit    		--红蓝单
     }
 }
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMoveStockStepOutBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMoveStockStepOutBillMain.cs"
index c6a8a90..b5caabb 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMoveStockStepOutBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMoveStockStepOutBillMain.cs"
@@ -18,5 +18,6 @@
         public string HInnerBillNo;//  varchar(50)     	--内部单据号
         public string HRemark; //加工要求
         public bool HRedBlueFlag;//  bit    		--红蓝单
+        public string HStockStyle;//  bit    		--红蓝单
     }
 }
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldStockBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldStockBillSub.cs"
index 7eca623..3954dc5 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldStockBillSub.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldStockBillSub.cs"
@@ -42,6 +42,8 @@
         public string HDiameter;
         public string HBackFlag;
         public double HNewLifeQty;
+        public long HStockOrgID; //调入组织内码,
+        public long HOtherOrgID;//调出组织内码
 
         public Int64 HPOOrderInterID;//  int      		--采购订单主内码
         public Int64 HPOOrderEntryID;//    int    		--采购订单子内码
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs
index 3cdd570..aafe991 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs
@@ -116,7 +116,7 @@
 
         public static DataSet Sc_MouldMoveStockStepInBill(string sWhere,string Organization)
         {
-            string sql1 = string.Format(@"select * from h_v_Sc_MouldMoveStockStepInBillListDetail where 璋冨嚭缁勭粐='" + Organization + "'");
+            string sql1 = string.Format(@"select * from h_v_Sc_MouldMoveStockStepInBillListDetail where (璋冨叆缁勭粐='" + Organization + "' or 璋冨嚭缁勭粐='" + Organization + "' )");
             if (sWhere == null || sWhere.Equals(""))
             {
                 return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldMoveStockStepInBillListDetail");
@@ -161,7 +161,7 @@
                 {
                     ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo,
                                                 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, 
-                                                鍗曚环 HPrice, 閲戦 HMoney, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, 
+                                                鍗曚环 HPrice, 閲戦 HMoney,HStockOrgID, HOtherOrgID,璋冨嚭缁勭粐浠g爜 HOtherOrgCode,璋冨嚭缁勭粐 HOtherOrgName, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, 
                                                 璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, 
                                                 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepInBillListDetail"), "h_v_Sc_MouldMoveStockStepInBillListDetail");
 
@@ -175,7 +175,7 @@
                     //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark  from Sc_MouldRepairCheckBillSub where 1 = 1 ";
                     string sql1 = string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo,
                                                 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, 
-                                                鍗曚环 HPrice, 閲戦 HMoney, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, 
+                                                鍗曚环 HPrice, 閲戦 HMoney,HStockOrgID, HOtherOrgID,璋冨嚭缁勭粐浠g爜 HOtherOrgCode,璋冨嚭缁勭粐 HOtherOrgName,  HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, 
                                                 璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, 
                                                 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepInBillListDetail where 1 = 1 ");
                     string sql = sql1 + sqlWhere;
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
index 5d9b0f3..18b9656 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
@@ -116,7 +116,7 @@
 
         public static DataSet Sc_MouldMoveStockStepOutBill(string sWhere, string Organization)
         {
-            string sql1 = string.Format(@"select * from h_v_Sc_MouldMoveStockStepOutBill where 璋冨嚭缁勭粐='" + Organization + "'");
+            string sql1 = string.Format(@"select * from h_v_Sc_MouldMoveStockStepOutBill where (璋冨嚭缁勭粐='" + Organization + "' or 璋冨叆缁勭粐='" + Organization + "')");
             if (sWhere == null || sWhere.Equals(""))
             {
                 return new SQLHelper.ClsCN().RunProcReturn(sql1, "h_v_Sc_MouldMoveStockStepOutBill");
@@ -161,8 +161,9 @@
                 {
                     ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo,
                                                 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, 
-                                                鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID, 
-                                                浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepOutBill"), "h_v_Sc_MouldMoveStockStepOutBill");
+                                                鍗曚环 HPrice, 閲戦 HMoney,HStockOrgID,璋冨叆缁勭粐浠g爜 HStockOrgCode,璋冨叆缁勭粐 HStockOrgName, HOtherOrgID ,璋冨嚭缁勭粐浠g爜 HOtherOrgCode,璋冨嚭缁勭粐 HOtherOrgName, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, 
+                                                璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, 
+                                                璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepOutBill"), "h_v_Sc_MouldMoveStockStepOutBill");
 
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
@@ -171,12 +172,12 @@
                 }
                 else
                 {
-
                     //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark  from Sc_MouldRepairCheckBillSub where 1 = 1 ";
                     string sql1 = string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo,
                                                 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, 
-                                                鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID, 
-                                                浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepOutBill where 1 = 1 ");
+                                                鍗曚环 HPrice, 閲戦 HMoney,HStockOrgID,璋冨叆缁勭粐浠g爜 HStockOrgCode,璋冨叆缁勭粐 HStockOrgName, HOtherOrgID,璋冨嚭缁勭粐浠g爜 HOtherOrgCode,璋冨嚭缁勭粐 HOtherOrgName, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, 
+                                                璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, 
+                                                璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepOutBill where 1 = 1 ");
                     string sql = sql1 + sqlWhere;
                     ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMoveStockStepOutBill");
 
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index b6c0485..73c88c0 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -371,7 +371,7 @@
             //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
             if (Warehouse != "")
             {
-                sWhere = sWhere + " and ( HNumber like '%" + Warehouse + "%' or HName like '%" + Warehouse + "%' ) ";
+                sWhere = sWhere + " and ( HNumber like '%" + Warehouse + "%' or HName like '%" + Warehouse + "%'  or HUSEORGID like '%" + Warehouse + "%' ) ";
             }
             try
             {
diff --git a/WebAPI/DLL/ClsSc_MouldMoveStockStepInBill.cs b/WebAPI/DLL/ClsSc_MouldMoveStockStepInBill.cs
index 42d4bd0..4ff7506 100644
--- a/WebAPI/DLL/ClsSc_MouldMoveStockStepInBill.cs
+++ b/WebAPI/DLL/ClsSc_MouldMoveStockStepInBill.cs
@@ -45,6 +45,7 @@
                 ",HYear='" + omodel.HYear.ToString() + "'" +
                 ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                 ",HRemark='" + omodel.HRemark + "'" +
+                ",HStockStyle='" + omodel.HStockStyle + "'" +
                 ",HUpDater='" + omodel.HMaker+ "'" +
                 ",HUpDateDate=getdate()" +
                 //========================================
@@ -75,7 +76,7 @@
                       ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
                       ",HDesignLife,HLeaveLife,HUseLife" +
                       ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
-                      ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+                      ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HStockOrgID,HOtherOrgID" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
@@ -83,7 +84,7 @@
                       "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
                       "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
                       "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
-                      "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+                      "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "','" + oSub.HStockOrgID + "','" + oSub.HOtherOrgID + "'" +
                       ") ");
                 }
                 //
@@ -121,13 +122,13 @@
                 //涓昏〃
                 oCn.RunProc("Insert Into Sc_MouldStockBillMain   " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
-                ",HRemark,HMaker,HMakeDate" +
+                ",HRemark,HStockStyle,HMaker,HMakeDate" +
                 ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                 ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
-                ",HProcID"+
+                ",HProcID" +
                 ") " +
-                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
-                ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
+                " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+                ",'" + omodel.HRemark + "','" + omodel.HStockStyle.ToString() + "','" + omodel.HMaker + "',getdate()" +
                 ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
                 ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
                  "," + '0' +
@@ -142,7 +143,7 @@
                       ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
                       ",HDesignLife,HLeaveLife,HUseLife" +
                       ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
-                      ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+                      ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HStockOrgID,HOtherOrgID" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
@@ -150,7 +151,7 @@
                       "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
                       "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
                       "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
-                      "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+                      "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "','" + oSub.HStockOrgID + "','" + oSub.HOtherOrgID + "'" +
                       ") ");
                 }
                 //
diff --git a/WebAPI/DLL/ClsSc_MouldMoveStockStepOutBill.cs b/WebAPI/DLL/ClsSc_MouldMoveStockStepOutBill.cs
index bc0f603..b791b5f 100644
--- a/WebAPI/DLL/ClsSc_MouldMoveStockStepOutBill.cs
+++ b/WebAPI/DLL/ClsSc_MouldMoveStockStepOutBill.cs
@@ -45,6 +45,7 @@
                 ",HYear='" + omodel.HYear.ToString() + "'" +
                 ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                 ",HRemark='" + omodel.HRemark + "'" +
+                ",HStockStyle='" + omodel.HStockStyle + "'" +
                 ",HUpDater='" + omodel.HMaker+ "'" +
                 ",HUpDateDate=getdate()" +
                 //========================================
@@ -72,7 +73,7 @@
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
-                      ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
+                      ",HQty,HPrice,HMoney,HStockOrgID,HOtherOrgID,HWHID,HSCWHID,HSPID" +
                       ",HDesignLife,HLeaveLife,HUseLife" +
                       ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
                       ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
@@ -80,7 +81,7 @@
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
-                      "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
+                      "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HStockOrgID.ToString() + "," + oSub.HOtherOrgID.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
                       "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
                       "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
                       "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
@@ -121,13 +122,13 @@
                 //涓昏〃
                 oCn.RunProc("Insert Into Sc_MouldStockBillMain   " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
-                ",HRemark,HMaker,HMakeDate" +
+                ",HRemark,HStockStyle,HMaker,HMakeDate" +
                 ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                 ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
                 ",HProcID"+
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
-                ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
+                ",'" + omodel.HRemark + "','" + omodel.HStockStyle + "','" + omodel.HMaker + "',getdate()" +
                 ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
                 ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
                  "," + '0' +
@@ -139,7 +140,7 @@
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
-                      ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
+                      ",HQty,HPrice,HMoney,HStockOrgID,HOtherOrgID,HWHID,HSCWHID,HSPID" +
                       ",HDesignLife,HLeaveLife,HUseLife" +
                       ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
                       ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
@@ -147,7 +148,7 @@
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
-                      "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
+                      "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HStockOrgID.ToString() + "," + oSub.HStockOrgID.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
                       "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() +
                       "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
                       "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +

--
Gitblit v1.9.1