From 8affd199e02bd37f0dcb16447d1fbcaa34bfa2f8 Mon Sep 17 00:00:00 2001 From: lan <lan@DESKTOP-MG88OFJ> Date: 星期四, 30 五月 2024 10:39:43 +0800 Subject: [PATCH] 1 --- DAL/计划管理/ClsGy_RoutingBill.cs | 87 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 75 insertions(+), 12 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 5bd56d6..79a54e7 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,7 +38,8 @@ oCn.BeginTran(); //鏇存柊涓昏〃 oCn.RunProc("UpDate Gy_RoutingBillMain set " + - " HName='" + omodel.HName + "'" + + " HPRDORGID=" + omodel.HORGID.ToString() + + ",HName='" + omodel.HName + "'" + ",HBillNo='" + omodel.HBillNo + "'" + ",HMaterTypeID=" + omodel.HMaterTypeID.ToString() + ",HMaterID=" + omodel.HMaterID.ToString() + @@ -50,20 +51,26 @@ ",HDate='" + omodel.HDate + "'" + ",HYear=" + omodel.HYear.ToString() + "" + ",HPeriod=" + omodel.HPeriod.ToString() + "" + - ",HUpDater='" + omodel.HUpDater + "'" + - ",HUpDateDate='" + omodel.HUpDateDate + "'" + ",HRemark='" + omodel.HRemark + "'" + + ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + + ",HUpDateDate=getdate()" + ",HMainGroupID=" + omodel.HMainGroupID.ToString() + ",HMainProcID=" + omodel.HMainProcID.ToString() + ",HMainCenterID=" + omodel.HMainCenterID.ToString() + - ",HMainTimeUnit='" + omodel.HMainTimeUnit.ToString() + "'" + + ",HMainTimeUnit='" + omodel.HMainTimeUnit + "'" + ",HMainUnitTime=" + omodel.HMainUnitTime.ToString() + ",HMainWorkQty=" + omodel.HMainWorkQty.ToString() + ",HMainPrice=" + omodel.HMainPrice.ToString() + ",HStdSourceQty=" + omodel.HStdSourceQty.ToString() + ",HAddSourceRate=" + omodel.HAddSourceRate.ToString() + ",HDelSourceRate=" + omodel.HDelSourceRate.ToString() + + ",HPicNumVer='" + omodel.HPicNumVer + "'" + + ",HPicNumAssemble='" + omodel.HPicNumAssemble + "'" + + ",HMaterTexture='" + omodel.HMaterTexture + "'" + + ",HProductNum='" + omodel.HProductNum + "'" + + ",HVerNum='" + omodel.HVerNum + "'" + + ",HORGID=" + omodel.HORGID.ToString() + " where HInterID=" + lngBillKey.ToString()); //鍒犻櫎鍏宠仈 @@ -85,7 +92,7 @@ ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + ",HTechnologyParameter,HPicNum,HProcCheckNote" + - ",HOverRate" + + ",HOverRate,HWorkTimes_S,HSNCtrl" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HProcNo.ToString() + "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" + "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() + @@ -97,7 +104,7 @@ "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + "," + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() + ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + ",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() + - "', " + oSub.HOverRate.ToString() + + "', " + oSub.HOverRate.ToString() + "," + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) + ") "); } // @@ -137,25 +144,73 @@ { try { + string orgid = DBUtility.ClsPub.HOrgID.ToString(); //寰楀埌mainid omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� oCn.BeginTran(); + //string BillType1 = this.BillType; + //string HInterID = omodel.HInterID.ToString(); + //string HBillNo = omodel.HBillNo; + //DateTime HDate = omodel.HDate; + //string HYear = omodel.HYear.ToString(); + //string HPeriod = omodel.HPeriod.ToString(); + //string HRemark = omodel.HRemark; + //string CurUserName = DBUtility.ClsPub.CurUserName; + //string HMaterID = omodel.HMaterID.ToString(); + //string HName = omodel.HName; + //string HMaterTypeID = omodel.HMaterTypeID.ToString(); + //string HRoutingGroupID = omodel.HRoutingGroupID.ToString(); + //string HUnitID = omodel.HUnitID.ToString(); + //string HMaterNumber = omodel.HMaterNumber; + //string HUnitNumber = omodel.HUnitNumber; + //string HStandard = DBUtility.ClsPub.BoolToString(omodel.HStandard); + //string HMainGroupID = omodel.HMainGroupID.ToString(); + //string HMainProcID = omodel.HMainProcID.ToString(); + //string HMainCenterID = omodel.HMainCenterID.ToString(); + //string HMainTimeUnit = omodel.HMainTimeUnit; + //string HMainUnitTime = omodel.HMainUnitTime.ToString(); + //string HMainWorkQty = omodel.HMainWorkQty.ToString(); + //string HMainPrice = omodel.HMainPrice.ToString(); + //string HStdSourceQty = omodel.HStdSourceQty.ToString(); + //string HAddSourceRate = omodel.HAddSourceRate.ToString(); + //string HDelSourceRate = omodel.HDelSourceRate.ToString(); + //string HPicNumVer = omodel.HPicNumVer.ToString(); + //string HPicNumAssemble = omodel.HPicNumAssemble.ToString(); + //string HMaterTexture = omodel.HMaterTexture.ToString(); + //string HProductNum = omodel.HProductNum.ToString(); + //string HVerNum = omodel.HVerNum.ToString(); //涓昏〃 + //oCn.RunProc("Insert Into Gy_RoutingBillMain " + + //"(HBillType,HInterID,HBillNo,HDate" + + //",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + + //",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" + + //",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + + //",HMainPrice,HStdSourceQty,HAddSourceRate,HDelSourceRate" + + //",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.HPRDORGID.ToString()+"','" + omodel.HVerNum.ToString() + "'"+ + //") "); + oCn.RunProc("Insert Into Gy_RoutingBillMain " + "(HBillType,HInterID,HBillNo,HDate" + ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + ",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,HORGID,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 + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "'," + omodel.HORGID.ToString() + "," + omodel.HORGID.ToString() + ",'" + omodel.HVerNum + "'" + ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsGy_RoutingBillSub oSub in DetailColl) @@ -171,7 +226,7 @@ ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + ",HTechnologyParameter,HPicNum,HProcCheckNote" + - ",HOverRate,HProcWorkNum" + + ",HOverRate,HProcWorkNum,HWorkTimes_S,HSNCtrl" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HProcNo.ToString() + "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" + "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() + @@ -183,7 +238,7 @@ "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + ", " + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() + ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + ",'"+ oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() + - "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'" + + "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) + ") "); } // @@ -225,7 +280,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 = "鍗曟嵁鏈壘鍒帮紒"; @@ -274,7 +329,13 @@ 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(); + omodel.HPRDORGID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPRDORGID"].ToString()); + omodel.HORGID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HORGID"].ToString()); //寰幆 DataSet DsSub ; DsSub = oCn.RunProcReturn("Select * from Gy_RoutingBillSub Where HInterID=" + lngBillKey.ToString() + " Order by HEntryID ", "Gy_RoutingBillSub"); @@ -344,6 +405,8 @@ oSub.HPicNum = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPicNum"]); oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcCheckNote"]); oSub.HOverRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HOverRate"]); + oSub.HWorkTimes_S = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWorkTimes_S"]); + oSub.HSNCtrl = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HSNCtrl"]); DetailColl.Add(oSub); } sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�"; -- Gitblit v1.9.1