admin
2024-09-26 1b757f9c9b887a7151ce0a11b2e2f77098e344be
下线计划优化
已修改2个文件
17 ■■■■■ 文件已修改
_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/Response_MatrixEditor951_OnUpdateValue.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
@@ -92,12 +92,14 @@
    shiftStartDateOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "5" );
    shiftEndDateOPRs   := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "6" );
    traverse ( opt, OfflinePlanColumn, opc, opc.OfflinePlanCell( relsize ) > 0 and opc.ColumnDate() >= macroPlan.StartOfPlanning().Date() ) {
      // 补全总量
      traverse ( totalOPRs, Elements, totalOPR ) {
        total     := sum( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = totalOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1", [Real]tempOPC.Value() );
        totalCell := opc.OfflinePlanCell( relnew, Value := [String]total );
        totalCell.OfflinePlanRow( relset, totalOPR );
      }
      
      // &班次
      traverse ( shiftOPRs, Elements, shiftOPR ) {
        shift := select( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = shiftOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1" ); 
        if ( not isnull( shift ) ) {
@@ -106,6 +108,7 @@
        }
      }
      
      // 班次开始时间
      traverse ( shiftStartDateOPRs, Elements, ssdOPR ) {
        shift := select( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = ssdOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1" ); 
        if ( not isnull( shift ) ) {
@@ -115,6 +118,7 @@
        }
      }
      
      // 班次结束时间
      traverse ( shiftEndDateOPRs, Elements, sedOPR ) {
        shift := select( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = sedOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1" ); 
        if ( not isnull( shift ) ) {
@@ -136,6 +140,17 @@
      indexDate := indexDate + 1;
    }
    
    // 补全空格子
    traverse ( opt, OfflinePlanRow, opr ) {
      traverse ( opt, OfflinePlanColumn, opc ) {
        cell := select( opr, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanColumn() = opc );
        if ( isnull( cell ) ) {
          cell := opc.OfflinePlanCell( relnew, Value := "" );
          cell.OfflinePlanRow( relset, opr );
        }
      }
    }
    Transaction::Transaction().PropagateAll();
    
    // 设置生产顺序
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/Response_MatrixEditor951_OnUpdateValue.def
@@ -23,6 +23,8 @@
        cell.IsQuantityChange( true );
        cell.Value( value );
        cell.Quantity( [Real]value );
      } else if ( row.Type() = "2" and column.ColumnDate() >= MacroPlan.StartOfPlanning().Date() ) {
        cell.Value( value );
      }
    *]
    GroupServerCalls: false