| | |
| | | // yypsybs Sep-15-2023 (created) |
| | | existList := selectuniquevalues( parent, CapacityAndSaleBudgeFilterYear, item, item.YearNo() ); |
| | | nowYear := Date::Today().Year(); |
| | | for( i := nowYear - 10; i <= nowYear; i++ ) { |
| | | for( i := nowYear - 10; i <= nowYear + 5; i++ ) { |
| | | if( existList.Find( i ) = -1 ) { |
| | | parent.CapacityAndSaleBudgeFilterYear( relnew, |
| | | YearNo := i ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CapacityAndSaleBudgeExport () as BinaryValue |
| | | { |
| | | Description: 'å¯¼åºæ¯è¾ç»æ' |
| | | TextBody: |
| | | [* |
| | | // generate by generate_export.py |
| | | info( "export start" ); |
| | | text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>年度产éé¢ç®</name> |
| | | <column><name>å 餿 è®°</name><type>String</type></column> |
| | | <column><name>年份</name><type>Number</type></column> |
| | | <column><name>ä¸å¡é¨é¨</name><type>String</type></column> |
| | | <column><name>æ¾ç¤ºææ¯åç±»</name><type>String</type></column> |
| | | <column><name>ä¸å¡åç±»</name><type>String</type></column> |
| | | <column><name>产å线/产åè§æ ¼</name><type>String</type></column> |
| | | <column><name>产åæå·</name><type>String</type></column> |
| | | <column><name>Array产å°</name><type>String</type></column> |
| | | <column><name>è¸é产å°</name><type>String</type></column> |
| | | <column><name>å辨ç</name><type>String</type></column> |
| | | <column><name>åºè´§å½¢æ</name><type>String</type></column> |
| | | <column><name>å岿°</name><type>String</type></column> |
| | | <column><name>产è½å½é</name><type>String</type></column> |
| | | <column><name>maskæ°</name><type>String</type></column> |
| | | <column><name>1æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>2æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>3æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>4æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>5æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>6æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>7æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>8æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>9æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>10æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>11æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>12æäº§è½(PCS)</name><type>Real</type></column> |
| | | <column><name>年产è½(PCS)</name><type>Real</type></column> |
| | | <column><name>1æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>2æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>3æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>4æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>5æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>6æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>7æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>8æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>9æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>10æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>11æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>12æäº§è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>年产è½(宿°å¤§å¼ )</name><type>Real</type></column> |
| | | <column><name>1æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>2æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>3æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>4æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>5æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>6æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>7æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>8æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>9æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>10æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>11æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>12æéå®é¢(W)</name><type>Real</type></column> |
| | | <column><name>å¹´éå®é¢(W)</name><type>Real</type></column> |
| | | </table>'; |
| | | xmlDOMImplementation := XMLDOMImplementation::Create(); |
| | | xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text ); |
| | | |
| | | tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 ); |
| | | |
| | | toExportList := selectsortedset( this, MappingCapacityAndSaleBudge, item, true, item.OrgCode() + "_" + item.PlaceOfProductionOfArray() ); |
| | | info( "export size : " + [String]toExportList.Size() ); |
| | | nowNo := 1; |
| | | traverse ( toExportList, Elements, toExport ) { |
| | | info( "nowNo : " + [String]nowNo ); |
| | | nowNo := nowNo + 1; |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, ifexpr( toExport.Deleted(), "Y", "N"), "å 餿 è®°" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.YearNo(), "年份" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.OrgCode(), "ä¸å¡é¨é¨" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.DisplayTechnology(), "æ¾ç¤ºææ¯åç±»" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.BusinessType(), "ä¸å¡åç±»" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.LineAndSpecification(), "产å线/产åè§æ ¼" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductCode(), "产åæå·" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.PlaceOfProductionOfArray(), "Array产å°" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.PlaceOfProductionOfEvaporation(), "è¸é产å°" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.Resolution(), "å辨ç" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ShippingForm(), "åºè´§å½¢æ" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.NumberOfCut(), "å岿°" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.CapacityEquivalent(), "产è½å½é" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.NumberOfMask(), "maskæ°" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth1(), "1æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth2(), "2æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth3(), "3æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth4(), "4æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth5(), "5æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth6(), "6æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth7(), "7æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth8(), "8æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth9(), "9æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth10(), "10æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth11(), "11æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth12(), "12æäº§è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSTotal(), "年产è½(PCS)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth1(), "1æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth2(), "2æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth3(), "3æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth4(), "4æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth5(), "5æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth6(), "6æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth7(), "7æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth8(), "8æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth9(), "9æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth10(), "10æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth11(), "11æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth12(), "12æäº§è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetTotal(), "年产è½(宿°å¤§å¼ )" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth1(), "1æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth2(), "2æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth3(), "3æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth5(), "4æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth4(), "5æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth6(), "6æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth7(), "7æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth8(), "8æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth9(), "9æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth10(), "10æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth11(), "11æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth12(), "12æéå®é¢(W)" ); |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountTotal(), "å¹´éå®é¢(W)" ); |
| | | } |
| | | |
| | | xmlDOMSerializer := xmlDOMImplementation.CreateSerializer(); |
| | | xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument ); |
| | | |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) ); |
| | | tableGroupHandle := TableGroupHandle::Create( "年度产éé¢ç®" ); |
| | | tableGroupHandle.Add( tableHandle ); |
| | | tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true ); |
| | | |
| | | info( "export end" ); |
| | | |
| | | return tableBinaryData.AsBinaryValue(); |
| | | *] |
| | | } |
| | |
| | | info( "productCodeList : " + [String]productCodeList.Size() ); |
| | | |
| | | mpSync.MappingCapacityAndSaleBudge( relflush ); |
| | | for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year(); year := year + 1 ) { |
| | | for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year() + 5; year := year + 1 ) { |
| | | for( i := 1; i <= productCodeList.Size(); i := i + 1 ) { |
| | | productCode := productCodeList.Element( i - 1 ); |
| | | mappingCapacityAndSaleBudge := mpSync.MappingCapacityAndSaleBudge( relnew, |
| | |
| | | info( "test MappingCapacityAndSaleBudge size : " + [String]result1.Size() ); |
| | | |
| | | mpSync.MappingAnnualBudget( relflush ); |
| | | for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year(); year := year + 1 ) { |
| | | for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year() + 5; year := year + 1 ) { |
| | | for( i := 1; i <= productCodeList.Size(); i := i + 1 ) { |
| | | productCode := productCodeList.Element( i - 1 ); |
| | | mappingAnnualBudget := mpSync.MappingAnnualBudget( relnew, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod ExpectedHeaders () as owning Strings |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jun-30-2023 (created) |
| | | value := construct( structured[String] ); |
| | | value.Add( "å 餿 è®°" ); |
| | | value.Add( "年份" ); |
| | | value.Add( "ä¸å¡é¨é¨" ); |
| | | value.Add( "æ¾ç¤ºææ¯åç±»" ); |
| | | value.Add( "ä¸å¡åç±»" ); |
| | | value.Add( "产å线/产åè§æ ¼" ); |
| | | value.Add( "产åæå·" ); |
| | | value.Add( "Array产å°" ); |
| | | value.Add( "è¸é产å°" ); |
| | | value.Add( "å辨ç" ); |
| | | value.Add( "åºè´§å½¢æ" ); |
| | | value.Add( "å岿°" ); |
| | | value.Add( "产è½å½é" ); |
| | | value.Add( "maskæ°" ); |
| | | value.Add( "1æäº§è½(PCS)" ); |
| | | value.Add( "2æäº§è½(PCS)" ); |
| | | value.Add( "3æäº§è½(PCS)" ); |
| | | value.Add( "4æäº§è½(PCS)" ); |
| | | value.Add( "5æäº§è½(PCS)" ); |
| | | value.Add( "6æäº§è½(PCS)" ); |
| | | value.Add( "7æäº§è½(PCS)" ); |
| | | value.Add( "8æäº§è½(PCS)" ); |
| | | value.Add( "9æäº§è½(PCS)" ); |
| | | value.Add( "10æäº§è½(PCS)" ); |
| | | value.Add( "11æäº§è½(PCS)" ); |
| | | value.Add( "12æäº§è½(PCS)" ); |
| | | value.Add( "年产è½(PCS)" ); |
| | | value.Add( "1æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "2æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "3æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "4æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "5æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "6æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "7æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "8æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "9æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "10æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "11æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "12æäº§è½(宿°å¤§å¼ )" ); |
| | | value.Add( "年产è½(宿°å¤§å¼ )" ); |
| | | value.Add( "1æéå®é¢(W)" ); |
| | | value.Add( "2æéå®é¢(W)" ); |
| | | value.Add( "3æéå®é¢(W)" ); |
| | | value.Add( "4æéå®é¢(W)" ); |
| | | value.Add( "5æéå®é¢(W)" ); |
| | | value.Add( "6æéå®é¢(W)" ); |
| | | value.Add( "7æéå®é¢(W)" ); |
| | | value.Add( "8æéå®é¢(W)" ); |
| | | value.Add( "9æéå®é¢(W)" ); |
| | | value.Add( "10æéå®é¢(W)" ); |
| | | value.Add( "11æéå®é¢(W)" ); |
| | | value.Add( "12æéå®é¢(W)" ); |
| | | value.Add( "å¹´éå®é¢(W)" ); |
| | | return &value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | MPSync parent |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jul-1-2023 (created) |
| | | xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?> |
| | | <table> |
| | | <name>MappingCapacityAndSaleBudge</name> |
| | | '; |
| | | //--------------------------------------------------------------------------------------------- |
| | | exportFields := MappingCapacityAndSaleBudge::ExportFields(); |
| | | exportHeaders := MappingCapacityAndSaleBudge::ExpectedHeaders(); |
| | | if( exportFields.Size() <> exportHeaders.Size() ) { |
| | | error( "fields and headers not match" ); |
| | | } |
| | | info( "export start" ); |
| | | for( i := 0; i < exportFields.Size() ; i++ ) { |
| | | header := exportHeaders.Element( i ); |
| | | fieldName := exportFields.Element( i ); |
| | | info( "header : " + header ) |
| | | info( "fieldName : " + fieldName ) |
| | | columnStr := "<column><name>" + header + "</name><type>String</type>"; |
| | | traverse( parent, MappingCapacityAndSaleBudge, oldRecord ) { |
| | | field := Reflection::FindAttribute( "MappingCapacityAndSaleBudge", fieldName); |
| | | if( not isnull( field ) ) { |
| | | fieldValue := ""; |
| | | if( fieldValue = "" ) { |
| | | fieldValue := guard( field.GetString( oldRecord ), "" ); |
| | | } |
| | | if( fieldValue = "" ) { |
| | | fieldValue := guard( [String]field.GetNumber( oldRecord ), "" ); |
| | | } |
| | | if( fieldValue = "" ) { |
| | | fieldValue := guard( [String]field.GetReal( oldRecord ), "" ); |
| | | } |
| | | if( fieldValue = "" ) { |
| | | fieldValue := guard( ifexpr( field.GetBoolean( oldRecord ), "Y", "N" ), "" ); |
| | | } |
| | | if( fieldValue = "" ) { |
| | | fileDateValue := guard( field.GetDate( oldRecord ), Date::MinDate() ); |
| | | if( fileDateValue <> Date::MinDate() ) { |
| | | conv := DateTimeToString::StandardConverter(); |
| | | conv.SetCustomConversion(); |
| | | conv.CustomFormatString( 'yyyyMMdd' ); |
| | | fieldValue := conv.Convert( fileDateValue.DateTime() ); |
| | | } |
| | | } |
| | | cellStr := '<cell value="' + fieldValue + '"/>'; |
| | | |
| | | columnStr := columnStr + cellStr; |
| | | } else { |
| | | error( "no field " + fieldName + " in type MappingCapacityAndSaleBudge"); |
| | | } |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | } |
| | | //--------------------------------------------------------------------------------------------- |
| | | xmlTemplate := xmlTemplate + "</table>"; |
| | | info( xmlTemplate ); |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) ); |
| | | XLS::SaveTable( tableHandle, OS::TempPath() + "MappingCapacityAndSaleBudge.xlsx" ); |
| | | file := OSFile::Construct(); |
| | | file.Open( OS::TempPath() + "MappingCapacityAndSaleBudge.xlsx", "Read", true ); |
| | | data := file.ReadBinary() |
| | | info( "export end" ); |
| | | return data.AsBase64EncodedString(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod ExportFields () as owning Strings |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Jun-30-2023 (created) |
| | | value := construct( structured[String] ); |
| | | value.Add( "Deleted" ); |
| | | value.Add( "YearNo" ); |
| | | value.Add( "OrgCode" ); |
| | | value.Add( "DisplayTechnology" ); |
| | | value.Add( "BusinessType" ); |
| | | value.Add( "LineAndSpecification" ); |
| | | value.Add( "ProductCode" ); |
| | | value.Add( "PlaceOfProductionOfArray" ); |
| | | value.Add( "PlaceOfProductionOfEvaporation" ); |
| | | value.Add( "Resolution" ); |
| | | value.Add( "ShippingForm" ); |
| | | value.Add( "NumberOfCut" ); |
| | | value.Add( "CapacityEquivalent" ); |
| | | value.Add( "NumberOfMask" ); |
| | | value.Add( "CapacityInPCSInMonth1" ); |
| | | value.Add( "CapacityInPCSInMonth2" ); |
| | | value.Add( "CapacityInPCSInMonth3" ); |
| | | value.Add( "CapacityInPCSInMonth4" ); |
| | | value.Add( "CapacityInPCSInMonth5" ); |
| | | value.Add( "CapacityInPCSInMonth6" ); |
| | | value.Add( "CapacityInPCSInMonth7" ); |
| | | value.Add( "CapacityInPCSInMonth8" ); |
| | | value.Add( "CapacityInPCSInMonth9" ); |
| | | value.Add( "CapacityInPCSInMonth10" ); |
| | | value.Add( "CapacityInPCSInMonth11" ); |
| | | value.Add( "CapacityInPCSInMonth12" ); |
| | | value.Add( "CapacityInPCSTotal" ); |
| | | value.Add( "CapacityInSheetInMonth1" ); |
| | | value.Add( "CapacityInSheetInMonth2" ); |
| | | value.Add( "CapacityInSheetInMonth3" ); |
| | | value.Add( "CapacityInSheetInMonth4" ); |
| | | value.Add( "CapacityInSheetInMonth5" ); |
| | | value.Add( "CapacityInSheetInMonth6" ); |
| | | value.Add( "CapacityInSheetInMonth7" ); |
| | | value.Add( "CapacityInSheetInMonth8" ); |
| | | value.Add( "CapacityInSheetInMonth9" ); |
| | | value.Add( "CapacityInSheetInMonth10" ); |
| | | value.Add( "CapacityInSheetInMonth11" ); |
| | | value.Add( "CapacityInSheetInMonth12" ); |
| | | value.Add( "CapacityInSheetTotal" ); |
| | | value.Add( "SaleAmountInMonth1" ); |
| | | value.Add( "SaleAmountInMonth2" ); |
| | | value.Add( "SaleAmountInMonth3" ); |
| | | value.Add( "SaleAmountInMonth5" ); |
| | | value.Add( "SaleAmountInMonth4" ); |
| | | value.Add( "SaleAmountInMonth6" ); |
| | | value.Add( "SaleAmountInMonth7" ); |
| | | value.Add( "SaleAmountInMonth8" ); |
| | | value.Add( "SaleAmountInMonth9" ); |
| | | value.Add( "SaleAmountInMonth10" ); |
| | | value.Add( "SaleAmountInMonth11" ); |
| | | value.Add( "SaleAmountInMonth12" ); |
| | | value.Add( "SaleAmountTotal" ); |
| | | return &value; |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | Method CapacityAndSaleBudgeChart ( |
| | | MacroPlans macroPlans, |
| | | Boolean isCapacity, |
| | | String saleOrCapacity, |
| | | String groupBy, |
| | | String byBusinessTypeOrByOrgCode, |
| | | CapacityAndSaleBudgeFilterBusinessTypes businessTypes, |
| | |
| | | [* |
| | | // yypsybs Sep-19-2023 (created) |
| | | // true, false |
| | | info( isCapacity ); |
| | | info( saleOrCapacity ); |
| | | // æ;å£åº¦;åå¹´;å¹´ |
| | | info( groupBy ); |
| | | // 颿¿åºå°;äºä¸é¨ |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, year.YearNo() ), |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, year.YearNo() ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, year.YearNo() ), |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, year.YearNo() ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ), |
| | | MappingCustomerOrder::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCustomerOrder::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ), |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) |
| | | ) |
| | | ); |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ), |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ), |
| | | MappingCustomerOrder::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCustomerOrder::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ), |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) |
| | | ) |
| | | ); |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ), |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ) ) |
| | | ); |
| | | // info( "productCodeList : " + [String]productCodeList.Size() ); |
| | | // S&OP |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ), |
| | | MappingCustomerOrder::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCustomerOrder::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) , |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) |
| | | ) |
| | | ); |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ), |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ), |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ), |
| | | MappingCustomerOrder::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCustomerOrder::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ), |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) |
| | | ) |
| | | ); |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, year.YearNo() ), |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, year.YearNo() ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, year.YearNo() ), |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, year.YearNo() ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ), |
| | | MappingCustomerOrder::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCustomerOrder::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) , |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) |
| | | ) |
| | | ); |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ), |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ), |
| | | MappingCustomerOrder::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCustomerOrder::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) , |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) |
| | | ) |
| | | ); |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ), |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ), |
| | | MappingCustomerOrder::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCustomerOrder::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ), |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) |
| | | ) |
| | | ); |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ), |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ), |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ), |
| | | MappingCustomerOrder::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingCustomerOrder::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) , |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) |
| | | ) |
| | | ); |
| | | } |
| | |
| | | #parent: #root |
| | | Method CapacityAndSaleBudgeChart ( |
| | | MacroPlans macroPlans, |
| | | Boolean isCapacity, |
| | | String saleOrCapacity, |
| | | String groupBy, |
| | | String byBusinessTypeOrByOrgCode, |
| | | String businessTypeChosen, |
| | |
| | | [* |
| | | // yypsybs Sep-19-2023 (created) |
| | | // true, false |
| | | info( isCapacity ); |
| | | info( saleOrCapacity ); |
| | | // æ;å£åº¦;åå¹´;å¹´ |
| | | info( groupBy ); |
| | | // 颿¿åºå°;äºä¸é¨ |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | // todo QID 23 |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ), |
| | | // todo |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "å£åº¦-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | ); |
| | | // info( "productCodeList : " + [String]productCodeList.Size() ); |
| | | // S&OP |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "å£åº¦-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-第" + monthNoString + "æ-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-第" + monthNoString + "æ-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "å£åº¦-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "å£åº¦-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-第" + monthNoString + "æ-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "å¹´-第" + monthNoString + "æ-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ButtonExportDetail |
| | | Response OnClick () id:Response_FormCapacityAndSaleBudge_ButtonExportDetail_OnClick |
| | | { |
| | | #keys: '[414384.0.887310502]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return not isnull( MPSync ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | //Application.Download( "年度产éé¢ç®è¯¦æ
.xlsx", MPSync.CapacityAndSaleBudgeExport().AsBinaryData() ); |
| | | |
| | | base64 := MappingCapacityAndSaleBudge::Export( MPSync ); |
| | | Application.Download( "年度产éé¢ç®è¯¦æ
.xlsx", base64 ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | [* |
| | | MPSync::TestData( MPSync, MacroPlan ); |
| | | GlobalOTDTable.InitTestData(); |
| | | MPSync.RefreshCapacityAndSaleBudgeFilter(); |
| | | *] |
| | | } |
| | | } |
| | |
| | | Children: |
| | | [ |
| | | #child: ListCapacityAndSaleBudge |
| | | Component ButtonExportDetail |
| | | { |
| | | #keys: '[414384.0.887310503]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'EXPORT1' |
| | | Label: '导åº' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | CapacityAndSaleBudgeChartElement::TestData( ScenarioManager ); |
| | | |
| | | ScenarioManager.CapacityAndSaleBudgeChart( DataHolderMacroPlansForScenarioComparison.Data(), |
| | | CheckboxIsCapacity.Checked(), |
| | | DropDownSaleOrCapacity.Text(), |
| | | DropDownTimeGroup.Text(), |
| | | DropDownByBusinessTypeOrByOrgCode.Text(), |
| | | DataHolderCapacityAndSaleBudgeFilterBusinessType.Data(), |
| | |
| | | Visible: false |
| | | ] |
| | | } |
| | | Component CheckboxIsCapacity |
| | | { |
| | | #keys: '[414384.0.857770765]' |
| | | BaseType: 'WebCheckbox' |
| | | Properties: |
| | | [ |
| | | Label: '产è½' |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | | Component DropDownTimeGroup |
| | | { |
| | | #keys: '[414384.0.857771238]' |
| | |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component DropDownSaleOrCapacity |
| | | { |
| | | #keys: '[414384.0.886240556]' |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | InitialValue: 'éå®é¢' |
| | | Label: 'éå®é¢/产è½' |
| | | Strings: 'éå®é¢;产è½' |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |