| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod FromSupplyPlanning ( |
| | | GlobalOTDTable otdTable, |
| | | const GlobalOTDTable otdTable, |
| | | const GlobalOTDSOP otdSop, |
| | | MacroPlan macroPlan, |
| | | String mrpCalverNo, |
| | | String userId |
| | |
| | | // 按MRPCalverNo查,已有旧记录时不处理 |
| | | oldRecords := selectset( macroPlan, PRData, item, |
| | | item.MRPCalverNo() = mrpCalverNo ); |
| | | nowNo := 1; |
| | | if( isnull( oldRecords ) or oldRecords.Size() = 0 ) { |
| | | pispips := ProductInStockingPointInPeriod::GetByMRPCalverNo( macroPlan, mrpCalverNo ); |
| | | traverse( pispips, Elements, item, item.NewSupplyQuantity() > 0 ) { |
| | | PRData::FromSupplyPlanning( otdTable, macroPlan, item, userId ); |
| | | PRData::FromSupplyPlanning( otdTable, otdSop, macroPlan, item, userId ); |
| | | nowNo := nowNo + 1; |
| | | if( nowNo mod 1000 = 0 ) { |
| | | info( "SupplyPlanning to prData : " + [String]nowNo ); |
| | | } |
| | | } |
| | | } |
| | | *] |