admin
2024-10-30 52ee4f24536c33f3ccd1f6ceaa4f97fac7c880b7
上线计划优化
已修改1个文件
10 ■■■■■ 文件已修改
_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl
@@ -13,9 +13,11 @@
    // 是否执行处理标志
    isFlag := false;
    
    traverse ( pls, Elements, pl, pl = "CC MoMo" ) {
    traverse ( pls, Elements, pl
    //           , pl = "CC MoMo"
              ) {
      traverse ( macroPlan, NewAssemblyOnlinePlanColumn, naopc
                 , naopc.StartDate() <= Date::Construct( 2025, 2, 15 )
    //             , naopc.StartDate() <= Date::Construct( 2025, 2, 15 )
                ) {
        // 需要处理的数量
        targetQuantity := ifexpr( pl = "CC MoMo", guard( macroPlan.AssemblyOnlineQuantity().CCMoMo(), 0 ),
@@ -25,7 +27,7 @@
        currentCells := selectset( naopc, NewAssemblyOnlinePlanCell, tempNAOPCell, tempNAOPCell.NewAssemblyOnlinePlanRow().ProductionLine() = pl and tempNAOPCell.Quantity() > 0 );
        isFlag       := ifexpr( exists( currentCells, Elements, tempNAOPCell, tempNAOPCell.LineLayingOrEmptying() = "铺线" ), true, 
                                ifexpr( exists( currentCells, Elements, tempNAOPCell, tempNAOPCell.LineLayingOrEmptying() = "拉空" ), false, isFlag ) );
        info( "日期:", naopc.StartDate().Format( "Y-M2-D2" ), "   是否处理:", isFlag, "    当前单元格数量:", currentCells.Size(), "----------------------------" );
    //    info( "日期:", naopc.StartDate().Format( "Y-M2-D2" ), "   是否处理:", isFlag, "    当前单元格数量:", currentCells.Size(), "----------------------------" );
        
        // 处理铺线后的逻辑
        if ( isFlag and currentCells.Size() > 0 ) {
@@ -49,7 +51,7 @@
                orderNr := maxselect( naopc, NewAssemblyOnlinePlanCell, tempNAOPCell, 
                                      tempNAOPCell.NewAssemblyOnlinePlanRow().ProductionLine() = pl and tempNAOPCell.Quantity() > 0, 
                                      tempNAOPCell.OrderNr() ).OrderNr() + 1;
                info( orderNr );
    //            info( orderNr );
                currentCell.OrderNr( orderNr );
                currentCell.Order( "#" + orderNr.Format( "N(LPad0(2))" ) );
              }