| | |
| | | [* |
| | | // 甄兰鸽 Jun-24-2024 (created) |
| | | owner.EnginePipelineSource( relflush ); |
| | | //ccunit := EnginePipelineReport::GetDefaultCCUnit(); |
| | | //dlunit := EnginePipelineReport::GetDefaultDLUnit(); |
| | | productparent := EnginePipelineReport::GetDefaultProductParent(); |
| | | //ccalineunit := EnginePipelineReport::GetDefaultCCALineUnit(); |
| | | //dlalienunit := EnginePipelineReport::GetDefaultDLALineUnit() |
| | | //ccmplineunit := EnginePipelineReport::GetDefaultCCMPLineUnit() |
| | | //dlmplineunit := EnginePipelineReport::GetDefaultDLMPLineUnit(); |
| | | //allunit := EnginePipelineReport::GetDefaultAllUnit(); |
| | | source := owner.EnginePipelineSource( relnew, Name := EnginePipelineReport::GetDefaultName() ); |
| | | table := source.Report( relnew, ID := source.Name(), Name := source.Name() ); |
| | | showtable := source.Report( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsShow := true ); |
| | |
| | | endperiod := maxobject( owner, Period_MP, period, not period.IsHistorical() and period.TimeUnit() = Translations::MP_GlobalParameters_Day(), period.StartDate() ); |
| | | |
| | | //生成生产和库存数据 |
| | | //traverse( owner, StockingPoint_MP, stockingpoint ){ |
| | | traverse( owner, StockingPoint_MP, stockingpoint, stockingpoint.ID().EndsWith( '厂内库' ) ){ |
| | | // unit := stockingpoint.Unit(); |
| | | // parentunits := unit.GetAllParent(); |
| | | traverse( owner, StockingPoint_MP, stockingpoint ){ |
| | | //是否属于长春工厂 |
| | | // iscc := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit ); |
| | | iscc := stockingpoint.ID().StartsWith( 'CC' ); |
| | | iscc := ( stockingpoint.ID().StartsWith( 'CC' ) or stockingpoint.ID().StartsWith( '长春' ) ) and stockingpoint.ID().EndsWith( '厂内库' ); |
| | | //是否属于大连工厂 |
| | | // isdl := unit.ID() = dlalienunit or unit.ID() = dlmplineunit or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit ); |
| | | isdl := stockingpoint.ID().StartsWith( '大连' ); |
| | | isdl := ( ( stockingpoint.ID().StartsWith( 'DL' ) or stockingpoint.ID().StartsWith( '大连' ) ) and stockingpoint.ID().EndsWith( '厂内库' ) ) or stockingpoint.ID() = '大连外租库'; |
| | | |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and not pisp.IsSystem() |
| | | and exists( pisp.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent ) |