Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
| | |
| | | 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 ); |
| | |
| | | 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 ); |
| | |
| | | offlinePlanCell := offlinePlanCells.Element( offlinePlanCellIndex.GetValueAsNumber() ); |
| | | offlinePlanCellQuantity := offlinePlanCell.Quantity(); |
| | | } |
| | | |
| | | if( element.NewSupply( relsize ) = 1 ){ |
| | | traverse( element,NewSupply,newSupply ){ |
| | | newSupply.Update( offlinePlanCellQuantity ); |
| | |
| | | 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 ); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | *] |
| | |
| | | |
| | | 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 ) ); |
| | |
| | | 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 |
| | | *] |
| | | } |