lazhen
2024-11-20 1811d693013942d9b2e61ca4b04b7a8500a4e047
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
已修改6个文件
50 ■■■■ 文件已修改
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_DispatchCC.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_DispatchDL.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LockPeriod/Method_Enable.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_NewOfflinePlanCell/StaticMethod_SynchronizeToNewSupply.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_NewOfflinePlanCell/StaticMethod_UpdateOrder.qbl 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_NewOfflinePlanCell/StaticMethod_UpdateQuantity.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_DispatchCC.qbl
@@ -26,7 +26,7 @@
      traverse( product,DispatchShiftSchedulingDetail,detail ){
        detail_Json := JSON::Object();
        detail_Json.Add( "ShiftName",detail.SingleShiftName() );
        detail_Json.Add( "Quantity",detail.ShiftVolume() );
        detail_Json.Add( "Quantity",detail.ShiftVolume().Format( "N(Dec)" ) );
        detail_Json.Add( "ProductNo",detail.DispatchShiftSchedulingProduct().ProductID() );
        
        details_Json.Add( detail_Json );
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_DispatchDL.qbl
@@ -26,7 +26,7 @@
      traverse( product,DispatchShiftSchedulingDetail,detail ){
        detail_Json := JSON::Object();
        detail_Json.Add( "ShiftName",detail.SingleShiftName() );
        detail_Json.Add( "Quantity",detail.ShiftVolume() );
        detail_Json.Add( "Quantity",detail.ShiftVolume().Format( "N(Dec)" ) );
        detail_Json.Add( "ProductNo",detail.DispatchShiftSchedulingProduct().ProductID() );
        
        details_Json.Add( detail_Json );
_Main/BL/Type_LockPeriod/Method_Enable.qbl
@@ -30,6 +30,7 @@
          offlinePlanCell := offlinePlanCells.Element( offlinePlanCellIndex.GetValueAsNumber() );
          offlinePlanCellQuantity := offlinePlanCell.Quantity();
        }
        if( element.NewSupply( relsize ) = 1 ){
          traverse( element,NewSupply,newSupply ){
            newSupply.Update( offlinePlanCellQuantity );
_Main/BL/Type_NewOfflinePlanCell/StaticMethod_SynchronizeToNewSupply.qbl
@@ -9,28 +9,25 @@
  TextBody:
  [*
    traverse ( selectedRows, Elements.NewOfflinePlanCell, cell, 
               cell.NewOfflinePlanRow().Type() = "1" and cell.Quantity() > 0.0
               cell.NewOfflinePlanRow().Type() = "1" and cell.Quantity() >= 0.0
    //           and cell.NewOfflinePlanRow().ProductionLine() = "eMotor Assy (France)" and cell.NewOfflinePlanColumn().StartDate() = Date::Construct( 2020, 4, 4 )
             ) 
    {
     pto := select( macroPlan, Unit.Operation.PeriodTaskOperation, tempPTO,
                    exists( tempPTO, NewSupply, tempNS, tempNS.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() = cell.NewOfflinePlanRow().ProductID() ) and
                    tempPTO.Operation().UnitID() = cell.NewOfflinePlanRow().ProductionLine()                                                                                                 and
                    tempPTO.Start().Date()       = cell.NewOfflinePlanColumn().StartDate() );
      if ( isnull( pto ) ) {
      pto := select( macroPlan, Unit.Operation.PeriodTaskOperation, tempPTO,
                     exists( tempPTO, NewSupply, tempNS, tempNS.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() = cell.NewOfflinePlanRow().ProductID() ) and
                     tempPTO.Operation().UnitID() = cell.NewOfflinePlanRow().ProductionLine()                                                                                                 and
                     tempPTO.Start().Date()       = cell.NewOfflinePlanColumn().StartDate() );
      if ( isnull( pto ) and cell.Quantity() > 0 ) {
        o  := select( macroPlan, Unit.Operation, tempO, tempO.ID() = cell.NewOfflinePlanRow().OperationID() );
        up := select( macroPlan, Unit.UnitPeriod, tempUP, tempUP.UnitID() = cell.NewOfflinePlanRow().ProductionLine() and tempUP.StartDate() = cell.NewOfflinePlanColumn().StartDate() );
        if ( not isnull( o ) and not isnull( up ) ) {
          PeriodTaskOperation::Create( o, up, cell.Quantity(), false );
        }
      } else {
      } else if ( not isnull( pto ) ) {
        if ( [Number]cell.Quantity() <> [Number]pto.Quantity() ) {
          pto.Update( cell.Quantity(), false );
        }
      }
      
    }
  *]
_Main/BL/Type_NewOfflinePlanCell/StaticMethod_UpdateOrder.qbl
@@ -18,7 +18,16 @@
    
    if ( guard( [Number]value.SubString( 1, 2 ) <= 0, true ) ) {
      error( "不符合格式" );
    };
    }
    if ( exists( nopc, NewOfflinePlanColumn.NewOfflinePlanCell, tempNOPCell,
                 tempNOPCell                                      <> nopc                                      and
                 tempNOPCell.NewOfflinePlanRow().Type()           =  "1"                                       and
                 tempNOPCell.NewOfflinePlanRow().ProductionLine() =  nopc.NewOfflinePlanRow().ProductionLine(),
                 tempNOPCell.OrderNr() = [Number]value.SubString( 1, 2 ) )
        ) {
      error( "已经存在Order:", [Number]value.SubString( 1, 2 ) );
    }
    
    nopc.Order( value );
    nopc.OrderNr( [Number]value.SubString( 1, 2 ) );
_Main/BL/Type_NewOfflinePlanCell/StaticMethod_UpdateQuantity.qbl
@@ -6,5 +6,20 @@
  String attrName
)
{
  TextBody: 'nopc.Quantity( value );'
  TextBody:
  [*
    if ( value < 0 ) {
      error( "数量不能为负" );
    }
    nopc.Quantity( value );
    // 数量为0,修改Order
    if ( value = 0 ) {
      nopc.Order( "" );
      nopc.OrderNr( 0 );
    }
    // 如果数量不为0,修改Order
  *]
}