_Main/BL/InfoMessages.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_Publish.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
_Main/BL/InfoMessages.qbl
@@ -122,6 +122,26 @@ { DefaultText: 'Customer demand(PPA + IDS)' } InfoMessage InterfaceDataset_CustomerDemandPPAIDS_URL { DefaultText: '/api/customer-demand/saveList' } InfoMessage InterfaceDataset_DataCenter_Address { DefaultText: 'vwed-service.dmp.vwfawedl.mobi' } InfoMessage InterfaceDataset_DataCenter_ClientId { DefaultText: 'PPPS' } InfoMessage InterfaceDataset_DataCenter_ClientSecret { DefaultText: 'eyJ0eXAiOiJKV1QdsdfQdiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3Mjk4MjgxMjksInVzZXJuYW1lIjoicmNhY2NvdW50In0' } InfoMessage InterfaceDataset_DataCenter_ContentType { DefaultText: 'application/json;charset=utf-8' } InfoMessage InterfaceDataset_FinishedEngineInventory_Name { DefaultText: 'Finished engine inventory' _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
@@ -74,6 +74,6 @@ } } } owner.DLEngineLogisticsCostExcel( relnew, Name := CCEngineLogisticsCostReport::GetDefaultName(), FileBinaryValue := binaryValue, UploadDateTime := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ) ); owner.CCEngineLogisticsCostExcel( relnew, Name := CCEngineLogisticsCostReport::GetDefaultName(), FileBinaryValue := binaryValue, UploadDateTime := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ) ); *] } _Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_Publish.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,46 @@ Quintiq file version 2.0 #parent: #root StaticMethod Publish ( InterfaceDataset owner, String executor ) { TextBody: [* //// çå °é¸½ Jul-17-2024 (created) requestbody :='[ { "product": "DZ948293", "demandDate": "2024-10-01", "demandQty": 800, "versionName": "V2410204", "interfaceTime": "2024-10-01 12:00:00" } ]'; loginfo := owner.InterfaceLoginfo( relnew, ExecuteUser := executor , Name := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() , InterfaceDateTime := DateTime::ActualTime() , Message := '客æ·éæ±ï¼PPA+IDSï¼' , RequestBody := requestbody); InterfaceLoginfo::CallInterface( owner, loginfo ); //if( not isnull( data ) ){ // // cnv2 := StringToDate::StandardConverter(); // cnv2.SetCustomConversion(); // cnv2.CustomFormatString( 'yyyy-MM-dd' ); // // sadatalist := construct( FinishedEngineInventorys ); // for( seq := 0;seq < data.Size();seq++){ // item := data.Get(seq); // sadata := FinishedEngineInventory::GenerateData( loginfo, cnv2, item ); // sadatalist.Add( sadata ); // } // // options := DatasetFindOptions::Construct( 'MacroPlan' ).IncludeOffline( true ); //to load we must search offline datasets. // mdskey := DatasetController::FindUnique( options ); // // MDSMacroPlan::Root( mdskey ) -> InventoryInterfaceData::SynchronizeInventory( owner, sadatalist ); //} *] } _Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
@@ -40,7 +40,7 @@ periodname := period.Format( "M2/D2/Y" ); quantity := [Real]cell.Value(); previouscolumn := cell.FinancialProductionColumn().PreviousColumn(); if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ if( period = yearday.Date() and not isnull( previouscolumn ) and cnv2.CanConvert( previouscolumn.Name() ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ previouscell := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn ); quantity := [Real]cell.Value() + [Real]previouscell.Value(); } _Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
@@ -36,7 +36,7 @@ periodname := period.Format( "M2/D2/Y" ); quantity := [Real]cell.Value() previouscolumn := cell.FinancialSalesColumn().PreviousColumn(); if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ if( period = yearday.Date() and not isnull( previouscolumn ) and cnv2.CanConvert( previouscolumn.Name() ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){ previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn ); quantity := [Real]cell.Value() + [Real]previouscell.Value(); } _Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
@@ -11,7 +11,7 @@ owner.FinancialWeeklyReport( relflush ); ccunit := FinancialWeeklyReport::GetDefaultCCUnit(); dlunit := FinancialWeeklyReport::GetDefaultDLUnit(); allunit := FinancialWeeklyReport::GetDefaultAllUnit(); //allunit := FinancialWeeklyReport::GetDefaultAllUnit(); defaultname := FinancialWeeklyReport::GetDefaultName(); startofplanning := owner.StartOfPlanning(); @@ -29,17 +29,13 @@ dlsales := table.FinancialWeeklyRow( relnew, Name := 'DLéé', RowNr := 5 ); ccsales := table.FinancialWeeklyRow( relnew, Name := 'CCéé', RowNr := 6 ); //SUM totalpvaluesum := [Real]0; dlpvaluesum := [Real]0; ccpvaluesum := [Real]0; totalsvaluesum := [Real]0; dlsvaluesum := [Real]0; ccsvaluesum := [Real]0; //累计é totalpvaluecumulant := [Real]0; dlpvaluecumulant := [Real]0; ccpvaluecumulant := [Real]0; totalsvaluecumulant := [Real]0; dlsvaluecumulant := [Real]0; ccsvaluecumulant := [Real]0; @@ -48,18 +44,12 @@ salescolumn := selectobject( salestable, FinancialSalesColumn, scolumn, scolumn.Name() = column.Name() and scolumn.Period() = column.Period() and not scolumn.IsDay() ); //äº§éæ±æ» totalpvalue := [Real]0; dlpvalue := [Real]0; ccpvalue := [Real]0; traverse( productioncolumn, FinancialProductionCell, cell, cell.Quantity() > 0 ){ unit := cell.FinancialProductionRow().Unit(); if( unit = allunit ){ totalpvalue := totalpvalue + cell.Quantity(); if( column.Period() = startofplanning.StartOfMonth().Date() ){ totalpvaluecumulant := totalpvaluecumulant - cell.PlanValue(); } }else if( unit = dlunit ){ if( unit = dlunit ){ dlpvalue := dlpvalue + cell.Quantity(); if( column.Period() = startofplanning.StartOfMonth().Date() ){ dlpvaluecumulant := dlpvaluecumulant - cell.PlanValue(); @@ -71,7 +61,7 @@ } } } totalpcell := column.FinancialWeeklyCell( relnew, Value := [String]( [Number]totalpvalue ) ); totalpcell := column.FinancialWeeklyCell( relnew, Value := [String]( [Number]( dlpvalue + ccpvalue ) ) ); totalproduction.FinancialWeeklyCell( relinsert, totalpcell ); dlpcell := column.FinancialWeeklyCell( relnew, Value := [String]( [Number]dlpvalue ) ); dlproduction.FinancialWeeklyCell( relinsert, dlpcell ); @@ -79,20 +69,18 @@ ccproduction.FinancialWeeklyCell( relinsert, ccpcell ); //ééæ±æ» totalsvalue := [Real]0; dlsvalue := [Real]0; ccsvalue := [Real]0; traverse( salescolumn, FinancialSalesCell, cell, [Real]cell.Value() > 0 ){ unit := cell.FinancialSalesRow().Unit(); if( unit = allunit ){ totalsvalue := totalsvalue + [Real]cell.Value(); }else if( unit = dlunit ){ if( unit = dlunit ){ dlsvalue := dlsvalue + [Real]cell.Value(); }else if( unit = ccunit ){ ccsvalue := ccsvalue + [Real]cell.Value(); } } totalscell := column.FinancialWeeklyCell( relnew, Value := [String]totalsvalue ); totalscell := column.FinancialWeeklyCell( relnew, Value := [String]( dlsvalue + ccsvalue ) ); totalsales.FinancialWeeklyCell( relinsert, totalscell ); dlscell := column.FinancialWeeklyCell( relnew, Value := [String]dlsvalue ); dlsales.FinancialWeeklyCell( relinsert, dlscell ); @@ -100,17 +88,13 @@ ccsales.FinancialWeeklyCell( relinsert, ccscell ); if( column.Period() < startofplanning.StartOfMonth().Date() ){ totalpvaluecumulant := totalpvaluecumulant + totalpvalue; dlpvaluecumulant := dlpvaluecumulant + dlpvalue; ccpvaluecumulant := ccpvaluecumulant + ccpvalue; totalsvaluecumulant := totalsvaluecumulant + totalsvalue; dlsvaluecumulant := dlsvaluecumulant + dlsvalue; ccsvaluecumulant := ccsvaluecumulant + ccsvalue; } totalpvaluesum := totalpvaluesum + totalpvalue; dlpvaluesum := dlpvaluesum + dlpvalue; ccpvaluesum := ccpvaluesum + ccpvalue; totalsvaluesum := totalsvaluesum + totalsvalue; dlsvaluesum := dlsvaluesum + dlsvalue; ccsvaluesum := ccsvaluesum + ccsvalue; } @@ -118,33 +102,33 @@ cumulantcolumn := table.FinancialWeeklyColumn( relnew, Name := '累计é' ); proportioncolumn := table.FinancialWeeklyColumn( relnew, Name := 'å æ¯' ); //SUM totalpcellsum := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]( [Number]totalpvaluesum ) ); totalpcellsum := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]( [Number]( dlpvaluesum + ccpvaluesum ) ) ); totalproduction.FinancialWeeklyCell( relinsert, totalpcellsum ); dlpcellsum := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]( [Number]dlpvaluesum ) ); dlproduction.FinancialWeeklyCell( relinsert, dlpcellsum ); ccpcellsum := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]( [Number]ccpvaluesum ) ); ccproduction.FinancialWeeklyCell( relinsert, ccpcellsum ); totalscellsum := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]totalsvaluesum ); totalscellsum := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]( dlsvaluesum + ccsvaluesum ) ); totalsales.FinancialWeeklyCell( relinsert, totalscellsum ); dlscellsum := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]dlsvaluesum ); dlsales.FinancialWeeklyCell( relinsert, dlscellsum ); ccscellsum := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]ccsvaluesum ); ccsales.FinancialWeeklyCell( relinsert, ccscellsum ); //累计é totalpcellcumulant := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalpvaluecumulant ); totalpcellcumulant := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]( dlpvaluecumulant + ccpvaluecumulant ) ); totalproduction.FinancialWeeklyCell( relinsert, totalpcellcumulant ); dlpcellcumulant := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlpvaluecumulant ); dlproduction.FinancialWeeklyCell( relinsert, dlpcellcumulant ); ccpcellcumulant := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccpvaluecumulant ); ccproduction.FinancialWeeklyCell( relinsert, ccpcellcumulant ); totalscellcumulant := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalsvaluecumulant ); totalscellcumulant := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]( dlsvaluecumulant + ccsvaluecumulant ) ); totalsales.FinancialWeeklyCell( relinsert, totalscellcumulant ); dlscellcumulant := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlsvaluecumulant ); dlsales.FinancialWeeklyCell( relinsert, dlscellcumulant ); ccscellcumulant := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccsvaluecumulant ); ccsales.FinancialWeeklyCell( relinsert, ccscellcumulant ); //å æ¯ totalpvalueproportion := guard( ( totalpvaluecumulant / totalpvaluesum ).Format( 'N(Dec(2))' ), '0.00' ); totalpvalueproportion := guard( ( ( dlpvaluecumulant + ccpvaluecumulant ) / ( dlpvaluesum + ccpvaluesum ) ).Format( 'N(Dec(2))' ), '0.00' ); totalpcellproportion := proportioncolumn.FinancialWeeklyCell( relnew, Value := totalpvalueproportion ); totalproduction.FinancialWeeklyCell( relinsert, totalpcellproportion ); @@ -156,7 +140,7 @@ ccpcellproportion := proportioncolumn.FinancialWeeklyCell( relnew, Value := ccpvalueproportion ); ccproduction.FinancialWeeklyCell( relinsert, ccpcellproportion ); totalsvalueproportion := guard( ( totalsvaluecumulant / totalsvaluesum ).Format( 'N(Dec(2))' ), '0.00' ); totalsvalueproportion := guard( ( ( dlsvaluecumulant + ccsvaluecumulant ) / ( dlsvaluesum + ccsvaluesum ) ).Format( 'N(Dec(2))' ), '0.00' ); totalscellproportion := proportioncolumn.FinancialWeeklyCell( relnew, Value := totalsvalueproportion ); totalsales.FinancialWeeklyCell( relinsert, totalscellproportion ); _Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,51 @@ Quintiq file version 2.0 #parent: #root StaticMethod CallInterfaceForDataCenter ( InterfaceDataset owner, InterfaceLoginfo loginfo ) as owning JSON { Description: 'è°ç¨æ°æ®ä¸å°æ¥å£' TextBody: [* // çå °é¸½ Jul-22-2024 (created) address := Translations::InterfaceDataset_DataCenter_Address(); httpinterface := HTTPInterface::Create( address,80); httpinterface.PostMethod( true ); httpinterface.MediaType( Translations::InterfaceDataset_DataCenter_ContentType() ); httpinterface.AddHeader( "clientId", Translations::InterfaceDataset_DataCenter_ClientId() ); httpinterface.AddHeader( "clientSecret", Translations::InterfaceDataset_DataCenter_ClientSecret() ); try{ if( loginfo.Name() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() ){//客æ·éæ± httpinterface.URL( Translations::InterfaceDataset_CustomerDemandPPAIDS_URL() ); } httpinterface.Call( loginfo.RequestBody() ); result := httpinterface.Result(); loginfo.Response( result ); loginfo.Success( true ); }onerror{ loginfo.ReturnMsg( e.GeneralInformation() ); } //åç»å ¬å ±å¤ç loginfo.FinishTime( DateTime::ActualTime() ); data := JSON::Null().Build(); if( loginfo.Success() ){ resultJson := JSON::Parse( loginfo.Response() ); code := resultJson.Get( "code" ).GetString(); msg := resultJson.Get( "message" ).GetString(); data := resultJson.Get( "data" ); loginfo.ReturnMsg( msg ); if( code = "200" ){ total := resultJson.Get( "dataSize" ).GetNumber(); loginfo.ReturnSuccess( true ); loginfo.TotalRow( total ); loginfo.UpdateLast(); } } return &data; *] } _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def
@@ -15,7 +15,7 @@ [* CCEngineLogisticsCostReport::Initialize( MacroPlan ); if( not isnull( MacroPlan.DLEngineLogisticsCostExcel() ) ){ if( not isnull( MacroPlan.CCEngineLogisticsCostExcel() ) ){ CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, MacroPlan.CCEngineLogisticsCostExcel().FileBinaryValue() ); }else{ CCEngineLogisticsCostReport::InitiateSearch( MacroPlan );