| | |
| | | #parent: #root |
| | | StaticMethod GenerateData ( |
| | | InterfaceDataset owner, |
| | | MacroPlan macroplan, |
| | | String werk, |
| | | String version, |
| | | Date startdate, |
| | |
| | | if( not exists( productids, Elements, e, e = quantityrow.ProductID() ) ){ |
| | | productids.Add( quantityrow.ProductID() ); |
| | | } |
| | | |
| | | pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := [Number]cell.Quantity(), Werk := rowwerk ); |
| | | product := selectobject( macroplan, Product_MP, product, product.ID() = quantityrow.Name() ); |
| | | planqty := [Number]cell.Quantity(); |
| | | if( not isnull( product ) and exists( product.GetAllParent(), Elements, proparent, proparent.ID() = 'PL' ) ){ |
| | | planqty := planqty * 4; |
| | | } |
| | | pir.PIRData( relnew, Product := quantityrow.ProductID(), PlanningDate := column.StartDate(), PlanningQty := planqty, Werk := rowwerk ); |
| | | } |
| | | } |
| | | } |
| | |
| | | if( isnull( pirdata ) ){ |
| | | pirdata := pir.PIRData( relnew, Product := row.ProductID(), PlanningDate := column.StartDate(), PlanningQty := 0, Werk := rowwerk ); |
| | | } |
| | | pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Quantity() ); |
| | | product := selectobject( macroplan, Product_MP, product, product.ID() = row.Name() ); |
| | | planqty := [Number]cell.Quantity(); |
| | | if( not isnull( product ) and exists( product.GetAllParent(), Elements, proparent, proparent.ID() = 'PL' ) ){ |
| | | planqty := planqty * 4; |
| | | } |
| | | pirdata.PlanningQty( pirdata.PlanningQty() + planqty ); |
| | | } |
| | | } |
| | | } |
| | |
| | | Form.ApplyChanges(); |
| | | if( WebMessageBox::Question( this, '是否确认推送', 'OK|Cancel' ) = 0 ){ |
| | | msg := ''; |
| | | loginfo := AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), efVersion.Text(), dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName(), msg ); |
| | | loginfo := AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, MacroPlan, ddslFactory.Text(), efVersion.Text(), dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName(), msg ); |
| | | sucproduct := selectuniquevalues( loginfo, SAPResponseLoginfo, e, e.IsSuccess(), e.Msg_v1() ); |
| | | if( sucproduct.Size() = loginfo.SAPResponseLoginfo( relsize ) ){ |
| | | WebMessageBox::Success( ApplicationMacroPlanner, '推送成功' ); |