| | |
| | | traverse ( archiveExecutionStatus, TemporaryDemandData, tdd ,tdd.Origin() = "" or tdd.StartDate() >= macroPlan.StartOfPlanning().Date()) { |
| | | targetProduct_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = tdd.ProductID() ); |
| | | targetStockingPoint_MP := select( macroPlan, StockingPoint_MP, tempSPMP, tempSPMP.ID() = tdd.StockingPointID() ); |
| | | info( tdd.SalesSegmentName() ); |
| | | // info( tdd.SalesSegmentName() ); |
| | | if ( not isnull( targetProduct_MP ) and not isnull( targetStockingPoint_MP ) ) { |
| | | forcest := Forecast::Create( targetProduct_MP, |
| | | targetStockingPoint_MP, |
| | |
| | | archiveExecutionStatus.AES_TemporaryDemandData().Source().FlatQuery( "truncate table A_Forecasts" ); |
| | | |
| | | // 返回成功消息 |
| | | if( message <> ''){ |
| | | RequirementImportExecutionStatus::Create( archiveExecutionStatus, code, "Complete", userName, message, true ); |
| | | }else{ |
| | | RequirementImportExecutionStatus::Create( archiveExecutionStatus, code, "Complete", userName, Translations::A_VWED_RequirementImportSuccessful(), true ); |
| | | } |
| | | } else { |
| | | RequirementImportExecutionStatus::Create( archiveExecutionStatus, code, "Complete", userName, message, false ); |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // Akari Aug-21-2024 (created) |
| | | owner.DispatchShiftPlan( relflush ); |
| | | owner.RB_DispatchShiftPlanBroker().Source().FlatQuery( "truncate table A_DispatchShiftPlan" ); |
| | | |
| | | now := DateTime::Now(); |
| | | macroPlanName := macroPlan.MDSMacroPlan().Description(); |
| | | traverse( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).ShiftPlan,shiftPlan ){ |