From 3f4662e0caa56de16e528630d3517765f6ce46d4 Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期一, 30 九月 2024 15:39:07 +0800 Subject: [PATCH] 装配上线计划集合类名 --- _Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl b/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl index fefeec7..ca7ed85 100644 --- a/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl +++ b/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl @@ -32,19 +32,21 @@ //鏄惁灞炰簬澶ц繛宸ュ巶 isdl := stockingpoint.ID().StartsWith( 'DL' ) or unit.ID().StartsWith( 'DL' ) or exists( parentunits, Elements, punit, punit.ID().StartsWith( 'DL' ) );//unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit ); //鏄惁灞炰簬闀挎槬瑁呴厤绾緾C鍘傚唴搴� - isccassemnly := stockingpoint.ID().EndsWith( '鍘傚唴搴�' ) and ( stockingpoint.ID().StartsWith( 'CC' ) or stockingpoint.ID().StartsWith( '闀挎槬' ) );//unit.ID() = MachiningPipelineReport::GetDefaultCCAssemnlyUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultCCAssemnlyUnit() ); + // isccassemnly := stockingpoint.ID().EndsWith( '鍘傚唴搴�' ) and ( stockingpoint.ID().StartsWith( 'CC' ) or stockingpoint.ID().StartsWith( '闀挎槬' ) );//unit.ID() = MachiningPipelineReport::GetDefaultCCAssemnlyUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultCCAssemnlyUnit() ); //鏄惁灞炰簬澶ц繛瑁呴厤绾緿L鍘傚唴搴� - isdlassemnly := stockingpoint.ID().EndsWith( '鍘傚唴搴�' ) and ( stockingpoint.ID().StartsWith( 'DL' ) or stockingpoint.ID().StartsWith( '澶ц繛' ) );//unit.ID() = MachiningPipelineReport::GetDefaultDLAssemnlyUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultDLAssemnlyUnit() ); + // isdlassemnly := stockingpoint.ID().EndsWith( '鍘傚唴搴�' ) and ( stockingpoint.ID().StartsWith( 'DL' ) or stockingpoint.ID().StartsWith( '澶ц繛' ) );//unit.ID() = MachiningPipelineReport::GetDefaultDLAssemnlyUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultDLAssemnlyUnit() ); //鏄惁灞炰簬闀挎槬鏈哄姞浜х嚎 isccproduction := stockingpoint.ID().EndsWith( '绾胯竟搴�' ) and ( stockingpoint.ID().StartsWith( 'CC' ) or stockingpoint.ID().StartsWith( '闀挎槬' ) );//unit.ID() = MachiningPipelineReport::GetDefaultCCProductionUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultCCProductionUnit() ); //鏄惁灞炰簬澶ц繛鏈哄姞浜х嚎 isdlproduction := unit.ID().EndsWith( 'MoMo' ) and unit.ID().StartsWith( 'DL' );//unit.ID() = MachiningPipelineReport::GetDefaultDLProductionUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultDLProductionUnit() ); if( iscc or isdl ){ traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and not pisp.IsSystem() - // and exists( pisp.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent ) - and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() and ( pispip.NewSupplyQuantity() <> 0 or pispip.PlannedInventoryLevelEnd() <> 0 ) ) ){ + and exists( pisp.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent ) + and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() and ( pispip.NewSupplyQuantity() <> 0 or pispip.PlannedInventoryLevelEnd() <> 0 or pispip.DependentDemandAndSalesDemandQuantity() <> 0 ) ) ){ + isccassemnly := stockingpoint.ID().EndsWith( pisp.Product_MP().ParentID() + '绾胯竟搴�' ) and ( stockingpoint.ID().StartsWith( 'CC' ) or stockingpoint.ID().StartsWith( '闀挎槬' ) ); + isdlassemnly := stockingpoint.ID().EndsWith( pisp.Product_MP().ParentID() ) and ( stockingpoint.ID().StartsWith( 'DL' ) or stockingpoint.ID().StartsWith( '澶ц繛' ) ); pispips := selectsortedset( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() - and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() and ( pispip.NewSupplyQuantity() <> 0 or pispip.PlannedInventoryLevelEnd() <> 0 ), pispip.Start() ); + and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() and ( pispip.NewSupplyQuantity() <> 0 or pispip.PlannedInventoryLevelEnd() <> 0 or pispip.DependentDemandAndSalesDemandQuantity() <> 0 ), pispip.Start() ); traverse( pispips, Elements, pispip ){ supplyquantity := [Number]pispip.NewSupplyQuantity();//鍥涜垗浜斿叆 //澶� @@ -54,12 +56,13 @@ //瑁呴厤绾� if( isccassemnly or isdlassemnly ){ + quantity := [Number]pispip.DependentDemandAndSalesDemandQuantity();//鍥涜垗浜斿叆 if( isccassemnly ){ - daycolumn.CCAssemblyPlanQty( daycolumn.CCAssemblyPlanQty() + supplyquantity ); - weekcolumn.CCAssemblyPlanQty( weekcolumn.CCAssemblyPlanQty() + supplyquantity ); + daycolumn.CCAssemblyPlanQty( daycolumn.CCAssemblyPlanQty() + quantity ); + weekcolumn.CCAssemblyPlanQty( weekcolumn.CCAssemblyPlanQty() + quantity ); } else { - daycolumn.DLAssemblyPlanQty( daycolumn.DLAssemblyPlanQty() + supplyquantity ); - weekcolumn.DLAssemblyPlanQty( weekcolumn.DLAssemblyPlanQty() + supplyquantity ); + daycolumn.DLAssemblyPlanQty( daycolumn.DLAssemblyPlanQty() + quantity ); + weekcolumn.DLAssemblyPlanQty( weekcolumn.DLAssemblyPlanQty() + quantity ); } } @@ -114,7 +117,6 @@ //鍛� weekcolumn := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), tpcell.TransferPlanColumn().ColumnDate() ); quantity := [Real]tpcell.Value();//鍥涜垗浜斿叆 - if( not isnull( daycolumn ) ){ row.SetCellTransferValue( daycolumn, ( originiscc and destiisdl ), quantity ); } -- Gitblit v1.9.3