| | |
| | | [* |
| | | // 初始化查询参数月份 |
| | | ds_Month_FOF.Date(Date::ActualDate()); |
| | | // 预测数据2此处理(筛选+客户名称提取) |
| | | if( MacroPlan.H_Forecast(relget ).Size()>0) |
| | | // 初始化预测数据 |
| | | JResult := H_FunctionClass::SM_InitialForcastData( MacroPlan); |
| | | if(not JResult.Get( "Status").GetBoolean()) |
| | | { |
| | | MacroPlan.H_Forecast(relget ).Delete( 0,MacroPlan.H_Forecast(relget ).Size()-1); |
| | | WebMessageBox::Warning( JResult.Get( "Msg").GetString()); |
| | | } |
| | | //AllData:= selectset( MacroPlan, Product_MP.SalesDemand.astype( Forecast ),object,object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth() |
| | | // and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth() |
| | | // and object.Quantity()>0 ); |
| | | // |
| | | //CustomName:=""; |
| | | //DepartMent:=""; |
| | | //idx:=0; |
| | | //traverse( AllData,Elements,Obj,not isnull(Obj)) |
| | | //{ |
| | | // idx:=Obj.SalesSegmentName().FindString( "_",0); |
| | | // if(idx>0) |
| | | // { |
| | | // DepartMent:=Obj.SalesSegmentName().SubString( 0,idx+1); |
| | | // CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1)); |
| | | // } |
| | | // else |
| | | // { |
| | | // CustomName :=Obj.SalesSegmentName(); |
| | | // } |
| | | // |
| | | // ArrayData:=Obj.SalesSegmentName().SubString( 0,Obj.SalesSegmentName().FindString( "_",0)+1); |
| | | // MacroPlan.H_Forecast(relnew,OrderCode := H_FunctionClass::SM_GenerateID( "OF"), |
| | | // SKU := Obj.ProductID(), |
| | | // CustomCode := CustomName, |
| | | // CustomName := CustomName, |
| | | // Util:=Obj.UnitOfMeasureName(), |
| | | // NeedTime:=Obj.EndDate(), |
| | | // ForecastQty:=[Number]Obj.Quantity().Round( 0), |
| | | // Department:=DepartMent); |
| | | //} |
| | | *] |
| | | GroupServerCalls: false |
| | | } |