_Main/BL/Type_TemplateManager/StaticMethod_GetIDSFullTable.qbl | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Response_pnlActionsLeft_bIDSFullTableTemplateDownload_OnClick.def | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
_Main/BL/Type_TemplateManager/StaticMethod_GetIDSFullTable.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,43 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetIDSFullTable ( const Archive archive, Number year ) as BinaryValue { TextBody: [* // Administrator May-30-2024 (created) // Akari May-18-2024 (created) // è°ç¨æ¥å£ url := "/IDSPPACurve/GetIDSFullTableXML" + "?year=" +[String]year; i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() ); i.URL( url ); i.PostMethod( false ); i.TimeOut( Duration::Minutes( 5 ) ); i.Call( ); htmlresult := i.Result(); respJSON := JSON::Parse( htmlresult ); code := respJSON.Get( "code" ).GetNumber(); message := respJSON.Get( "message" ).GetString(); xmlTemplate := ""; if( code = 200 ){ xmlTemplate := message; }else{ error( message ); } tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) ); XLS::SaveTable( tableHandle, OS::TempPath() + "template.xlsx" ); file := OSFile::Construct(); file.Open( OS::TempPath() + "template.xlsx", "Read", true ); data := file.ReadBinary(); return data; *] } _Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Response_pnlActionsLeft_bIDSFullTableTemplateDownload_OnClick.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,18 @@ Quintiq file version 2.0 #parent: pnlActionsLeft/bIDSFullTableTemplateDownload Response OnClick () id:Response_pnlActionsLeft_bIDSFullTableTemplateDownload_OnClick { #keys: '[411860.0.31051373]' CanBindMultiple: false DefinitionID: 'Responsedef_WebButton_OnClick' QuillAction { Body: [* binaryValue := TemplateManager::GetIDSFullTable( Archive, Date::ActualDate().Year() ); Application.Download( "IDSå ¨è¡¨ï¼ "+ [String]Date::ActualDate().Year() +".xlsx", binaryValue.AsBinaryData() ); *] GroupServerCalls: false } }