| | |
| | | //插入子表 |
| | | foreach (Models.ClsSc_ProcessReportSub oSub in DetailColl) |
| | | { |
| | | |
| | | |
| | | oCn.RunProc("Insert into Sc_ProcessReportSub " + |
| | | " (HInterID,HEntryID,HProcID,HProcNumber,HEmpID" + |
| | | ",HMaterID,HMaterNumber,HOutPrice,HOutMoney" + |
| | |
| | | "HSecUnitQty1,HSecUnitRate1,HSecUnitQty2,HSecUnitRate2,HUsingQty,"+ |
| | | "HSelfBadCount,HPreBadCount,HPayMentQty,HOtherDeduct,HRelPay,"+ |
| | | "HOtherItem1,HOtherItem2,HOtherItem3,HOtherItem4,HOtherItem5,"+ |
| | | "HPackType,HCheckEmpID,HWeight,HBatchNo" + |
| | | "HPackType,HCheckEmpID,HWeight,HBatchNo,HRelationInterID" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + ",'" + oSub.HProcNumber + "'," + oSub.HEmpID.ToString() + |
| | | "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'," + oSub.HOutPrice.ToString() + "," + oSub.HOutMoney.ToString() + |
| | |
| | | "," + oSub.HSecUnitQty1.ToString() + "," + oSub.HSecUnitRate1.ToString() + "," + oSub.HSecUnitQty2.ToString() + "," + oSub.HSecUnitRate2.ToString() + "," + oSub.HUsingQty.ToString() + |
| | | "," + oSub.HSelfBadCount.ToString() + "," + oSub.HPreBadCount.ToString() + "," + oSub.HPayMentQty.ToString() + "," + oSub.HOtherDeduct.ToString() + "," + oSub.HRelPay.ToString() + |
| | | ",'" + oSub.HOtherItem1.ToString() + "','" + oSub.HOtherItem2.ToString() + "','" + oSub.HOtherItem3.ToString() + "','" + oSub.HOtherItem4.ToString() + "','" + oSub.HOtherItem5.ToString() + |
| | | "','" + oSub.HPackType.ToString() + "'," + oSub.HCheckEmpID.ToString() + "," + oSub.HWeight.ToString() + ",'" + oSub.HBatchNo + "'" + |
| | | "','" + oSub.HPackType.ToString() + "'," + oSub.HCheckEmpID.ToString() + "," + oSub.HWeight.ToString() + ",'" + oSub.HBatchNo + "','0'" + |
| | | ") "); |
| | | } |
| | | //更新关联数量 |
| | | AddNewRelation(ref sReturn, omodel.HInterID); |
| | | //更新关联数量 |
| | | //oCn.RunProc("exec h_p_Sc_UpDateICMOBillStepStatusRelation_Add " + omodel.HInterID); |
| | | //回填 生产状态表 日计划 为 已完工 状态 |
| | | oCn.RunProc("exec h_p_Sc_UpDateICMOBillQualityStatus " + omodel.HICMOStatusInterID.ToString() + ",3"); |
| | | //默认变为 申请检验状态 |
| | | oCn.RunProc("exec h_p_Sc_UpDateProcessReportStatus " + omodel.HInterID.ToString() + ",15"); |
| | | // |
| | | sReturn = "新增单据成功!"; |
| | | sReturn = omodel.HInterID.ToString(); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |