Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
已修改38个文件
已添加12个文件
已删除1个文件
| | |
| | | // æ¾è£
é
çº¿è¡ |
| | | oprs := selectsortedset( opt, OfflinePlanRow, tempOPR, |
| | | tempOPR.ProductionLine() = "DL MoMo" |
| | | // or tempOPR.ProductionLine() = "CC MoMo" or tempOPR.ProductionLine() = "DL ZKM" |
| | | or |
| | | tempOPR.ProductionLine() = "CC MoMo" |
| | | or |
| | | tempOPR.ProductionLine() = "DL ZKM" |
| | | , |
| | | tempOPR.ProductionLine(), tempOPR.ProductID(), tempOPR.Type() ); |
| | | opcs := selectsortedset( opt, OfflinePlanColumn, tempOPC, true, tempOPC.ColumnDate() ); |
| | |
| | | ); |
| | | |
| | | u := select( macroPlan, Unit, tempU, tempU.ID() = pl ); |
| | | drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "æç©º", false ) ); |
| | | lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "éºçº¿", false ) ); |
| | | drainPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "æç©º" ), false ) ); |
| | | lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject().Regex( "éºçº¿" ), false ) ); |
| | | |
| | | // å¤çæç©º |
| | | info( "å½å产线ï¼", pl, " å¤çæç©º--------------------------" ); |
| | | info( "å½å产线ï¼", pl, " å¤çæç©º--------------------------" ); |
| | | traverse ( drainPs, Elements, p ) { |
| | | traverse ( p, ExplicitTimeInterval, eti ) { |
| | | info( "å¼å§æ¶é´ï¼", eti.Start().Format( "Y-M2-D2" ), " ç»ææ¶é´ï¼", eti.End().Format( "Y-M2-D2" ) ); |
| | | // åä¸å¤©æ¥å |
| | | aopc := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = ( eti.Start().Date() - 1 ) ); |
| | | info( "éè¦æç©ºçä¸çº¿è®¡åæ¶é´ï¼", aopc.ColumnDate().Format( "Y-M2-D2" ) ); |
| | | info( "éè¦æç©ºçä¸çº¿è®¡åæ¶é´ï¼", aopc.ColumnDate().Format( "Y-M2-D2" ) ); |
| | | aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and |
| | | exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) ); |
| | | aopr := maxselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc, |
| | |
| | | traverse ( lineLyingPs, Elements, p ) { |
| | | traverse ( p, ExplicitTimeInterval, eti ) { |
| | | info( "å¼å§æ¶é´ï¼", eti.Start().Format( "Y-M2-D2" ), " ç»ææ¶é´ï¼", eti.End().Format( "Y-M2-D2" ) ); |
| | | info( "éè¦éºçº¿çä¸çº¿è®¡åæ¶é´ï¼", eti.Start().Format( "Y-M2-D2" ) ); |
| | | aopc := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = eti.Start().Date() ); |
| | | aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and |
| | | exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) ); |
| | | aopr := minselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc, |
| | | [Number]tempAOPC.Value().ReplaceAll( "#0", "" ) ); |
| | | cell := select( macroPlan, AssemblyOnlinePlanRow.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanRow().ProductionLine() = pl and tempAOPC.AssemblyOnlinePlanColumn() = aopc and |
| | | tempAOPC.AssemblyOnlinePlanRow().Type() = "1" and tempAOPC.AssemblyOnlinePlanRow().ProductID() = aopr.AssemblyOnlinePlanRow().ProductID() ); |
| | | cell.Value( [String] ( [Number]cell.Value() + targetQuantity ) ); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CCRentQty |
| | | { |
| | | #keys: '3[415136.0.1184074701][415136.0.1184074700][415136.0.1184074702]' |
| | | Description: 'é¿æ¥å¤ç§åºæ°é' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute DLRentOtherCost |
| | | { |
| | | #keys: '3[415136.0.1184074682][415136.0.1184074681][415136.0.1184074683]' |
| | | Description: '大è¿å¤ç§åºå
¶ä»è´¹ç¨' |
| | | ValueType: Real |
| | | } |
| | |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-12-2024 (created) |
| | | // çå
°é¸½ Aug-12-2024 (created) |
| | | |
| | | value := this.CCRentInCost() + this.CCRentOutOfCost() + this.CCLongTransCost() + this.CCShorTransCost() + this.CCRentStorCost() |
| | | + this.DLRentInCost() + this.DLRentOutOfCost() + this.WerkToDLRentTransCost() + this.DLRentStorCost() |
| | | + this.DLRentInCost() + this.DLRentOutOfCost() + this.WerkToDLRentTransCost() + this.DLRentStorCost() + this.DLRentOtherCost() |
| | | |
| | | this.EstimateTotalCost( value ); |
| | | *] |
| | |
| | | } |
| | | //å¤ç§åºå
¥åºè´¹ç¨ |
| | | rententercostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | rententercostcellElement.SetAttribute( "value", [String]c.RentInCost() ); |
| | | rententercostcellElement.SetAttribute( "value", c.RentInCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( rententercostcellElement ); |
| | | //å¤ç§åºåºåºè´¹ç¨ |
| | | rentoutcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | rentoutcostcellElement.SetAttribute( "value", [String]c.RentOutOfCost() ); |
| | | rentoutcostcellElement.SetAttribute( "value", c.RentOutOfCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( rentoutcostcellElement ); |
| | | //åå
å°å¤ç§åºè¿è¾è´¹ç¨ |
| | | factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | factorytorenttranscostcellElement.SetAttribute( "value", [String]c.WerkToRentTransCost() ); |
| | | factorytorenttranscostcellElement.SetAttribute( "value", c.WerkToRentTransCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( factorytorenttranscostcellElement ); |
| | | //å¤ç§åºä»å¨è´¹ç¨ |
| | | rentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | rentstoragecostcellElement.SetAttribute( "value", [String]c.RentStorCost() ); |
| | | rentstoragecostcellElement.SetAttribute( "value", c.RentStorCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( rentstoragecostcellElement ); |
| | | //é¢è®¡æ»è´¹ç¨ |
| | | estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", [String]c.EstimateTotalCost() ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", c.EstimateTotalCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( estimatedtotalcostcellElement ); |
| | | //ç³»æ° |
| | | coefficientcellElement := xmlDOM.CreateElement( "cell" ); |
| | | coefficientcellElement.SetAttribute( "value", [String]c.Coefficient() ); |
| | | coefficientcellElement.SetAttribute( "value", c.Coefficient().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( coefficientcellElement ); |
| | | //æ»è´¹ç¨ |
| | | totalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | totalcostcellElement.SetAttribute( "value", [String]c.AllCost() ); |
| | | totalcostcellElement.SetAttribute( "value", c.AllCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( totalcostcellElement ); |
| | | } |
| | | tableElement.AppendChild( columnelement ); |
| | |
| | | if( not isnull( enginecost ) ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | quantity := ceil( [Number]pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | |
| | | } |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrententercostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrententercostcellElement.SetAttribute( "value", [String]c.CCRentInCost() ); |
| | | ccrententercostcellElement.SetAttribute( "value", c.CCRentInCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( ccrententercostcellElement ); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨ |
| | | ccrentoutcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrentoutcostcellElement.SetAttribute( "value", [String]c.CCRentOutOfCost() ); |
| | | ccrentoutcostcellElement.SetAttribute( "value", c.CCRentOutOfCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( ccrentoutcostcellElement ); |
| | | //é¿æ¥é¿éè¿è¾è´¹ç¨ |
| | | cclongtranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | cclongtranscostcellElement.SetAttribute( "value", [String]c.CCLongTransCost() ); |
| | | cclongtranscostcellElement.SetAttribute( "value", c.CCLongTransCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( cclongtranscostcellElement ); |
| | | //é¿æ¥çéè¿è¾è´¹ç¨ |
| | | ccshorttranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccshorttranscostcellElement.SetAttribute( "value", [String]c.CCShorTransCost() ); |
| | | ccshorttranscostcellElement.SetAttribute( "value", c.CCShorTransCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( ccshorttranscostcellElement ); |
| | | //é¿æ¥å¤ç§åºä»å¨è´¹ç¨ |
| | | ccrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | ccrentstoragecostcellElement.SetAttribute( "value", [String]c.CCRentStorCost() ); |
| | | ccrentstoragecostcellElement.SetAttribute( "value", c.CCRentStorCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( ccrentstoragecostcellElement ); |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ |
| | | dlrententercostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrententercostcellElement.SetAttribute( "value", [String]c.DLRentInCost() ); |
| | | dlrententercostcellElement.SetAttribute( "value", c.DLRentInCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( dlrententercostcellElement ); |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ |
| | | dlrentoutcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrentoutcostcellElement.SetAttribute( "value", [String]c.DLRentOutOfCost() ); |
| | | dlrentoutcostcellElement.SetAttribute( "value", c.DLRentOutOfCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( dlrentoutcostcellElement ); |
| | | //åå
å°å¤ç§åºè¿è¾è´¹ç¨ |
| | | factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | factorytorenttranscostcellElement.SetAttribute( "value", [String]c.WerkToDLRentTransCost() ); |
| | | factorytorenttranscostcellElement.SetAttribute( "value", c.WerkToDLRentTransCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( factorytorenttranscostcellElement ); |
| | | //大è¿å¤ç§åºä»å¨è´¹ç¨ |
| | | dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | dlrentstoragecostcellElement.SetAttribute( "value", [String]c.DLRentStorCost() ); |
| | | dlrentstoragecostcellElement.SetAttribute( "value", c.DLRentStorCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( dlrentstoragecostcellElement ); |
| | | //é¢è®¡æ»è´¹ç¨ |
| | | estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", [String]c.EstimateTotalCost() ); |
| | | estimatedtotalcostcellElement.SetAttribute( "value", c.EstimateTotalCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( estimatedtotalcostcellElement ); |
| | | //ç³»æ° |
| | | coefficientcellElement := xmlDOM.CreateElement( "cell" ); |
| | | coefficientcellElement.SetAttribute( "value", [String]c.Coefficient() ); |
| | | coefficientcellElement.SetAttribute( "value", c.Coefficient().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( coefficientcellElement ); |
| | | //æ»è´¹ç¨ |
| | | totalcostcellElement := xmlDOM.CreateElement( "cell" ); |
| | | totalcostcellElement.SetAttribute( "value", [String]c.AllCost() ); |
| | | totalcostcellElement.SetAttribute( "value", c.AllCost().Format( 'N(Dec)' ) ); |
| | | columnelement.AppendChild( totalcostcellElement ); |
| | | } |
| | | tableElement.AppendChild( columnelement ); |
| | |
| | | if( not isnull( enginecost ) ){ |
| | | products.Add( product ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCRentQuantity( cell.CCRentQuantity() + quantity ); |
| | | cell.CCRentQty( cell.CCRentQty() + quantity ); |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»· |
| | | entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨: åºåºé/å
è£
容é*åºåºåä»· |
| | |
| | | traverse( owner, StockingPoint_MP, stockingpoint, stockingpoint.ID().EndsWith( 'å¤ç§åº' ) ){ |
| | | // unit := stockingpoint.Unit(); |
| | | // parentunits := unit.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥å¤ç§åº |
| | | //æ¯å¦å±äºé¿æ¥å¤ç§åºç¨äºé¿æ¥å¤ç§åºä»å¨è´¹ç¨ |
| | | isccrent := stockingpoint.ID().StartsWith( 'é¿æ¥' ) or stockingpoint.ID().StartsWith( 'CC' ); |
| | | //æ¯å¦å±äºå¤§è¿å卿ºçé¿æ¥å¤ç§åº |
| | | //æ¯å¦å±äºå¤§è¿å卿ºçé¿æ¥å¤ç§åºç¨äºé¿æ¥å
¥åº/åºåºè´¹ç¨ |
| | | isdltoccrent := stockingpoint.ID().StartsWith( '大è¿å卿ºçé¿æ¥' ); |
| | | //æ¯å¦å±äºå¤§è¿å¤ç§åº |
| | | //æ¯å¦å±äºå¤§è¿å¤ç§åºç¨äºå¤§è¿å¤ç§åºä»å¨è´¹ç¨ |
| | | isdlrent := stockingpoint.ID().StartsWith( '大è¿' ) or stockingpoint.ID().StartsWith( 'DL' ); |
| | | if( isccrent or isdlrent ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() |
| | |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() |
| | | and engine.Factory() = ccfactory ); |
| | | if( not isnull( enginecost ) ){ |
| | | quantity := [Number]pispip.NewSupplyQuantity(); |
| | | if( isccrent ){ |
| | | cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.CCRentStorCost( cell.CCRentStorCost() + cost ); |
| | | cost := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.CCRentStorCost( cell.CCRentStorCost() + cost );//é¿æ¥å¤ç§åºä»å¨è´¹ç¨ |
| | | }else{ |
| | | cell.CCRentQuantity( cell.CCRentQuantity() + quantity ); |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»· |
| | | entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | cell.CCRentQty( cell.CCRentQty() + pispip.NewSupplyQuantity() ); |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»· |
| | | entercost := ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨: åºåºé/å
è£
容é*åºåºåä»· |
| | | outcost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice(); |
| | | outcost := ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice(); |
| | | cell.CCRentInCost( cell.CCRentInCost() + entercost ); |
| | | cell.CCRentOutOfCost( cell.CCRentOutOfCost() + outcost ); |
| | | } |
| | |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() |
| | | and engine.Factory() = dlfactory ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.DLRentStorCost( cell.DLRentStorCost() + cost ); |
| | | cost := ceil( [Number]pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.DLRentStorCost( cell.DLRentStorCost() + cost );//大è¿å¤ç§åºä»å¨è´¹ç¨ |
| | | } |
| | | } |
| | | } |
| | |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccfactory ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = 'é¿æ¥å¤ç§åº' |
| | | and trans.Destination() = '客æ·åº' |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( forecast.Product_MP() ); |
| | | row := table.GetRow( forecast.ProductID() ); |
| | | traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() > 0 ){ |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= psdip.StartDate() and engine.EndDate() >= psdip.StartDate() ); |
| | | transcost := selectobject( transcosts, Elements, trans, trans.StartDate() <= psdip.StartDate() and trans.EndDate() >= psdip.StartDate() ); |
| | | if( not isnull( enginecost ) ){ |
| | | periodtime := psdip.StartDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | // info( '-------------------------', column.Name() ); |
| | | cost := ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | cost := ceil( ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice(); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCShorTransCost( cell.CCShorTransCost() + cost ); |
| | | } |
| | |
| | | e.RowNr( i ); |
| | | i := i + 1; |
| | | } |
| | | info( '-------------------------------------end---------------------------------' ); |
| | | info( '-------------------------------------end----------------------------------' ); |
| | | // |
| | | showtable.Generate( search, products ); |
| | | *] |
| | |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | quantity := [Number]fpcell.Value() - cell.CCRentQuantity(); |
| | | quantity := fpcell.Quantity() - cell.CCRentQty(); |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | othercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OtherPrice(); |
| | | |
| | | value := cell.DLRentInCost() + cost; |
| | | cell.DLRentInCost( value ); |
| | | cell.DLRentOtherCost( cell.DLRentOtherCost() + othercost ); |
| | | *] |
| | | } |
| | |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, Cell, cell, cell.Column() = column ); |
| | | quantity := [Number]fscell.Value() - cell.CCRentQuantity(); |
| | | quantity := [Number]fscell.Value() - cell.CCRentQty(); |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | cost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | |
| | |
| | | and tempLCMR.StartDate() <= ccerc.StartDate() and tempLCMR.EndDate() >= ccerc.StartDate().StartOfNextMonth() ); |
| | | |
| | | // è¿è¾ææ¬åæ° |
| | | lct := select( macroPlan, LogisticsCostTransport, tempLCT, tempLCT.Product() = "å卿º" and tempLCT.Origin() = "CC åå
åº" and tempLCT.Destination() = "é¿æ¥å¤ç§åº" ); |
| | | lct := select( macroPlan, LogisticsCostTransport, tempLCT, tempLCT.Product() = "å卿ºææ¶" and tempLCT.Origin() = "é¿æ¥å¤ç§åº" and tempLCT.Destination() = "CC åå
åº" ); |
| | | |
| | | // å½åææ«æåä¸å¤©æ¥æ |
| | | lastDayOfThisMonth := ccerc.StartDate().StartOfNextMonth() - 1; |
| | |
| | | tempFSID.StartDate().Year() = ccerc.StartDate().Year() and |
| | | tempFSID.StartDate().Month() = ccerc.StartDate().Month(), |
| | | tempFSID.Quantity() ); |
| | | |
| | | cell.StorageFeesForRentedWarehouses( [Number] ( engineSales / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.WarehousingPrice(), 1 ) ) ); |
| | | |
| | | // å¤ç§åºåºåºè´¹ç¨ï¼å卿ºäº§é / å
è£
容é[åä¸åæ´] * ææ¶åºåºåä»·ï¼ |
| | |
| | | tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() = "é¿æ¥å¤ç§åº", |
| | | tempPIT.Quantity() |
| | | ); |
| | | // info( "æ¶é´ï¼", ccerc.StartDate().Format( "Y-M2-D2" ), " è¿è¾æ°æ®ï¼", transportationQuantity, " è¿è¾åä»·ï¼", lct.TransportPrice() ); |
| | | cell.ExternalRentalWarehouseTransportationCosts( transportationQuantity / guard( lce.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ); |
| | | |
| | | // å¤ç§åºä»å¨è´¹ç¨ï¼ææ¶æ»æ°é - å卿ºåºå / å
è£
容éï¼åä¸åæ´ï¼ï¼åä¹ä»¥ç©ºææ¶ä»å¨åä»·å¾å°ç©ºææ¶ä»å¨è´¹ç¨ãå卿ºåºååActual inventorieséåå°é¿æ¥å¤ç§åºè¯¥å卿ºçä»å¨éï¼ææ¶æ»æ°ééè¦æå¨ç»´æ¤ã |
| | |
| | | firstColumn := xmlDOM.CreateElement( "column" ); |
| | | firstName := xmlDOM.CreateElement( "name" ); |
| | | firstType := xmlDOM.CreateElement( "type" ); |
| | | firstName.TextContent( "" ); |
| | | firstName.TextContent( "*" ); |
| | | firstType.TextContent( "String" ); |
| | | firstColumn.AppendChild( firstName ); |
| | | firstColumn.AppendChild( firstType ); |
| | |
| | | secondColumn := xmlDOM.CreateElement( "column" ); |
| | | secondName := xmlDOM.CreateElement( "name" ); |
| | | secondType := xmlDOM.CreateElement( "type" ); |
| | | secondName.TextContent( "" ); |
| | | secondName.TextContent( "*" ); |
| | | secondType.TextContent( "String" ); |
| | | secondColumn.AppendChild( secondName ); |
| | | secondColumn.AppendChild( secondType ); |
| | |
| | | cells := selectsortedset( cerc, CC_EngineRackCell, tempCELL, true, tempCELL.CC_EngineRackRow().Name() ); |
| | | traverse ( cells, Elements, c ) { |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks() ); // ææ¶æ»æ°é |
| | | cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks().Round( 0 ) ); // ææ¶æ»æ°é |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves() ); // ç©ºææ¶æ°é |
| | | cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves().Round( 0 ) ); // ç©ºææ¶æ°é |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses() ); // å¤ç§åºå
¥åºè´¹ç¨ |
| | | cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses().Round( 0 ) ); // å¤ç§åºå
¥åºè´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses() ); // å¤ç§åºåºåºè´¹ç¨ |
| | | cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses().Round( 0 ) ); // å¤ç§åºåºåºè´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts() ); // å¤ç§åºè¿è¾è´¹ç¨ |
| | | cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts().Round( 0 ) ); // å¤ç§åºè¿è¾è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees() ); // å¤ç§åºä»å¨è´¹ç¨ |
| | | cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees().Round( 0 ) ); // å¤ç§åºä»å¨è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.CleaningCost() ); // æ¸
æ´è´¹ç¨ |
| | | cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // æ¸
æ´è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.EstimatedTotalCost() ); // é¢è®¡æ»è´¹ç¨ |
| | | cell.SetAttribute( "value", [String]c.EstimatedTotalCost().Round( 0 ) ); // é¢è®¡æ»è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.Coefficient() ); // ç³»æ° |
| | | cell.SetAttribute( "value", [String]c.Coefficient().Round( 0 ) ); // ç³»æ° |
| | | cellColumn.AppendChild( cell ); |
| | | |
| | | cell := xmlDOM.CreateElement( "cell" ); |
| | | cell.SetAttribute( "value", [String]c.TotalCost() ); // æ»è´¹ç¨ |
| | | cell.SetAttribute( "value", [String]c.TotalCost().Round( 0 ) ); // æ»è´¹ç¨ |
| | | cellColumn.AppendChild( cell ); |
| | | } |
| | | tableElement.AppendChild( cellColumn ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Import ( |
| | | MacroPlan macroPlan, |
| | | GeneralExcelImportAndExportDataTable table |
| | | ) |
| | | { |
| | | TextBody: '//traverse (' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ShowChangeLossNumber |
| | | { |
| | | #keys: '3[415136.0.1184074662][415136.0.1184074661][415136.0.1184074663]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcShowChangeLossNumber |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Oct-10-2024 (created) |
| | | |
| | | value := [String]this.ChangeLossNumber(); |
| | | |
| | | this.ShowChangeLossNumber( value ); |
| | | *] |
| | | } |
| | |
| | | feedback := Translations::MP_LibCal_Event_ValidDatePeriod(); |
| | | } |
| | | if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit and not ( cls.StartDate() > enddate or cls.EndDate() < startdate ) |
| | | and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) |
| | | or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){ |
| | | and cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) ){ |
| | | // and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) |
| | | // or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){ |
| | | feedback := Translations::MP_ChangeLossSetting_Exist() |
| | | } |
| | | if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit and not ( cls.StartDate() > enddate or cls.EndDate() < startdate ) |
| | | and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) |
| | | or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){ |
| | | and cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) ){ |
| | | // and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) |
| | | // or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){ |
| | | feedback := Translations::MP_ChangeLossSetting_DateCoincide() |
| | | } |
| | | |
| | |
| | | models := selectuniquevalues( table, Column.Cell.Demand, demand, demand.Model() ); |
| | | cellnr := 5 + models.Size(); |
| | | //åè®¡è¡ |
| | | sumrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'ç产', rows.Size() * cellnr, true ); |
| | | sumrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'æ»äº§é', rows.Size() * cellnr, true ); |
| | | sumrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '大è¿äº§é', sumrowproduction.RowNr() + 1, false ); |
| | | sumrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'é¿æ¥äº§é', sumrowproduction.RowNr() + 2, false ); |
| | | sumrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'éæ±', sumrowproduction.RowNr() + 3, false ); |
| | | sumrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'æ»éæ±', sumrowproduction.RowNr() + 3, false ); |
| | | rowno := sumrowproduction.RowNr() + 4; |
| | | traverse( models, Elements, model ){ |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model, rowno, false ); |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model.Concat( 'éæ±' ), rowno, false ); |
| | | rowno := rowno + 1; |
| | | } |
| | | sumrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'åºå', rowno, false ); |
| | |
| | | rownr := 0; |
| | | traverse( rows, Elements, row, productids.Find( row.Name() ) >= 0 ){ |
| | | |
| | | showrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'ç产', rownr, true );; |
| | | showrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'æ»ç产', rownr, true );; |
| | | showrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '大è¿äº§é', rownr + 1, false ); |
| | | showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'é¿æ¥äº§é', rownr + 2, false ); |
| | | showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'éæ±', rownr + 3, false ); |
| | | showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'æ»éæ±', rownr + 3, false ); |
| | | rownr := rownr + 4; |
| | | modelsnr := rownr + 3; |
| | | models := construct( Strings ); |
| | |
| | | traverse( uniquemodels, Elements, e ){ |
| | | |
| | | if( rownr < modelsnr ){ |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e, rownr, false ); |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e.Concat( 'éæ±' ), rownr, false ); |
| | | models.Add( e ); |
| | | rownr := rownr + 1; |
| | | } |
| | |
| | | sumdemand.Value( [String]( [Real]sumdemand.Value() + cell.DemandQuantity() ) ); |
| | | |
| | | traverse( cell, Demand, demand, exists( models, Elements, model, model = demand.Model() ) ){ |
| | | demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model() ) ); |
| | | sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model() ) ); |
| | | demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( 'éæ±' ) ) ); |
| | | sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( 'éæ±' ) ) ); |
| | | |
| | | if( not isnull( demandrow ) ){ |
| | | demandcell := column.CellValue( relnew, Value := [String]demand.Quantity() ); |
| | |
| | | } |
| | | if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){ |
| | | periodname := start.Format( "M2/D2/Y" ); |
| | | weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date(); |
| | | |
| | | this.Column( relnew, Name := periodname, StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | this.Column( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GenerateNew ( |
| | | EnginePipelineSearch search, |
| | | Product_MPs products |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | table := selectobject( this, Source.Report, report, not report.IsShow() ); |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | this.Clear( search.TimeUnit(), search.StartDate(), search.EndDate() ); |
| | | Transaction::Transaction().Propagate( attribute( EnginePipelineColumn, Index ) ); |
| | | Transaction::Transaction().Propagate( attribute( EnginePipelineCell, ProductionQuantity ) ); |
| | | Transaction::Transaction().Propagate( attribute( EnginePipelineCell, DemandQuantity ) ); |
| | | //è¿æ»¤åç产åid |
| | | productids := selectuniquevalues( products, Elements, product, true, product.ID() ); |
| | | rows := selectsortedset( table, Row, row, row.RowNr() ); |
| | | //æ¾ç¤ºå |
| | | productcolumn := selectobject( this, Column, column, column.Index() = 0 ); |
| | | attricolumn := selectobject( this, Column, column, column.Index() = 1 ); |
| | | models := selectuniquevalues( table, Column.Cell.Demand, demand, demand.Model() ); |
| | | cellnr := 5 + models.Size(); |
| | | //åè®¡è¡ |
| | | sumrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'æ»äº§é', rows.Size() * cellnr, true ); |
| | | sumrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '大è¿äº§é', sumrowproduction.RowNr() + 1, false ); |
| | | sumrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'é¿æ¥äº§é', sumrowproduction.RowNr() + 2, false ); |
| | | sumrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'æ»éæ±', sumrowproduction.RowNr() + 3, false ); |
| | | rowno := sumrowproduction.RowNr() + 4; |
| | | traverse( models, Elements, model ){ |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model.Concat( 'éæ±' ), rowno, false ); |
| | | rowno := rowno + 1; |
| | | } |
| | | sumrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', 'åºå', rowno, false ); |
| | | |
| | | //è¡è®¡æ° |
| | | rownr := 0; |
| | | traverse( rows, Elements, row, productids.Find( row.Name() ) >= 0 ){ |
| | | |
| | | //äº§åæ¾ç¤ºè¡ |
| | | showrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'æ»ç产', rownr, true );; |
| | | showrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '大è¿äº§é', rownr + 1, false ); |
| | | showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'é¿æ¥äº§é', rownr + 2, false ); |
| | | showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'æ»éæ±', rownr + 3, false ); |
| | | rownr := rownr + 4; |
| | | modelsnr := rownr + 3; |
| | | models := construct( Strings ); |
| | | uniquemodels := selectuniquevalues( row, Cell.Demand, demand, true, demand.Model() ); |
| | | //éæ±æ¾ç¤º |
| | | traverse( uniquemodels, Elements, e ){ |
| | | |
| | | if( rownr < modelsnr ){ |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e.Concat( 'éæ±' ), rownr, false ); |
| | | models.Add( e ); |
| | | rownr := rownr + 1; |
| | | } |
| | | } |
| | | //ç©ºéæ±è¡¥å
|
| | | for( rownr := rownr; rownr < modelsnr; rownr ++ ){ |
| | | |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '', rownr, false ); |
| | | } |
| | | showrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'åºå', rownr, false ); |
| | | |
| | | // traverse( this, Column, column ){ |
| | | // //æ¥è¯¢æ¶é´ç±»å为dayçåå
æ ¼ |
| | | // daycells := selectset( row, Cell, daycell, daycell.Column().TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | // cell.Column().StartDate() >= column.StartDate() and |
| | | // cell.Column().StartDate() <= column.EndaDate() ); |
| | | traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ |
| | | |
| | | column := selectobject( this, Column, column, column.Name() = cell.Column().Name() and column.TimeUnit() = search.TimeUnit() ); |
| | | |
| | | if( not isnull( column ) ){ |
| | | |
| | | //ç产 |
| | | production := column.CellValue( relnew, Value := [String]cell.ProductionQuantity() ); |
| | | showrowproduction.CellValue( relinsert, production ); |
| | | sumproduction := selectobject( column, CellValue, c, c.Row() = sumrowproduction ); |
| | | |
| | | if( isnull( sumproduction ) ){ |
| | | sumproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowproduction.CellValue( relinsert, sumproduction ); |
| | | } |
| | | sumproduction.Value( [String]( [Real]sumproduction.Value() + cell.ProductionQuantity() ) ); |
| | | |
| | | //大è¿äº§é |
| | | dlproductionquantity := guard( cell.Production().DLProduction(), 0 ); |
| | | dlproduction := column.CellValue( relnew, Value := [String]dlproductionquantity ); |
| | | showrowdlproduction.CellValue( relinsert, dlproduction ); |
| | | sumdlproduction := selectobject( column, CellValue, c, c.Row() = sumrowdlproduction ); |
| | | |
| | | if( isnull( sumdlproduction ) ){ |
| | | sumdlproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowdlproduction.CellValue( relinsert, sumdlproduction ); |
| | | } |
| | | sumdlproduction.Value( [String]( [Real]sumdlproduction.Value() + dlproductionquantity ) ); |
| | | |
| | | //é¿æ¥äº§é |
| | | ccproductionquantity := guard( cell.Production().CCProduction(), 0 ); |
| | | ccproduction := column.CellValue( relnew, Value := [String]ccproductionquantity ); |
| | | showrowccproduction.CellValue( relinsert, ccproduction ); |
| | | sumccproduction := selectobject( column, CellValue, c, c.Row() = sumrowccproduction ); |
| | | |
| | | if( isnull( sumccproduction ) ){ |
| | | sumccproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowccproduction.CellValue( relinsert, sumccproduction ); |
| | | } |
| | | sumccproduction.Value( [String]( [Real]sumccproduction.Value() + ccproductionquantity ) ); |
| | | |
| | | //éæ± |
| | | totaldemand := column.CellValue( relnew, Value := [String]cell.DemandQuantity() ); |
| | | showrowdemand.CellValue( relinsert, totaldemand ); |
| | | sumdemand := selectobject( column, CellValue, c, c.Row() = sumrowdemand ); |
| | | if( isnull( sumdemand ) ){ |
| | | sumdemand := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowdemand.CellValue( relinsert, sumdemand ); |
| | | } |
| | | sumdemand.Value( [String]( [Real]sumdemand.Value() + cell.DemandQuantity() ) ); |
| | | |
| | | traverse( cell, Demand, demand, exists( models, Elements, model, model = demand.Model() ) ){ |
| | | demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( 'éæ±' ) ) ); |
| | | sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( 'éæ±' ) ) ); |
| | | |
| | | if( not isnull( demandrow ) ){ |
| | | demandcell := column.CellValue( relnew, Value := [String]demand.Quantity() ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | } |
| | | if( not isnull( sumdemandrow ) ){ |
| | | sumdemandcell := selectobject( column, CellValue, c, c.Row() = sumdemandrow ); |
| | | if( isnull( sumdemandcell ) ){ |
| | | sumdemandcell := column.CellValue( relnew, Value := [String]0 ); |
| | | sumdemandrow.CellValue( relinsert, sumdemandcell ); |
| | | } |
| | | sumdemandcell.Value( [String]( [Real]sumdemandcell.Value() + demand.Quantity() ) ); |
| | | } |
| | | } |
| | | |
| | | for( demandr := showrowdemand.RowNr() + 1; demandr < showrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = row.Name() ); |
| | | if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){ |
| | | demandcell := column.CellValue( relnew, Value := '' ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | } |
| | | } |
| | | |
| | | |
| | | //åºå |
| | | inventory := column.CellValue( relnew, Value := [String]cell.InventoryQuantity() ); |
| | | showrowinventory.CellValue( relinsert, inventory ); |
| | | suminventory := selectobject( column, CellValue, c, c.Row() = sumrowinventory ); |
| | | if( isnull( suminventory ) ){ |
| | | suminventory := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowinventory.CellValue( relinsert, suminventory ); |
| | | } |
| | | suminventory.Value( [String]( [Real]suminventory.Value() + cell.InventoryQuantity() ) ); |
| | | |
| | | } |
| | | } |
| | | } |
| | | traverse( this, Column, column ){ |
| | | for( demandr := sumrowdemand.RowNr() + 1; demandr < sumrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = 'SUM' ); |
| | | // info( '------------------14----------------' ); |
| | | if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){ |
| | | demandcell := column.CellValue( relnew, Value := '' ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | rows := selectsortedset( this, Row, row, row.Name(), row.RowNr() ); |
| | | i := 0; |
| | | traverse( rows, Elements, e ){ |
| | | e.RowNr( i ); |
| | | i := i + 1; |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ShowName |
| | | { |
| | | #keys: '3[415136.0.1185710016][415136.0.1185710015][415136.0.1185710017]' |
| | | ValueType: String |
| | | } |
| | |
| | | acell := attricolumn.CellValue( relnew, Value := attriname ); |
| | | row.CellValue( relinsert, pcell ); |
| | | row.CellValue( relinsert, acell ); |
| | | traverse( table, Column, column, column.Index() > 1 ){ |
| | | cell := column.CellValue( relnew, Value := '0' ); |
| | | row.CellValue( relinsert, cell ); |
| | | } |
| | | return row; |
| | | *] |
| | | } |
| | |
| | | [* |
| | | // çå
°é¸½ Aug-8-2024 (created) |
| | | |
| | | value := guard( [Number]this.Cell().Value(), 0 ); |
| | | value := guard( [Number]this.Cell().Quantity(), 0 ); |
| | | |
| | | this.Quantity( value ); |
| | | *] |
| | |
| | | cell := column.FinancialProductionCell( relnew, Quantity := 0 ); |
| | | |
| | | this.FinancialProductionCell( relinsert, cell ); |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){ |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() and not column.IsDay()){ |
| | | importdata := product.MacroPlan().FPImportData( relnew, Generation := product.Generation() |
| | | , MqbMlb := product.MQBMLB() |
| | | , Power := product.Power() |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := column.FinancialSalesCell( relnew, Value := '' ); |
| | | cell := column.FinancialSalesCell( relnew, Value := '0' ); |
| | | |
| | | this.FinancialSalesCell( relinsert, cell ); |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){ |
| | | if( unit <> FinancialProductionReport::GetDefaultAllUnit() and not column.IsDay() ){ |
| | | importdata := product.MacroPlan().FSImportData( relnew, Generation := product.Generation() |
| | | , MqbMlb := product.MQBMLB() |
| | | , Power := product.Power() |
| | |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | owner.FinancialSalesSource( relflush ); |
| | | owner.FSImportData( relflush ); |
| | | products := construct( Product_MPs ); |
| | | allunit := FinancialSalesReport::GetDefaultAllUnit(); |
| | | ccunit := FinancialSalesReport::GetDefaultCCUnit(); |
| | |
| | | this.InventorySummaryColumn( relnew, Name := periodname, StartDate := periodtime, EndaDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | }else if( timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | weekstartstr := ' KW'; |
| | | for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){ |
| | | weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date(); |
| | | |
| | | this.InventorySummaryColumn( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | this.InventorySummaryColumn( relnew, Name := weekend.Format( "M2/D2/Y" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | }else if( timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){ |
| | | monthend := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | |
| | | this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM" ).Concat( '/').Concat( [String]monthend.Month() ).Concat( 'æ' ) ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | } |
| | | } |
| | | } |
| | |
| | | products.Add( pisp.Product_MP() ); |
| | | period := pispip.Period_MP(); |
| | | periodtime := period.Start().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | //天ï¼éæ©æ¥é¢ç²åº¦æ¶ï¼ææ«åºåï¼æå°åºåï¼æå¤§åºååå¹³ååºåçæ°å¼ä¿æä¸è´ |
| | | daycolumn := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname, column.StartDate() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Day() ); |
| | | daycolumn := selectobject( table, InventorySummaryColumn, column, column.StartDate() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Day() ); |
| | | quantity := ifexpr( pispip.Period_MP().IsHistorical(), [Number]pispip.ActualInventoryLevelEnd(), [Number]pispip.PlannedInventoryLevelEnd() ); |
| | | factoryrow.SetCellValue( daycolumn, quantity ); |
| | | allrow.SetCellValue( daycolumn, quantity ); |
| | |
| | | } |
| | | if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){ |
| | | periodname := start.Format( "M2/D2/Y" ); |
| | | weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date(); |
| | | |
| | | this.Column( relnew, Name := periodname, StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | this.Column( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CC_PackagingInventory |
| | | { |
| | | #keys: '3[415754.0.351286657][415754.0.351286656][415754.0.351286658]' |
| | | Description: 'é¿æ¥å·¥åå
è£
åºå' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CC_UnpackagedInventory |
| | | { |
| | | #keys: '3[415754.0.351197962][415754.0.351197961][415754.0.351197963]' |
| | | Description: 'é¿æ¥å·¥åéå
è£
åºå' |
| | | ValueType: Real |
| | | } |
| | |
| | | [* |
| | | // lihongji Jul-26-2024 (created) |
| | | |
| | | value := this.InitialPackagingInventory() + guard( this.Previous().PackagingInventory() + |
| | | guard( this.Previous().Package(), 0.0 ) - |
| | | value := ifexpr( this.PackagingPlanRow().Factory() = "é¿æ¥å·¥å", this.CC_PackagingInventory(), |
| | | this.InitialPackagingInventory() + guard( this.Previous().PackagingInventory() + |
| | | guard( this.Package(), 0.0 ) - |
| | | ifexpr( this.TransferIn() > 0.0, 0, this.Unpacking() ), |
| | | 0.0 ) |
| | | - this.Out(); |
| | | - this.Out() |
| | | ); |
| | | |
| | | this.PackagingInventory( value ); |
| | | *] |
| | |
| | | [* |
| | | // lihongji Jul-24-2024 (created) |
| | | |
| | | value := guard( this.EndingInventory() - this.PackagingInventory(), 0.0 ); |
| | | value := ifexpr( this.PackagingPlanRow().Factory() = "é¿æ¥å·¥å", this.CC_UnpackagedInventory(), |
| | | guard( this.EndingInventory() - this.PackagingInventory(), 0.0 ) ); |
| | | |
| | | this.UnpackagedInventory( value ); |
| | | *] |
| | |
| | | planPre := macroPlan.PackagingPlanColumn( relnew, StartDate := macroPlan.StartOfPlanning().Date() - 1 ); |
| | | |
| | | // çææ¥è¡¨ |
| | | traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() ) { |
| | | traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() and |
| | | ( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "DL" ) or pisp.StockingPointID().Regex( "大è¿" ) or pisp.StockingPointID().Regex( "é¿æ¥" ) ) ) { |
| | | // å½åpispæå¤å°ç¹ |
| | | factory := ifexpr( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "é¿æ¥" ), "é¿æ¥å·¥å", "大è¿å·¥å" ); |
| | | factoryAbbreviation := ifexpr( pisp.StockingPointID().Regex( "CC" ) or pisp.StockingPointID().Regex( "é¿æ¥" ), "CC", "DL" ); |
| | | |
| | | // åå»ºè¡ |
| | | ppr := select( macroPlan, PackagingPlanRow, tempPPR, tempPPR.ProductID() = pisp.ProductID() and tempPPR.StockingPointID() = pisp.StockingPointID() ); |
| | | ppr := select( macroPlan, PackagingPlanRow, tempPPR, tempPPR.ProductID() = pisp.ProductID() and tempPPR.Factory() = factory ); |
| | | if ( isnull( ppr ) ) { |
| | | ppr := macroPlan.PackagingPlanRow( relnew, ProductID := pisp.ProductID(), StockingPointID := pisp.StockingPointID(), Factory := "大è¿å·¥å", Category := "ZKG" ); |
| | | ppr := macroPlan.PackagingPlanRow( relnew, ProductID := pisp.ProductID(), StockingPointID := pisp.StockingPointID(), Factory := factory, Category := guard( pisp.Product_MP().ParentID(), "" ) ); |
| | | } |
| | | |
| | | // å建计ååä¸å¤©æ ¼å |
| | | planPreCell := ppr.PackagingPlanCell( relnew, PackagingPlanColumn := planPre, InitialPackagingInventory := 200 ); |
| | | |
| | | // åºåå°åºåç¹Trip |
| | | originTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID() = pisp.StockingPointID() ); |
| | | originTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID().Regex( factoryAbbreviation ) and |
| | | TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ) <> TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ) ); |
| | | // ç®çå°åºåç¹Trip |
| | | destinationTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() = pisp.StockingPointID() ); |
| | | destinationTrips := selectset( macroPlan, Unit.Lane.LaneLeg.Trip, tempT, tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID().Regex( factoryAbbreviation ) and |
| | | TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ) <> TransferPlanRow::IdentifyTheFactory( tempT.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ) ); |
| | | |
| | | // 循ç¯pispippl |
| | | traverse ( pisp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispipl, not pispipl.IsPeriodFrozen() ) { |
| | | // å建å |
| | | ppc := select( macroPlan, PackagingPlanColumn, tempPPC, tempPPC.StartDate() = pispipl.Start().Date() ); |
| | |
| | | // å建åå
æ ¼ |
| | | cell := select( ppr, PackagingPlanCell, tempPPCell, tempPPCell.PackagingPlanColumn() = ppc ); |
| | | if ( isnull( cell ) ) { |
| | | cell := ppr.PackagingPlanCell( relnew, NetDemand := pispipl.DependentDemandAndSalesDemandQuantity() - pispipl.NewSupplyQuantity(), EndingInventory := pispipl.InventoryLevelEnd() ); |
| | | cell := ppr.PackagingPlanCell( relnew ); |
| | | cell.NetDemand( pispipl.DependentDemandAndSalesDemandQuantity() - pispipl.NewSupplyQuantity() ); |
| | | cell.EndingInventory( pispipl.InventoryLevelEnd() ); |
| | | cell.PackagingPlanColumn( relset, ppc ); |
| | | } else { |
| | | cell.NetDemand( cell.NetDemand() + ( pispipl.DependentDemandAndSalesDemandQuantity() - pispipl.NewSupplyQuantity() ) ); |
| | | cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() ); |
| | | } |
| | | |
| | | // 设置è°åº&è°è¿ |
| | | // 设置è°åº |
| | | outs := selectset( originTrips, Elements, tempT, tempT.Departure().Date() = pispipl.Start().Date() ); |
| | | traverse ( outs, Elements, out ) { |
| | | cell.Out( cell.Out() + out.Quantity() ); |
| | | traverse ( outs, Elements.ProductInTrip, outPIT, outPIT.ProductID() = pisp.ProductID() ) { |
| | | cell.Out( cell.Out() + outPIT.Quantity() ); |
| | | } |
| | | |
| | | // 设置è°è¿ |
| | | transferIns := selectset( destinationTrips, Elements, tempT, tempT.Arrival().Date() = pispipl.Start().Date() ); |
| | | traverse ( transferIns, Elements, ti ) { |
| | | cell.TransferIn( cell.TransferIn() + ti.Quantity() ); |
| | | traverse ( transferIns, Elements.ProductInTrip, tiPIT, tiPIT.ProductID() = pisp.ProductID() ) { |
| | | cell.TransferIn( cell.TransferIn() + tiPIT.Quantity() ); |
| | | } |
| | | |
| | | // é¿æ¥å·¥åç¹æ®æ
åµè®¾ç½®å
è£
åºååéå
è£
åºå |
| | | if ( factory = "é¿æ¥å·¥å" ) { |
| | | if ( pisp.StockingPointID().Regex( "å¤ç§åº" ) ) { |
| | | cell.CC_PackagingInventory( pispipl.InventoryLevelEnd() ); |
| | | } else if ( pisp.StockingPointID().Regex( "线边åº" ) ) { |
| | | cell.CC_UnpackagedInventory( pispipl.InventoryLevelEnd() ); |
| | | } |
| | | } |
| | | |
| | | // 设置åä¸å¤©åºå |
| | | if ( pispipl.Start().Date() = macroPlan.StartOfPlanning().Date() ) { |
| | | // prePISPIPL := pispipl.PreviousPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf ); |
| | | planPreCell.EndingInventory( 2000 ); |
| | | prePISPIPL := pispipl.PreviousPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf ); // åä¸ä¸ªpispippl |
| | | // å建计ååä¸å¤©æ ¼å |
| | | preCell := select( ppr, PackagingPlanCell, tempPPCell, tempPPCell.PackagingPlanColumn() = planPre ); |
| | | if ( isnull( preCell ) ) { |
| | | preCell := ppr.PackagingPlanCell( relnew ); |
| | | preCell.EndingInventory( prePISPIPL.InventoryLevelEnd() ); |
| | | preCell.PackagingPlanColumn( relset, planPre ); |
| | | } else { |
| | | preCell.EndingInventory( preCell.EndingInventory() + prePISPIPL.InventoryLevelEnd() ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | Transaction::Transaction().Propagate( relation( PackagingPlanCell, Next ) ); |
| | | |
| | | // 设置å
è£
&æå
-æ°é |
| | | traverse ( macroPlan, PackagingPlanRow, ppr, ( ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Bosch" ) or ( ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Components (Spain)" ) ) { |
| | | traverse ( ppr, PackagingPlanCell, ppc/*, ppc.StartDate() = Date::Construct( 2020, 4, 1 )*/ ) { |
| | | // 设置å
è£
æ°é |
| | | if ( ppc.PackagingInventory() < ppc.Out() ) { // å
è£
åºåæ¯å¦å°äºè°åº |
| | | prePPC := ppc.Previous(); |
| | | needPackagingQuantity := ppc.Out() - prePPC.PackagingInventory(); |
| | | while ( not isnull( prePPC ) and needPackagingQuantity > 0.0 ) { |
| | | // è·åå
è£
lotsize |
| | | ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppc.PackagingPlanRow().Factory() and |
| | | tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() ); |
| | | |
| | | // è·åæå¤§å
è£
æ°é |
| | | maxPackageReflection := Reflection::FindAttribute( "PackagingPlanCapability", ppc.PackagingPlanRow().FactoryAbbreviation() + "_" + ppc.PackagingPlanRow().Category() + "_Package" ); |
| | | // maxPackageQuantity := maxPackageReflection.GetNumber( macroPlan.PackagingPlanCapability() ); // æ¤å¤éè¦ä¿®æ¹ |
| | | maxPackageQuantity := 100000; |
| | | |
| | | // è·åæç»å
è£
æ°é |
| | | finalPackagingQuantity := minvalue( ceil( needPackagingQuantity / ppls.LotSize() ), ceil( ( maxPackageQuantity - prePPC.Package() ) / ppls.LotSize() ) ) * ppls.LotSize(); |
| | | needPackagingQuantity := needPackagingQuantity - finalPackagingQuantity; |
| | | |
| | | // 设置å
è£
å¼ |
| | | prePPC.Package( prePPC.Package() + finalPackagingQuantity ); |
| | | |
| | | //debuginfo( "éè¦å
è£
æ°éï¼", needPackagingQuantity, " lotsize: ", ppls.LotSize(), " æå¤§å
è£
æ°éï¼", maxPackageQuantity, " æç»è¡¥çæ°éï¼", finalPackagingQuantity ); |
| | | PackagingPlanCell::CalculationPackagingPlanProperties(); |
| | | |
| | | prePPC := prePPC.Previous(); |
| | | } |
| | | } |
| | | |
| | | // 设置æå
æ°é |
| | | if ( ppc.TransferIn() > 0.0 ) { // æè°å
¥æ°é |
| | | // è·åå
è£
lotsize |
| | | ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppc.PackagingPlanRow().Factory() and |
| | | tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() ); |
| | | |
| | | // 设置æå
å¼ |
| | | ppc.Unpacking( ppc.TransferIn() ); |
| | | } |
| | | } |
| | | } |
| | | //traverse ( macroPlan, PackagingPlanRow, ppr, ( ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Bosch" ) or ( ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Components (Spain)" ) ) { |
| | | // traverse ( ppr, PackagingPlanCell, ppc/*, ppc.StartDate() = Date::Construct( 2020, 4, 1 )*/ ) { |
| | | // // 设置å
è£
æ°é |
| | | // if ( ppc.PackagingInventory() < ppc.Out() ) { // å
è£
åºåæ¯å¦å°äºè°åº |
| | | // prePPC := ppc.Previous(); |
| | | // needPackagingQuantity := ppc.Out() - prePPC.PackagingInventory(); |
| | | // while ( not isnull( prePPC ) and needPackagingQuantity > 0.0 ) { |
| | | // // è·åå
è£
lotsize |
| | | // ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppc.PackagingPlanRow().Factory() and |
| | | // tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() ); |
| | | // |
| | | // // è·åæå¤§å
è£
æ°é |
| | | // maxPackageReflection := Reflection::FindAttribute( "PackagingPlanCapability", ppc.PackagingPlanRow().FactoryAbbreviation() + "_" + ppc.PackagingPlanRow().Category() + "_Package" ); |
| | | //// maxPackageQuantity := maxPackageReflection.GetNumber( macroPlan.PackagingPlanCapability() ); // æ¤å¤éè¦ä¿®æ¹ |
| | | // maxPackageQuantity := 100000; |
| | | // |
| | | // // è·åæç»å
è£
æ°é |
| | | // finalPackagingQuantity := minvalue( ceil( needPackagingQuantity / ppls.LotSize() ), ceil( ( maxPackageQuantity - prePPC.Package() ) / ppls.LotSize() ) ) * ppls.LotSize(); |
| | | // needPackagingQuantity := needPackagingQuantity - finalPackagingQuantity; |
| | | // |
| | | // // 设置å
è£
å¼ |
| | | // prePPC.Package( prePPC.Package() + finalPackagingQuantity ); |
| | | // |
| | | // //debuginfo( "éè¦å
è£
æ°éï¼", needPackagingQuantity, " lotsize: ", ppls.LotSize(), " æå¤§å
è£
æ°éï¼", maxPackageQuantity, " æç»è¡¥çæ°éï¼", finalPackagingQuantity ); |
| | | // PackagingPlanCell::CalculationPackagingPlanProperties(); |
| | | // |
| | | // prePPC := prePPC.Previous(); |
| | | // } |
| | | // } |
| | | // |
| | | // // 设置æå
æ°é |
| | | // if ( ppc.TransferIn() > 0.0 ) { // æè°å
¥æ°é |
| | | // // è·åå
è£
lotsize |
| | | // ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppc.PackagingPlanRow().Factory() and |
| | | // tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() ); |
| | | // |
| | | // // 设置æå
å¼ |
| | | // ppc.Unpacking( ppc.TransferIn() ); |
| | | // } |
| | | // } |
| | | //} |
| | | *] |
| | | } |
| | |
| | | [* |
| | | // lihongji Jul-24-2024 (created) |
| | | |
| | | value := guard( this.ProductID() + " in " + this.StockingPointID(), this.ProductID() ); |
| | | value := guard( this.ProductID(), "" ); |
| | | |
| | | this.Name( value ); |
| | | *] |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method FilterProduct ( |
| | | Product_MPs products |
| | | Product_MPs products, |
| | | String factory |
| | | ) declarative remote as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | | flag := exists( products, Elements, tempP, tempP.ID() = this.ProductID() ); |
| | | flag := exists( products, Elements, tempP, tempP.ID() = this.ProductID() ) and this.Factory() = factory; |
| | | |
| | | return flag; |
| | | *] |
| | |
| | | // çæè°æ¨è®¡å |
| | | traverse ( macroPlan, Unit, u, u.HasCapacityTypeTransportQuantity() ) { |
| | | traverse ( u, Lane.LaneLeg.Trip, t ) { |
| | | traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 and exists( pit.Product_MP(), AllParent.AsParent, tempP, tempP.ID() = "æºå ä»¶" ) ) { |
| | | originFactory := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ); // èµ·å§å·¥å |
| | | destinationFactory := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ); // ç®æ å·¥å |
| | | traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 and // æ°é大äº0 |
| | | exists( pit.Product_MP(), AllParent.AsParent, tempP, tempP.ID() = "æºå ä»¶" ) and // åªåæºå ä»¶ |
| | | originFactory <> destinationFactory // èµ·å§å·¥åä¸è½åç®æ å·¥åä¸è´ |
| | | ) { |
| | | // æ¾è¡ |
| | | tpr := TransferPlanRow::FindTransferPlanRowTypeIndex( TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ), |
| | | TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ), |
| | |
| | | AttributeKey: '[415136.0.1160164787]' |
| | | Synonym: '大è¿å¤ç§åºå
¥åºè´¹ç¨' |
| | | } |
| | | AttributeRepresentation DLRentOtherCost |
| | | { |
| | | AttributeKey: '[415136.0.1184074681]' |
| | | Synonym: '大è¿å¤ç§åºå
¶ä»è´¹ç¨' |
| | | } |
| | | AttributeRepresentation DLRentOutOfCost |
| | | { |
| | | AttributeKey: '[415136.0.1160164795]' |
| | |
| | | AttributeRepresentation CCProductionQty |
| | | { |
| | | AttributeKey: '[415136.0.886711530]' |
| | | Synonym: 'CCç产计å' |
| | | Synonym: 'CCæºå 计å' |
| | | } |
| | | AttributeRepresentation CCTransferQty |
| | | { |
| | | AttributeKey: '[415136.0.894481175]' |
| | | Synonym: 'CCè°æ¨è®¡å' |
| | | Synonym: 'CC to DL' |
| | | } |
| | | AttributeRepresentation DLAssemblyPlanQty |
| | | { |
| | |
| | | AttributeRepresentation DLProductionQty |
| | | { |
| | | AttributeKey: '[415136.0.894481151]' |
| | | Synonym: 'DLç产计å' |
| | | Synonym: 'DLæºå 计å' |
| | | } |
| | | AttributeRepresentation DLTransferQty |
| | | { |
| | | AttributeKey: '[415136.0.894481185]' |
| | | Synonym: 'DLè°æ¨è®¡å' |
| | | Synonym: 'DL to CC' |
| | | } |
| | | AttributeRepresentation TotalInventoryQty |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: dhSelectedFactory |
| | | Response OnCreated () id:Response_MacroPlanner_ApplicationMacroPlanner_dhSelectedFactory_OnCreated |
| | | { |
| | | #keys: '[415754.0.350439844]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | this.Data( "大è¿å·¥å" ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | Taborder: 58 |
| | | ] |
| | | } |
| | | Component dhSelectedFactory |
| | | { |
| | | #keys: '[415754.0.350439827]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'String*' |
| | | Properties: |
| | | [ |
| | | Description: 'å
è£
计åæéå·¥å' |
| | | Taborder: 59 |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Image: 'EXPORT1' |
| | | Label: '导åº' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component bImport |
| | | { |
| | | #keys: '[415754.0.345743565]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'IMPORT1' |
| | | Label: '导å
¥' |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: pHeader/bImport |
| | | Response OnClick () id:Response_pHeader_bImport_OnClick |
| | | { |
| | | #keys: '[415754.0.345782016]' |
| | | 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" ); |
| | | |
| | | CC_EngineRackCell::Import( MacroPlan, selection ); |
| | | |
| | | // åç»å é¤ |
| | | generalExcelImportAndExportDataSource.Delete(); |
| | | |
| | | WebMessageBox::Success( Translations::A_VWED_Success() ); |
| | | } |
| | | } onerror { |
| | | WebMessageBox::Error( e.GeneralInformation() ); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ChangeLossNumber","title":"ChangeLossNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ChangeLossNumber"}}]' |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShowChangeLossNumber","title":"ChangeLossNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShowChangeLossNumber"}}]' |
| | | ContextMenu: 'listContextMenuChangeLossSetting' |
| | | Taborder: 2 |
| | | ] |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Attributes: 'CCRentInCost;CCRentOutOfCost;CCLongTransCost;CCShorTransCost;CCRentStorCost;DLRentInCost;DLRentOutOfCost;WerkToDLRentTransCost;DLRentStorCost;EstimateTotalCost;Coefficient;AllCost' |
| | | Attributes: 'CCRentInCost;CCRentOutOfCost;CCLongTransCost;CCShorTransCost;CCRentStorCost;DLRentInCost;DLRentOutOfCost;WerkToDLRentTransCost;DLRentStorCost;DLRentOtherCost;EstimateTotalCost;Coefficient;AllCost' |
| | | Column: 'Column' |
| | | Row: 'Row' |
| | | Taborder: 0 |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Legend: 'RowNr' |
| | | Legend: 'ShowName' |
| | | SortCriteria: 'RowNr' |
| | | Taborder: 1 |
| | | ] |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'MacroPlan' |
| | | FilterArguments: 'products:QLibMacroPlannerWebUI::ApplicationMacroPlanner.DataHolderCheckedProduct' |
| | | FixedFilter: 'object.FilterProduct( products )' |
| | | FilterArguments: 'products:QLibMacroPlannerWebUI::ApplicationMacroPlanner.DataHolderCheckedProduct;factory:QLibMacroPlannerWebUI::ApplicationMacroPlanner.dhSelectedFactory' |
| | | FixedFilter: 'object.FilterProduct( products, factory )' |
| | | Source: 'MacroPlan' |
| | | Taborder: 0 |
| | | Transformation: 'PackagingPlanRow' |
| | |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | InitialValue: '大è¿å·¥å' |
| | | Label: 'å·¥å' |
| | | Sorting: 'none' |
| | | Strings: '大è¿å·¥å;é¿æ¥å·¥å' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: pHeader/ddslFactorySelection |
| | | Response OnUserSelectionChanged () id:Response_pHeader_ddslFactorySelection_OnUserSelectionChanged |
| | | { |
| | | #keys: '[415754.0.350720104]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebDropDownStringList_OnUserSelectionChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | dhSelectedFactory.Data( this.Text() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_ChangeLossNumber |
| | | column_ShowChangeLossNumber |
| | | { |
| | | columnId: 'ChangeLossNumber' |
| | | dataPath: 'ChangeLossNumber' |
| | | dataType: 'real' |
| | | columnId: 'ShowChangeLossNumber' |
| | | dataPath: 'ShowChangeLossNumber' |
| | | dataType: 'string' |
| | | index: 5 |
| | | subtotals: '' |
| | | width: 183 |
| | | width: 150 |
| | | } |
| | | } |
| | | } |