admin
2024-09-18 4c8356907a350b92bdda8bff783bcc89decdc7fc
_Main/BL/Type_OfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl
@@ -16,7 +16,10 @@
    traverse ( allProductionLines, Elements, pl ) {
      oprs := selectset( newOPT, OfflinePlanRow, tempORT, tempORT.ProductionLine() = pl and ( tempORT.Type() = "1" or tempORT.Type() = "2" ) );
      
      traverse ( newOPT, OfflinePlanColumn, opc, opc.ColumnDate() = macroPlan.StartOfPlanning().Date() ) {
      traverse ( newOPT, OfflinePlanColumn, opc,
                 opc.ColumnDate() >= macroPlan.StartOfPlanning().Date()
    //             opc.ColumnDate() >= macroPlan.StartOfPlanning().Date() and opc.ColumnDate() <= Date::Construct( 2024, 4, 17 ) // 测试时可以过滤时间
                ) {
        for ( i := 1; i < 10; i++ ) {
          firstOrderCell  := select( oprs, Elements.OfflinePlanCell, tempOPC, tempOPC.OfflinePlanColumn() = opc and tempOPC.Value() = ( "#" + i.Format( "N(LPad0(2))" ) ) );
          secondOrderCell := select( oprs, Elements.OfflinePlanCell, tempOPC, tempOPC.OfflinePlanColumn() = opc and tempOPC.Value() = ( "#" + ( i + 1 ).Format( "N(LPad0(2))" ) ) );
@@ -34,8 +37,8 @@
                                         tempOPC.OfflinePlanRow().ProductID() = firstOrderCell.OfflinePlanRow().ProductID()
                                        );
            firstQuantityCell.Value( [String] ( [Number]firstQuantityCell.Value() - cls.ChangeLossNr() ) );                 
    //        info( "当前序号:", i, "    单元格的值:", firstCell.Value(), "    产品名:", firstCell.OfflinePlanRow().ProductID(),
    //              "下一个序号:", i + 1, "    单元格的值:", secondCell.Value(), "    产品名:", secondCell.OfflinePlanRow().ProductID() );
    //        info( "当前列时间:", opc.ColumnDate().Format( "Y-M2-D2" ), "    当前序号:", i, "    单元格的值:", firstOrderCell.Value(), "    产品名:", firstOrderCell.OfflinePlanRow().ProductID(),
    //              "下一个序号:", i + 1, "    单元格的值:", secondOrderCell.Value(), "    产品名:", secondOrderCell.OfflinePlanRow().ProductID() );
          }
        }
      }