¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DLEngineLogisticsCostColumn_Cell_DLEngineLogisticsCostCell_Column |
| | | { |
| | | #keys: '1[415136.0.992900190]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Cell |
| | | { |
| | | #keys: '3[415136.0.992900192][415136.0.992900191][415136.0.992900193]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: DLEngineLogisticsCostColumn |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide Column |
| | | { |
| | | #keys: '3[415136.0.992900195][415136.0.992900194][415136.0.992900196]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DLEngineLogisticsCostCell |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DLEngineLogisticsCostReport_Column_DLEngineLogisticsCostColumn_Report |
| | | { |
| | | #keys: '1[415136.0.992900157]' |
| | | ProceduralSequenceRelationStrategy |
| | | { |
| | | #keys: '13[0.0.0][415136.0.992900176][415136.0.992900170][415136.0.992900177][415136.0.992900171][415136.0.992900178][415136.0.992900172][415136.0.992900179][415136.0.992900173][415136.0.992900180][415136.0.992900174][415136.0.992900181][415136.0.992900175]' |
| | | SequenceElementSuffix: 'Column' |
| | | SequenceSuffix: 'Column' |
| | | } |
| | | RelationSide.LeftSide Column |
| | | { |
| | | #keys: '3[415136.0.992900159][415136.0.992900158][415136.0.992900160]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: DLEngineLogisticsCostReport |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide Report |
| | | { |
| | | #keys: '3[415136.0.992900162][415136.0.992900161][415136.0.992900163]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DLEngineLogisticsCostColumn |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DLEngineLogisticsCostReport_MacroPlan_MacroPlan_DLEngineLogisticsCostReport |
| | | { |
| | | #keys: '1[415136.0.992900125]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MacroPlan |
| | | { |
| | | #keys: '3[415136.0.992900127][415136.0.992900126][415136.0.992900128]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DLEngineLogisticsCostReport |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide DLEngineLogisticsCostReport |
| | | { |
| | | #keys: '3[415136.0.992900130][415136.0.992900129][415136.0.992900131]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: MacroPlan |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DLEngineLogisticsCostReport_Row_DLEngineLogisticsCostRow_Report |
| | | { |
| | | #keys: '1[415136.0.992900141]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Row |
| | | { |
| | | #keys: '3[415136.0.992900143][415136.0.992900142][415136.0.992900144]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: DLEngineLogisticsCostReport |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide Report |
| | | { |
| | | #keys: '3[415136.0.992900146][415136.0.992900145][415136.0.992900147]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DLEngineLogisticsCostRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DLEngineLogisticsCostRow_Cell_DLEngineLogisticsCostCell_Row |
| | | { |
| | | #keys: '1[415136.0.992900203]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Cell |
| | | { |
| | | #keys: '3[415136.0.992900205][415136.0.992900204][415136.0.992900206]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: DLEngineLogisticsCostRow |
| | | OwningSide: 'Owned' |
| | | } |
| | | RelationSide.RightSide Row |
| | | { |
| | | #keys: '3[415136.0.992900208][415136.0.992900207][415136.0.992900209]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DLEngineLogisticsCostCell |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DLEngineLogisticsCostSearch_MacroPlan_MacroPlan_DLEngineLogisticsCostSearch |
| | | { |
| | | #keys: '1[415136.0.992900109]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MacroPlan |
| | | { |
| | | #keys: '3[415136.0.992900111][415136.0.992900110][415136.0.992900112]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DLEngineLogisticsCostSearch |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide DLEngineLogisticsCostSearch |
| | | { |
| | | #keys: '3[415136.0.992900114][415136.0.992900113][415136.0.992900115]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MacroPlan |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation FinancialProductionRow_Product_MP_Product_MP_FinancialProductionRow |
| | | { |
| | | #keys: '1[415136.0.992900294]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Product_MP |
| | | { |
| | | #keys: '3[415136.0.992900296][415136.0.992900295][415136.0.992900297]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: FinancialProductionRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide FinancialProductionRow |
| | | { |
| | | #keys: '3[415136.0.992900299][415136.0.992900298][415136.0.992900300]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: Product_MP |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation FinancialSalesRow_Product_MP_Product_MP_FinancialSalesRow |
| | | { |
| | | #keys: '1[415136.0.993115876]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Product_MP |
| | | { |
| | | #keys: '3[415136.0.993115878][415136.0.993115877][415136.0.993115879]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: FinancialSalesRow |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide FinancialSalesRow |
| | | { |
| | | #keys: '3[415136.0.993115881][415136.0.993115880][415136.0.993115882]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: Product_MP |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CCLongTransCoat |
| | | { |
| | | #keys: '3[415136.0.992900332][415136.0.992900331][415136.0.992900333]' |
| | | Description: 'é¿æ¥é¿éè¿è¾è´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CCRentEnterCost |
| | | { |
| | | #keys: '3[415136.0.992900045][415136.0.992900044][415136.0.992900046]' |
| | | Description: 'é¿æ¥å¤ç§åºå
¥åºè´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CCRentOutCost |
| | | { |
| | | #keys: '3[415136.0.992900048][415136.0.992900047][415136.0.992900049]' |
| | | Description: 'é¿æ¥å¤ç§åºåºåºè´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CCRentQuantity |
| | | { |
| | | #keys: '3[415136.0.993115853][415136.0.993115852][415136.0.993115854]' |
| | | Description: 'é¿æ¥å¤ç§åºæ°é' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CCRentStorageCost |
| | | { |
| | | #keys: '3[415136.0.992900051][415136.0.992900050][415136.0.992900052]' |
| | | Description: 'é¿æ¥å¤ç§åºä»å¨è´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CCShortTransCost |
| | | { |
| | | #keys: '3[415136.0.992900342][415136.0.992900341][415136.0.992900343]' |
| | | Description: 'é¿æ¥çéè¿è¾è´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Coefficient |
| | | { |
| | | #keys: '3[415136.0.992900036][415136.0.992900035][415136.0.992900037]' |
| | | Description: 'ç³»æ°' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute DLRentEnterCost |
| | | { |
| | | #keys: '3[415136.0.992900242][415136.0.992900241][415136.0.992900243]' |
| | | Description: '大è¿å¤ç§åºå
¥åºè´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute DLRentOutCost |
| | | { |
| | | #keys: '3[415136.0.992900249][415136.0.992900248][415136.0.992900250]' |
| | | Description: '大è¿å¤ç§åºåºåºè´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute DLRentStorageCost |
| | | { |
| | | #keys: '3[415136.0.992900262][415136.0.992900261][415136.0.992900263]' |
| | | Description: '大è¿å¤ç§åºä»å¨è´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute EstimatedTotalCost |
| | | { |
| | | #keys: '3[415136.0.992900039][415136.0.992900038][415136.0.992900040]' |
| | | Description: 'é¢è®¡æ»è´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute FactoryToDLRentTransCost |
| | | { |
| | | #keys: '3[415136.0.992900042][415136.0.992900041][415136.0.992900043]' |
| | | Description: 'åå
å°å¤§è¿å¤ç§åºè¿è¾è´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute TotalCost |
| | | { |
| | | #keys: '3[415136.0.992900054][415136.0.992900053][415136.0.992900055]' |
| | | Description: 'æ»è´¹ç¨' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcEstimatedTotalCost |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-12-2024 (created) |
| | | |
| | | value := this.CCRentEnterCost() + this.CCRentOutCost() + this.CCLongTransCoat() + this.CCShortTransCost() + this.CCRentStorageCost() |
| | | + this.DLRentEnterCost() + this.DLRentOutCost() + this.FactoryToDLRentTransCost() + this.DLRentStorageCost(); |
| | | |
| | | this.EstimatedTotalCost( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcTotalCost |
| | | { |
| | | Description: 'è®¡ç®æ»è´¹ç¨' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-12-2024 (created) |
| | | value := this.EstimatedTotalCost() * this.Coefficient(); |
| | | |
| | | this.TotalCost( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DLEngineLogisticsCostCell |
| | | { |
| | | #keys: '5[415136.0.992900033][415136.0.992900031][0.0.0][415136.0.992900032][415136.0.992900034]' |
| | | BaseType: Object |
| | | Description: '大è¿å卿ºç©æµææ¬æ¥è¡¨åå
æ ¼' |
| | | StructuredName: 'DLEngineLogisticsCostCells' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Index |
| | | { |
| | | #keys: '3[415136.0.992900061][415136.0.992900060][415136.0.992900062]' |
| | | Description: 'åå·' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.992900064][415136.0.992900063][415136.0.992900065]' |
| | | Description: 'åç§°' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute StartDate |
| | | { |
| | | #keys: '3[415136.0.992900067][415136.0.992900066][415136.0.992900068]' |
| | | Description: 'å¼å§æ¥æ' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcIndex |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-13-2024 (created) |
| | | |
| | | value := ifexpr( isnull( this.PreviousColumn() ), 0, this.PreviousColumn().Index() + 1 ); |
| | | |
| | | this.Index( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DLEngineLogisticsCostColumn |
| | | { |
| | | #keys: '5[415136.0.992900058][415136.0.992900056][0.0.0][415136.0.992900057][415136.0.992900059]' |
| | | BaseType: Object |
| | | Description: '大è¿å卿ºç©æµææ¬æ¥è¡¨å' |
| | | StructuredName: 'DLEngineLogisticsCostColumns' |
| | | } |
| | |
| | | |
| | | sumcell := selectobject( column, Cell, c, c.Row() = sumrow ); |
| | | if( isnull( sumcell ) ){ |
| | | sumcell := showrow.Cell( relnew, RentEnterCost := 0 |
| | | sumcell := sumrow.Cell( relnew, RentEnterCost := 0 |
| | | , RentOutCost := 0 |
| | | , FactoryToRentTransCost := 0 |
| | | , RentStorageCost := 0 ); |
| | |
| | | factorytorenttranscostcellElement.SetAttribute( "value", 'FactoryToRentTransCost' ); |
| | | attricolumnelement.AppendChild( factorytorenttranscostcellElement ); |
| | | //å¤ç§åºä»å¨è´¹ç¨ |
| | | estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", 'EstimatedTotalCost' ); |
| | | attricolumnelement.AppendChild( estimatedtotalcostcellElement ); |
| | | //é¢è®¡æ»è´¹ç¨ |
| | | rentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | rentstoragecostcellElement.SetAttribute( "value", 'RentStorageCost' ); |
| | | attricolumnelement.AppendChild( rentstoragecostcellElement ); |
| | | //é¢è®¡æ»è´¹ç¨ |
| | | estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", 'EstimatedTotalCost' ); |
| | | attricolumnelement.AppendChild( estimatedtotalcostcellElement ); |
| | | //ç³»æ° |
| | | coefficientcellElement := xmlDOM.CreateElement( "cell" ); |
| | | coefficientcellElement.SetAttribute( "value", 'Coefficient' ); |
| | |
| | | factorytorenttranscostcellElement.SetAttribute( "value", [String]c.FactoryToRentTransCost() ); |
| | | columnelement.AppendChild( factorytorenttranscostcellElement ); |
| | | //å¤ç§åºä»å¨è´¹ç¨ |
| | | rentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | rentstoragecostcellElement.SetAttribute( "value", [String]c.RentStorageCost() ); |
| | | columnelement.AppendChild( rentstoragecostcellElement ); |
| | | //é¢è®¡æ»è´¹ç¨ |
| | | estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", [String]c.EstimatedTotalCost() ); |
| | | columnelement.AppendChild( estimatedtotalcostcellElement ); |
| | | //é¢è®¡æ»è´¹ç¨ |
| | | rentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | rentstoragecostcellElement.SetAttribute( "value", [String]c.EstimatedTotalCost() ); |
| | | columnelement.AppendChild( rentstoragecostcellElement ); |
| | | //ç³»æ° |
| | | coefficientcellElement := xmlDOM.CreateElement( "cell" ); |
| | | coefficientcellElement.SetAttribute( "value", [String]c.Coefficient() ); |
| | |
| | | traverse( source, FinancialProductionReport, report, not report.IsShow() ){//è´¢å¡äº§éæ¥è¡¨ä¸æ¾ç¤º |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = ccunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' ) ){//è´¢å¡äº§éæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | ccrow := table.GetRow( row.Name() ); |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Product() = row.Name() ); |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){ |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | quantity := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetRentEnterCost( column, quantity ); |
| | | product := row.Product_MP(); |
| | | products.Add( product ); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | product := row.Product_MP(); |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){ |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | quantity := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetRentEnterCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | traverse( source, FinancialSalesReport, report, not report.IsShow() ){//è´¢å¡ééæ¥è¡¨ä¸æ¾ç¤º |
| | | traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' ) ){//è´¢å¡ééæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | ccrow := table.GetRow( row.Name() ); |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Product() = row.Name() ); |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){ |
| | | //åºåºé/å
è£
容é*åºåºåä»·ï¼å
¥åºéçäºé¿æ¥éé |
| | | quantity := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | //å¤ç§åºåºåºè´¹ç¨ |
| | | ccrow.SetRentOutCost( column, quantity ); |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | products.Add( product ); |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){ |
| | | //åºåºé/å
è£
容é*åºåºåä»·ï¼å
¥åºéçäºé¿æ¥éé |
| | | quantity := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | //å¤ç§åºåºåºè´¹ç¨ |
| | | ccrow.SetRentOutCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | traverse( trip, ProductInTrip, pit, pit.Quantity() = 0 ){ |
| | | row := table.GetRow( pit.ProductID() ); |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Product() = row.Name() ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( owner, LogisticsCostTransport, trans, trans.Product() = row.Name() ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | quantity := ceil( ceil( [Number]pit.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | |
| | | row.SetFactoryToRentTransCost( column, quantity ); |
| | | product := pit.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){////æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = ccline |
| | | and trans.Destination() = ccrent |
| | | and exists( productparents, Elements, e, e.ID() = trans.Product() ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | products.Add( product ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | quantity := ceil( ceil( [Number]pit.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | |
| | | row.SetFactoryToRentTransCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | if( isccrent ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() ){ |
| | | //è·åè¡ |
| | | product := pisp.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Product() = row.Name() ); |
| | | products.Add( pisp.Product_MP() ); |
| | | //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
|
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear |
| | | ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | row.SetRentStorageCost( column, quantity ); |
| | | } |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){////æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | products.Add( product ); |
| | | //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
|
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear |
| | | ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | row.SetRentStorageCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ID |
| | | { |
| | | #keys: '3[415136.0.992900074][415136.0.992900073][415136.0.992900075]' |
| | | IsReadOnly: true |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsShow |
| | | { |
| | | #keys: '3[415136.0.992900077][415136.0.992900076][415136.0.992900078]' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.992900080][415136.0.992900079][415136.0.992900081]' |
| | | Description: 'åç§°' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: ID |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Clear |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-13-2024 (created) |
| | | this.Column( relflush ); |
| | | this.Row( relflush ); |
| | | |
| | | this.GenerateColumn( this.MacroPlan() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Generate ( |
| | | DLEngineLogisticsCostSearch search, |
| | | Product_MPs products |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | table := selectobject( this, MacroPlan.DLEngineLogisticsCostReport, report, not report.IsShow() ); |
| | | allunit := '<All>'; |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | this.Clear(); |
| | | //è¿æ»¤åç产åid |
| | | productids := selectuniquevalues( products, Elements, product, ( search.Generation() = allunit or product.Generation() = search.Generation() ) |
| | | and ( search.MqbMlb() = allunit or product.MQBMLB() = search.MqbMlb() ) |
| | | and ( search.Power() = allunit or product.Power() = search.Power() ), product.ID() ); |
| | | sumrow := this.Row( relnew, Name := 'SUM', RowNr := table.Row( relsize ) ); |
| | | traverse( table, Row, row ){ |
| | | productid := construct( Strings ); |
| | | productid.Add( row.Name() ); |
| | | |
| | | if( productids.ContainsAll( productid ) ){ |
| | | showrow := this.Row( relnew, Name := row.Name(), RowNr := row.RowNr() ); |
| | | |
| | | traverse( row, Cell, cell ){ |
| | | column := selectobject( this, Column, column, column.Name() = cell.Column().Name() ); |
| | | |
| | | sumcell := selectobject( column, Cell, c, c.Row() = sumrow ); |
| | | if( isnull( sumcell ) ){ |
| | | sumcell := sumrow.Cell( relnew, CCRentEnterCost := 0 |
| | | , CCRentOutCost := 0 |
| | | , CCLongTransCoat := 0 |
| | | , CCShortTransCost := 0 |
| | | , CCRentStorageCost := 0 |
| | | , DLRentEnterCost := 0 |
| | | , DLRentOutCost := 0 |
| | | , FactoryToDLRentTransCost := 0 |
| | | , DLRentStorageCost := 0 ); |
| | | column.Cell( relinsert, sumcell ); |
| | | } |
| | | |
| | | showcell := showrow.Cell( relnew, CCRentEnterCost := cell.CCRentEnterCost() |
| | | , CCRentOutCost := cell.CCRentOutCost() |
| | | , CCLongTransCoat := cell.CCLongTransCoat() |
| | | , CCShortTransCost := cell.CCShortTransCost() |
| | | , CCRentStorageCost := cell.CCRentStorageCost() |
| | | , DLRentEnterCost := cell.DLRentEnterCost() |
| | | , DLRentOutCost := cell.DLRentOutCost() |
| | | , FactoryToDLRentTransCost := cell.FactoryToDLRentTransCost() |
| | | , DLRentStorageCost := cell.DLRentStorageCost() ); |
| | | column.Cell( relinsert, showcell ); |
| | | sumcell.CCRentEnterCost( cell.CCRentEnterCost() + sumcell.CCRentEnterCost() ); |
| | | sumcell.CCRentOutCost( cell.CCRentOutCost() + sumcell.CCRentOutCost() ); |
| | | sumcell.CCLongTransCoat( cell.CCLongTransCoat() + sumcell.CCLongTransCoat() ); |
| | | sumcell.CCShortTransCost( cell.CCShortTransCost() + sumcell.CCShortTransCost() ); |
| | | sumcell.CCRentStorageCost( cell.CCRentStorageCost() + sumcell.CCRentStorageCost() ); |
| | | sumcell.DLRentEnterCost( cell.DLRentEnterCost() + sumcell.DLRentEnterCost() ); |
| | | sumcell.DLRentOutCost( cell.DLRentOutCost() + sumcell.DLRentOutCost() ); |
| | | sumcell.FactoryToDLRentTransCost( cell.FactoryToDLRentTransCost() + sumcell.FactoryToDLRentTransCost() ); |
| | | sumcell.DLRentStorageCost( cell.DLRentStorageCost() + sumcell.DLRentStorageCost() ); |
| | | } |
| | | } |
| | | } |
| | | info( '-------------------------g------------end---------------------------------' ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GenerateColumn ( |
| | | MacroPlan owner |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-13-2024 (created) |
| | | startofplanning := owner.StartOfPlanning(); |
| | | startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | this.Column( relnew, Name := periodname, StartDate := periodtime ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetRow ( |
| | | String product |
| | | ) as DLEngineLogisticsCostRow |
| | | { |
| | | Description: 'æ ¹æ®å·¥åè·åè¡' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-13-2024 (created) |
| | | row := selectobject( this, Row, row, row.Name() = product ); |
| | | if( isnull( row ) ){ |
| | | //åå§ååå
æ ¼ |
| | | row := this.Row( relnew, Name := product ); |
| | | traverse( this, Column, column ){ |
| | | row.Initialize( column ); |
| | | } |
| | | } |
| | | return row; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method IsInUnit ( |
| | | StockingPoint_MP sp, |
| | | String unitname |
| | | ) as Boolean |
| | | { |
| | | Description: 'æ¯å¦å±äºæä¸ªçº¿' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-5-2024 (created) |
| | | unit := sp.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | return sp.ID() = unitname or unit.ID() = unitname or exists( parentunits, Elements, punit, punit.ID() = unitname ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Download ( |
| | | MacroPlan macroPlan |
| | | ) as BinaryValue |
| | | { |
| | | Description: 'ä¸è½½è´¢å¡æ¥è¡¨æ°æ®' |
| | | TextBody: |
| | | [* |
| | | |
| | | table := selectobject( macroPlan, DLEngineLogisticsCostReport, table, table.IsShow() ); |
| | | |
| | | xmlDOMI := XMLDOMImplementation::Create(); |
| | | xmlDOM := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' ); |
| | | |
| | | tableElement := xmlDOM.GetElementByTagName( "table", 0 ); |
| | | //Product |
| | | productcolumnelement := xmlDOM.CreateElement( "column" ); |
| | | productnameelement := xmlDOM.CreateElement( "name" ); |
| | | producttypeelement := xmlDOM.CreateElement( "type" ); |
| | | productnameelement.TextContent( 'Product' ); |
| | | producttypeelement.TextContent( "String" ); |
| | | productcolumnelement.AppendChild( productnameelement ); |
| | | productcolumnelement.AppendChild( producttypeelement ); |
| | | //Attribute |
| | | attricolumnelement := xmlDOM.CreateElement( "column" ); |
| | | attrinameelement := xmlDOM.CreateElement( "name" ); |
| | | attritypeelement := xmlDOM.CreateElement( "type" ); |
| | | attrinameelement.TextContent( 'Attribute' ); |
| | | attritypeelement.TextContent( "String" ); |
| | | attricolumnelement.AppendChild( attrinameelement ); |
| | | attricolumnelement.AppendChild( attritypeelement ); |
| | | |
| | | tableElement.AppendChild( productcolumnelement ); |
| | | tableElement.AppendChild( attricolumnelement ); |
| | | traverse ( table, Column, column ) { |
| | | columnelement := xmlDOM.CreateElement( "column" ); |
| | | nameelement := xmlDOM.CreateElement( "name" ); |
| | | typeelement := xmlDOM.CreateElement( "type" ); |
| | | nameelement.TextContent( column.Name() ); |
| | | typeelement.TextContent( "String" ); |
| | | columnelement.AppendChild( nameelement ); |
| | | columnelement.AppendChild( typeelement ); |
| | | |
| | | cells := selectsortedset( column, Cell, cell, cell.Row().RowNr() ); |
| | | |
| | | traverse ( cells, Elements, c ) { |
| | | if( column.Index() = 0 ){ |
| | | row := c.Row(); |
| | | //Product |
| | | product1cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product1cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product1cellElement ); |
| | | |
| | | product2cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product2cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product2cellElement ); |
| | | |
| | | product3cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product3cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product3cellElement ); |
| | | |
| | | product4cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product4cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product4cellElement ); |
| | | |
| | | product5cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product5cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product5cellElement ); |
| | | |
| | | product6cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product6cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product6cellElement ); |
| | | |
| | | product7cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product7cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product7cellElement ); |
| | | |
| | | product8cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product8cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product8cellElement ); |
| | | |
| | | product9cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product9cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product9cellElement ); |
| | | |
| | | product10cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product10cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product10cellElement ); |
| | | |
| | | product11cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product11cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product11cellElement ); |
| | | |
| | | product12cellElement := xmlDOM.CreateElement( "cell" ); |
| | | product12cellElement.SetAttribute( "value", row.Name() ); |
| | | productcolumnelement.AppendChild( product12cellElement ); |
| | | //Attribute |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrententercostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrententercostcellElement.SetAttribute( "value", 'CCRentEnterCost' ); |
| | | attricolumnelement.AppendChild( ccrententercostcellElement ); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨ |
| | | ccrentoutcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrentoutcostcellElement.SetAttribute( "value", 'CCRentOutCost' ); |
| | | attricolumnelement.AppendChild( ccrentoutcostcellElement ); |
| | | //é¿æ¥é¿éè¿è¾è´¹ç¨ |
| | | cclongtranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | cclongtranscostcellElement.SetAttribute( "value", 'CCLongTransCost' ); |
| | | attricolumnelement.AppendChild( cclongtranscostcellElement ); |
| | | //é¿æ¥çéè¿è¾è´¹ç¨ |
| | | ccshorttranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccshorttranscostcellElement.SetAttribute( "value", 'CCShortTransCost' ); |
| | | attricolumnelement.AppendChild( ccshorttranscostcellElement ); |
| | | //é¿æ¥å¤ç§åºä»å¨è´¹ç¨ |
| | | ccrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrentstoragecostcellElement.SetAttribute( "value", 'CCRentStorageCost' ); |
| | | attricolumnelement.AppendChild( ccrentstoragecostcellElement ); |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ |
| | | dlrententercostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrententercostcellElement.SetAttribute( "value", 'DLRentEnterCost' ); |
| | | attricolumnelement.AppendChild( dlrententercostcellElement ); |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ |
| | | dlrentoutcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrentoutcostcellElement.SetAttribute( "value", 'DLRentOutCost' ); |
| | | attricolumnelement.AppendChild( dlrentoutcostcellElement ); |
| | | //åå
å°å¤ç§åºè¿è¾è´¹ç¨ |
| | | factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | factorytorenttranscostcellElement.SetAttribute( "value", 'FactoryToRentTransCost' ); |
| | | attricolumnelement.AppendChild( factorytorenttranscostcellElement ); |
| | | //大è¿å¤ç§åºä»å¨è´¹ç¨ |
| | | dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrentstoragecostcellElement.SetAttribute( "value", 'DLRentStorageCost' ); |
| | | attricolumnelement.AppendChild( dlrentstoragecostcellElement ); |
| | | //é¢è®¡æ»è´¹ç¨ |
| | | estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", 'EstimatedTotalCost' ); |
| | | attricolumnelement.AppendChild( estimatedtotalcostcellElement ); |
| | | //ç³»æ° |
| | | coefficientcellElement := xmlDOM.CreateElement( "cell" ); |
| | | coefficientcellElement.SetAttribute( "value", 'Coefficient' ); |
| | | attricolumnelement.AppendChild( coefficientcellElement ); |
| | | //æ»è´¹ç¨ |
| | | totalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | totalcostcellElement.SetAttribute( "value", 'TotalCost' ); |
| | | attricolumnelement.AppendChild( totalcostcellElement ); |
| | | } |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrententercostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrententercostcellElement.SetAttribute( "value", [String]c.CCRentEnterCost() ); |
| | | columnelement.AppendChild( ccrententercostcellElement ); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨ |
| | | ccrentoutcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrentoutcostcellElement.SetAttribute( "value", [String]c.CCRentOutCost() ); |
| | | columnelement.AppendChild( ccrentoutcostcellElement ); |
| | | //é¿æ¥é¿éè¿è¾è´¹ç¨ |
| | | cclongtranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | cclongtranscostcellElement.SetAttribute( "value", [String]c.CCLongTransCoat() ); |
| | | columnelement.AppendChild( cclongtranscostcellElement ); |
| | | //é¿æ¥çéè¿è¾è´¹ç¨ |
| | | ccshorttranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccshorttranscostcellElement.SetAttribute( "value", [String]c.CCShortTransCost() ); |
| | | columnelement.AppendChild( ccshorttranscostcellElement ); |
| | | //é¿æ¥å¤ç§åºä»å¨è´¹ç¨ |
| | | ccrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrentstoragecostcellElement.SetAttribute( "value", [String]c.CCRentStorageCost() ); |
| | | columnelement.AppendChild( ccrentstoragecostcellElement ); |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ |
| | | dlrententercostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrententercostcellElement.SetAttribute( "value", [String]c.DLRentEnterCost() ); |
| | | columnelement.AppendChild( dlrententercostcellElement ); |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ |
| | | dlrentoutcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrentoutcostcellElement.SetAttribute( "value", [String]c.DLRentOutCost() ); |
| | | columnelement.AppendChild( dlrentoutcostcellElement ); |
| | | //åå
å°å¤ç§åºè¿è¾è´¹ç¨ |
| | | factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | factorytorenttranscostcellElement.SetAttribute( "value", [String]c.FactoryToDLRentTransCost() ); |
| | | columnelement.AppendChild( factorytorenttranscostcellElement ); |
| | | //大è¿å¤ç§åºä»å¨è´¹ç¨ |
| | | dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrentstoragecostcellElement.SetAttribute( "value", [String]c.DLRentStorageCost() ); |
| | | columnelement.AppendChild( dlrentstoragecostcellElement ); |
| | | //é¢è®¡æ»è´¹ç¨ |
| | | estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", [String]c.EstimatedTotalCost() ); |
| | | columnelement.AppendChild( estimatedtotalcostcellElement ); |
| | | //ç³»æ° |
| | | coefficientcellElement := xmlDOM.CreateElement( "cell" ); |
| | | coefficientcellElement.SetAttribute( "value", [String]c.Coefficient() ); |
| | | columnelement.AppendChild( coefficientcellElement ); |
| | | //æ»è´¹ç¨ |
| | | totalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | totalcostcellElement.SetAttribute( "value", [String]c.TotalCost() ); |
| | | columnelement.AppendChild( totalcostcellElement ); |
| | | } |
| | | tableElement.AppendChild( columnelement ); |
| | | } |
| | | |
| | | xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM ) |
| | | |
| | | //info( xmlString ); |
| | | |
| | | tableGroupHandle := TableGroupHandle::Create( DLEngineLogisticsCostReport::GetDefaultName() ); |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) ); |
| | | tableGroupHandle.Add( tableHandle ); |
| | | |
| | | binaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true ); |
| | | |
| | | return binaryData.AsBinaryValue(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultAllUnit () const declarative as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return '<All>'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultCCUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'é¿æ¥å·¥å'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultDLUnit () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return '大è¿å·¥å'; |
| | | //return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetDefaultName () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | return 'CC engine logistics cost reports'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetStockingPointCCRent () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | return 'é¿æ¥å¤ç§åº'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetStockingPointDLLine () as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | //return 'é¿æ¥è£
é
线边åº'; |
| | | return '大è¿è£
é
线'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetStockingPointDLRent () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | return '大è¿å¤ç§åº'; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Initialize ( |
| | | MacroPlan owner |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-12-2024 (created) |
| | | owner.DLEngineLogisticsCostReport( relflush ); |
| | | name := DLEngineLogisticsCostReport::GetDefaultName(); |
| | | allunit := DLEngineLogisticsCostReport::GetDefaultAllUnit(); |
| | | ccunit := DLEngineLogisticsCostReport::GetDefaultCCUnit(); |
| | | dlunit := DLEngineLogisticsCostReport::GetDefaultDLUnit(); |
| | | dlline := DLEngineLogisticsCostReport::GetStockingPointDLLine(); |
| | | ccrent := DLEngineLogisticsCostReport::GetStockingPointCCRent(); |
| | | dlrent := DLEngineLogisticsCostReport::GetStockingPointCCRent(); |
| | | |
| | | startofplanning := owner.StartOfPlanning().Date(); |
| | | //startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | table := owner.DLEngineLogisticsCostReport( relnew, ID := name, Name := name ); |
| | | showtable := owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true ); |
| | | search := owner.DLEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit ); |
| | | |
| | | products := construct( Product_MPs ); |
| | | |
| | | table.GenerateColumn( owner ); |
| | | //åå¾é¿æ¥çéééè¦å¨trip plané颿¾å°èµ·å§åºåç¹ä¸ºå¤§è¿è£
é
线边åºï¼ç®çå°ä¸ºé¿æ¥å¤ç§åºç产å ç®åºåå¾é¿æ¥çééåï¼å¨å卿ºææ¬åæ°è¡¨éæ¾å°å¯¹åºçå
è£
容éåé¿æ¥å
¥åºåä»·ï¼ç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ» |
| | | //å¨ trip planéæ¾å°å¤§è¿è£
é
线边åºå°å¤§è¿å¤ç§åºçè¿è¾æ°é |
| | | traverse( owner, Unit.Lane.LaneLeg, laneleg ){ |
| | | //èµ·å§åºåç¹æ¯å¦æ¯å¤§è¿è£
é
çº¿è¾¹åº |
| | | originsp := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.OriginStockingPointID() ); |
| | | isdlspline := table.IsInUnit( originsp, dlline ); |
| | | //ç®çå°æ¯å¦æ¯é¿æ¥å¤ç§åº |
| | | destisp := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() ); |
| | | isccrent := table.IsInUnit( destisp, ccrent ); |
| | | //ç®çå°æ¯å¦æ¯å¤§è¿å¤ç§åº |
| | | destisp := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() ); |
| | | isdlrent := table.IsInUnit( destisp, dlrent ); |
| | | if( isdlspline and ( isccrent or isdlrent ) ){ |
| | | traverse( laneleg, Trip, trip, trip.Departure().Date() < startofnextyear ){//ç±äºéè¦èè产åè¿è¾lead timeï¼æ¯ä¸ªæçæ±æ»æ°æ®éè¦æ¨è¿ä¸¤å¤©è¿è¡è®¡ç® |
| | | periodtime := trip.Departure().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | traverse( trip, ProductInTrip, pit, pit.Quantity() = 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = 'å卿º' ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | quantity := [Number]pit.Quantity(); |
| | | row := table.GetRow( pit.ProductID() ); |
| | | product := pit.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( isccrent ){//ç®çå°æ¯é¿æ¥å¤ç§åº |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | products.Add( product ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCRentQuantity( cell.CCRentQuantity() + quantity ); |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»· |
| | | entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨: åºåºé/å
è£
容é*åºåºåä»· |
| | | outcost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | cell.CCRentEnterCost( cell.CCRentEnterCost() + entercost ); |
| | | cell.CCRentOutCost( cell.CCRentOutCost() + outcost ); |
| | | } |
| | | } |
| | | if( isdlrent ){//ç®çå°æ¯å¤§è¿å¤ç§åº |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = dlline |
| | | and trans.Destination() = dlrent |
| | | and exists( productparents, Elements, e, e.ID() = trans.Product() ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | products.Add( product ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | cell.FactoryToDLRentTransCost( cell.FactoryToDLRentTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºå¤§è¿å·¥å该产å产éåå»åå¾é¿æ¥çæ°é |
| | | traverse( owner, FinancialProductionSource, source, not source.IsImport() ){//è´¢å¡äº§éæ¥è¡¨é导å
¥ |
| | | traverse( source, FinancialProductionReport, report, not report.IsShow() ){//è´¢å¡äº§éæ¥è¡¨ä¸æ¾ç¤º |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = dlunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' ) ){//è´¢å¡äº§éæ¥è¡¨éç大è¿äº§é, ä¸ä¸º0 |
| | | ccrow := table.GetRow( row.Name() ); |
| | | product := row.Product_MP(); |
| | | products.Add( product ); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){ |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetDLRentEnterCost( column, enginecost, cell ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ï¼åºåºé/å
è£
容é*åºåºåä»·ï¼åºåºéçäºå¤§è¿å·¥å该产åééåå»åå¾é¿æ¥çæ°é |
| | | traverse( owner, FinancialSalesSource, source, not source.IsImport() ){//è´¢å¡ééæ¥è¡¨é导å
¥ |
| | | traverse( source, FinancialSalesReport, report, not report.IsShow() ){//è´¢å¡ééæ¥è¡¨ä¸æ¾ç¤º |
| | | traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' ) ){//è´¢å¡ééæ¥è¡¨éç大è¿äº§é, ä¸ä¸º0 |
| | | ccrow := table.GetRow( row.Name() ); |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | products.Add( product ); |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){ |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ |
| | | ccrow.SetDLRentOutCost( column, enginecost, cell ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //é¿æ¥é¿éè¿è¾è´¹ç¨ï¼è°æ¨æ°é/å
è£
容é/è£
载容é*è¿è¾åä»·ï¼è°æ¨è®¡åéæ¾å°è¯¥äº§åä»DLå°CCçè°æ¨æ°éï¼å³èµ·å§å°å¤§è¿è£
é
线边åºï¼ç®çå°ä¸ºé¿æ¥å¤ç§åºå¯¹åºçè¿è¾æ°éï¼å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容éï¼å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容éï¼ç¨å
¬å¼è®¡ç®å¾åºç»æï¼æåº¦è¿è¡æ±æ» |
| | | traverse( owner, TransferPlanRow, tprow, tprow.SourceStockpoingPointID() = 'DL' and tprow.TargetStockpoingPointID() = 'CC' ){ |
| | | product := selectobject( owner, Product_MP, product, product.ID() = tprow.ProductID() ); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = dlline |
| | | and trans.Destination() = dlrent |
| | | and exists( productparents, Elements, e, e.ID() = trans.Product() ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | row := table.GetRow( product.ID() ); |
| | | products.Add( product ); |
| | | traverse( tprow,TransferPlanCell, tpcell ){ |
| | | periodtime := tpcell.TransferPlanColumn().ColumnDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | cost := ceil( ceil( [Number]tpcell.Value() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice(); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCLongTransCoat( cell.CCLongTransCoat() + cost ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //é¿æ¥çéè¿è¾è´¹ç¨ï¼å®¢æ·éæ±æ°é/å
è£
容é/è£
载容é*è¿è¾åä»·ï¼å®¢æ·éæ±æ°éåèªforecastésales segmentä¸ºé¿æ¥çæ°éæ±æ»ï¼åç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ»ï¼å客æ·éæ±æ°éæ¢ç®æè½¦æ¬¡ï¼ |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.StartDate() < startofnextyear ){ |
| | | salessegment := forecast.SalesSegment_MP(); |
| | | parentsalessegments := salessegment.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥ |
| | | iscc := salessegment.Name() = ccunit or exists( parentsalessegments, Elements, psalessegment, psalessegment.Name() = ccunit ); |
| | | if( iscc ){ |
| | | product := forecast.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | row := table.GetRow( forecast.ProductID() ); |
| | | products.Add( forecast.Product_MP() ); |
| | | |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | traverse( forecast, PlanningSalesDemandInPeriod, psdip ){ |
| | | periodtime := psdip.StartDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | // info( '-------------------------', column.Name() ); |
| | | cost := ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCShortTransCost( cell.CCShortTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //å¤ç§åºä»å¨è´¹ç¨ï¼ä»å¨æ°é/å
è£
容é*ä»å¨åä»·ï¼å¨Actual inventorieséåå°é¿æ¥å¤ç§åº/大è¿å¤ç§åºè¯¥å卿ºçä»å¨éï¼æ ¹æ®å卿ºå·æ¾å°å¯¹åºçGeneration 忍ªçºµå¶ï¼å¨å卿ºææ¬åæ°è¡¨éæ¾å°å¯¹åºçä»å¨åä»·åå
è£
容éï¼ç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ» |
| | | traverse( owner, StockingPoint_MP, stockingpoint ){ |
| | | unit := stockingpoint.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥å¤ç§åº |
| | | isccrent := stockingpoint.ID() = ccrent or unit.ID() = ccrent or exists( parentunits, Elements, punit, punit.ID() = ccrent ); |
| | | //æ¯å¦å±äºå¤§è¿å¤ç§åº |
| | | isdlrent := stockingpoint.ID() = dlrent or unit.ID() = dlrent or exists( parentunits, Elements, punit, punit.ID() = dlrent ); |
| | | if( isccrent or isdlrent ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() ){ |
| | | //è·åè¡ |
| | | product := pisp.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = 'å卿º' ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | products.Add( pisp.Product_MP() ); |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | |
| | | if( isccrent ){ |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.CCRentStorageCost( cell.CCRentStorageCost() + cost ); |
| | | } |
| | | } else { |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit |
| | | and exists( productparents, Elements, e, e.ID() = engine.Product() ) ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.DLRentStorageCost( cell.DLRentStorageCost() + cost );; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | rows := selectsortedset( table, Row, row, row.Name() ); |
| | | i := 0; |
| | | traverse( rows, Elements, e ){ |
| | | e.RowNr( i ); |
| | | i := i + 1; |
| | | } |
| | | info( '-------------------------------------end---------------------------------' ); |
| | | // |
| | | showtable.Generate( search, products ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DLEngineLogisticsCostReport |
| | | { |
| | | #keys: '5[415136.0.992900071][415136.0.992900069][0.0.0][415136.0.992900070][415136.0.992900072]' |
| | | BaseType: Object |
| | | Description: '大è¿å卿ºç©æµææ¬æ¥è¡¨' |
| | | StructuredName: 'DLEngineLogisticsCostReports' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.992900087][415136.0.992900086][415136.0.992900088]' |
| | | Description: 'åç§°' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute RowNr |
| | | { |
| | | #keys: '3[415136.0.992900090][415136.0.992900089][415136.0.992900091]' |
| | | Description: 'è¡å·' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Initialize ( |
| | | DLEngineLogisticsCostColumn column |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := this.Cell( relnew, CCRentEnterCost := 0 |
| | | , CCRentOutCost := 0 |
| | | , CCLongTransCoat := 0 |
| | | , CCShortTransCost := 0 |
| | | , CCRentStorageCost := 0 |
| | | , DLRentEnterCost := 0 |
| | | , DLRentOutCost := 0 |
| | | , FactoryToDLRentTransCost := 0 |
| | | , DLRentStorageCost := 0 ); |
| | | |
| | | column.Cell( relinsert, cell ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SetDLRentEnterCost ( |
| | | DLEngineLogisticsCostColumn column, |
| | | LogisticsCostEngine enginecost, |
| | | FinancialProductionCell fpcell |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | quantity := [Number]fpcell.Value() - cell.CCRentQuantity(); |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | |
| | | value := cell.DLRentEnterCost() + cost; |
| | | cell.DLRentEnterCost( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SetDLRentOutCost ( |
| | | DLEngineLogisticsCostColumn column, |
| | | LogisticsCostEngine enginecost, |
| | | FinancialSalesCell fscell |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | quantity := [Number]fscell.Value() - cell.CCRentQuantity(); |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | |
| | | value := cell.DLRentOutCost() + cost; |
| | | cell.DLRentOutCost( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SetFactoryToRentTransCost ( |
| | | DLEngineLogisticsCostColumn column, |
| | | Number quantity |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | |
| | | value := cell.FactoryToDLRentTransCost() + quantity; |
| | | cell.FactoryToDLRentTransCost( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SetRentOutCost ( |
| | | DLEngineLogisticsCostColumn column, |
| | | Number quantity |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | |
| | | value := cell.CCRentOutCost() + quantity; |
| | | cell.CCRentOutCost( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SetRentStorageCost ( |
| | | DLEngineLogisticsCostColumn column, |
| | | Number quantity |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | |
| | | value := cell.CCRentStorageCost() + quantity; |
| | | cell.CCRentStorageCost( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DLEngineLogisticsCostRow |
| | | { |
| | | #keys: '5[415136.0.992900084][415136.0.992900082][0.0.0][415136.0.992900083][415136.0.992900085]' |
| | | BaseType: Object |
| | | Description: '大è¿å卿ºç©æµææ¬æ¥è¡¨è¡' |
| | | StructuredName: 'DLEngineLogisticsCostRows' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Generation |
| | | { |
| | | #keys: '3[415136.0.992900097][415136.0.992900096][415136.0.992900098]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MqbMlb |
| | | { |
| | | #keys: '3[415136.0.992900100][415136.0.992900099][415136.0.992900101]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Power |
| | | { |
| | | #keys: '3[415136.0.992900103][415136.0.992900102][415136.0.992900104]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Generation |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: MqbMlb |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Power |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DLEngineLogisticsCostSearch |
| | | { |
| | | #keys: '5[415136.0.992900094][415136.0.992900092][0.0.0][415136.0.992900093][415136.0.992900095]' |
| | | BaseType: Object |
| | | Description: '大è¿å卿ºç©æµææ¬æ¥è¡¨æ¥è¯¢ç±»' |
| | | StructuredName: 'DLEngineLogisticsCostSearchs' |
| | | } |
| | |
| | | if( isnull( row ) ){ |
| | | //åå§ååå
æ ¼ |
| | | row := this.FinancialProductionRow( relnew, Name := product.ID(), Unit := unit ); |
| | | row.Product_MP( relset, product ); |
| | | traverse( this, FinancialProductionColumn, column ){ |
| | | row.Initialize( column, product, unit ); |
| | | } |
| | |
| | | |
| | | if( isnull( row ) ){ |
| | | row := this.FinancialSalesRow( relnew, Name := product.ID(), Unit := salessegment ); |
| | | row.Product_MP( relset, product ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell( this, product ); |
| | | } |
| | |
| | | Title: 'CC engine logistics cost report' |
| | | ] |
| | | } |
| | | Component MenuDLEngineLogisticsCostReport |
| | | { |
| | | #keys: '[415136.0.991620623]' |
| | | BaseType: 'WebMenu' |
| | | Properties: |
| | | [ |
| | | Image: 'MONEY2' |
| | | Taborder: 1 |
| | | Title: 'DL engine logistics cost report' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ContextMenuEngineLogisticsCostReport/MenuDLEngineLogisticsCostReport |
| | | Response OnClick () id:Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_MenuDLEngineLogisticsCostReport_OnClick |
| | | { |
| | | #keys: '[415136.0.993328236]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebMenu_OnClick' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | ApplicationScope.ViewManager().ResetUserViewById( "DL_engine_logistics_cost_report_view", true); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Attributes: 'Value' |
| | | Column: 'FinancialProductionColumn' |
| | | Row: 'FinancialProductionRow' |
| | | Attributes: 'RentEnterCost;RentOutCost;FactoryToRentTransCost;RentStorageCost;EstimatedTotalCost;Coefficient;TotalCost' |
| | | Column: 'Column' |
| | | Row: 'Row' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | table := selectobject( MacroPlan, CCEngineLogisticsCostReport, report, not report.IsShow() ); |
| | | cell.Coefficient( value ); |
| | | traverse( table, Row, trow, trow.Name() = row.Name() ){ |
| | | traverse( trow, Cell, tcel, tcel.Column().Name() = column.Name() ){ |
| | | tcel.RentEnterCost( cell.RentEnterCost() ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component MatrixEditorTable |
| | | { |
| | | #keys: '[415136.0.992750484]' |
| | | BaseType: 'WebMatrixEditor' |
| | | Children: |
| | | [ |
| | | Component MatrixEditorCellTable |
| | | { |
| | | #keys: '[415136.0.992750485]' |
| | | BaseType: 'WebMatrixEditorCell' |
| | | Children: |
| | | [ |
| | | Component DataExtractorCell |
| | | { |
| | | #keys: '[415136.0.992750486]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'DLEngineLogisticsCostReport' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'Row.Cell' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Attributes: 'CCRentEnterCost;CCRentOutCost;CCLongTransCoat;CCShortTransCost;CCRentStorageCost;DLRentEnterCost;DLRentOutCost;FactoryToDLRentTransCost;DLRentStorageCost;EstimatedTotalCost;Coefficient;TotalCost' |
| | | Column: 'Column' |
| | | Row: 'Row' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component MatrixEditorRowsTable |
| | | { |
| | | #keys: '[415136.0.992750487]' |
| | | BaseType: 'WebMatrixEditorHeaderLevel' |
| | | Children: |
| | | [ |
| | | Component DataExtractorRow |
| | | { |
| | | #keys: '[415136.0.992750488]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'DLEngineLogisticsCostReport' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'Row' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Legend: 'Name' |
| | | SortCriteria: 'RowNr' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component MatrixEditorColumnsTable |
| | | { |
| | | #keys: '[415136.0.992750489]' |
| | | BaseType: 'WebMatrixEditorHeaderLevel' |
| | | Children: |
| | | [ |
| | | Component DataExtractorColumn |
| | | { |
| | | #keys: '[415136.0.992750490]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'DLEngineLogisticsCostReport' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'Column' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Legend: 'Name' |
| | | SortCriteria: 'Index' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | #child: matrixEditorActionBarPageTable |
| | | #child: matrixeditorContextMenuTable |
| | | ] |
| | | Properties: |
| | | [ |
| | | AllowMultipleAttributes: true |
| | | Columns: 'MatrixEditorColumnsTable' |
| | | ContextMenu: 'matrixeditorContextMenuTable' |
| | | Rows: 'MatrixEditorRowsTable' |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelDLEngineLogisticsCostReportHeader |
| | | { |
| | | #keys: '[415136.0.992750421]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: PanelDLEngineLogisticsCostReportSearch |
| | | ] |
| | | Properties: |
| | | [ |
| | | FixedSize: true |
| | | Taborder: 2 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelDLEngineLogisticsCostReportSearch |
| | | { |
| | | #keys: '[415136.0.992750422]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: PanelExport |
| | | #child: PanelPower |
| | | #child: PanelMQBMLB |
| | | #child: PanelGeneration |
| | | ] |
| | | Properties: |
| | | [ |
| | | FixedSize: true |
| | | Orientation: 'horizontal' |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelExport |
| | | { |
| | | #keys: '[415136.0.992750423]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component ButtonExport |
| | | { |
| | | #keys: '[415136.0.992750424]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'EXPORT1' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component ButtonSearch |
| | | { |
| | | #keys: '[415136.0.992750425]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'VIEW' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Orientation: 'horizontal' |
| | | Taborder: 3 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelGeneration |
| | | { |
| | | #keys: '[415136.0.992750430]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component ddslGeneration |
| | | { |
| | | #keys: '[415136.0.992750431]' |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | Label: 'Generation' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Orientation: 'horizontal' |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelMQBMLB |
| | | { |
| | | #keys: '[415136.0.992750428]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component ddslMQBMLB |
| | | { |
| | | #keys: '[415136.0.992750429]' |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | Label: 'MQB/MLB' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Orientation: 'horizontal' |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelPower |
| | | { |
| | | #keys: '[415136.0.992750426]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component ddslPower |
| | | { |
| | | #keys: '[415136.0.992750427]' |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | Label: 'Power' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Orientation: 'horizontal' |
| | | Taborder: 2 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelTable |
| | | { |
| | | #keys: '[415136.0.992750483]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: MatrixEditorTable |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 3 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component matrixEditorActionBarPageTable |
| | | { |
| | | #keys: '[415136.0.992750491]' |
| | | BaseType: 'matrixEditorActionBarPage' |
| | | Properties: |
| | | [ |
| | | Taborder: 3 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component matrixeditorContextMenuTable |
| | | { |
| | | #keys: '[415136.0.992750492]' |
| | | BaseType: 'matrixeditorContextMenu' |
| | | Properties: |
| | | [ |
| | | Taborder: 4 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: MatrixEditorTable |
| | | Response OnUpdateValue ( |
| | | CCEngineLogisticsCostRow row, |
| | | CCEngineLogisticsCostColumn column, |
| | | CCEngineLogisticsCostCell cell, |
| | | Number value, |
| | | Number oldvalue |
| | | ) id:Response_MatrixEditorTable_OnUpdateValue |
| | | { |
| | | #keys: '[415136.0.992750480]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | table := selectobject( MacroPlan, CCEngineLogisticsCostReport, report, not report.IsShow() ); |
| | | cell.Coefficient( value ); |
| | | traverse( table, Row, trow, trow.Name() = row.Name() ){ |
| | | traverse( trow, Cell, tcel, tcel.Column().Name() = column.Name() ){ |
| | | tcel.RentEnterCost( cell.RentEnterCost() ); |
| | | tcel.RentOutCost( cell.RentOutCost() ); |
| | | tcel.FactoryToRentTransCost( cell.FactoryToRentTransCost() ); |
| | | tcel.RentStorageCost( cell.RentStorageCost() ); |
| | | tcel.Coefficient( cell.Coefficient() ); |
| | | } |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Response OnClose () id:Response_FormDLEngineLogisticsCostReport_OnClose |
| | | { |
| | | #keys: '[415136.0.992750704]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebForm_OnClose' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | //åå§å |
| | | //if( not exists( MacroPlan, FinancialProductionSource, source, not source.IsImport() ) ){ |
| | | DLEngineLogisticsCostReport::Initialize( MacroPlan ); |
| | | //} |
| | | //info( '------------------1----------------' ); |
| | | table := selectobject( MacroPlan, DLEngineLogisticsCostReport, table, table.IsShow() ); |
| | | //info( '------------------2----------------', table.IsImport(), table.IsShow() ); |
| | | DataHolderTable.Data( table ); |
| | | |
| | | dhSearch.Data( table.MacroPlan().DLEngineLogisticsCostSearch() ); |
| | | info( '------------------2----------------', isnull( dhSearch.Data() ) ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelExport/ButtonExport |
| | | Response OnClick () id:Response_PanelExport_ButtonExport_OnClick |
| | | { |
| | | #keys: '[415136.0.992750420]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return not isnull( MacroPlan ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | binaryValue := DLEngineLogisticsCostReport::Download( MacroPlan ); |
| | | |
| | | Application.Download( DLEngineLogisticsCostReport::GetDefaultName() + '.xlsx', binaryValue.AsBinaryData() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelExport/ButtonSearch |
| | | Response OnClick () id:Response_PanelExport_ButtonSearch_OnClick |
| | | { |
| | | #keys: '[415136.0.992750419]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelGeneration/ddslGeneration |
| | | Response OnCreated () id:Response_PanelGeneration_ddslGeneration_OnCreated |
| | | { |
| | | #keys: '[415136.0.992750414]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Generation() ); |
| | | |
| | | valueString := values.Concatenate( ";" ); |
| | | valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" ); |
| | | |
| | | valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString; |
| | | |
| | | this.Strings( valueString ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelGeneration/ddslGeneration |
| | | Response OnSelectionChanged () id:Response_PanelGeneration_ddslGeneration_OnSelectionChanged |
| | | { |
| | | #keys: '[415136.0.992750413]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | if( dhSearch.Data().Generation() <> selection ){ |
| | | dhSearch.Data().Generation( selection ); |
| | | // DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelMQBMLB/ddslMQBMLB |
| | | Response OnCreated () id:Response_PanelMQBMLB_ddslMQBMLB_OnCreated |
| | | { |
| | | #keys: '[415136.0.992750416]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.MQBMLB() ); |
| | | |
| | | valueString := values.Concatenate( ";" ); |
| | | valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" ); |
| | | |
| | | valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString; |
| | | |
| | | this.Strings( valueString ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelMQBMLB/ddslMQBMLB |
| | | Response OnSelectionChanged () id:Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged |
| | | { |
| | | #keys: '[415136.0.992750415]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | if( dhSearch.Data().MqbMlb() <> selection ){ |
| | | dhSearch.Data().MqbMlb( selection ); |
| | | // DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelPower/ddslPower |
| | | Response OnCreated () id:Response_PanelPower_ddslPower_OnCreated |
| | | { |
| | | #keys: '[415136.0.992750418]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Power() ); |
| | | |
| | | valueString := values.Concatenate( ";" ); |
| | | valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" ); |
| | | |
| | | valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString; |
| | | |
| | | this.Strings( valueString ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelPower/ddslPower |
| | | Response OnSelectionChanged () id:Response_PanelPower_ddslPower_OnSelectionChanged |
| | | { |
| | | #keys: '[415136.0.992750417]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | if( dhSearch.Data().Power() <> selection ){ |
| | | dhSearch.Data().Power( selection ); |
| | | // DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: MacroPlannerWebApp |
| | | OrphanComponent FormDLEngineLogisticsCostReport |
| | | { |
| | | #keys: '[415136.0.992750301]' |
| | | BaseType: 'WebForm' |
| | | Children: |
| | | [ |
| | | Component DataHolderTable |
| | | { |
| | | #keys: '[415136.0.992750351]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'DLEngineLogisticsCostReport' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component dhSearch |
| | | { |
| | | #keys: '[415136.0.992750376]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'DLEngineLogisticsCostSearch' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | #child: PanelDLEngineLogisticsCostReportHeader |
| | | #child: PanelTable |
| | | ] |
| | | Properties: |
| | | [ |
| | | Image: 'MONEY2' |
| | | Title: 'DL engine logistics cost report' |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | { |
| | | viewcontents |
| | | { |
| | | forms |
| | | { |
| | | form_FormDLEngineLogisticsCostReport |
| | | { |
| | | title: 'QMacroPlanner::FormDLEngineLogisticsCostReport' |
| | | shown: true |
| | | componentID: 'QMacroPlanner::FormDLEngineLogisticsCostReport' |
| | | layout |
| | | { |
| | | mode: 'open' |
| | | rowPosition: 1 |
| | | rowSpan: 15 |
| | | columnPosition: 1 |
| | | columnSpan: 13 |
| | | } |
| | | components |
| | | { |
| | | FormDLEngineLogisticsCostReport_PanelDLEngineLogisticsCostReportHeader |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormDLEngineLogisticsCostReport_PanelDLEngineLogisticsCostReportSearch |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormDLEngineLogisticsCostReport_PanelGeneration |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormDLEngineLogisticsCostReport_PanelMQBMLB |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormDLEngineLogisticsCostReport_PanelPower |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormDLEngineLogisticsCostReport_PanelExport |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormDLEngineLogisticsCostReport_PanelTable |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormDLEngineLogisticsCostReport_MatrixEditorTable |
| | | { |
| | | gridColor: '#c4c4c4' |
| | | totalHeaderWidth: 200 |
| | | attributeHeaderWidthRatio: 0.6 |
| | | nameHeaderWidthRatio: 0.4 |
| | | columnWidth: 100 |
| | | horizontalGrid: true |
| | | verticalGrid: true |
| | | backendState |
| | | { |
| | | componentId: 'QMacroPlanner::FormDLEngineLogisticsCostReport.MatrixEditorTable' |
| | | state |
| | | { |
| | | cells |
| | | { |
| | | attributes |
| | | { |
| | | attribute_CCRentEnterCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 0 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'CCRentEnterCost' |
| | | } |
| | | attribute_CCRentOutCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 1 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'CCRentOutCost' |
| | | } |
| | | attribute_CCLongTransCoat |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 2 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'CCLongTransCoat' |
| | | } |
| | | attribute_CCShortTransCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 3 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'CCShortTransCost' |
| | | } |
| | | attribute_CCRentStorageCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 4 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'CCRentStorageCost' |
| | | } |
| | | attribute_DLRentEnterCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 5 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'DLRentEnterCost' |
| | | } |
| | | attribute_DLRentOutCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 6 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'DLRentOutCost' |
| | | } |
| | | attribute_FactoryToDLRentTransCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 7 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'FactoryToDLRentTransCost' |
| | | } |
| | | attribute_DLRentStorageCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 8 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'DLRentStorageCost' |
| | | } |
| | | attribute_EstimatedTotalCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 9 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'EstimatedTotalCost' |
| | | } |
| | | attribute_Coefficient |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 10 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'Coefficient' |
| | | } |
| | | attribute_TotalCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 11 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'TotalCost' |
| | | } |
| | | } |
| | | } |
| | | columns |
| | | { |
| | | sorting |
| | | { |
| | | criteria: "datamember:'Index'" |
| | | } |
| | | } |
| | | rows |
| | | { |
| | | sorting |
| | | { |
| | | criteria: "datamember:'RowNr'" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | userconfigurableinformation |
| | | { |
| | | } |
| | | page: '' |
| | | group: '' |
| | | index: 28 |
| | | image: 'MONEY2' |
| | | description: '' |
| | | } |
| | | formatversion: 2 |
| | | id: 'DL_engine_logistics_cost_report_view' |
| | | name: 'DL engine logistics cost report view' |
| | | isglobal: false |
| | | isroot: true |
| | | } |