From c4f47bbec99d71eba138745e7f16c03400d88ad1 Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期三, 18 九月 2024 10:15:53 +0800
Subject: [PATCH] 导入任务1

---
 DAL/计划管理/ClsGy_MaterialTechParamBillMain.cs |   85 ++++++++++++++++++++++--------------------
 1 files changed, 45 insertions(+), 40 deletions(-)

diff --git "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs" "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
index e84b64c..e8c399c 100644
--- "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
+++ "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
@@ -5,7 +5,7 @@
 
 namespace DAL
 {
-    public  class ClsGy_MaterialTechParamBillMain : DBUtility.ClsXt_BaseBill
+    public class ClsGy_MaterialTechParamBillMain : DBUtility.ClsXt_BaseBill
     {
         public Model.ClsGy_MaterialTechParamBillMain omodel = new Model.ClsGy_MaterialTechParamBillMain();
         public List<Model.ClsGy_MaterialTechParamBillSub> DetailColl = new List<Model.ClsGy_MaterialTechParamBillSub>();
@@ -16,9 +16,9 @@
             base.MvarItemKeySub2 = "";
             base.MvarItemKeySub3 = "";
             base.MvarItemKeySub4 = "";
-            base.MvarItemKey= "Gy_MaterialTechParamBillMain";
-            base.MvarReportTitle= "浜у搧宸ヨ壓鍙傛暟娓呭崟";
-            base.BillType="3334";
+            base.MvarItemKey = "Gy_MaterialTechParamBillMain";
+            base.MvarReportTitle = "浜у搧宸ヨ壓鍙傛暟娓呭崟";
+            base.BillType = "3334";
             base.HBillSubType = "3334";
 
         }
@@ -46,7 +46,7 @@
                     "', HUpDater = '" + omodel.HUpDater +
                     "', HUpDateDate = getdate()" +
                      //===============================================================
-                    
+
                      ", HDeptID = '" + omodel.HDeptID +
                     "', HEmpID = '" + omodel.HEmpID +
                     "', HMaterID = '" + omodel.HMaterID +
@@ -54,6 +54,7 @@
                     "', HProcID  = '" + omodel.HProcID +
                     "', HEquipID  = '" + omodel.HEquipID +
                     "', HOrgID	  = '" + omodel.HOrgID +
+                    "', HMouldID = '" + omodel.HMouldID +
                     "' where HInterID = " + omodel.HInterID;
 
                 oCn.RunProc(mainSql);
@@ -64,30 +65,32 @@
 
                 //鎻掑叆瀛愯〃
                 omodel.HInterID = lngBillKey;
+                //鎻掑叆瀛愯〃
                 foreach (Model.ClsGy_MaterialTechParamBillSub oSub in DetailColl)
                 {
                     string subSql = "insert into Gy_MaterialTechParamBillSub" +
-                            "" +
-                            "" +
-                            "" +
-                            "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
-                            ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes) " +
-                            " values(" +
-                            "" + omodel.HInterID.ToString() +
-                            "," + oSub.HEntryID.ToString() +
-                            "," + oSub.HSourceInterID +
-                            "," + oSub.HSourceEntryID +
-                            ",'" + oSub.HSourceBillNo +
-                            "','" + oSub.HSourceBillType +
-                            "','" + oSub.HTechParamID +
-                             "','" + oSub.HTechParamUnitID +
-                            "'," + oSub.HStd +
-                            "," + oSub.HMax +
-                            ",'" + oSub.HMin +
-                            "','" + oSub.HDataForm +
-                            "','" + oSub.HDataUnit +
-                           "'," + oSub.HDataTimes +
-                            ")";
+                           "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+                           ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes,HTechParamClassID,HSNO,HStdNextTimes,HTechParamIDStd) " +
+                           " values(" +
+                           "" + omodel.HInterID.ToString() +
+                           "," + oSub.HEntryID.ToString() +
+                           "," + oSub.HSourceInterID +
+                           "," + oSub.HSourceEntryID +
+                           ",'" + oSub.HSourceBillNo +
+                           "','" + oSub.HSourceBillType +
+                           "','" + oSub.HTechParamID +
+                           "','" + oSub.HTechParamUnitID +
+                           "'," + oSub.HStd +
+                           "," + oSub.HMax +
+                           ",'" + oSub.HMin +
+                           "','" + oSub.HDataForm +
+                           "','" + oSub.HDataUnit +
+                           "','" + oSub.HDataTimes +
+                           "','" + oSub.HTechParamClassID +
+                           "','" + oSub.HSNO +
+                           "','" + oSub.HStdNextTimes +
+                           "','" + oSub.HTechParamIDStd +
+                           "')";
                     oCn.RunProc(subSql);
                 }
 
