yxj
2024-09-20 306bde7e1ebdde6403f89a0d13feccf9b1e79d2f
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainPlanBill.cs
@@ -57,14 +57,20 @@
                //",HGroupID=" + omodel.HGroupID.ToString() +
                //",HWHID=" + omodel.HWHID.ToString() +
                //",HSCWHID=" + omodel.HSCWHID.ToString() +
                 ",HEquipDotCheckRuleInterID='" + omodel.HEquipDotCheckRuleInterID + "'" +
                 ",HMouldMaintainRuleID='" + omodel.HMouldMaintainRuleID + "'" +
                ",HCycleUnit='" + omodel.HCycleUnit + "'" +
                ",HCheckCycle=" + omodel.HCheckCycle.ToString() +
                ",HBeginDate='" + omodel.HBeginDate + "'" +
                ",HEndDate='" + omodel.HEndDate + "'" +
                ",HExplanation='" + omodel.HExplanation + "'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                ",HMaintainLevID=" + omodel.HMaintainLevID +
                ",HMainSourceInterID=" + omodel.HMainSourceInterID +
                ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
                ",HMouldID=" + omodel.HMouldID +
                ",HUSEORGID=" + omodel.HUSEORGID +
                //",HCREATEORGID=" + omodel.HCREATEORGID +
                ",HDeptID=" + omodel.HDeptID +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
@@ -103,8 +109,8 @@
                          ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" +
                          "," + Item.HManagerID.ToString() +
                          ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" +
                          "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() + "," + Item.HMaintainItem.ToString() +
                          ") ");
                          "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() + ",'" + Item.HMaintainItem.ToString() +
                          "') ");
                }
                //
                //foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
@@ -143,12 +149,15 @@
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + 
                ",HYear,HPeriod,HRemark" +
                ",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+
                ",HInnerBillNo,HExplanation,HEquipDotCheckRuleInterID" +
                ",HInnerBillNo,HExplanation,HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo,HMouldID" +
                ",HUSEORGID,HCREATEORGID,HDeptID" +
                ") " +
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
                ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "'" +
                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "','" + omodel.HEquipDotCheckRuleInterID + "'" +
                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation  + "','" + omodel.HMouldMaintainRuleID + "'," + omodel.HMaintainLevID +
                "," + omodel.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'," + omodel.HMouldID + "," + omodel.HUSEORGID +
                "," + omodel.HCREATEORGID + "," + omodel.HDeptID +
                ") ");
                //插入子表配件信息
                foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
@@ -180,7 +189,7 @@
                          ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" +
                          "," + Item.HManagerID.ToString() +
                          ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" +
                          "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString()  +"," + Item.HMaintainItem.ToString() +
                          "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString()  +",'" + Item.HMaintainItem.ToString() + "'" +
                          ") ");
                }
                //
@@ -312,12 +321,13 @@
            {
                string HChecker = DBUtility.ClsPub.CurUserName;
                string HCheckDate = DBUtility.ClsPub.GetServerDate(-1);
                oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString());
                //生成调拨单
                //得到调拨单 mainid å•据号
                long NewInterID = DBUtility.ClsPub.CreateBillID("1207", ref DBUtility.ClsPub.sExeReturnInfo);
                string NewBillNo = DBUtility.ClsPub.CreateBillCode("1207", ref DBUtility.ClsPub.sExeReturnInfo, true);//得到新单号
                oCn.RunProc("exec h_p_Kf_MoveStockBill_Add " + lngBillKey.ToString() + "," + NewInterID.ToString() + ",'" + NewBillNo + "','" + HChecker + "'");
                //更新单据状态
                oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
                ////生成调拨单
                ////得到调拨单 mainid å•据号
                //long NewInterID = DBUtility.ClsPub.CreateBillID("1207", ref DBUtility.ClsPub.sExeReturnInfo);
                //string NewBillNo = DBUtility.ClsPub.CreateBillCode("1207", ref DBUtility.ClsPub.sExeReturnInfo, true);//得到新单号
                //oCn.RunProc("exec h_p_Kf_MoveStockBill_Add " + lngBillKey.ToString() + "," + NewInterID.ToString() + ",'" + NewBillNo + "','" + HChecker + "'");
                //
                sReturn = "";
                return true;