Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
已重命名4个文件
已添加43个文件
已修改32个文件
已删除4个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsAllCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740107][415136.0.1293740106][415136.0.1293740108]' |
| | | Description: 'æ»è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsCoefficientUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740114][415136.0.1293740113][415136.0.1293740115]' |
| | | Description: 'ç³»æ°æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsEstimateTotalCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740121][415136.0.1293740120][415136.0.1293740122]' |
| | | Description: 'é¢è®¡æ»è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsRentInCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740128][415136.0.1293740127][415136.0.1293740129]' |
| | | Description: 'å¤ç§åºå
¥åºè´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsRentOutOfCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740140][415136.0.1293740139][415136.0.1293740141]' |
| | | Description: 'å¤ç§åºåºåºè´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsRentStorCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740147][415136.0.1293740146][415136.0.1293740148]' |
| | | Description: 'å¤ç§åºä»å¨è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsWerkToRentTransCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740154][415136.0.1293740153][415136.0.1293740155]' |
| | | Description: 'åå
å°å¤ç§åºè¿è¾è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
ÎļþÃû´Ó _Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcEstimateTotalCost.qbl ÐÞ¸Ä |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcEstimateTotalCost |
| | | Method CalcEstimateTotalCost () as Real |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Sep-24-2024 (created) |
| | | |
| | | // çå
°é¸½ Nov-11-2024 (created) |
| | | value := this.RentInCost() + this.RentOutOfCost() + this.WerkToRentTransCost() + this.RentStorCost(); |
| | | |
| | | this.EstimateTotalCost( value ); |
| | | return value; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsAllCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293750020][415136.0.1293750019][415136.0.1293750021]' |
| | | Description: 'æ»è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsCCLongTransCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740011][415136.0.1293740010][415136.0.1293740012]' |
| | | Description: 'é¿æ¥é¿éè¿è¾è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsCCRentInCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740018][415136.0.1293740017][415136.0.1293740019]' |
| | | Description: 'é¿æ¥å¤ç§åºå
¥åºè´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsCCRentOutOfCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740025][415136.0.1293740024][415136.0.1293740026]' |
| | | Description: 'é¿æ¥å¤ç§åºåºåºè´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsCCRentStorCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740032][415136.0.1293740031][415136.0.1293740033]' |
| | | Description: 'é¿æ¥å¤ç§åºä»å¨è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsCCShorTransCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740039][415136.0.1293740038][415136.0.1293740040]' |
| | | Description: 'é¿æ¥çéè¿è¾è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsCoefficientUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740046][415136.0.1293740045][415136.0.1293740047]' |
| | | Description: 'ç³»æ°æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsDLRentInCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740053][415136.0.1293740052][415136.0.1293740054]' |
| | | Description: '大è¿å¤ç§åºå
¥åºè´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsDLRentOtherCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740060][415136.0.1293740059][415136.0.1293740061]' |
| | | Description: '大è¿å¤ç§åºå
¶ä»è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsDLRentOutOfCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740067][415136.0.1293740066][415136.0.1293740068]' |
| | | Description: '大è¿å¤ç§åºåºåºè´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsDLRentStorCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740074][415136.0.1293740073][415136.0.1293740075]' |
| | | Description: '大è¿å¤ç§åºä»å¨è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsEstimateTotalCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740081][415136.0.1293740080][415136.0.1293740082]' |
| | | Description: 'é¢è®¡æ»è´¹ç¨æ¯å¦è¢«å¯¼å
¥æ´æ°' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsWerkToDLRentTransCostUpdate |
| | | { |
| | | #keys: '3[415136.0.1293740088][415136.0.1293740087][415136.0.1293740089]' |
| | | Description: 'åå
å°å¤§è¿å¤ç§åºè¿è¾è´¹ç¨' |
| | | ValueType: Boolean |
| | | } |
ÎļþÃû´Ó _Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl ÐÞ¸Ä |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcEstimateTotalCost |
| | | Method CalcEstimateTotalCost () as Real |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-12-2024 (created) |
| | | |
| | | // çå
°é¸½ Nov-11-2024 (created) |
| | | value := this.CCRentInCost() + this.CCRentOutOfCost() + this.CCLongTransCost() + this.CCShorTransCost() + this.CCRentStorCost() |
| | | + this.DLRentInCost() + this.DLRentOutOfCost() + this.WerkToDLRentTransCost() + this.DLRentStorCost() + this.DLRentOtherCost() |
| | | + this.DLRentInCost() + this.DLRentOutOfCost() + this.WerkToDLRentTransCost() + this.DLRentStorCost() + this.DLRentOtherCost(); |
| | | |
| | | this.EstimateTotalCost( value ); |
| | | return value; |
| | | *] |
| | | } |
| | |
| | | sumcell.WerkToRentTransCost( cell.WerkToRentTransCost() + sumcell.WerkToRentTransCost() ); |
| | | sumcell.RentStorCost( cell.RentStorCost() + sumcell.RentStorCost() ); |
| | | } |
| | | yearcell.EstimateTotalCost( yearcell.CalcEstimateTotalCost() ); |
| | | yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() ); |
| | | } |
| | | } |
| | | Transaction::Transaction().Propagate( attribute( CCEngineLogisticsCostCell, EstimateTotalCost ) ); |
| | | traverse( yearcolumn, Cell, cell ){ |
| | | cell.EstimateTotalCost( cell.CalcEstimateTotalCost() ); |
| | | cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); |
| | | } |
| | | traverse( sumrow, Cell, cell ){ |
| | | cell.EstimateTotalCost( cell.CalcEstimateTotalCost() ); |
| | | cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); |
| | | if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){ |
| | | cell.IsUpdate( true ); |
| | | } |
| | | cell.IsAllCostUpdate( exists( cell.Column(), Cell, acell, acell.IsAllCostUpdate() ) ); |
| | | cell.IsCoefficientUpdate( exists( cell.Column(), Cell, acell, acell.IsCoefficientUpdate() ) ); |
| | | cell.IsEstimateTotalCostUpdate( exists( cell.Column(), Cell, acell, acell.IsEstimateTotalCostUpdate() ) ); |
| | | cell.IsRentInCostUpdate( exists( cell.Column(), Cell, acell, acell.IsRentInCostUpdate() ) ); |
| | | cell.IsRentOutOfCostUpdate( exists( cell.Column(), Cell, acell, acell.IsRentOutOfCostUpdate() ) ); |
| | | cell.IsRentStorCostUpdate( exists( cell.Column(), Cell, acell, acell.IsRentStorCostUpdate() ) ); |
| | | cell.IsWerkToRentTransCostUpdate( exists( cell.Column(), Cell, acell, acell.IsWerkToRentTransCostUpdate() ) ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | cell := selectobject( ccrow, Cell, cell, cell.Column() = column ); |
| | | traverse( sameproductcells, Elements.GeneralExcelImportAndExportDataRow, samerow ){ |
| | | attricell := selectobject( samerow, GeneralExcelImportAndExportDataCell, attricell, attricell.GeneralExcelImportAndExportDataColumn() = attricolumn ); |
| | | if( attricell.Value() = 'æ»è´¹ç¨' ){ |
| | | valuecell := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn ); |
| | | if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){ |
| | | cell.AllCost( [Real]valuecell.Value() ); |
| | | cell.IsUpdate( true ); |
| | | } |
| | | } |
| | | // if( not ( attricell.Value() = 'é¢è®¡æ»è´¹ç¨' or attricell.Value() = 'æ»è´¹ç¨' ) ){ |
| | | // if( attricell.Value() = 'æ»è´¹ç¨' ){ |
| | | // valuecell := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn ); |
| | | // if( attricell.Value() = 'å¤ç§åºå
¥åºè´¹ç¨' ){ |
| | | // cell.RentInCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = 'å¤ç§åºåºåºè´¹ç¨' ){ |
| | | // cell.RentOutOfCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' ){ |
| | | // cell.WerkToRentTransCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = 'å¤ç§åºä»å¨è´¹ç¨' ){ |
| | | // cell.RentStorCost( [Number]valuecell.Value() ); |
| | | // if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){ |
| | | // cell.AllCost( [Real]valuecell.Value() ); |
| | | // cell.IsUpdate( true ); |
| | | // } |
| | | // else if( attricell.Value() = 'é¢è®¡æ»è´¹ç¨' ){ |
| | | // cell.EstimatedTotalCost( [Number]valuecell.Value() ); |
| | | // } |
| | | // else if( attricell.Value() = 'ç³»æ°' ){ |
| | | // cell.CoefficientValue( valuecell.Value() ); |
| | | // } |
| | | // else if( attricell.Value() = 'æ»è´¹ç¨' ){ |
| | | // cell.TotalCost( [Number]valuecell.Value() ); |
| | | // } |
| | | // } |
| | | // if( not ( attricell.Value() = 'é¢è®¡æ»è´¹ç¨' or attricell.Value() = 'æ»è´¹ç¨' ) ){ |
| | | valuecell := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn ); |
| | | if( attricell.Value() = 'å¤ç§åºå
¥åºè´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.RentInCost().Format( 'N(Dec)' ) ){ |
| | | cell.RentInCost( [Real]valuecell.Value() ); |
| | | cell.IsRentInCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'å¤ç§åºåºåºè´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.RentOutOfCost().Format( 'N(Dec)' ) ){ |
| | | cell.RentOutOfCost( [Real]valuecell.Value() ); |
| | | cell.IsRentOutOfCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.WerkToRentTransCost().Format( 'N(Dec)' ) ){ |
| | | cell.WerkToRentTransCost( [Real]valuecell.Value() ); |
| | | cell.IsWerkToRentTransCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'å¤ç§åºä»å¨è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.RentStorCost().Format( 'N(Dec)' ) ){ |
| | | cell.RentStorCost( [Real]valuecell.Value() ); |
| | | cell.IsRentStorCostUpdate( true ); |
| | | } |
| | | } |
| | | else if( attricell.Value() = 'é¢è®¡æ»è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.EstimateTotalCost().Format( 'N(Dec)' ) ){ |
| | | cell.EstimateTotalCost( [Real]valuecell.Value() ); |
| | | cell.IsEstimateTotalCostUpdate( true ); |
| | | } |
| | | } |
| | | else if( attricell.Value() = 'ç³»æ°' ){ |
| | | if( valuecell.Value() <> cell.CoefficientValue() ){ |
| | | cell.CoefficientValue( valuecell.Value() ); |
| | | cell.IsCoefficientUpdate( true ); |
| | | } |
| | | } |
| | | else if( attricell.Value() = 'æ»è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){ |
| | | cell.AllCost( [Real]valuecell.Value() ); |
| | | cell.IsAllCostUpdate( true ); |
| | | } |
| | | } |
| | | // } |
| | | } |
| | | } |
| | |
| | | //å¤ç§åºå
¥åºè´¹ç¨ï¼åèªè´¢å¡äº§éæ¥è¡¨ç产éï¼å¨äº§åè¡¨æ ¹æ®å卿ºå·æ¾å°å¯¹åºçGeneration 忍ªçºµå¶ï¼å¨å卿ºææ¬åæ°è¡¨éæ¾å°å¯¹åºçå
è£
容éåå
¥åºåä»·ï¼ç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ» |
| | | traverse( owner, FinancialProductionSource, source, not source.IsImport() ){//è´¢å¡äº§éæ¥è¡¨é导å
¥ |
| | | traverse( source, FinancialProductionReport, report, not report.IsShow() ){//è´¢å¡äº§éæ¥è¡¨ä¸æ¾ç¤º |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = ccunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' and not cell.FinancialProductionColumn().IsDay() ) ){//è´¢å¡äº§éæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = ccunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0') ){//è´¢å¡äº§éæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | ccrow := table.GetRow( row.Name() ); |
| | | products.Add( product ); |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and not cell.FinancialProductionColumn().IsDay() ){ |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){ |
| | | cellcolumn := cell.FinancialProductionColumn(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | |
| | | //å¤ç§åºåºåºè´¹ç¨ï¼åºåºéçäºé¿æ¥ééï¼åèªè´¢å¡ééæ¥è¡¨çééï¼å¨äº§åè¡¨æ ¹æ®å卿ºå·æ¾å°å¯¹åºçGeneration 忍ªçºµå¶ï¼å¨å卿ºææ¬åæ°è¡¨éæ¾å°å¯¹åºçå
è£
容éååºåºåä»·ï¼ç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ» |
| | | 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' and not cell.FinancialSalesColumn().IsDay() ) ){//è´¢å¡ééæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' ) ){//è´¢å¡ééæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | ccrow := table.GetRow( row.Name() ); |
| | | products.Add( product ); |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and not cell.FinancialSalesColumn().IsDay() ){ |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){ |
| | | cellcolumn := cell.FinancialSalesColumn(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | |
| | | sumcell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + sumcell.WerkToDLRentTransCost() ); |
| | | sumcell.DLRentStorCost( cell.DLRentStorCost() + sumcell.DLRentStorCost() ); |
| | | } |
| | | yearcell.EstimateTotalCost( yearcell.CalcEstimateTotalCost() ); |
| | | yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() ); |
| | | } |
| | | } |
| | | Transaction::Transaction().Propagate( attribute( DLEngineLogisticsCostCell, EstimateTotalCost ) ); |
| | | traverse( yearcolumn, Cell, cell ){ |
| | | cell.EstimateTotalCost( cell.CalcEstimateTotalCost() ); |
| | | cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); |
| | | } |
| | | traverse( sumrow, Cell, cell ){ |
| | | cell.EstimateTotalCost( cell.CalcEstimateTotalCost() ); |
| | | cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() ); |
| | | if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){ |
| | | cell.IsUpdate( true ); |
| | | } |
| | | cell.IsAllCostUpdate( exists( cell.Column(), Cell, acell, acell.IsAllCostUpdate() ) ); |
| | | cell.IsCCLongTransCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCLongTransCostUpdate() ) ); |
| | | cell.IsCCRentInCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCRentInCostUpdate() ) ); |
| | | cell.IsCCRentOutOfCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCRentOutOfCostUpdate() ) ); |
| | | cell.IsCCRentStorCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCRentStorCostUpdate() ) ); |
| | | cell.IsCCShorTransCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCShorTransCostUpdate() ) ); |
| | | cell.IsCoefficientUpdate( exists( cell.Column(), Cell, acell, acell.IsCoefficientUpdate() ) ); |
| | | cell.IsDLRentInCostUpdate( exists( cell.Column(), Cell, acell, acell.IsDLRentInCostUpdate() ) ); |
| | | cell.IsDLRentOtherCostUpdate( exists( cell.Column(), Cell, acell, acell.IsDLRentOtherCostUpdate() ) ); |
| | | cell.IsDLRentOutOfCostUpdate( exists( cell.Column(), Cell, acell, acell.IsDLRentOutOfCostUpdate() ) ); |
| | | cell.IsDLRentStorCostUpdate( exists( cell.Column(), Cell, acell, acell.IsDLRentStorCostUpdate() ) ); |
| | | cell.IsEstimateTotalCostUpdate( exists( cell.Column(), Cell, acell, acell.IsEstimateTotalCostUpdate() ) ); |
| | | cell.IsWerkToDLRentTransCostUpdate( exists( cell.Column(), Cell, acell, acell.IsWerkToDLRentTransCostUpdate() ) ); |
| | | } |
| | | info( '-------------------------g------------end---------------------------------' ); |
| | | *] |
| | |
| | | attricolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 1 ); |
| | | //çææ°è¡¨çæ¥æå |
| | | table := DLEngineLogisticsCostReport::InitiateSearch( owner ); |
| | | traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, excelrow ){ |
| | | productcell := selectobject( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn() = productcolumn ); |
| | | sameproductvalues := selectuniquevalues( productcolumn, GeneralExcelImportAndExportDataCell, productcell, productcell.Value() ); |
| | | traverse( sameproductvalues, Elements, productvalue ){ |
| | | //å¤çæªè¢«åæ¥ç产å |
| | | if( not exists( products, Elements, product, product.ID() = productcell.Value() ) ){ |
| | | product := selectobject( owner, Product_MP, product, product.ID() = productcell.Value() ); |
| | | if( not exists( products, Elements, product, product.ID() = productvalue ) ){ |
| | | product := selectobject( owner, Product_MP, product, product.ID() = productvalue ); |
| | | products.Add( product ); |
| | | ccrow := table.GetRow( productcell.Value() ); |
| | | ccrow := table.GetRow( productvalue ); |
| | | //è·åç¸åç产å |
| | | sameproductcells := selectset( productcolumn, GeneralExcelImportAndExportDataCell, excelcell, excelcell.Value() = productcell.Value() ); |
| | | sameproductcells := selectset( productcolumn, GeneralExcelImportAndExportDataCell, excelcell, excelcell.Value() = productvalue ); |
| | | //仿¥æåå¼å§å¤ç |
| | | traverse( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 1 ){ |
| | | excelcolumn := excelcell.GeneralExcelImportAndExportDataColumn(); |
| | | traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, excelcolumn, excelcolumn.ColumnIndex() > 1 ){ |
| | | column := selectobject( table, Column, column, column.Name() = excelcolumn.Name() ); |
| | | cell := selectobject( ccrow, Cell, cell, cell.Column() = column ); |
| | | traverse( sameproductcells, Elements.GeneralExcelImportAndExportDataRow, samerow ){ |
| | | attricell := selectobject( samerow, GeneralExcelImportAndExportDataCell, attricell, attricell.GeneralExcelImportAndExportDataColumn() = attricolumn ); |
| | | if( attricell.Value() = 'æ»è´¹ç¨' ){ |
| | | valuecell := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn ); |
| | | if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){ |
| | | cell.AllCost( [Real]valuecell.Value() ); |
| | | cell.IsUpdate( true ); |
| | | } |
| | | } |
| | | // if( not ( attricell.Value() = 'é¢è®¡æ»è´¹ç¨' or attricell.Value() = 'æ»è´¹ç¨' ) ){ |
| | | // if( attricell.Value() = 'æ»è´¹ç¨' ){ |
| | | // valuecell := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn ); |
| | | // if( attricell.Value() = 'é¿æ¥å¤ç§åºå
¥åºè´¹ç¨' ){ |
| | | // cell.CCRentInCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = 'é¿æ¥å¤ç§åºåºåºè´¹ç¨' ){ |
| | | // cell.CCRentOutOfCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = 'é¿æ¥é¿éè¿è¾è´¹ç¨' ){ |
| | | // cell.CCLongTransCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = 'é¿æ¥çéè¿è¾è´¹ç¨' ){ |
| | | // cell.CCShorTransCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = 'é¿æ¥å¤ç§åºä»å¨è´¹ç¨' ){ |
| | | // cell.CCRentStorCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = '大è¿å¤ç§åºå
¥åºè´¹ç¨' ){ |
| | | // cell.DLRentInCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = '大è¿å¤ç§åºåºåºè´¹ç¨' ){ |
| | | // cell.DLRentOutOfCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' ){ |
| | | // cell.WerkToDLRentTransCost( [Number]valuecell.Value() ); |
| | | // }else if( attricell.Value() = '大è¿å¤ç§åºä»å¨è´¹ç¨' ){ |
| | | // cell.DLRentStorCost( [Number]valuecell.Value() ); |
| | | // info( '------------------', valuecell.Value(), cell.AllCost().Format( 'N(Dec)' ),valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' )); |
| | | // if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){ |
| | | // cell.AllCost( [Real]valuecell.Value() ); |
| | | // cell.IsUpdate( true ); |
| | | // } |
| | | //// else if( attricell.Value() = 'é¢è®¡æ»è´¹ç¨' ){ |
| | | //// cell.EstimatedTotalCost( [Number]valuecell.Value() ); |
| | | //// } |
| | | // else if( attricell.Value() = 'ç³»æ°' ){ |
| | | // cell.CoefficientValue( valuecell.Value() ); |
| | | // } |
| | | //// else if( attricell.Value() = 'æ»è´¹ç¨' ){ |
| | | //// cell.TotalCost( [Number]valuecell.Value() ); |
| | | //// } |
| | | // } |
| | | // if( not ( attricell.Value() = 'é¢è®¡æ»è´¹ç¨' or attricell.Value() = 'æ»è´¹ç¨' ) ){ |
| | | valuecell := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn ); |
| | | if( attricell.Value() = 'é¿æ¥å¤ç§åºå
¥åºè´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.CCRentInCost().Format( 'N(Dec)' ) ){ |
| | | cell.CCRentInCost( [Real]valuecell.Value() ); |
| | | cell.IsCCRentInCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'é¿æ¥å¤ç§åºåºåºè´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.CCRentOutOfCost().Format( 'N(Dec)' ) ){ |
| | | cell.CCRentOutOfCost( [Real]valuecell.Value() ); |
| | | cell.IsCCRentOutOfCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'é¿æ¥é¿éè¿è¾è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.CCLongTransCost().Format( 'N(Dec)' ) ){ |
| | | cell.CCLongTransCost( [Real]valuecell.Value() ); |
| | | cell.IsCCLongTransCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'é¿æ¥çéè¿è¾è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.CCShorTransCost().Format( 'N(Dec)' ) ){ |
| | | cell.CCShorTransCost( [Real]valuecell.Value() ); |
| | | cell.IsCCShorTransCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'é¿æ¥å¤ç§åºä»å¨è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.CCRentStorCost().Format( 'N(Dec)' ) ){ |
| | | cell.CCRentStorCost( [Real]valuecell.Value() ); |
| | | cell.IsCCRentStorCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = '大è¿å¤ç§åºå
¥åºè´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.DLRentInCost().Format( 'N(Dec)' ) ){ |
| | | cell.DLRentInCost( [Real]valuecell.Value() ); |
| | | cell.IsDLRentInCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = '大è¿å¤ç§åºåºåºè´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.DLRentOutOfCost().Format( 'N(Dec)' ) ){ |
| | | cell.DLRentOutOfCost( [Real]valuecell.Value() ); |
| | | cell.IsDLRentOutOfCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.WerkToDLRentTransCost().Format( 'N(Dec)' ) ){ |
| | | cell.WerkToDLRentTransCost( [Real]valuecell.Value() ); |
| | | cell.IsWerkToDLRentTransCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = '大è¿å¤ç§åºä»å¨è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.DLRentStorCost().Format( 'N(Dec)' ) ){ |
| | | cell.DLRentStorCost( [Real]valuecell.Value() ); |
| | | cell.IsDLRentStorCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = '大è¿å¤ç§åºå
¶ä»è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.DLRentOtherCost().Format( 'N(Dec)' ) ){ |
| | | cell.DLRentOtherCost( [Real]valuecell.Value() ); |
| | | cell.IsDLRentOtherCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'é¢è®¡æ»è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.EstimateTotalCost().Format( 'N(Dec)' ) ){ |
| | | cell.EstimateTotalCost( [Real]valuecell.Value() ); |
| | | cell.IsEstimateTotalCostUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'ç³»æ°' ){ |
| | | if( valuecell.Value() <> cell.CoefficientValue() ){ |
| | | cell.CoefficientValue( valuecell.Value() ); |
| | | cell.IsCoefficientUpdate( true ); |
| | | } |
| | | }else if( attricell.Value() = 'æ»è´¹ç¨' ){ |
| | | if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){ |
| | | cell.AllCost( [Real]valuecell.Value() ); |
| | | cell.IsAllCostUpdate( true ); |
| | | } |
| | | } |
| | | // } |
| | | } |
| | | } |
| | |
| | | // 客æ·åºææ¶æ»æ°é |
| | | mrcc := select( macroPlan, MaterialRackCustomRow.MaterialRackCustomCell, tempMRCCell, tempMRCCell.MaterialRackCustomRow().Generation() = ccerr.Generation() and tempMRCCell.MaterialRackCustomRow().MLB_MQB() = ccerr.MLB_MQB() and tempMRCCell.MaterialRackColumn().Month() = ccerc.StartDate().Month() ); |
| | | |
| | | // å½åææ«æåä¸å¤©æ¥æ |
| | | lastDayOfThisMonth := ccerc.StartDate().StartOfNextMonth() - 1; |
| | | |
| | | cell := ccerr.CC_EngineRackCell( relnew ); |
| | | |
| | | // ææ¶æ»æ°é |
| | |
| | | tempMRTCell.MaterialRackTotalRow().Generation() = ccerr.Generation() and |
| | | tempMRTCell.MaterialRackTotalRow().MLB_MQB() = ccerr.MLB_MQB() and |
| | | tempMRTCell.MaterialRackColumn().Month() = ccerc.StartDate().Month() ); |
| | | cell.TotalQuantityOfMaterialRacks( mrtcell.Quantity() ); |
| | | cell.TotalQuantityOfMaterialRacks( guard( mrtcell.Quantity(), 0 ) ); |
| | | |
| | | // ç©ºææ¶æ°éï¼ã350bar MQBææ¶æ»æ°é - ææ350bar MQBæ»åºå / å
è£
容é-客æ·åºææ¶æ°éã* é¿æ¥å¤ç§åºç©ºææ¶æ¯ä¾ |
| | | plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP, |
| | |
| | | tempMRTCell.MaterialRackTotalRow().MLB_MQB() = dlerr.MLB_MQB() and |
| | | tempMRTCell.MaterialRackColumn().Month() = dlerc.StartDate().Month() ); |
| | | if ( dlerr.Generation() = "350bar" and dlerr.MLB_MQB() = "MQB" ) { |
| | | cell.TotalQuantityOfMaterialRacks( mrtcell.Quantity() ); |
| | | cell.TotalQuantityOfMaterialRacks( guard( mrtcell.Quantity(), 0 ) ); |
| | | } |
| | | |
| | | // 大è¿å¤ç§åºç©ºææ¶æ°éï¼ã350bar MQBææ¶æ»æ°é - ææ350bar MQBæ»åºå / å
è£
容é - 客æ·åºææ¶æ°éã* 大è¿å¤ç§åºç©ºææ¶æ¯ä¾ |
| | |
| | | startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | for( start := startofyear; start < startofnextyear; start := start + Duration::Days( 1 ) ){ |
| | | for( start := startofyear; start < startofnextyear; start := start.StartOfMonth() ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime, IsDay := true ); |
| | | if( start = start.StartOfMonth() ){ |
| | | this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime ); |
| | | } |
| | | this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | yearcell := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 ); |
| | | showrow.FinancialProductionCell( relinsert, yearcell ); |
| | | } |
| | | traverse( row, FinancialProductionCell, cell, not cell.FinancialProductionColumn().IsDay() ){ |
| | | column := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() ); |
| | | traverse( row, FinancialProductionCell, cell ){ |
| | | column := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | if( isnull( column ) ){ |
| | | column := this.FinancialProductionColumn( relnew, Name := cell.FinancialProductionColumn().Name(), Period := cell.FinancialProductionColumn().Period() ); |
| | | } |
| | |
| | | cell := column.FinancialProductionCell( relnew, Quantity := 0 ); |
| | | |
| | | this.FinancialProductionCell( relinsert, cell ); |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() and not column.IsDay()){ |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){ |
| | | importdata := product.MacroPlan().FPImportData( relnew, Generation := product.Generation() |
| | | , MqbMlb := product.MQBMLB() |
| | | , Power := product.Power() |
| | |
| | | if( isnull( unitrow ) ){ |
| | | unitrow := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := unit.Value() ); |
| | | } |
| | | // allrow := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit ); |
| | | // if( isnull( unitrow ) ){ |
| | | // allrow := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := allunit ); |
| | | // } |
| | | |
| | | //è¯»åæ¯ä¸è¡çåå
æ ¼ |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and cnv2.Convert( cell.FinancialProductionColumn().Name() ) <> beforeyearday ){ |
| | |
| | | previouscell := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn ); |
| | | quantity := [Real]cell.Value() + [Real]previouscell.Value(); |
| | | } |
| | | // info( '-----------------', period ); |
| | | //è·å被导å
¥æ¥è¡¨çæ¥æå |
| | | tablecolumn := selectobject( table, FinancialProductionColumn, column, not column.IsDay() and column.Name() = periodname ); |
| | | tablecolumn := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname ); |
| | | if( isnull( tablecolumn ) ){ |
| | | tablecolumn := table.FinancialProductionColumn( relnew, Name := periodname, Period := yearday.Date() ); |
| | | } |
| | | //è·å被导å
¥æ¥è¡¨çåå
æ ¼ |
| | | unitcell := selectobject( unitrow, FinancialProductionCell, unitcell, unitcell.FinancialProductionColumn() = tablecolumn ); |
| | | // allcell := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = tablecolumn ); |
| | | // if( isnull( allcell ) ){ |
| | | // allcell := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() ); |
| | | // allrow.FinancialProductionCell( relinsert, allcell ); |
| | | // }else{ |
| | | // if( allcell.Quantity() <> quantity ){ |
| | | // allcell.Quantity( quantity ); |
| | | // allcell.IsUpdate( true ); |
| | | // } |
| | | // } |
| | | if( isnull( unitcell ) ){ |
| | | unitcell := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() ); |
| | | unitrow.FinancialProductionCell( relinsert, unitcell ); |
| | |
| | | //Unit |
| | | unitcolumnelement := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Unit' ); |
| | | |
| | | minindex := min( table, FinancialProductionColumn, column, not column.IsDay(), column.Index() ); |
| | | traverse ( table, FinancialProductionColumn, column, not column.IsDay() ) { |
| | | minindex := min( table, FinancialProductionColumn, column, column.Index() ); |
| | | traverse ( table, FinancialProductionColumn, column ) { |
| | | columnelement := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, column.Name() ); |
| | | |
| | | cells := selectsortedset( column, FinancialProductionCell, cell, cell.FinancialProductionRow().RowNr() ); |
| | |
| | | periodtime := dayperiodtime.StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // quantity := [Number]pispip.NewSupplyQuantity();//åèäºå
¥ |
| | | daycolumn := selectobject( table, FinancialProductionColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() ); |
| | | column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() ); |
| | | daycolumn := selectobject( table, FinancialProductionColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime ); |
| | | column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | factoryrow.Initialize( daycolumn, pispip.NewSupplyQuantity() ); |
| | | factoryrow.Initialize( column, pispip.NewSupplyQuantity() ); |
| | | // allrow.Initialize( column, pispip.NewSupplyQuantity() ); |
| | |
| | | startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | for( start := startofyear; start < startofnextyear; start := start + Duration::Days( 1 ) ){ |
| | | for( start := startofyear; start < startofnextyear; start := start.StartOfMonth() ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime, IsDay := true ); |
| | | if( start = start.StartOfMonth() ){ |
| | | this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime ); |
| | | } |
| | | this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | showrow.FinancialSalesCell( relinsert, yearcell ); |
| | | } |
| | | |
| | | traverse( row, FinancialSalesCell, cell, not cell.FinancialSalesColumn().IsDay() ){ |
| | | column := selectobject( this, FinancialSalesColumn, column, column.Name() = cell.FinancialSalesColumn().Name() and not column.IsDay()); |
| | | traverse( row, FinancialSalesCell, cell ){ |
| | | column := selectobject( this, FinancialSalesColumn, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | if( isnull( column ) ){ |
| | | column := this.FinancialSalesColumn( relnew, Name := cell.FinancialSalesColumn().Name(), Period := cell.FinancialSalesColumn().Period() ); |
| | | } |
| | |
| | | cell := column.FinancialSalesCell( relnew, Value := '0' ); |
| | | |
| | | this.FinancialSalesCell( relinsert, cell ); |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() and not column.IsDay() ){ |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){ |
| | | importdata := product.MacroPlan().FSImportData( relnew, Generation := product.Generation() |
| | | , MqbMlb := product.MQBMLB() |
| | | , Power := product.Power() |
| | |
| | | if( isnull( unitrow ) ){ |
| | | unitrow := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := unit.Value() ); |
| | | } |
| | | // allrow := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit ); |
| | | // if( isnull( unitrow ) ){ |
| | | // allrow := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit ); |
| | | // } |
| | | |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn() <> productcolumn and cell.FinancialSalesColumn() <> unitcolumn and cnv2.Convert( cell.FinancialSalesColumn().Name() ) <> beforeyearday ){ |
| | | column := cell.FinancialSalesColumn(); |
| | |
| | | } |
| | | tablecolumn := construct( FinancialSalesColumn ); |
| | | //è·å被导å
¥æ¥è¡¨çæ¥æå |
| | | tablecolumn := selectobject( table, FinancialSalesColumn, fscolumn, not fscolumn.IsDay() and fscolumn.Name() = periodname ); |
| | | tablecolumn := selectobject( table, FinancialSalesColumn, fscolumn, fscolumn.Name() = periodname ); |
| | | if( isnull( tablecolumn ) ){ |
| | | tablecolumn := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() ); |
| | | } |
| | |
| | | unitcell.IsUpdate( true ); |
| | | } |
| | | } |
| | | // allcell := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn ); |
| | | // if( isnull( allcell ) ){ |
| | | // allcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() ); |
| | | // allrow.FinancialSalesCell( relinsert, allcell ); |
| | | // }else{ |
| | | // if( [Real]allcell.Value() <> quantity ){ |
| | | // allcell.Value( [String]( [Number]quantity ) ); |
| | | // allcell.IsUpdate( true ); |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | //Unit |
| | | unitcolumnelement := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Unit' ); |
| | | |
| | | minindex := min( table, FinancialSalesColumn, column, not column.IsDay(), column.Index() ); |
| | | traverse ( table, FinancialSalesColumn, column, not column.IsDay() ) { |
| | | minindex := min( table, FinancialSalesColumn, column, column.Index() ); |
| | | traverse ( table, FinancialSalesColumn, column ) { |
| | | columnelement := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, column.Name() ); |
| | | |
| | | cells := selectsortedset( column, FinancialSalesCell, cell, cell.FinancialSalesRow().RowNr() ); |
| | |
| | | periodtime := dayperiodtime.StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | // info( '-------------------------', column.Name() ); |
| | | quantity := [Number]psdip.Quantity();//åèäºå
¥ |
| | | |
| | |
| | | dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | periodtime := dayperiodtime.StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | quantity := [Number]pispip.NewSupplyQuantity();//åèäºå
¥ |
| | | |
| | | factoryrow.Initialize( column, quantity );//åTotal Demandåæ®µæææ±æ»éæ±æ°é |
| | |
| | | ccsvaluecumulant := [Real]0; |
| | | |
| | | traverse( table, FinancialWeeklyColumn, column ){ |
| | | productioncolumn := selectobject( productiontable, FinancialProductionColumn, pcolumn, pcolumn.Name() = column.Name() and pcolumn.Period() = column.Period() and not pcolumn.IsDay() ); |
| | | salescolumn := selectobject( salestable, FinancialSalesColumn, scolumn, scolumn.Name() = column.Name() and scolumn.Period() = column.Period() and not scolumn.IsDay() ); |
| | | productioncolumn := selectobject( productiontable, FinancialProductionColumn, pcolumn, pcolumn.Name() = column.Name() and pcolumn.Period() = column.Period() ); |
| | | salescolumn := selectobject( salestable, FinancialSalesColumn, scolumn, scolumn.Name() = column.Name() and scolumn.Period() = column.Period() ); |
| | | |
| | | //äº§éæ±æ» |
| | | dlpvalue := [Real]0; |
| | |
| | | if( iscustomdemand ){//å
¨å¹´æ¥åº¦éæ±/客æ·éæ± |
| | | CustomerDemandPPAIDS::GenerateData( this, macroplan, executor ); |
| | | } |
| | | if( isofflineplan ){//å产线ä¸çº¿è®¡å |
| | | // OfflinePlanArchiveVersion::RefreshData( this, macroplan, archive ); |
| | | if ( isofflineplan ) { // å产线ä¸çº¿è®¡å |
| | | InterfaceDataset::PushOfflinePlanData( macroplan, this, executor ); |
| | | } |
| | | if( isshiftplan ){//çæ¬¡è®¡å |
| | | DispatchShiftPlan::Dispatch(this, macroplan,executor ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod PushOfflinePlanData ( |
| | | const MacroPlan macroPlan, |
| | | InterfaceDataset interfaceDataset, |
| | | String executor |
| | | ) |
| | | { |
| | | Description: 'åéä¸çº¿è®¡åæ°æ®æ¥å£' |
| | | TextBody: |
| | | [* |
| | | table := selectobject( interfaceDataset, OfflinePlanArchiveVersion, version, not version.IsShow() ); |
| | | |
| | | totalRow := 0; |
| | | interfaceTime := DateTime::ActualTime().Format( "Y-M2-D2 H2:m:s" ); |
| | | |
| | | jsonarray := JSON::Array(); |
| | | |
| | | traverse ( table, Row, r ){ |
| | | traverse ( table, Column, c, c.TimeUnit() = Translations::MP_GlobalParameters_Day() ) { |
| | | cell := select( r, Cell, tempC, tempC.Column() = c ); |
| | | |
| | | if ( not isnull( cell ) ) { |
| | | idsjson := JSON::Object().Add( "product", r.ProductID() ) |
| | | .Add( "planningDate", c.StartDate().Format( 'Y-M2-D2' ) ) |
| | | .Add( "planningQty", cell.Quantity() ) |
| | | .Add( "versionName", macroPlan.ScenarioName() ) |
| | | .Add( "factoryName", ifexpr( r.Unit().Regex( "CC" ), "é¿æ¥å·¥å", "大è¿å·¥å" ) ) |
| | | .Add( "fac", ifexpr( r.Unit().Regex( "CC" ), "CC", "DL" ) ) |
| | | .Add( "interfaceTime", interfaceTime ).Build(); |
| | | jsonarray.Add( idsjson ); |
| | | totalRow++; |
| | | } |
| | | } |
| | | } |
| | | |
| | | requestbody := jsonarray.Build().AsString(); |
| | | |
| | | //info( requestbody ); |
| | | |
| | | loginfo := interfaceDataset.InterfaceLoginfo( relnew, |
| | | ExecuteUser := executor, |
| | | Name := "Offline plan data", |
| | | InterfaceDateTime := DateTime::ActualTime(), |
| | | Message := "ä¸çº¿è®¡åæ°æ®", |
| | | RequestBody := requestbody, |
| | | TotalRow := totalRow ); |
| | | |
| | | InterfaceLoginfo::CallInterfaceForDataCenter_OfflinePlan( interfaceDataset, loginfo ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CallInterfaceForDataCenter_OfflinePlan ( |
| | | InterfaceDataset owner, |
| | | InterfaceLoginfo loginfo |
| | | ) |
| | | { |
| | | Description: 'è°ç¨æ°æ®ä¸å°æ¥å£ãä¸çº¿è®¡åã' |
| | | TextBody: |
| | | [* |
| | | address := Translations::InterfaceDataset_DataCenter_Address(); |
| | | |
| | | httpinterface := HTTPInterface::Create( address,80 ); |
| | | |
| | | httpinterface.PostMethod( true ); |
| | | httpinterface.URL( "/api/production-planning/saveList" ); |
| | | httpinterface.MediaType( Translations::InterfaceDataset_ContentType() ); |
| | | httpinterface.AddHeader( "clientId", Translations::InterfaceDataset_DataCenter_ClientId() ); |
| | | httpinterface.AddHeader( "clientSecret", Translations::InterfaceDataset_DataCenter_ClientSecret() ); |
| | | |
| | | try { |
| | | httpinterface.Call( loginfo.RequestBody() ); |
| | | |
| | | result := httpinterface.Result(); |
| | | |
| | | loginfo.Response( result ); |
| | | loginfo.Success( true ); |
| | | } onerror { |
| | | loginfo.ReturnMsg( e.GeneralInformation() ); |
| | | } |
| | | |
| | | // åç»å
Œ
±å¤ç |
| | | loginfo.FinishTime( DateTime::ActualTime() ); |
| | | |
| | | if ( loginfo.Success() ) { |
| | | resultJson := JSON::Parse( loginfo.Response() ); |
| | | code := resultJson.Get( "code" ).GetNumber(); |
| | | msg := resultJson.Get( "message" ).GetString(); |
| | | |
| | | loginfo.ReturnMsg( msg ); |
| | | |
| | | if ( code = 200 ) { |
| | | loginfo.ReturnSuccess( true ); |
| | | loginfo.UpdateLast(); |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpateEstimatedTotalCost |
| | | { |
| | | #keys: '3[413988.1.99460691][413988.1.99460690][413988.1.99460692]' |
| | | Description: 'é¢è®¡æ»è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateBufferPaperCost |
| | | { |
| | | #keys: '3[413988.1.99460214][413988.1.99460213][413988.1.99460215]' |
| | | Description: 'ç¼å²çº¸è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateCoefficient |
| | | { |
| | | #keys: '3[413988.1.99460638][413988.1.99460637][413988.1.99460639]' |
| | | Description: 'ç³»æ°æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateExternalRentalWarehouseTransportationCosts |
| | | { |
| | | #keys: '3[413988.1.99460585][413988.1.99460584][413988.1.99460586]' |
| | | Description: 'å¤ç§åºè¿è¾è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateOutboundExpensesForRentedWarehouses |
| | | { |
| | | #keys: '3[413988.1.99460479][413988.1.99460478][413988.1.99460480]' |
| | | Description: 'å¤ç§åºåºåºè´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdatePackingCharges |
| | | { |
| | | #keys: '3[413988.1.99360501][413988.1.99360500][413988.1.99360502]' |
| | | Description: 'å
è£
è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateQuantityOfWoodenCrates |
| | | { |
| | | #keys: '3[413988.1.99460320][413988.1.99460319][413988.1.99460321]' |
| | | Description: 'æ¨ç®±æ°éæ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateRentalWarehouseStorageFees |
| | | { |
| | | #keys: '3[413988.1.99460532][413988.1.99460531][413988.1.99460533]' |
| | | Description: 'å¤ç§åºä»å¨è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateStorageFeesForRentedWarehouses |
| | | { |
| | | #keys: '3[413988.1.99460426][413988.1.99460425][413988.1.99460427]' |
| | | Description: 'å¤ç§åºå
¥åºè´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateTotalCost |
| | | { |
| | | #keys: '3[413988.1.99460744][413988.1.99460743][413988.1.99460745]' |
| | | Description: 'æ»è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateTransferCost |
| | | { |
| | | #keys: '3[413988.1.99460373][413988.1.99460372][413988.1.99460374]' |
| | | Description: 'è°æ¨è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateUnpackingCost |
| | | { |
| | | #keys: '3[413988.1.99360582][413988.1.99360581][413988.1.99360583]' |
| | | Description: 'æå
è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsUpdateWoodenCrateCost |
| | | { |
| | | #keys: '3[413988.1.99460267][413988.1.99460266][413988.1.99460268]' |
| | | Description: 'æ¨ç®±è´¹ç¨æ´æ°å¼' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SetCellValue ( |
| | | Real quantityOfWoodenCrates |
| | | ) |
| | | { |
| | | Description: 'æ´æ°åå
æ ¼å¼' |
| | | TextBody: |
| | | [* |
| | | // 设置æ¨ç®±æ°é |
| | | this.QuantityOfWoodenCrates( quantityOfWoodenCrates ); |
| | | |
| | | // ç©ºææ¶æ°éèå¨ |
| | | this.WoodenCrateCost( [Number] ( quantityOfWoodenCrates * this.WoodenCratePriceReal() ) ); |
| | | |
| | | // SUMè¡èå¨ |
| | | cell := select( this, MachineLogisticsCostReportColumn.MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() = "SUM" ); |
| | | cell.QuantityOfWoodenCrates( sum( this, MachineLogisticsCostReportColumn.MachineLogisticsCostReportCell, |
| | | tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = this.MachineLogisticsCostReportRow().Factory(), |
| | | tempMLCRCell.QuantityOfWoodenCrates() ) ); |
| | | cell.WoodenCrateCost( sum( this, MachineLogisticsCostReportColumn.MachineLogisticsCostReportCell, tempMLCRCell, |
| | | tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = this.MachineLogisticsCostReportRow().Factory(), |
| | | tempMLCRCell.WoodenCrateCost() ) ); |
| | | |
| | | // SUMåèå¨ |
| | | cell := select( this, MachineLogisticsCostReportRow.MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportColumn().DisplayName() = "SUM" ); |
| | | cell.QuantityOfWoodenCrates( sum( this, MachineLogisticsCostReportRow.MachineLogisticsCostReportCell, tempMLCRCell, |
| | | not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), |
| | | tempMLCRCell.QuantityOfWoodenCrates() ) ); |
| | | cell.WoodenCrateCost( sum( this, MachineLogisticsCostReportRow.MachineLogisticsCostReportCell, tempMLCRCell, |
| | | not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), |
| | | tempMLCRCell.WoodenCrateCost() ) ); |
| | | *] |
| | | } |
| | |
| | | exists( tempPMP, AllParent.AsParent, tempPMP1, tempPMP1.ID() = "æºå ä»¶" ), |
| | | tempPMP.ParentID() ); |
| | | traverse ( categories, Elements, c ) { |
| | | macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "大è¿å·¥å", Category := c ); |
| | | macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "é¿æ¥å·¥å", Category := c ); |
| | | macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "大è¿å·¥å", Category := c, Index := 0 ); |
| | | macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "é¿æ¥å·¥å", Category := c, Index := 0 ); |
| | | } |
| | | |
| | | // å建å |
| | |
| | | tempPPC.PackagingPlanColumn().StartDate().Year() = mlcrc.StartDate().Year() and |
| | | tempPPC.PackagingPlanColumn().StartDate().Month() = mlcrc.StartDate().Month(), |
| | | tempPPC.Package() ); |
| | | cell.PackingCharges( packageQuantity * guard( lcm.PackagePrice(), 1 ) ); |
| | | cell.PackingCharges( [Number] ( packageQuantity * guard( lcm.PackagePrice(), 1 ) ) ); |
| | | |
| | | // 设置æå
è´¹ç¨ï¼æå
é * æå
åä»·ï¼ |
| | | unpackingQuantity := sum( macroPlan, PackagingPlanRow.PackagingPlanCell, tempPPC, |
| | |
| | | tempPPC.PackagingPlanColumn().StartDate().Year() = mlcrc.StartDate().Year() and |
| | | tempPPC.PackagingPlanColumn().StartDate().Month() = mlcrc.StartDate().Month(), |
| | | tempPPC.Unpacking() ); |
| | | cell.UnpackingCost( unpackingQuantity * guard( lcm.UnpackingPrice(), 1 ) ); |
| | | cell.UnpackingCost( [Number] ( unpackingQuantity * guard( lcm.UnpackingPrice(), 1 ) ) ); |
| | | |
| | | // 设置ç¼å²çº¸è´¹ç¨ï¼å
è£
ç±» * ç¼å²çº¸åä»·ï¼ |
| | | cell.BufferPaperCost( packageQuantity * guard( lcm.BufferPaperPrice(), 1 ) ); |
| | | cell.BufferPaperCost( [Number] ( packageQuantity * guard( lcm.BufferPaperPrice(), 1 ) ) ); |
| | | |
| | | // 设置æ¨ç®±åä»· |
| | | cell.WoodenCratePriceReal( guard( lcm.WoodenCratePrice(), 1 ) ); |
| | |
| | | cell.TransferCost( [Number] ( ceil( ceil( transferQuantity / guard( lcm.PackagingCapacity(), 1 ) ) / guard( lct1.LoadingCapacity(), 1 ) ) * guard( lct1.TransportPrice(), 1 ) ) ); |
| | | |
| | | // å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé[å
è£
é] / å
è£
容é * å
¥åºåä»·ï¼ |
| | | cell.StorageFeesForRentedWarehouses( packageQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.WarehousingPrice(), 1 ) ); |
| | | cell.StorageFeesForRentedWarehouses( [Number] ( packageQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.WarehousingPrice(), 1 ) ) ); |
| | | |
| | | // å¤ç§åºåºåºè´¹ç¨ï¼åºåºé[æå
é] / å
è£
容é * åºåºåä»·ï¼ |
| | | cell.OutboundExpensesForRentedWarehouses( unpackingQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.OutboundPrice(), 1 ) ); |
| | | cell.OutboundExpensesForRentedWarehouses( [Number] ( unpackingQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.OutboundPrice(), 1 ) ) ); |
| | | |
| | | // å¤ç§åºè¿è¾è´¹ç¨ï¼è¿è¾æ°é / å
è£
容é / è£
载容é * è¿è¾åä»·ï¼ |
| | | transportationQuantity := sum( macroPlan, Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT, |
| | |
| | | tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() = ifexpr( mlcrr.Factory() = "大è¿å·¥å", "DL", "CC" ) + " " + mlcrr.Category() + "线边åº", |
| | | tempPIT.Quantity() |
| | | ); |
| | | cell.ExternalRentalWarehouseTransportationCosts( transportationQuantity / guard( lcm.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ); |
| | | cell.ExternalRentalWarehouseTransportationCosts( [Number] ( transportationQuantity / guard( lcm.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ) ); |
| | | |
| | | // å¤ç§åºä»å¨è´¹ç¨ï¼ä»å¨æ°é/å
è£
容é*ä»å¨åä»· |
| | | plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP, |
| | |
| | | tempPISPIP.End().Date() <= lastDayOfThisMonth and |
| | | tempPISPIP.ProductInStockingPoint_MP().StockingPointID() = ifexpr( mlcrr.Factory() = "大è¿å·¥å", "DL", "CC" ) + " " + mlcrr.Category() + "å¤ç§åº", |
| | | tempPISPIP.PlannedInventoryLevelEnd() ); |
| | | cell.RentalWarehouseStorageFees( plannedInventory / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.StoragePrice(), 1 ) ); |
| | | cell.RentalWarehouseStorageFees( [Number] ( plannedInventory / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.StoragePrice(), 1 ) ) ); |
| | | |
| | | |
| | | |
| | |
| | | cell.Coefficient( 1.05 ); |
| | | |
| | | // æ»è´¹ç¨ |
| | | cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() ); |
| | | cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) ); |
| | | |
| | | cell.MachineLogisticsCostReportColumn( relset, mlcrc ); |
| | | } |
| | | } |
| | | |
| | | // å建SUMè¡ |
| | | sumR := macroPlan.MachineLogisticsCostReportRow( relnew, Category := "SUM", Factory := "大è¿å·¥å", Index := 2 ); |
| | | traverse ( macroPlan, MachineLogisticsCostReportColumn, mlcrc ) { |
| | | cell := sumR.MachineLogisticsCostReportCell( relnew ); |
| | | cell.MachineLogisticsCostReportColumn( relset, mlcrc ); |
| | | |
| | | cell.PackingCharges( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.PackingCharges() ) ); |
| | | cell.UnpackingCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.UnpackingCost() ) ); |
| | | cell.BufferPaperCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.BufferPaperCost() ) ); |
| | | cell.QuantityOfWoodenCrates( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.QuantityOfWoodenCrates() ) ); |
| | | cell.WoodenCrateCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.WoodenCrateCost() ) ); |
| | | cell.TransferCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TransferCost() ) ); |
| | | cell.StorageFeesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.StorageFeesForRentedWarehouses() ) ); |
| | | cell.OutboundExpensesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) ); |
| | | cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) ); |
| | | cell.RentalWarehouseStorageFees( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.RentalWarehouseStorageFees() ) ); |
| | | cell.EstimatedTotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.EstimatedTotalCost() ) ); |
| | | cell.Coefficient( 1.05 ); |
| | | cell.TotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TotalCost() ) ); |
| | | } |
| | | |
| | | // å建SUMè¡ |
| | | sumR := macroPlan.MachineLogisticsCostReportRow( relnew, Category := "SUM", Factory := "é¿æ¥å·¥å", Index := 2 ); |
| | | traverse ( macroPlan, MachineLogisticsCostReportColumn, mlcrc ) { |
| | | cell := sumR.MachineLogisticsCostReportCell( relnew ); |
| | | cell.MachineLogisticsCostReportColumn( relset, mlcrc ); |
| | | |
| | | cell.PackingCharges( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.PackingCharges() ) ); |
| | | cell.UnpackingCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.UnpackingCost() ) ); |
| | | cell.BufferPaperCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.BufferPaperCost() ) ); |
| | | cell.QuantityOfWoodenCrates( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.QuantityOfWoodenCrates() ) ); |
| | | cell.WoodenCrateCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.WoodenCrateCost() ) ); |
| | | cell.TransferCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TransferCost() ) ); |
| | | cell.StorageFeesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.StorageFeesForRentedWarehouses() ) ); |
| | | cell.OutboundExpensesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) ); |
| | | cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) ); |
| | | cell.RentalWarehouseStorageFees( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.RentalWarehouseStorageFees() ) ); |
| | | cell.EstimatedTotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.EstimatedTotalCost() ) ); |
| | | cell.Coefficient( 1.05 ); |
| | | cell.TotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TotalCost() ) ); |
| | | } |
| | | |
| | | // å建SUMå |
| | | sumC := macroPlan.MachineLogisticsCostReportColumn( relnew, StartDate := Date::MaxDate() ); |
| | | traverse ( macroPlan, MachineLogisticsCostReportRow, mlcrr ) { |
| | | cell := mlcrr.MachineLogisticsCostReportCell( relnew ); |
| | | cell.MachineLogisticsCostReportColumn( relset, sumC ); |
| | | |
| | | cell.PackingCharges( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.PackingCharges() ) ); |
| | | cell.UnpackingCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.UnpackingCost() ) ); |
| | | cell.BufferPaperCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.BufferPaperCost() ) ); |
| | | cell.QuantityOfWoodenCrates( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.QuantityOfWoodenCrates() ) ); |
| | | cell.WoodenCrateCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.WoodenCrateCost() ) ); |
| | | cell.TransferCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.TransferCost() ) ); |
| | | cell.StorageFeesForRentedWarehouses( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.StorageFeesForRentedWarehouses() ) ); |
| | | cell.OutboundExpensesForRentedWarehouses( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) ); |
| | | cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) ); |
| | | cell.RentalWarehouseStorageFees( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.RentalWarehouseStorageFees() ) ); |
| | | cell.EstimatedTotalCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.EstimatedTotalCost() ) ); |
| | | cell.Coefficient( 1.05 ); |
| | | cell.TotalCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.TotalCost() ) ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | MacroPlan macroPlan, |
| | | MachineLogisticsCostReportRows mlcrrs |
| | | ) |
| | | ) as BinaryValue |
| | | { |
| | | TextBody: |
| | | [* |
| | | xmlDOMI := XMLDOMImplementation::Create(); |
| | | xmlDOM := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>Sheet1</name></table>' ); |
| | | |
| | | tableElement := xmlDOM.GetElementByTagName( "table", 0 ); |
| | | |
| | | // 第ä¸åï¼åç§°ï¼ |
| | | mlcrrs := selectsortedset( mlcrrs, Elements, tempMLCRR, true, tempMLCRR.Index(), tempMLCRR.Category() ); |
| | | firstColumn := xmlDOM.CreateElement( "column" ); |
| | | firstName := xmlDOM.CreateElement( "name" ); |
| | | firstType := xmlDOM.CreateElement( "type" ); |
| | | firstName.TextContent( "*" ); |
| | | firstType.TextContent( "String" ); |
| | | firstColumn.AppendChild( firstName ); |
| | | firstColumn.AppendChild( firstType ); |
| | | traverse ( mlcrrs, Elements, mlcrr ) { |
| | | firstCell := xmlDOM.CreateElement( "cell" ); |
| | | firstCell.SetAttribute( "value", mlcrr.Category() ); |
| | | firstColumn.AppendChild( firstCell ); |
| | | |
| | | for ( i := 0; i < 12; i++ ) { |
| | | firstCell := xmlDOM.CreateElement( "cell" ); |
| | | firstCell.SetAttribute( "value", "" ); |
| | | firstColumn.AppendChild( firstCell ); |
| | | } |
| | | } |
| | | tableElement.AppendChild( firstColumn ); |
| | | |
| | | |
| | | // 第äºå |
| | | attrs := construct( Strings ); attrs.Add( "å
è£
è´¹ç¨" ); attrs.Add( "æå
è´¹ç¨" ); attrs.Add( "ç¼å²çº¸è´¹ç¨" ); attrs.Add( "æ¨ç®±æ°é" ); attrs.Add( "æ¨ç®±è´¹ç¨" ); |
| | | attrs.Add( "è°æ¨è´¹ç¨" ); attrs.Add( "å¤ç§åºå
¥åºè´¹ç¨" ); attrs.Add( "å¤ç§åºåºåºè´¹ç¨" ); attrs.Add( "å¤ç§åºè¿è¾è´¹ç¨" ); attrs.Add( "å¤ç§åºä»å¨è´¹ç¨" ); |
| | | attrs.Add( "é¢è®¡æ»è´¹ç¨" ); attrs.Add( "ç³»æ°" ); attrs.Add( "æ»è´¹ç¨" ); |
| | | secondColumn := xmlDOM.CreateElement( "column" ); |
| | | secondName := xmlDOM.CreateElement( "name" ); |
| | | secondType := xmlDOM.CreateElement( "type" ); |
| | | secondName.TextContent( "*" ); |
| | | secondType.TextContent( "String" ); |
| | | secondColumn.AppendChild( secondName ); |
| | | secondColumn.AppendChild( secondType ); |
| | | for ( i := 0; i < mlcrrs.Size(); i++ ) { |
| | | traverse ( attrs, Elements, attr ) { |
| | | secondCell := xmlDOM.CreateElement( "cell" ); |
| | | secondCell.SetAttribute( "value", attr ); |
| | | secondColumn.AppendChild( secondCell ); |
| | | } |
| | | } |
| | | tableElement.AppendChild( secondColumn ); |
| | | |
| | | // æ¶é´å |
| | | mlcrcs := selectsortedset( macroPlan, MachineLogisticsCostReportColumn, tempMLCRC, true, tempMLCRC.StartDate() ); |
| | | traverse ( mlcrcs, Elements, mlcrc ) { |
| | | cellColumn := xmlDOM.CreateElement( "column" ); |
| | | cellName := xmlDOM.CreateElement( "name" ); |
| | | cellType := xmlDOM.CreateElement( "type" ); |
| | | cellName.TextContent( mlcrc.DisplayName() ); |
| | | cellType.TextContent( "Real" ); |
| | | cellColumn.AppendChild( cellName ); |
| | | cellColumn.AppendChild( cellType ); |
| | | cells := selectsortedset( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, |
| | | exists( mlcrrs, Elements, tempMLCRR, tempMLCRR = tempMLCRCell.MachineLogisticsCostReportRow() ), |
| | | tempMLCRCell.MachineLogisticsCostReportRow().Index(), tempMLCRCell.MachineLogisticsCostReportRow().Category() ); |
| | | traverse ( cells, Elements, c ) { |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.PackingCharges().Round( 0 ) ); // å
è£
è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.UnpackingCost().Round( 0 ) ); // æå
è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.BufferPaperCost().Round( 0 ) ); // ç¼å²çº¸è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.QuantityOfWoodenCrates().Round( 0 ) ); // æ¨ç®±æ°é |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.WoodenCrateCost().Round( 0 ) ); // æ¨ç®±è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.TransferCost().Round( 0 ) ); // è°æ¨è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses().Round( 0 ) ); // å¤ç§åºå
¥åºè´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses().Round( 0 ) ); // å¤ç§åºåºåºè´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts().Round( 0 ) ); // å¤ç§åºè¿è¾è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees().Round( 0 ) ); // å¤ç§åºä»å¨è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.EstimatedTotalCost().Round( 0 ) ); // é¢è®¡æ»è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.Coefficient().Round( 2 ) ); // ç³»æ° |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.TotalCost().Round( 0 ) ); // æ»è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | } |
| | | tableElement.AppendChild( cellColumn ); |
| | | } |
| | | |
| | | xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM ) |
| | | |
| | | //info( xmlString ); |
| | | |
| | | tableGroupHandle := TableGroupHandle::Create( "Sheet1" ); |
| | | 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 Import ( |
| | | MacroPlan macroPlan, |
| | | GeneralExcelImportAndExportDataTable table |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | isUpdateFlag := ""; |
| | | attributeUpdateFlag := ""; |
| | | |
| | | factory := table.GeneralExcelImportAndExportDataSource().Name().Tokenize( "_" ).Element( 0 ); |
| | | if ( not ( factory = "大è¿å·¥å" or factory = "é¿æ¥å·¥å" ) ) { |
| | | error( "æä»¶åé误" ); |
| | | } |
| | | |
| | | traverse ( table, GeneralExcelImportAndExportDataRow, row ) { |
| | | traverse ( table, GeneralExcelImportAndExportDataColumn, column ) { |
| | | // åå
æ ¼å¼ |
| | | cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value(); |
| | | // æºå ç©æµææ¬æ¥è¡¨å |
| | | mlcrc := select( macroPlan, MachineLogisticsCostReportColumn, tempMLCRC, tempMLCRC.DisplayName() = column.Name() ); |
| | | cell := select( macroPlan, MachineLogisticsCostReportRow.MachineLogisticsCostReportCell, tempMLCRCell, |
| | | tempMLCRCell.MachineLogisticsCostReportRow().Category() = "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = factory |
| | | and tempMLCRCell.MachineLogisticsCostReportColumn() = mlcrc ); |
| | | |
| | | if ( column.ColumnIndex() = 0 and cellValue <> "" ) { |
| | | isUpdateFlag := cellValue; |
| | | } |
| | | |
| | | if ( column.ColumnIndex() = 1 and cellValue <> "" ) { |
| | | attributeUpdateFlag := cellValue; |
| | | } |
| | | |
| | | if ( isUpdateFlag = "SUM" ) { |
| | | if ( attributeUpdateFlag = "å
è£
è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdatePackingCharges() and cell.PackingCharges() <> [Real]cellValue ) { |
| | | cell.IsUpdatePackingCharges( true ); |
| | | } |
| | | cell.PackingCharges( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "æå
è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateUnpackingCost() and cell.UnpackingCost() <> [Real]cellValue ) { |
| | | cell.IsUpdateUnpackingCost( true ); |
| | | } |
| | | cell.UnpackingCost( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "ç¼å²çº¸è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateBufferPaperCost() and cell.BufferPaperCost() <> [Real]cellValue ) { |
| | | cell.IsUpdateBufferPaperCost( true ); |
| | | } |
| | | cell.BufferPaperCost( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "æ¨ç®±æ°é" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateQuantityOfWoodenCrates() and cell.QuantityOfWoodenCrates() <> [Real]cellValue ) { |
| | | cell.IsUpdateQuantityOfWoodenCrates( true ); |
| | | } |
| | | cell.QuantityOfWoodenCrates( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "æ¨ç®±è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateWoodenCrateCost() and cell.WoodenCrateCost() <> [Real]cellValue ) { |
| | | cell.IsUpdateWoodenCrateCost( true ); |
| | | } |
| | | cell.WoodenCrateCost( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "è°æ¨è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateTransferCost() and cell.TransferCost() <> [Real]cellValue ) { |
| | | cell.IsUpdateTransferCost( true ); |
| | | } |
| | | cell.TransferCost( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "å¤ç§åºå
¥åºè´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateStorageFeesForRentedWarehouses() and cell.StorageFeesForRentedWarehouses() <> [Real]cellValue ) { |
| | | cell.IsUpdateStorageFeesForRentedWarehouses( true ); |
| | | } |
| | | cell.StorageFeesForRentedWarehouses( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "å¤ç§åºåºåºè´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateOutboundExpensesForRentedWarehouses() and cell.OutboundExpensesForRentedWarehouses() <> [Real]cellValue ) { |
| | | cell.IsUpdateOutboundExpensesForRentedWarehouses( true ); |
| | | } |
| | | cell.OutboundExpensesForRentedWarehouses( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "å¤ç§åºè¿è¾è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateExternalRentalWarehouseTransportationCosts() and cell.ExternalRentalWarehouseTransportationCosts() <> [Real]cellValue ) { |
| | | cell.IsUpdateExternalRentalWarehouseTransportationCosts( true ); |
| | | } |
| | | cell.ExternalRentalWarehouseTransportationCosts( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "å¤ç§åºä»å¨è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateRentalWarehouseStorageFees() and cell.RentalWarehouseStorageFees() <> [Real]cellValue ) { |
| | | cell.IsUpdateRentalWarehouseStorageFees( true ); |
| | | } |
| | | cell.RentalWarehouseStorageFees( [Real]cellValue ); |
| | | }else if ( attributeUpdateFlag = "é¢è®¡æ»è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpateEstimatedTotalCost() and cell.EstimatedTotalCost() <> [Real]cellValue ) { |
| | | cell.IsUpateEstimatedTotalCost( true ); |
| | | } |
| | | cell.EstimatedTotalCost( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "ç³»æ°" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateCoefficient() and cell.Coefficient() <> [Real]cellValue ) { |
| | | cell.IsUpdateCoefficient( true ); |
| | | } |
| | | cell.Coefficient( [Real]cellValue ); |
| | | } else if ( attributeUpdateFlag = "æ»è´¹ç¨" and not isnull( cell ) ) { |
| | | if ( not cell.IsUpdateTotalCost() and cell.TotalCost() <> [Real]cellValue ) { |
| | | cell.IsUpdateTotalCost( true ); |
| | | } |
| | | cell.TotalCost( [Real]cellValue ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute DisplayName |
| | | { |
| | | #keys: '3[413988.1.100804848][413988.1.100804847][413988.1.100804849]' |
| | | Description: 'åæ¾ç¤º' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: DisplayName |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcDisplayName |
| | | { |
| | | TextBody: |
| | | [* |
| | | value := ifexpr( this.StartDate().IsMaxInfinity(), "SUM", this.StartDate().Format( "Y-M2-D2" ) ); |
| | | |
| | | this.DisplayName( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Index |
| | | { |
| | | #keys: '3[413988.1.100900359][413988.1.100900358][413988.1.100900360]' |
| | | Description: 'æåºç´¢å¼' |
| | | ValueType: Number |
| | | } |
| | |
| | | |
| | | if( isnull( row ) ){ |
| | | product := selectobject( noprow.NewOfflinePlanTable().MacroPlan(), Product_MP, product, product.ID() = noprow.ProductID() ); |
| | | unit := ifexpr( noprow.ProductionLine().FindString( "CC", 0 ) > -1, FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() ); |
| | | row := this.Row( relnew, Name := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit |
| | | , ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell(); |
| | | if( not isnull( product ) ){ |
| | | unit := ifexpr( noprow.ProductionLine().FindString( "CC", 0 ) > -1, FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() ); |
| | | row := this.Row( relnew, Name := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit |
| | | , ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell(); |
| | | } |
| | | } |
| | | |
| | | return row; |
| | |
| | | } |
| | | traverse( noptable, NewOfflinePlanRow, noprow ){ |
| | | row := table.GetRow( noprow ); |
| | | traverse( noprow, NewOfflinePlanCell, nopcell ){ |
| | | column := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | actproductionKey := noprow.ProductID() + column.StartDate().AsQUILL(); |
| | | actproductionhandle:= actproductiontree.GetHandle( actproductionKey ); |
| | | actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue )); |
| | | |
| | | actproductionqty := 0.0; |
| | | if( not isnull( actproductionindex )){ |
| | | actproduction := actproductiondatas.Element( actproductionindex.GetValueAsNumber() ); |
| | | actproductionqty := actproduction.ActualOut(); |
| | | if( not isnull( row ) ){ |
| | | traverse( noprow, NewOfflinePlanCell, nopcell ){ |
| | | column := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | actproductionKey := noprow.ProductID() + column.StartDate().AsQUILL(); |
| | | actproductionhandle:= actproductiontree.GetHandle( actproductionKey ); |
| | | actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue )); |
| | | |
| | | actproductionqty := 0.0; |
| | | if( not isnull( actproductionindex )){ |
| | | actproduction := actproductiondatas.Element( actproductionindex.GetValueAsNumber() ); |
| | | actproductionqty := actproduction.ActualOut(); |
| | | } |
| | | cell.ActualProductionQty( actproductionqty ); |
| | | cell.InventoryWeight( nopcell.InventoryWeight() ); |
| | | // cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() ); |
| | | cell.Quantity( nopcell.Quantity() ); |
| | | // cell.Shift( nopcell.Shift() ); |
| | | // cell.Value( nopcell.Value() ); |
| | | } |
| | | cell.ActualProductionQty( actproductionqty ); |
| | | cell.InventoryWeight( nopcell.InventoryWeight() ); |
| | | // cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() ); |
| | | cell.Quantity( nopcell.Quantity() ); |
| | | // cell.Shift( nopcell.Shift() ); |
| | | // cell.Value( nopcell.Value() ); |
| | | } |
| | | } |
| | | showtable.Generate( search ); |
| | |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConditionBody: 'object.IsAllCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | |
| | | { |
| | | AttributeKey: '[415136.0.1188511346]' |
| | | Synonym: 'ç³»æ°' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsCoefficientUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation EstimateTotalCost |
| | | { |
| | | AttributeKey: '[415136.0.1160240036]' |
| | | Synonym: 'é¢è®¡æ»è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsEstimateTotalCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation RentInCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164662]' |
| | | Synonym: 'å¤ç§åºå
¥åºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsRentInCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation RentOutOfCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164672]' |
| | | Synonym: 'å¤ç§åºåºåºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsRentOutOfCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation RentStorCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164707]' |
| | | Synonym: 'å¤ç§åºä»å¨è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsRentStorCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation WerkToRentTransCost |
| | | { |
| | | AttributeKey: '[415136.0.1160240024]' |
| | | Synonym: 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsWerkToRentTransCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | RelationRepresentation Column { RelationKey: '[415136.0.986881392]' Visibility: 'Normal' } |
| | | } |
| | |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsUpdate()' |
| | | ConditionBody: 'object.IsAllCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | |
| | | { |
| | | AttributeKey: '[415136.0.1160164734]' |
| | | Synonym: 'é¿æ¥é¿éè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsCCLongTransCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CCRentInCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164742]' |
| | | Synonym: 'é¿æ¥å¤ç§åºå
¥åºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsCCRentInCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CCRentOutOfCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164750]' |
| | | Synonym: 'é¿æ¥å¤ç§åºåºåºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsCCRentOutOfCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CCRentStorCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164771]' |
| | | Synonym: 'é¿æ¥å¤ç§åºä»å¨è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsCCRentStorCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CCShorTransCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164779]' |
| | | Synonym: 'é¿æ¥çéè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsCCShorTransCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation CoefficientValue |
| | | { |
| | | AttributeKey: '[415136.0.1188511355]' |
| | | Synonym: 'ç³»æ°' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsCoefficientUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation DLRentInCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164787]' |
| | | Synonym: '大è¿å¤ç§åºå
¥åºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsDLRentInCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation DLRentOtherCost |
| | | { |
| | | AttributeKey: '[415136.0.1184074681]' |
| | | Synonym: '大è¿å¤ç§åºå
¶ä»è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsDLRentOtherCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation DLRentOutOfCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164795]' |
| | | Synonym: '大è¿å¤ç§åºåºåºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsDLRentOutOfCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation DLRentStorCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164806]' |
| | | Synonym: '大è¿å¤ç§åºä»å¨è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsDLRentStorCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation EstimateTotalCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164814]' |
| | | Synonym: 'é¢è®¡æ»è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsEstimateTotalCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation WerkToDLRentTransCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164822]' |
| | | Synonym: 'åå
å°å¤ç§åºè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF6666' |
| | | ConditionBody: 'object.IsWerkToDLRentTransCostUpdate()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | RelationRepresentation Column { RelationKey: '[415136.0.992900194]' Visibility: 'Normal' } |
| | | } |
| | |
| | | { |
| | | AttributeKey: '[413988.0.1462991459]' |
| | | Synonym: 'ç¼å²çº¸è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateBufferPaperCost()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation Coefficient |
| | | { |
| | |
| | | Synonym: 'ç³»æ°' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateCoefficient()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | DataRepresentation.Default |
| | | { |
| | |
| | | { |
| | | AttributeKey: '[413988.0.1462991539]' |
| | | Synonym: 'é¢è®¡æ»è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpateEstimatedTotalCost()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation ExternalRentalWarehouseTransportationCosts |
| | | { |
| | | AttributeKey: '[413988.0.1462991519]' |
| | | Synonym: 'å¤ç§åºè¿è¾è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateExternalRentalWarehouseTransportationCosts()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation OutboundExpensesForRentedWarehouses |
| | | { |
| | | AttributeKey: '[413988.0.1462991509]' |
| | | Synonym: 'å¤ç§åºåºåºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateOutboundExpensesForRentedWarehouses()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation PackingCharges |
| | | { |
| | | AttributeKey: '[413988.0.1462991439]' |
| | | Synonym: 'å
è£
è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdatePackingCharges()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation QuantityOfWoodenCrates |
| | | { |
| | | AttributeKey: '[413988.0.1462991469]' |
| | | Synonym: 'æ¨ç®±æ°é' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateQuantityOfWoodenCrates()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation RentalWarehouseStorageFees |
| | | { |
| | | AttributeKey: '[413988.0.1462991529]' |
| | | Synonym: 'å¤ç§åºä»å¨è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateRentalWarehouseStorageFees()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation StorageFeesForRentedWarehouses |
| | | { |
| | | AttributeKey: '[413988.0.1462991499]' |
| | | Synonym: 'å¤ç§åºå
¥åºè´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateStorageFeesForRentedWarehouses()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation TotalCost |
| | | { |
| | | AttributeKey: '[413988.0.1462991549]' |
| | | Synonym: 'æ»è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateTotalCost()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation TransferCost |
| | | { |
| | | AttributeKey: '[413988.0.1462991489]' |
| | | Synonym: 'è°æ¨è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateTransferCost()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation UnpackingCost |
| | | { |
| | | AttributeKey: '[413988.0.1462991449]' |
| | | Synonym: 'æå
è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateUnpackingCost()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | AttributeRepresentation WoodenCrateCost |
| | | { |
| | | AttributeKey: '[413988.0.1462991479]' |
| | | Synonym: 'æ¨ç®±è´¹ç¨' |
| | | Conditional: |
| | | [ |
| | | DataRepresentation.Conditional |
| | | { |
| | | BackgroundColor: '$FF3399' |
| | | ConditionBody: 'object.IsUpdateWoodenCrateCost()' |
| | | ConversionBody: '' |
| | | DefaultBackgroundColor: false |
| | | InheritConversion: false |
| | | } |
| | | ] |
| | | } |
| | | RelationRepresentation MachineLogisticsCostReportColumn { RelationKey: '[413988.0.1462991383]' Visibility: 'Normal' } |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Legend: 'Category' |
| | | SortCriteria: 'Category' |
| | | SortCriteria: 'Index;Category' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Legend: 'StartDate' |
| | | Legend: 'DisplayName' |
| | | SortCriteria: 'StartDate' |
| | | Taborder: 2 |
| | | ] |
| | |
| | | Properties: |
| | | [ |
| | | Image: 'EXPORT1' |
| | | Label: '导åº' |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component bImport id:bImport_438 |
| | | { |
| | | #keys: '[413988.1.109640450]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'IMPORT1' |
| | | Label: '导å
¥' |
| | | Taborder: 2 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: MatrixEditor912 |
| | | Response OnUpdateValue ( |
| | | MachineLogisticsCostReportCell cell, |
| | | Real value |
| | | ) id:Response_MatrixEditor912_OnUpdateValue |
| | | { |
| | | #keys: '[413988.1.115290697]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | cell.SetCellValue( value ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | mlcrrs := selectset( MacroPlan, MachineLogisticsCostReportRow, tempMLCRR, true ); |
| | | mlcrrs := selectset( MacroPlan, MachineLogisticsCostReportRow, tempMLCRR, tempMLCRR.Factory() = ddslFactory.Text() ); |
| | | |
| | | MachineLogisticsCostReportCell::Export( mlcrrs ); |
| | | binaryValue := MachineLogisticsCostReportCell::Export( MacroPlan, mlcrrs ); |
| | | |
| | | Application.Download( ddslFactory.Text() + "_æºå ç©æµææ¬æ¥è¡¨.xlsx", binaryValue.AsBinaryData() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: pHeader/bImport_438 |
| | | Response OnClick () id:Response_pHeader_bImport_OnClick_298 |
| | | { |
| | | #keys: '[413988.1.109640449]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return not isnull( MacroPlan ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | try { |
| | | uploadJsonString := Application.GetFile(); |
| | | if ( uploadJsonString <> "" ) { |
| | | uploadJson := JSON::Parse( uploadJsonString ); |
| | | Archive::VerifyTheFileName( uploadJson ); |
| | | |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | |
| | | webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue(); |
| | | |
| | | generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( RecycleBin, webFileBinaryData, fileName ); |
| | | generalExcelImportAndExportDataSource.ReadStructure(); |
| | | |
| | | selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" ); |
| | | |
| | | MachineLogisticsCostReportCell::Import( MacroPlan, selection ); |
| | | |
| | | // åç»å é¤ |
| | | generalExcelImportAndExportDataSource.Delete(); |
| | | |
| | | WebMessageBox::Success( Translations::A_VWED_Success() ); |
| | | } |
| | | } onerror { |
| | | WebMessageBox::Error( e.GeneralInformation() ); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormMachineLogisticsCostReport_MatrixEditor912 |
| | | { |
| | | gridColor: '#c4c4c4' |
| | | totalHeaderWidth: 200 |
| | | attributeHeaderWidthRatio: 0.6 |
| | | nameHeaderWidthRatio: 0.4 |
| | | columnWidth: 90 |
| | | horizontalGrid: true |
| | | verticalGrid: true |
| | | backendState |
| | | { |
| | | componentId: 'QMacroPlanner::FormMachineLogisticsCostReport.MatrixEditor912' |
| | | state |
| | | { |
| | | cells |
| | | { |
| | | attributes |
| | | { |
| | | attribute_PackingCharges |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 0 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'PackingCharges' |
| | | } |
| | | attribute_UnpackingCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 1 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'UnpackingCost' |
| | | } |
| | | attribute_BufferPaperCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 2 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'BufferPaperCost' |
| | | } |
| | | attribute_QuantityOfWoodenCrates |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 3 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'QuantityOfWoodenCrates' |
| | | } |
| | | attribute_WoodenCrateCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 4 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'WoodenCrateCost' |
| | | } |
| | | attribute_TransferCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 5 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'TransferCost' |
| | | } |
| | | attribute_StorageFeesForRentedWarehouses |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 6 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'StorageFeesForRentedWarehouses' |
| | | } |
| | | attribute_OutboundExpensesForRentedWarehouses |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 7 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'OutboundExpensesForRentedWarehouses' |
| | | } |
| | | attribute_ExternalRentalWarehouseTransportationCosts |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 8 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'ExternalRentalWarehouseTransportationCosts' |
| | | } |
| | | attribute_RentalWarehouseStorageFees |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 9 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'RentalWarehouseStorageFees' |
| | | } |
| | | attribute_EstimatedTotalCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 10 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'EstimatedTotalCost' |
| | | } |
| | | attribute_Coefficient |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 11 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'Coefficient' |
| | | } |
| | | attribute_TotalCost |
| | | { |
| | | type: 'MatrixEditorWebApiCellDataModelInterest' |
| | | index: 12 |
| | | rowsubtotal: '' |
| | | columnsubtotal: '' |
| | | attribute: 'TotalCost' |
| | | } |
| | | } |
| | | } |
| | | columns |
| | | { |
| | | sorting |
| | | { |
| | | criteria: "datamember:'StartDate'" |
| | | } |
| | | } |
| | | rows |
| | | { |
| | | sorting |
| | | { |
| | | criteria: "datamember:'Index';datamember:'Category'" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | form_FormGeneralSettings |