Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lhj
已重命名4个文件
已修改43个文件
已添加29个文件
已删除11个文件
| | |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MPSync |
| | | OwningSide: 'Owned' |
| | | InterfaceProperties { Accessibility: 'Module' } |
| | | } |
| | | RelationSide.RightSide MPSync |
| | | { |
| | |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: ImportExcel |
| | | OwningSide: 'Reference' |
| | | InterfaceProperties { Accessibility: 'Module' } |
| | | } |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method HasAllRequiredFilesForImport (output Strings missingFiles_o, Boolean needUserUploadAllFiles) as Boolean |
| | | Method HasAllRequiredFilesForImport ( |
| | | output Strings missingFiles_o, |
| | | Boolean needUserUploadAllFiles |
| | | ) remote as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method HasAllRequiredFilesForImport (output Strings missingFiles_o) as Boolean |
| | | Method HasAllRequiredFilesForImport ( |
| | | output Strings missingFiles_o |
| | | ) remote as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CanImport (output Strings missingFiles_o) as Boolean |
| | | Method CanImport ( |
| | | output Strings missingFiles_o |
| | | ) remote as Boolean |
| | | { |
| | | Description: 'Checks if necessary files are sufficent before starting import.' |
| | | TextBody: |
| | |
| | | system=false |
| | | version.component=2022.3.0.0 |
| | | version.fileformat=2 |
| | | version.quintiq=6.3.3.0 NightlyBuild 247983, build 247983 |
| | | version.quintiq=6.3.3.0 , build 248673 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeChartElement_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeChartElement |
| | | { |
| | | #keys: '1[414384.0.921264786]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264788][414384.0.921264787][414384.0.921264789]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeChartElement |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeChartElement |
| | | { |
| | | #keys: '3[414384.0.921264791][414384.0.921264790][414384.0.921264792]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeChartRow_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeChartRow |
| | | { |
| | | #keys: '1[414384.0.921264769]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264771][414384.0.921264770][414384.0.921264772]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeChartRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeChartRow |
| | | { |
| | | #keys: '3[414384.0.921264774][414384.0.921264773][414384.0.921264775]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeCompareItemColumn_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeCompareItemColumn |
| | | { |
| | | #keys: '1[414384.0.921264730]' |
| | | ProceduralSequenceRelationStrategy |
| | | { |
| | | #keys: '13[0.0.0][414384.0.921264749][414384.0.921264743][414384.0.921264750][414384.0.921264744][414384.0.921264751][414384.0.921264745][414384.0.921264752][414384.0.921264746][414384.0.921264753][414384.0.921264747][414384.0.921264754][414384.0.921264748]' |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264732][414384.0.921264731][414384.0.921264733]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeCompareItemColumn |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeCompareItemColumn |
| | | { |
| | | #keys: '3[414384.0.921264735][414384.0.921264734][414384.0.921264736]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeCompareItemRow_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeCompareItemRow |
| | | { |
| | | #keys: '1[414384.0.921264713]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264715][414384.0.921264714][414384.0.921264716]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeCompareItemRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeCompareItemRow |
| | | { |
| | | #keys: '3[414384.0.921264718][414384.0.921264717][414384.0.921264719]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeFilterBusinessType_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeFilterBusinessType |
| | | { |
| | | #keys: '1[414384.0.921264696]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264698][414384.0.921264697][414384.0.921264699]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeFilterBusinessType |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeFilterBusinessType |
| | | { |
| | | #keys: '3[414384.0.921264701][414384.0.921264700][414384.0.921264702]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeFilterItem_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeFilterItem |
| | | { |
| | | #keys: '1[414384.0.921264679]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264681][414384.0.921264680][414384.0.921264682]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeFilterItem |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeFilterItem |
| | | { |
| | | #keys: '3[414384.0.921264684][414384.0.921264683][414384.0.921264685]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeFilterMonth_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeFilterMonth |
| | | { |
| | | #keys: '1[414384.0.921264662]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264664][414384.0.921264663][414384.0.921264665]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeFilterMonth |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeFilterMonth |
| | | { |
| | | #keys: '3[414384.0.921264667][414384.0.921264666][414384.0.921264668]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeFilterPlaceOfProductionOfArray_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeFilterPlaceOfProductionOfArray |
| | | { |
| | | #keys: '1[414384.0.921264645]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264647][414384.0.921264646][414384.0.921264648]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeFilterPlaceOfProductionOfArray |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeFilterPlaceOfProductionOfArray |
| | | { |
| | | #keys: '3[414384.0.921264650][414384.0.921264649][414384.0.921264651]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation CapacityAndSaleBudgeFilterYear_GlobalOTDTable_GlobalOTDTable_CapacityAndSaleBudgeFilterYear |
| | | { |
| | | #keys: '1[414384.0.921264628]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide GlobalOTDTable |
| | | { |
| | | #keys: '3[414384.0.921264630][414384.0.921264629][414384.0.921264631]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: CapacityAndSaleBudgeFilterYear |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide CapacityAndSaleBudgeFilterYear |
| | | { |
| | | #keys: '3[414384.0.921264633][414384.0.921264632][414384.0.921264634]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: GlobalOTDTable |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation YuxTest_MPSync_MPSync_YuxTest |
| | | { |
| | | #keys: '1[414384.0.915854641]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MPSync |
| | | { |
| | | #keys: '3[414384.0.915854643][414384.0.915854642][414384.0.915854644]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: YuxTest |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide YuxTest |
| | | { |
| | | #keys: '3[414384.0.915854646][414384.0.915854645][414384.0.915854647]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MPSync |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod TestData ( |
| | | ScenarioManager scenarioManager |
| | | GlobalOTDTable parent |
| | | ) |
| | | { |
| | | Description: 'çææµè¯æ°æ®' |
| | |
| | | |
| | | info( "çæå¹´åº¦äº§éé¢ç®æ¥è¡¨æµè¯æ°æ®" ) |
| | | |
| | | scenarioManager.CapacityAndSaleBudgeChartElement( relflush ); |
| | | parent.CapacityAndSaleBudgeChartElement( relflush ); |
| | | |
| | | for( sc := 0; sc < 4; sc := sc + 1 ) { |
| | | scenarioName := "SC" + [String]sc; |
| | |
| | | businessTypeString := "BT" + [String]i; |
| | | for( j := 1; j <= 12; j := j + 1 ) { |
| | | monthString := "MONTH" + ifexpr( j < 10, "0" + [String]j, [String]j ); |
| | | scenarioManager.CapacityAndSaleBudgeChartElement( relnew, |
| | | parent.CapacityAndSaleBudgeChartElement( relnew, |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessTypeString, |
| | | TimeStringAndScenarioName := monthString + " - " + scenarioName, |
| | | Quantity := Real::Random( 20.0, 30.0 ) ); |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | ScenarioManager scenarioManager, |
| | | GlobalOTDTable parent, |
| | | String businessType, |
| | | String placeOfProductionOfArray |
| | | ) as CapacityAndSaleBudgeChartRow |
| | |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-18-2023 (created) |
| | | value := select( scenarioManager, CapacityAndSaleBudgeChartRow, row, row.BusinessType() = businessType and row.PlaceOfProductionOfArray() = placeOfProductionOfArray ); |
| | | value := select( parent, CapacityAndSaleBudgeChartRow, row, row.BusinessType() = businessType and row.PlaceOfProductionOfArray() = placeOfProductionOfArray ); |
| | | if( isnull( value ) ) { |
| | | value := scenarioManager.CapacityAndSaleBudgeChartRow( relnew, BusinessType := businessType, PlaceOfProductionOfArray := placeOfProductionOfArray ); |
| | | value := parent.CapacityAndSaleBudgeChartRow( relnew, BusinessType := businessType, PlaceOfProductionOfArray := placeOfProductionOfArray ); |
| | | } |
| | | return value; |
| | | *] |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | ScenarioManager manager, |
| | | GlobalOTDTable parent, |
| | | String columnName |
| | | ) as CapacityAndSaleBudgeCompareItemColumn |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-18-2023 (created) |
| | | value := select( manager, CapacityAndSaleBudgeCompareItemColumn, item, item.ColumnName() = columnName ); |
| | | value := select( parent, CapacityAndSaleBudgeCompareItemColumn, item, item.ColumnName() = columnName ); |
| | | if( isnull( value ) ) { |
| | | value := manager.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := columnName ); |
| | | value := parent.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := columnName ); |
| | | } |
| | | return value; |
| | | *] |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | ScenarioManager scenarioManager, |
| | | GlobalOTDTable parent, |
| | | String businessType, |
| | | String placeOfProductionOfArray |
| | | ) as CapacityAndSaleBudgeCompareItemRow |
| | |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-18-2023 (created) |
| | | value := select( scenarioManager, CapacityAndSaleBudgeCompareItemRow, row, row.BusinessType() = businessType and row.PlaceOfProductionOfArray() = placeOfProductionOfArray ); |
| | | value := select( parent, CapacityAndSaleBudgeCompareItemRow, row, row.BusinessType() = businessType and row.PlaceOfProductionOfArray() = placeOfProductionOfArray ); |
| | | if( isnull( value ) ) { |
| | | value := scenarioManager.CapacityAndSaleBudgeCompareItemRow( relnew, BusinessType := businessType, PlaceOfProductionOfArray := placeOfProductionOfArray ); |
| | | value := parent.CapacityAndSaleBudgeCompareItemRow( relnew, BusinessType := businessType, PlaceOfProductionOfArray := placeOfProductionOfArray ); |
| | | } |
| | | return value; |
| | | *] |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | MPSync parent, |
| | | GlobalOTDTable parent, |
| | | String value |
| | | ) |
| | | { |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | ScenarioManager parent, |
| | | GlobalOTDTable parent, |
| | | String itemName |
| | | ) |
| | | { |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Initial ( |
| | | ScenarioManager parent |
| | | GlobalOTDTable parent |
| | | ) |
| | | { |
| | | Description: 'åå§å对æ¯é¡¹' |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Initial ( |
| | | ScenarioManager parent |
| | | GlobalOTDTable parent |
| | | ) |
| | | { |
| | | Description: 'åå§å年份' |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateIfNotExist ( |
| | | MPSync parent, |
| | | GlobalOTDTable parent, |
| | | String value |
| | | ) |
| | | { |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Initial ( |
| | | ScenarioManager parent |
| | | GlobalOTDTable parent |
| | | ) |
| | | { |
| | | Description: 'åå§å年份' |
ÎļþÃû´Ó _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart#95.qbl ÐÞ¸Ä |
| | |
| | | // 颿¿åºå°;äºä¸é¨ |
| | | info( byBusinessTypeOrByOrgCode ); |
| | | traverse( businessTypes, Elements, businessType ) { |
| | | info( "businessType : " + businessType.BusinessType() ); |
| | | debuginfo( "businessType : " + businessType.BusinessType() ); |
| | | } |
| | | traverse( placeOfProductionOfArrays, Elements, placeOfProductionOfArray ) { |
| | | info( "placeOfProductionOfArray : " + placeOfProductionOfArray.PlaceOfProductionOfArray() ); |
| | | debuginfo( "placeOfProductionOfArray : " + placeOfProductionOfArray.PlaceOfProductionOfArray() ); |
| | | } |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | info( "macroPlan : " + macroPlan.ScenarioName() ); |
| | | debuginfo( "macroPlan : " + macroPlan.ScenarioName() ); |
| | | } |
| | | // 年份ä¸éæ¶å
¨é |
| | | if( years.Size() = 0 ) { |
| | | years := selectsortedset( this, CapacityAndSaleBudgeFilterYear, item, true, item.YearNo() ); |
| | | } |
| | | traverse( years, Elements, year ) { |
| | | info( "yearNo : " + [String]year.YearNo() ); |
| | | debuginfo( "yearNo : " + [String]year.YearNo() ); |
| | | } |
| | | // æä»½ä¸éæ¶å
¨é |
| | | if( months.Size() = 0 ) { |
| | | months := selectsortedset( this, CapacityAndSaleBudgeFilterMonth, item, true, item.MonthNo() ); |
| | | } |
| | | traverse( months, Elements, month ) { |
| | | info( "monthNo : " + [String]month.MonthNo() ); |
| | | debuginfo( "monthNo : " + [String]month.MonthNo() ); |
| | | } |
| | | |
| | | // ====æ¸
çæ§æ°æ®==== |
| | |
| | | businessTypeList := selectuniquevalues( historyData, Elements, item, item.BusinessType() ); |
| | | // çæå¾è¡¨å
ç´ |
| | | traverse( years, Elements, year ) { |
| | | info( "process year start : " + [String]year.YearNo() ); |
| | | debuginfo( "process year start : " + [String]year.YearNo() ); |
| | | if( byBusinessTypeOrByOrgCode = "颿¿åºå°" and groupBy = "å¹´" ) { |
| | | // ç®æ |
| | | traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "äºä¸é¨" and groupBy = "å£åº¦" ) { |
| | | for( seasonNo := 1; seasonNo <= 4; seasonNo := seasonNo + 1 ) { |
| | | info( "process season start : " + [String]seasonNo ); |
| | | debuginfo( "process season start : " + [String]seasonNo ); |
| | | traverse( businessTypeList, Elements, businessType ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "äºä¸é¨" and groupBy = "æ" ) { |
| | | traverse( months, Elements, month ) { |
| | | info( "process month start : " + [String]month.MonthNo() ); |
| | | debuginfo( "process month start : " + [String]month.MonthNo() ); |
| | | monthNoString := ifexpr( month.MonthNo() <= 9, "0" + [String]month.MonthNo(), [String]month.MonthNo() ); |
| | | traverse( businessTypeList, Elements, businessType ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | |
| | | ); |
| | | } |
| | | } |
| | | info( "process month end : " + [String]month.MonthNo() ); |
| | | debuginfo( "process month end : " + [String]month.MonthNo() ); |
| | | } |
| | | } |
| | | info( "process year end : " + [String]year.YearNo() ) |
| | | debuginfo( "process year end : " + [String]year.YearNo() ) |
| | | } |
| | | //info( "CapacityAndSaleBudgeChartElement : " + [String]selectset( this, CapacityAndSaleBudgeChartElement, item, true ).Size() ); |
| | | //traverse( this, CapacityAndSaleBudgeChartRow, row ) { |
ÎļþÃû´Ó _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl ÐÞ¸Ä |
| | |
| | | months := selectsortedset( this, CapacityAndSaleBudgeFilterMonth, item, item.MonthNo() ); |
| | | } |
| | | traverse( macroPlans, Elements, item ) { |
| | | info( "scenario : " + item.ScenarioName() ); |
| | | debuginfo( "scenario : " + item.ScenarioName() ); |
| | | } |
| | | traverse( items, Elements, item ) { |
| | | info( "item : " + item.ItemName() ); |
| | | debuginfo( "item : " + item.ItemName() ); |
| | | } |
| | | traverse( years, Elements, item ) { |
| | | info( "year : " + [String]item.YearNo() ); |
| | | debuginfo( "year : " + [String]item.YearNo() ); |
| | | } |
| | | traverse( months, Elements, item ) { |
| | | info( "month : " + [String]item.MonthNo() ); |
| | | debuginfo( "month : " + [String]item.MonthNo() ); |
| | | } |
| | | // ====æ¸
çæ§æ°æ®==== |
| | | this.CapacityAndSaleBudgeCompareItemRow( relflush ); |
| | | this.CapacityAndSaleBudgeCompareItemColumn( relflush ); |
| | | // ====æ±æ»ææåºç°ç产å==== |
| | | historyData := selectset( mpSync, MappingCapacityAndSaleBudge, item, true ); |
| | | info( "historyData : " + [String]historyData.Size() ) |
| | | debuginfo( "historyData : " + [String]historyData.Size() ) |
| | | traverse( historyData, Elements, one ) { |
| | | productCode := one.ProductCode(); |
| | | MappingBOM::CreateTestData( mappingParent, "äºä¸é¨" + [String](productCode.Length() mod 3), [String](productCode.Length() mod 4), productCode ); |
| | |
| | | // è®°å½æ¯è¡å
å«åªäºproduct |
| | | CapacityAndSaleBudgeCompareItemRowProduct::CreateIfNotExist( row, productCode ); |
| | | } else { |
| | | info( "no boms for product : " + productCode ); |
| | | debuginfo( "no boms for product : " + productCode ); |
| | | } |
| | | } |
| | | info( "CapacityAndSaleBudgeCompareItemRow : " + [String]selectset( this, CapacityAndSaleBudgeCompareItemRow, item, true ).Size() ); |
| | | debuginfo( "CapacityAndSaleBudgeCompareItemRow : " + [String]selectset( this, CapacityAndSaleBudgeCompareItemRow, item, true ).Size() ); |
| | | // ====ä»å·¦åå³çæå头ä¸å
容==== |
| | | // äºä¸é¨ï¼ç»ç» |
| | | info( "dealing businessType and placeOfProductionOfArray" ) |
| | | debuginfo( "dealing businessType and placeOfProductionOfArray" ) |
| | | columnBusinessType := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "äºä¸é¨" ); |
| | | columnPlaceOfProductionOfArray := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "颿¿åºå°" ); |
| | | traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { |
| | |
| | | info( "dealing 颿¿åé
é" ) |
| | | if( CapacityAndSaleBudgeFilterItem::Contains( items, "颿¿åé
é" ) ) { |
| | | traverse( years, Elements, year ) { |
| | | info( "颿¿åé
é" + [String]year.YearNo() + "å¹´" ); |
| | | debuginfo( "颿¿åé
é" + [String]year.YearNo() + "å¹´" ); |
| | | // å岿°æ® |
| | | info( "颿¿åé
é" + [String]year.YearNo() + "å¹´å岿°æ®" ); |
| | | debuginfo( "颿¿åé
é" + [String]year.YearNo() + "å¹´å岿°æ®" ); |
| | | traverse( months, Elements, month ) { |
| | | columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "颿¿åé
é-" + [String]year.YearNo() + "å¹´-" + [String]month.MonthNo() + "æ-年度é¢ç®" ); |
| | | traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { |
| | |
| | | cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); |
| | | cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); |
| | | } |
| | | info( "颿¿åé
é" + [String]year.YearNo() + "å¹´S&OPæ°æ®" ); |
| | | debuginfo( "颿¿åé
é" + [String]year.YearNo() + "å¹´S&OPæ°æ®" ); |
| | | // S&OPæ°æ® |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | traverse( months, Elements, month ) { |
| | |
| | | } |
| | | } |
| | | // 年度éå®é¢ |
| | | info( "dealing éå®é¢" ) |
| | | debuginfo( "dealing éå®é¢" ) |
| | | if( CapacityAndSaleBudgeFilterItem::Contains( items, "éå®é¢" ) ) { |
| | | traverse( years, Elements, year ) { |
| | | info( "éå®é¢" + [String]year.YearNo() + "å¹´" ); |
| | | debuginfo( "éå®é¢" + [String]year.YearNo() + "å¹´" ); |
| | | // å岿°æ® |
| | | info( "éå®é¢" + [String]year.YearNo() + "å¹´å岿°æ®" ); |
| | | debuginfo( "éå®é¢" + [String]year.YearNo() + "å¹´å岿°æ®" ); |
| | | traverse( months, Elements, month ) { |
| | | columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对å¤éå®é¢-" + [String]year.YearNo() + "å¹´-" + [String]month.MonthNo() + "æ-年度é¢ç®" ); |
| | | traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { |
| | |
| | | cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); |
| | | cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); |
| | | } |
| | | info( "éå®é¢" + [String]year.YearNo() + "å¹´å岿°æ®S&OPæ°æ®" ); |
| | | debuginfo( "éå®é¢" + [String]year.YearNo() + "å¹´å岿°æ®S&OPæ°æ®" ); |
| | | // S&OPæ°æ® |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | traverse( months, Elements, month ) { |
| | |
| | | } |
| | | } |
| | | // å¤§å¼ çå©é¢ |
| | | info( "dealing å¤§å¼ çå©é¢" ) |
| | | debuginfo( "dealing å¤§å¼ çå©é¢" ) |
| | | traverse( years, Elements, year ) { |
| | | // å岿°æ® |
| | | columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "å¤§å¼ çå©é¢-" + [String]year.YearNo() + "å¹´-年度é¢ç®" ); |
| | |
| | | } |
| | | } |
| | | // 产åçå©é¢ |
| | | info( "dealing 产åçå©é¢" ) |
| | | debuginfo( "dealing 产åçå©é¢" ) |
| | | traverse( years, Elements, year ) { |
| | | // å岿°æ® |
| | | columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "产åçå©é¢-" + [String]year.YearNo() + "å¹´-年度é¢ç®" ); |
| | |
| | | } |
| | | |
| | | // 设置rowNoåcolumnNo |
| | | info( "set rowNo and columnNo" ); |
| | | debuginfo( "set rowNo and columnNo" ); |
| | | rowNo := 1; |
| | | rowSorted := selectsortedset( this, CapacityAndSaleBudgeCompareItemRow, item, item.PlaceOfProductionOfArray() + "_" + item.BusinessType() ); |
| | | traverse( rowSorted, Elements, item ) { |
| | |
| | | item.ColumnNo( columnNo ); |
| | | columnNo := columnNo + 1; |
| | | } |
| | | info( "done" ); |
| | | debuginfo( "done" ); |
| | | *] |
| | | } |
ÎļþÃû´Ó _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl ÐÞ¸Ä |
| | |
| | | // å¤çcolumn <column><name>ç©æç¼ç </name><type>String</type></column> |
| | | columnXml := "" |
| | | traverse( this, CapacityAndSaleBudgeCompareItemColumn, column ) { |
| | | info( "columnName : " + column.ColumnName() ); |
| | | debuginfo( "columnName : " + column.ColumnName() ); |
| | | columnXml := columnXml + "<column><name>" + column.ColumnName() + "</name><type>String</type></column>"; |
| | | } |
| | | text := text + columnXml + "</table>" |
| | |
| | | tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 ); |
| | | rows := selectsortedset( this, CapacityAndSaleBudgeCompareItemRow, row, row.PlaceOfProductionOfArray() + "_" + row.BusinessType() ); |
| | | traverse ( rows, Elements, row ) { |
| | | info( "rowNo : " + [String]row.RowNo() ); |
| | | debuginfo( "rowNo : " + [String]row.RowNo() ); |
| | | traverse( row, CapacityAndSaleBudgeCompareItemCell, cell ) { |
| | | ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, cell.CellContent(), cell.CapacityAndSaleBudgeCompareItemColumn().ColumnName() ); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | MethodOverride Execute #extension |
| | | { |
| | | TextBody: |
| | | [* |
| | | opt := DatasetFindOptions::Construct( this.MacroPlanDatasetName() ); |
| | | mp := MDSMacroPlan::Find( opt ); |
| | | |
| | | opt := DatasetFindOptions::Construct(); |
| | | scenarioManager := MDSScenarioManager::Find( opt ); |
| | | |
| | | // Only get data source which has all required files uploaded |
| | | dummyMissingFiles := construct( Strings ); |
| | | needUserUploadAllFiles := true; |
| | | validUploadedFiles := selectset( this, LibSOPImpExp_DataSourceChildren, ds, |
| | | ds.HasAllRequiredFilesForImport( dummyMissingFiles, needUserUploadAllFiles ) ); |
| | | |
| | | traverse( validUploadedFiles, Elements, file ) |
| | | { |
| | | this.LibSOPImpExp_UserInput( relnew, Value := file.Name() ); |
| | | } |
| | | |
| | | binaryValues := selectvalues( validUploadedFiles, Elements.LibSOPImpExp_DataSourceFile.LibSOPImpExp_ImportUploadedFile, file, true, file.DataAsBinary() ); |
| | | brokerNames := selectvalues( validUploadedFiles, Elements.LibSOPImpExp_DataSourceFile, file, true, file.BrokerName() ); |
| | | userinputvalues := selectuniquevalues( this, LibSOPImpExp_UserInput, userinput, |
| | | true, |
| | | userinput.Value() ); |
| | | mpsync := this.MPSync(); |
| | | |
| | | // Reactive way to import |
| | | o := this |
| | | ->SetStatusInProgress() |
| | | ->|mp->ImportExcels_Tianma( userinputvalues, binaryValues.Copy(), brokerNames ) |
| | | ->|scenarioManager->ImportExcels_Tianma( userinputvalues, binaryValues.Copy(), brokerNames ) |
| | | ->|mpsync->ImportExcels_Tianma( userinputvalues, binaryValues.Copy(), brokerNames ) |
| | | ->|this->SetStatusDone() |
| | | ->|mp->SetLastImportTime() |
| | | ->Exception(); |
| | | |
| | | this->OnException(o); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | TypeSpecialization ImportExcel #extension |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod IsDataSourceIncluded_Tianma ( |
| | | Strings userinputvalues, |
| | | String datasource_i |
| | | ) remote as Boolean |
| | | { |
| | | Description: 'If data source selected by user to export' |
| | | TextBody: 'return exists( userinputvalues, Elements, input, input = datasource_i );' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | TypeSpecialization LibSOPImpExp_ExportExcel #extension |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ImportExcels_Tianma ( |
| | | Strings userinputvalues, |
| | | BinaryValues mpBinaryValues_i, |
| | | Strings mpBrokers_i |
| | | ) |
| | | { |
| | | Description: 'Import from Excel, used by web app.' |
| | | TextBody: |
| | | [* |
| | | // @userInput_i - Array of data group that user imports |
| | | // @mpBinaryValues_i - Array of uploaded Excels in binary value. Binary at position x matches @mpBrokers_i at same position |
| | | // @mpBrokers_i - Array of uploaded Excels' broker name |
| | | |
| | | is3DDrive := false; |
| | | |
| | | // Check if each data group has files uploaded by user for import |
| | | this.Import( LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_ImportProfiles() ), |
| | | mpBinaryValues_i, mpBrokers_i, is3DDrive, construct( FileItems), construct( Strings ) ); |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method RefreshCapacityAndSaleBudgeFilter |
| | | Method RefreshCapacityAndSaleBudgeFilter ( |
| | | GlobalOTDTable globalOtdTable |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | |
| | | businessTypes := selectuniquevalues( this, MappingCapacityAndSaleBudge, item, item.BusinessType() ); |
| | | info( [String]businessTypes.Size() ); |
| | | traverse( businessTypes, Elements, businessType ) { |
| | | CapacityAndSaleBudgeFilterBusinessType::CreateIfNotExist( this, businessType ); |
| | | CapacityAndSaleBudgeFilterBusinessType::CreateIfNotExist( globalOtdTable, businessType ); |
| | | } |
| | | placeOfProductionOfArrays := selectuniquevalues( this, MappingCapacityAndSaleBudge, item, item.PlaceOfProductionOfArray() ); |
| | | info( [String]placeOfProductionOfArrays.Size() ); |
| | | traverse( placeOfProductionOfArrays, Elements, placeOfProductionOfArray ) { |
| | | CapacityAndSaleBudgeFilterPlaceOfProductionOfArray::CreateIfNotExist( this, placeOfProductionOfArray ); |
| | | CapacityAndSaleBudgeFilterPlaceOfProductionOfArray::CreateIfNotExist( globalOtdTable, placeOfProductionOfArray ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method RefreshCapacityAndSaleBudgeFilter ( |
| | | Boolean deleteBeforeCreate, |
| | | GlobalOTDTable globalOtdTable |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | if( deleteBeforeCreate ) { |
| | | globalOtdTable.CapacityAndSaleBudgeFilterBusinessType( relflush ); |
| | | globalOtdTable.CapacityAndSaleBudgeFilterPlaceOfProductionOfArray( relflush ); |
| | | } |
| | | this.RefreshCapacityAndSaleBudgeFilter( globalOtdTable ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ImportExcels_Tianma ( |
| | | Strings userinputvalues, |
| | | BinaryValues mpBinaryValues_i, |
| | | Strings mpBrokers_i |
| | | ) |
| | | { |
| | | Description: 'Import from Excel, used by web app.' |
| | | TextBody: |
| | | [* |
| | | // @userinputvalues - Array of data group that user imports |
| | | // @mpBinaryValues_i - Array of uploaded Excels in binary value. Binary at position x matches @mpBrokers_i at same position |
| | | // @mpBrokers_i - Array of uploaded Excels' broker name |
| | | |
| | | is3DDrive := false; |
| | | |
| | | // Check if each data group has files uploaded by user for import |
| | | this.Synchronize( LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_SupplyChainParameters() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_GlobalParameters() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Periods() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MP_Functionality_InventorySpecifications() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MP_Functionality_InventorySupplies() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Products() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Forecasts() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_ServiceLevels() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Campaigns() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Entities() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Costs() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Lanes() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Routings() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Capacities() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MP_Functionality_SupplySpecifications() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Recipes() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MP_Designer_Actuals() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MP_GlobalParameters_KPIFeedbackName() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_OptimizerPuzzles() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_PostponementSpecAndFulfillmentRestriction() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_CustomerOrder() ), |
| | | false, /* isImportBinary */ |
| | | mpBinaryValues_i, |
| | | mpBrokers_i, |
| | | is3DDrive, |
| | | construct( FileItems ), /* 3ddrive, ignore */ |
| | | construct( Strings ) /* 3ddrive, ignore */ ); |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // yypsybs Aug-21-2023 (created) |
| | | |
| | | keyProductList := construct( Strings ); |
| | | if( isKeyProduct ) { |
| | | keyProductList := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="æå" or item.ProductMajorType()="åæå", item.ID() ); |
| | |
| | | // ========åç»å¤çè¾å
¥======== |
| | | |
| | | } |
| | | |
| | | if( not isnull( stockingPoint)){ |
| | | if( isKeyProduct){ |
| | | keyRows := selectset( routingRows,Elements,routingrow,keyProductList.Find( routingrow.ComponentCode())>=0); |
| | |
| | | this.MappingOperationBOMDataSupplyPurchase( bom.OrganCode(), bom.ComponentCode(), bom.ComponentType()); |
| | | } |
| | | } |
| | | |
| | | |
| | | // |
| | | //keyProductList := construct( Strings ); |
| | | //if( isKeyProduct ) { |
| | | // keyProductList := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="æå" or item.ProductMajorType()="åæå", item.ID() ); |
| | | //} |
| | | //bomList := selectsortedset( globalOTDTable, Global_MappingOperationBOM, item, |
| | | // ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0, |
| | | // true, |
| | | //// businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 ) |
| | | // businessTypes.Find( item.BusinessType() ) >= 0 ) |
| | | //// and ifexpr( isKeyProduct, |
| | | //// keyProductList.Size() > 0 and keyProductList.Find( item.ComponentCode() ) >= 0, |
| | | //// true ) |
| | | // , |
| | | // item.OrganCode() + "_" + item.ProductCode() + "_" + item.ProcessSection() ); |
| | | //// æroutingåroutingStepåç» |
| | | //routingIds := selectuniquevalues( bomList, Elements, item, true, item.OrganCode() + "_" + item.ProductCode() ); |
| | | //traverse( routingIds, Elements, routingId ) { |
| | | // routingRows := selectset( bomList, Elements, item, true, routingId = item.OrganCode() + "_" + item.ProductCode() ); |
| | | // if( routingRows.Size() > 0 ) { |
| | | // firstRow := routingRows.Element( 0 ); |
| | | //// stockingPointId := firstRow.OrganCode() + "_" + firstRow.ProductType() + "_Stock"; |
| | | //// inputStockingPointId := firstRow.OrganCode() + "_" + firstRow.ComponentType() + "_Stock"; |
| | | // stockingPointId := firstRow.OrganCode() + "_Stock"; |
| | | // |
| | | // // ========æ£æ¥======== |
| | | // product := Product_MP::FindProductTypeIndex( firstRow.ProductCode() ); |
| | | // if( not isnull( product ) ) { |
| | | //// error( "product : " + firstRow.ProductCode() + " not found" ); |
| | | // stockingPoint := StockingPoint_MP::FindStockingPointTypeIndex( stockingPointId ); |
| | | // |
| | | //// info( stockingPointId.AsQUILL() ); |
| | | // // if( isnull( stockingPoint ) ) { |
| | | // // error( "stockingPoint : " + stockingPointId + " not found" ); |
| | | // // } |
| | | // routing := Routing::FindRoutingTypeIndex( routingId ); |
| | | // if( not isnull( routing ) ) { |
| | | //// error( "routing : " + routingId + " not found" ); |
| | | // // ========å¤çè¾åº======== |
| | | // if( not isnull( stockingPoint ) ) { |
| | | //// info( 1 ); |
| | | // operationsInLastSteps := Operation::FindFinalOperationsByRoutingId( this, routingId ); |
| | | // traverse( operationsInLastSteps, Elements, operationsInLastStep ) { |
| | | // operationsInLastStep.CreateOperationBOM( product, stockingPoint, false, true ); |
| | | // operationsInLastStep.GetOperationBOM( product.ID(), stockingPoint.ID(), false ).Quantity( 1 ); |
| | | // } |
| | | // // ========åç»å¤çè¾å
¥======== |
| | | // |
| | | // } |
| | | // if( not isnull( stockingPoint)){ |
| | | // if( isKeyProduct){ |
| | | // keyRows := selectset( routingRows,Elements,routingrow,keyProductList.Find( routingrow.ComponentCode())>=0); |
| | | // this.MappingOperationBOMDataRouting( routing,globalOTDTable,keyRows); |
| | | // }else{ |
| | | // this.MappingOperationBOMDataRouting( routing,globalOTDTable,routingRows); |
| | | // } |
| | | // |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | //} |
| | | //if( createPurchaseSupplyMaterial ) { |
| | | // toCreateBomList := selectuniquevalues( bomList, Elements, item, |
| | | // item.ComponentType() = "P", item.OrganCode() + item.ComponentCode()); |
| | | // traverse( toCreateBomList, Elements, key ) { |
| | | // boms := selectset( bomList, Elements, item, item.ComponentType() = "P" and item.OrganCode() + item.ComponentCode() = key ); |
| | | // bom := boms.First(); |
| | | // this.MappingOperationBOMDataSupplyPurchase( bom.OrganCode(), bom.ComponentCode(), bom.ComponentType()); |
| | | // } |
| | | //} |
| | | *] |
| | | } |
| | |
| | | } |
| | | //--------------------------------------------------------------------------------------------- |
| | | xmlTemplate := xmlTemplate + "</table>"; |
| | | info( xmlTemplate ); |
| | | //info( xmlTemplate ); |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) ); |
| | | XLS::SaveTable( tableHandle, OS::TempPath() + "MappingCapacityAndSaleBudge.xlsx" ); |
| | | file := OSFile::Construct(); |
| | |
| | | |
| | | if( priorityFactor.Name() = "å¤§å¼ ç婿°´å¹³" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "大ç",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "å°ç",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | |
| | | |
| | | if( priorityFactor.Name() = "客æ·çç¥" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "81%â¤Xâ¤100%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4, |
| | | IsRange := false,GradingName := "61%â¤Xâ¤80%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | |
| | | IsRange := false,GradingName := "1%â¤Xâ¤20%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "ç»åå¸åºç级" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "æç¥",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "éç¹",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "æ½å",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "订åä¸åæ¶é´" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "120",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4, |
| | | IsRange := false,GradingName := "90",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "60",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 2, |
| | | IsRange := false,GradingName := "30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "0",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "éæ±ç±»å" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "æé¢æµ",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "æ 颿µ",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "çº¯é¢æµ",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "客æ·ç级" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "81%â¤Xâ¤100%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4, |
| | | IsRange := false,GradingName := "61%â¤Xâ¤80%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "æç¥",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "41%â¤Xâ¤60%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 2, |
| | | IsRange := false,GradingName := "21%â¤Xâ¤40%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | IsRange := false,GradingName := "éç¹",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "1%â¤Xâ¤20%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | IsRange := false,GradingName := "æ½å",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "DOI" or priorityFactor.Name() = "DSI") |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "<7",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "<15",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "<30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := ">30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | *] |
| | | } |
| | |
| | | { |
| | | // 䏿¯ç¬¦å· ç´æ¥è·å计ç®åçæ°å¼ |
| | | score := PriorityResult::GetDetailsValue( customerOrder,remindFormula,macroPlan,globalOTDTable); |
| | | |
| | | info( "123123"); |
| | | // æªåæå·²ç»è®¡ç®çä¼å
级å å éå½è®¡ç® |
| | | remindFormula := PriorityResult::GetRemindFormula( remindFormula,macroPlan); |
| | | PriorityResult::CalculateScore( remindFormula,customerOrder,businessType,macroPlan,score,globalOTDTable); |
| | |
| | | TextBody: |
| | | [* |
| | | // NBoTk Sep-26-2023 (created) |
| | | // å½å计ç®ä¼å
级å åç»å 妿è·åä¸å°å
¨é¨å
é»è®¤ä¸º1 |
| | | |
| | | value := 0.0; |
| | | |
| | |
| | | if( "å¤§å¼ ç婿°´å¹³" = priorityFactor.Name()) |
| | | { |
| | | obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "å¤§å¼ ç婿°´å¹³" and p.GradingName() = customerOrder.SheetProfitability()); |
| | | value := priorityFactor.Coefficient() * obj.GradeTarget(); |
| | | gradeTarget := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | gradeTarget := obj.GradeTarget(); |
| | | } |
| | | value := priorityFactor.Coefficient() * gradeTarget; |
| | | } |
| | | |
| | | if( "DOI" = priorityFactor.Name()) |
| | | { |
| | | // DOIæ°æ® |
| | | obj := selectobject( globalOTDTable,Global_MappingDOI_DSI,doi,doi.ProductID() = customerOrder.ProductID()) |
| | | value := priorityFactor.Coefficient() * [Real]obj.DOI(); |
| | | doi := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | doi := [Real]obj.DOI(); |
| | | } |
| | | value := priorityFactor.Coefficient() * doi; |
| | | } |
| | | |
| | | if( "DSI" = priorityFactor.Name()) |
| | | { |
| | | // DOIæ°æ® |
| | | obj := selectobject( globalOTDTable,Global_MappingDOI_DSI,doi,doi.ProductID() = customerOrder.ProductID()) |
| | | value := priorityFactor.Coefficient() * [Real]obj.DSI(); |
| | | dsi := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | dsi := [Real]obj.DSI(); |
| | | } |
| | | value := priorityFactor.Coefficient() * dsi; |
| | | } |
| | | |
| | | if( "ç»åå¸åºç级" = priorityFactor.Name()) |
| | | { |
| | | obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "ç»åå¸åºç级" and p.GradingName() = customerOrder.SegmentPriority()); |
| | | value := priorityFactor.Coefficient() * obj.GradeTarget(); |
| | | gradeTarget := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | gradeTarget := obj.GradeTarget(); |
| | | } |
| | | value := priorityFactor.Coefficient() * gradeTarget; |
| | | } |
| | | |
| | | if( "éæ±ç±»å" = priorityFactor.Name()) |
| | | { |
| | | // æé¢æµ æ 颿µ çº¯é¢æµ |
| | | obj := selectobject( priorityFactor,PriorityFactorDetails,p,p.GradingName() = customerOrder.OrderType()); |
| | | value := priorityFactor.Coefficient() * obj.GradeTarget(); |
| | | gradeTarget := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | gradeTarget := obj.GradeTarget(); |
| | | } |
| | | value := priorityFactor.Coefficient() * gradeTarget; |
| | | } |
| | | |
| | | if( "客æ·ç级" = priorityFactor.Name()) |
| | | { |
| | | // éè¿æ°æ®æ¹è®¡ç®å®¢æ·ç级 |
| | | obj := selectobject( globalOTDTable,Global_MappingCustomerGrade,doi,doi.BusinessType() = customerOrder.BusinessType() and doi.Customer() = customerOrder.CustomerName()) |
| | | value := priorityFactor.Coefficient() * [Real]obj.CustomerGrade(); |
| | | obj := selectobject( globalOTDTable,Global_MappingCustomerGrade,doi,doi.BusinessType() = customerOrder.BusinessType() and doi.Customer() = customerOrder.CustomerName()) |
| | | customerGrade := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | customerGrade := [Real]obj.CustomerGrade(); |
| | | } |
| | | value := priorityFactor.Coefficient() * customerGrade; |
| | | } |
| | | |
| | | if( "订åä¸åæ¶é´" = priorityFactor.Name()) |
| | |
| | | { |
| | | if( formula.StartsWith( p.Name()) ) |
| | | { |
| | | str := formula.SubString( 0 + p.Name().Length(),formula.Length()); |
| | | // 夿å©ä½å符é¿åº¦ |
| | | if( p.Name().Length() = formula.Length() ) |
| | | { |
| | | str := "" |
| | | } |
| | | else |
| | | { |
| | | str := formula.SubString( 0 + p.Name().Length(),formula.Length()); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | traverse( macroPlan,SalesDemand.astype( CustomerOrder ),e) |
| | | { |
| | | // äºä¸é¨ä¿¡æ¯ |
| | | businessType := e.BusinessType(); |
| | | //businessType := e.BusinessType(); |
| | | businessType := "ææºäºä¸é¨"; |
| | | |
| | | // è·å对åºäºä¸é¨è®¡ç®å
¬å¼ |
| | | priorityPolicys := selectobject( macroPlan,PriorityPolicy,p,p.BusinessType() = businessType and p.Name() = priorityPolicyName); |
| | |
| | | obj := selectobject( macroPlan,SalesDemand.astype( CustomerOrder ),order, |
| | | order.ID() = e.CustomerOrderID() |
| | | ); |
| | | obj.PriorityName([String]priorityValue); |
| | | |
| | | // å建ä¼å
çº§æ°æ® |
| | | macroPlan.Priority(relnew,Weight := priorityValue,Name := [String]priorityValue); |
| | | priorityValue := priorityValue + 1; |
| | | // è®¢åæ°æ®ä¸ä¸ºç©ºååå¤ç |
| | | if( not isnull( obj ) ) |
| | | { |
| | | obj.PriorityName([String]priorityValue); |
| | | |
| | | // å建ä¼å
çº§æ°æ® |
| | | macroPlan.Priority(relnew,Weight := priorityValue,Name := obj.OrderID()); |
| | | priorityValue := priorityValue + 1; |
| | | } |
| | | |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ImportExcels_Tianma ( |
| | | Strings userinputvalues, |
| | | BinaryValues mpBinaryValues_i, |
| | | Strings mpBrokers_i |
| | | ) |
| | | { |
| | | Description: 'Import from Excel, used by web app.' |
| | | TextBody: |
| | | [* |
| | | // @userinputvalues - Array of data group that user imports |
| | | // @mpBinaryValues_i - Array of uploaded Excels in binary value. Binary at position x matches @mpBrokers_i at same position |
| | | // @mpBrokers_i - Array of uploaded Excels' broker name |
| | | |
| | | is3DDrive := false; |
| | | |
| | | // Check if each data group has files uploaded by user for import |
| | | this.Import( LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Strategies() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Accounts() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_Bookmarks() ), |
| | | LibSOPImpExp_ExportExcel::IsDataSourceIncluded_Tianma( userinputvalues, Translations::MPSync_ObjectGroup_KPISetting() ), |
| | | mpBinaryValues_i.Copy(), |
| | | mpBrokers_i, |
| | | is3DDrive, |
| | | construct( FileItems ), /* 3ddrive, ignore */ |
| | | construct( Strings ) /* 3ddrive, ignore */ ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TestBoolean |
| | | { |
| | | #keys: '3[414384.0.915854691][414384.0.915854690][414384.0.915854692]' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TestDate |
| | | { |
| | | #keys: '3[414384.0.915854704][414384.0.915854703][414384.0.915854705]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TestDateTime |
| | | { |
| | | #keys: '3[414384.0.915854714][414384.0.915854713][414384.0.915854715]' |
| | | ValueType: DateTime |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TestNumber |
| | | { |
| | | #keys: '3[414384.0.915854681][414384.0.915854680][414384.0.915854682]' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TestReal |
| | | { |
| | | #keys: '3[414384.0.915854668][414384.0.915854667][414384.0.915854669]' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TestString |
| | | { |
| | | #keys: '3[414384.0.915854658][414384.0.915854657][414384.0.915854659]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | YuxTests toExportList |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // generate by generate_export_method.py |
| | | xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?> |
| | | <table> |
| | | <name>YuxTest</name> |
| | | '; |
| | | convDateToString := DateToString::StandardConverter(); |
| | | convDateToString.SetCustomConversion(); |
| | | convDateToString.CustomFormatString( 'yyyy-MM-dd' ); |
| | | convDateTimeToString := DateTimeToString::StandardConverter(); |
| | | convDateTimeToString.SetCustomConversion(); |
| | | convDateTimeToString.CustomFormatString( 'yyyy-MM-dd HH:mm:ss' ); |
| | | info( "export start" ); |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æµè¯æ°å</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | testNumber := toExportItem.TestNumber(); |
| | | cellStr := '<cell value="' + [String]testNumber + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æµè¯å°æ°</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | testReal := toExportItem.TestReal(); |
| | | cellStr := '<cell value="' + [String]testReal + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æµè¯å符串</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | testString := toExportItem.TestString(); |
| | | cellStr := '<cell value="' + testString + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æµè¯å¸å°</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | testBoolean := toExportItem.TestBoolean(); |
| | | cellStr := '<cell value="' + [String]testBoolean + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æµè¯æ¥æ</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | testDate := toExportItem.TestDate(); |
| | | cellStr := '<cell value="' + ifexpr( testDate = Date::MinDate(), "", convDateToString.Convert( testDate )) + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | columnStr := "<column><name>æµè¯æ¥ææ¶é´</name><type>String</type>"; |
| | | traverse( toExportList, Elements, toExportItem ) { |
| | | testDateTime := toExportItem.TestDateTime(); |
| | | cellStr := '<cell value="' + ifexpr( testDateTime = DateTime::MinDateTime(), "", convDateTimeToString.Convert( testDateTime )) + '"/>'; |
| | | columnStr := columnStr + cellStr; |
| | | } |
| | | columnStr := columnStr + "</column>"; |
| | | xmlTemplate := xmlTemplate + columnStr; |
| | | //--------------------------------------------------------------------------------------------- |
| | | xmlTemplate := xmlTemplate + "</table>"; |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) ); |
| | | XLS::SaveTable( tableHandle, OS::TempPath() + "YuxTest.xlsx" ); |
| | | file := OSFile::Construct(); |
| | | file.Open( OS::TempPath() + "YuxTest.xlsx", "Read", true ); |
| | | data := file.ReadBinary() |
| | | info( "export end" ); |
| | | return data.AsBase64EncodedString(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod ExportTest ( |
| | | MPSync parent |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-25-2023 (created) |
| | | list := selectset( parent, YuxTest, item, true ); |
| | | if( list.Size() = 0 ) { |
| | | for( i := 0; i < 100; i := i + 1 ) { |
| | | parent.YuxTest( relnew, |
| | | TestBoolean := ifexpr( Number::Random( 0, 1 ) = 1, true, false ), |
| | | TestDate := ifexpr( Number::Random( 0, 1 ) = 1, Date::MinDate(), Date::ActualDate() ), |
| | | TestDateTime := ifexpr( Number::Random( 0, 1 ) = 1,DateTime::MinDateTime(), DateTime::ActualTime() ), |
| | | TestNumber := Number::Random( 100, 200 ), |
| | | TestReal := Real::Random( 10.0, 20.0 ), |
| | | TestString := [String]Number::Random( 1000, 2000 ) |
| | | ); |
| | | } |
| | | } |
| | | list := selectset( parent, YuxTest, item, true ); |
| | | return YuxTest::Export( list ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type YuxTest |
| | | { |
| | | #keys: '5[414384.0.915854638][414384.0.915854636][0.0.0][414384.0.915854637][414384.0.915854639]' |
| | | BaseType: Object |
| | | StructuredName: 'YuxTests' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CalculatePriorityResult () id:Method_DialogChoosePriorityPolicy_CalculatePriorityResult |
| | | { |
| | | #keys: '[414382.0.577602130]' |
| | | Body: |
| | | [* |
| | | name := PriorityPolicyStringList.Text(); |
| | | PriorityResult::CalculatePriorityResult(name,MacroPlan,GlobalOTDTable); |
| | | this.Close(); |
| | | *] |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | name := PriorityPolicyStringList.Text(); |
| | | PriorityResult::CalculatePriorityResult(name,MacroPlan,GlobalOTDTable); |
| | | dlg := construct( DialogChoosePriorityPolicy ); |
| | | dlg.CalculatePriorityResult(); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | Taborder: 2 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ButtonExportTest |
| | | Response OnClick () id:Response_FormCapacityAndSaleBudge_ButtonExportTest_OnClick |
| | | { |
| | | #keys: '[414384.0.914711825]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return not isnull( MPSync ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | base64 := YuxTest::ExportTest( MPSync ); |
| | | Application.Download( "result.xlsx", base64 ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | [* |
| | | MPSync::TestData( MPSync, MacroPlan ); |
| | | GlobalOTDTable.InitTestData(); |
| | | MPSync.RefreshCapacityAndSaleBudgeFilter(); |
| | | MPSync.RefreshCapacityAndSaleBudgeFilter( GlobalOTDTable ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component ButtonExportTest |
| | | { |
| | | #keys: '[414384.0.914711826]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'EXPORT1' |
| | | Label: 'å¯¼åºæµè¯' |
| | | Taborder: 1 |
| | | Visible: false |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeChartElement' |
| | | ] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | CapacityAndSaleBudgeChartElement::TestData( ScenarioManager ); |
| | | CapacityAndSaleBudgeChartElement::TestData( GlobalOTDTable ); |
| | | |
| | | ScenarioManager.CapacityAndSaleBudgeChart( DataHolderMacroPlansForScenarioComparison.Data(), |
| | | DropDownSaleOrCapacity.Text(), |
| | | DropDownTimeGroup.Text(), |
| | | DropDownByBusinessTypeOrByOrgCode.Text(), |
| | | DataHolderCapacityAndSaleBudgeFilterBusinessType.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterYear.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterMonth.Data(), |
| | | MPSync, |
| | | GlobalOTDTable, |
| | | MacroPlan ); |
| | | GlobalOTDTable.CapacityAndSaleBudgeChart( DataHolderMacroPlansForScenarioComparison.Data(), |
| | | DropDownSaleOrCapacity.Text(), |
| | | DropDownTimeGroup.Text(), |
| | | DropDownByBusinessTypeOrByOrgCode.Text(), |
| | | DataHolderCapacityAndSaleBudgeFilterBusinessType.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterYear.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterMonth.Data(), |
| | | MPSync, |
| | | GlobalOTDTable, |
| | | MacroPlan ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeCompareItemColumn.CapacityAndSaleBudgeCompareItemCell' |
| | | ] |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeCompareItemRow' |
| | | ] |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeCompareItemColumn' |
| | | ] |
| | |
| | | info( DataHolderCapacityAndSaleBudgeFilterItem.Data().Size() ); |
| | | info( DataHolderCapacityAndSaleBudgeFilterYear.Data().Size() ); |
| | | info( DataHolderCapacityAndSaleBudgeFilterMonth.Data().Size() ); |
| | | ScenarioManager.CapacityAndSaleBudgeCompare( DataHolderMacroPlansForScenarioComparison.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterItem.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterYear.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterMonth.Data(), |
| | | MPSync, |
| | | GlobalOTDTable, |
| | | MacroPlan ); |
| | | GlobalOTDTable.CapacityAndSaleBudgeCompare( DataHolderMacroPlansForScenarioComparison.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterItem.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterYear.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterMonth.Data(), |
| | | MPSync, |
| | | GlobalOTDTable, |
| | | MacroPlan ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | tableBinaryData := ScenarioManager.CapacityAndSaleBudgeCompareExport().AsBinaryData(); |
| | | tableBinaryData := GlobalOTDTable.CapacityAndSaleBudgeCompareExport().AsBinaryData(); |
| | | Application.Download( "年度产éé¢ç®å¯¹æ¯.xlsx", tableBinaryData ); |
| | | *] |
| | | GroupServerCalls: false |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'MPSync' |
| | | Source: 'MPSync' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeFilterBusinessType' |
| | | ] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | MPSync.RefreshCapacityAndSaleBudgeFilter(); |
| | | MPSync.RefreshCapacityAndSaleBudgeFilter( GlobalOTDTable ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeFilterItem' |
| | | ] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | CapacityAndSaleBudgeFilterItem::Initial( ScenarioManager ); |
| | | CapacityAndSaleBudgeFilterItem::Initial( GlobalOTDTable ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeFilterMonth' |
| | | ] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | CapacityAndSaleBudgeFilterMonth::Initial( ScenarioManager ); |
| | | CapacityAndSaleBudgeFilterMonth::Initial( GlobalOTDTable ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'MPSync' |
| | | Source: 'MPSync' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeFilterPlaceOfProductionOfArray' |
| | | ] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | MPSync.RefreshCapacityAndSaleBudgeFilter(); |
| | | MPSync.RefreshCapacityAndSaleBudgeFilter( GlobalOTDTable ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'ScenarioManager' |
| | | Source: 'ScenarioManager' |
| | | DataType: 'GlobalOTDTable' |
| | | Source: 'GlobalOTDTable' |
| | | Taborder: 0 |
| | | Transformation: 'CapacityAndSaleBudgeFilterYear' |
| | | ] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | CapacityAndSaleBudgeFilterYear::Initial( ScenarioManager ); |
| | | CapacityAndSaleBudgeFilterYear::Initial( GlobalOTDTable ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Label: '*' |
| | | Label: '-' |
| | | Taborder: 3 |
| | | ] |
| | | } |