@@ -96,7 +99,7 @@
                 return true;
             }
             catch (Exception e)
-            {
+            { 
                 sReturn = e.Message;
                 oCn.RollBack();
                 throw (e);
@@ -118,7 +121,7 @@
                 while (true)
                 {
                     ds = oCn.RunProcReturn("select * from Gy_MaterialTechParamBillMain where HInterID = " + omodel.HInterID, "Gy_MaterialTechParamBillMain");
-                    if(ds!=null && ds.Tables[0].Rows.Count > 0)
+                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                     {
                         omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                     }
@@ -131,7 +134,7 @@
                 //鎻掑叆涓昏〃
                 string mainSql = "insert into Gy_MaterialTechParamBillMain" +
                     "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
-                    ",HDeptID,HEmpID,HMaterID,HWorkCenterID,HEquipID,HOrgID,HProcID ) " +
+                    ",HDeptID,HEmpID,HMaterID,HWorkCenterID,HEquipID,HOrgID,HProcID,HMouldID ) " +
                     "values(" +
                     "" + omodel.HYear.ToString() +
                     "," + omodel.HPeriod.ToString() +
@@ -149,7 +152,8 @@
                     "','" + omodel.HWorkCenterID +
                     "','" + omodel.HEquipID +
                     "','" + omodel.HOrgID +
-                     "','" + omodel.HProcID +
+                    "','" + omodel.HProcID +
+                     "','" + omodel.HMouldID +
                     "')";
 
                 oCn.RunProc(mainSql);
@@ -158,11 +162,8 @@
                 foreach (Model.ClsGy_MaterialTechParamBillSub oSub in DetailColl)
                 {
                     string subSql = "insert into Gy_MaterialTechParamBillSub" +
-                           "" +
-                           "" +
-                           "" +
                            "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
-                           ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes) " +
+                           ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes,HTechParamClassID,HSNO,HStdNextTimes,HTechParamIDStd) " +
                            " values(" +
                            "" + omodel.HInterID.ToString() +
                            "," + oSub.HEntryID.ToString() +
@@ -171,14 +172,18 @@
                            ",'" + oSub.HSourceBillNo +
                            "','" + oSub.HSourceBillType +
                            "','" + oSub.HTechParamID +
-                            "','" + oSub.HTechParamUnitID +
+                           "','" + oSub.HTechParamUnitID +
                            "'," + oSub.HStd +
                            "," + oSub.HMax +
                            ",'" + oSub.HMin +
                            "','" + oSub.HDataForm +
-                            "','" + oSub.HDataUnit +
-                           "'," + oSub.HDataTimes +
-                           ")";
+                           "','" + oSub.HDataUnit +
+                           "','" + oSub.HDataTimes +
+                           "','" + oSub.HTechParamClassID +
+                           "','" + oSub.HSNO +
+                           "','" + oSub.HStdNextTimes +
+                           "','" + oSub.HTechParamIDStd +
+                           "')";
                     oCn.RunProc(subSql);
                 }
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
@@ -237,7 +242,7 @@
                 //========================================================
 
                 omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
-               
+
                 //
 
                 //寰幆
@@ -261,7 +266,7 @@
                     oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
                     oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
                     //===================================================
-                 
+
                     DetailColl.Add(oSub);
                 }
                 sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";

--
Gitblit v1.9.1