| | |
| | | } |
| | | |
| | | #endregion 自定义方法 |
| | | |
| | | //修改单据 |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | |
| | | oCn.RunProc("Insert Into Sc_ICMOBillWorkQtyStatus_Tmp " + |
| | | oCn.RunProc("Insert Into Sc_ICMOBillWorkQtyStatus_Tmp " + |
| | | "(HInterID,HBillType,HSourceID,HReportType,HPieceQty" + |
| | | ",HMaterID,HGroupID,HWorkManID,HWorkReportDate,HDate" + |
| | | ",HBillSubType,HBillNo,HICMOInterID,HICMOEntryID,HICMOBillNo" + |
| | |
| | | ") "); |
| | | |
| | | //根据源单主内码 设置 生产状态表 完工状态(设置本单对应得源单 为完工状态) |
| | | |
| | | oCn.RunProcReturn("exec h_p_JIT_MESICMOReport_Status " + omodel.HSourceID.ToString() + "," + omodel.HSourceInterID.ToString() + "," + omodel.HSourceEntryID.ToString() + ",'" + omodel.HSourceBillNo.ToString() + "','" + omodel.HPlanQty + "','" + omodel.HQty + "','" + omodel.HBadQty + "','" + omodel.HWasterQty + "'", "h_p_JIT_MESICMOReport_Status"); |
| | | //更新生产状态临时状态表数量 |
| | | oCn.RunProcReturn("exec h_p_Sc_UpDateRelation_ICMOToICMOReport_Qty " + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID.ToString() + "", "h_p_Sc_UpDateRelation_ICMOToICMOReport_Qty"); |
| | | sReturn = "新增单据成功!"; |
| | | |
| | | oCn.Commit(); |