Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
| | |
| | | { |
| | | DefaultText: 'The Event type of binding Event exists.' |
| | | } |
| | | InfoMessage MP_Routing_RequiredField |
| | | { |
| | | DefaultText: 'All fields Required This parameter is mandatory.' |
| | | } |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Copy ( |
| | | RoutingStep newroutingstep, |
| | | StockingPoint_MP stockingpoint, |
| | | String id, |
| | | Unit unit |
| | | ) as Operation |
| | | { |
| | | Description: 'Duplicate the entire operation (including input product groups + input output products + costs)' |
| | | TextBody: |
| | | [* |
| | | idholder := this.MacroPlan().IDHolder(); |
| | | //unit := this.Unit(); |
| | | |
| | | // Create new Operation with information of this Operation |
| | | newoperation := Operation::Create( id, |
| | | unit, |
| | | id, |
| | | newroutingstep, |
| | | this.LeadTime(), |
| | | this.StandardDeviationLeadTime(), |
| | | this.Throughput(), |
| | | this.HasUserLotSize(), |
| | | this.UserMinimumQuantity(), |
| | | this.HasUserMaximumQuantity(), |
| | | this.UserMaximumQuantity(), |
| | | this.UserLotSize(), |
| | | this.CO2Emission(), |
| | | false, |
| | | false ); |
| | | |
| | | // Copy OperationCosts of this Operation to the new Operation |
| | | traverse( this, OperationCost, operationcost ) |
| | | { |
| | | // Select UnitAccount |
| | | accountassignment := select( unit, UnitAccount, ua, |
| | | ua.Account_MP() = operationcost.AccountAssignment().Account_MP() |
| | | and ua.CostDriver() = operationcost.AccountAssignment().CostDriver() ); |
| | | |
| | | // Create OperationCost for the new Operation if UnitAccount is found |
| | | if( not isnull( accountassignment ) ) |
| | | { |
| | | OperationCost::Create( idholder.GetOperationCostID(), |
| | | newoperation, |
| | | accountassignment.Account_MP(), |
| | | accountassignment.CostDriver(), |
| | | operationcost.Start(), |
| | | operationcost.TimeUnit(), |
| | | operationcost.LengthOfTime(), |
| | | operationcost.Cost(), |
| | | false ); |
| | | } |
| | | } |
| | | |
| | | // Copy OperationBOM from this Operation to the new Operation |
| | | traverse( this, OperationBOM, ob, not ob.IsInput() ) |
| | | { |
| | | pisp := ob.PISPNodeInRouting().ProductInStockingPoint_MP(); |
| | | newpisp := pisp.Product_MP().AddToStockingPoint( stockingpoint ); |
| | | // info( 'last----', ob.IsInput(), ',', ob.OperationID(), ',', ob.ProductID(), ',', ob.StockingPointID(), ',', pisp.ProductID(), ',', pisp.StockingPointID() ); |
| | | OperationBOM::Create( newoperation, newpisp, |
| | | not ob.IsInput(), |
| | | ob.InputGroupID(), |
| | | ob.HasUserInputQuantity(), |
| | | ob.Quantity(), |
| | | ob.MinQuantityInGroup(), |
| | | ob.MaxQuantityInGroup(), |
| | | ob.IsExcluded(), |
| | | false ); |
| | | // output.PISPNodeInRouting().Update( pisp.Product_MP(), stockingpoint ); |
| | | // info( 'new output----', output.IsInput(), ',', output.OperationID(), ',', output.ProductID(), ',', output.StockingPointID() ); |
| | | OperationBOM::Create( newoperation, ob.PISPNodeInRouting().ProductInStockingPoint_MP(), |
| | | ob.IsInput(), |
| | | ob.InputGroupID(), |
| | | ob.HasUserInputQuantity(), |
| | | ob.Quantity(), |
| | | ob.MinQuantityInGroup(), |
| | | ob.MaxQuantityInGroup(), |
| | | ob.IsExcluded(), |
| | | false ); |
| | | // input.UpdateTypeIndex( input.OperationID(), input.ProductID(), ob.OldStockingPointID(), false ); |
| | | // info( 'new input----', input.IsInput(), ',', input.OperationID(), ',', input.ProductID(), ',', input.StockingPointID() ); |
| | | } |
| | | |
| | | // Copy OpearationInputGroup of this Operation to the new Operation |
| | | traverse( this, OperationInputGroup, inputgroup ) |
| | | { |
| | | inputgroup.Copy( newoperation ); |
| | | } |
| | | |
| | | |
| | | return newoperation; |
| | | *] |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | TypeSpecialization Operation #extension |
| | | { |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute OldStockingPointID |
| | | { |
| | | #keys: '3[415136.0.782845096][415136.0.782845095][415136.0.782845097]' |
| | | Description: '娣诲姞鐑紡涔嬪墠鐨勫簱瀛樼偣' |
| | | ValueType: String |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | TypeSpecialization OperationBOM #extension |
| | | { |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod ThermalTrialRatio ( |
| | | Routing routing, |
| | | Number capacity, |
| | | Date start, |
| | | Date end, |
| | | Number ratio |
| | | ) as owning Routings |
| | | { |
| | | Description: 'Check input is valid' |
| | | TextBody: |
| | | [* |
| | | // Adhi Feb-10-2016 (created) |
| | | thermaltrial := '鐑紡'; |
| | | newroutings := construct( Routings ); |
| | | unit := selectobject( routing.MacroPlan(), Unit, unit, unit.ID() = thermaltrial and unit.HasCapacityTypeQuantity() ); |
| | | newrouting := routing.Copy(); |
| | | routingstep := newrouting.LastStep(); |
| | | //info( '------------------', routingstep.Tool(), ',', unit.ID() ); |
| | | newroutingstep := RoutingStep::Create( newrouting, thermaltrial, routingstep.Tool(), false ); |
| | | |
| | | traverse( routingstep, Operation, operation ){ |
| | | id := Operation::GetConcatenatedID( newrouting.ID(), newroutingstep.Name(), unit.ID() ); |
| | | // info( '------------------', operation.Name(), routingstep.Name(), newroutingstep.Name() ); |
| | | stockingpoint := StockingPoint_MP::FindCreateUpdate( routing.MacroPlan(), thermaltrial, unit, newrouting, true ); |
| | | |
| | | traverse( operation, OperationBOM, obom, not obom.IsInput() ){ |
| | | pisp := obom.PISPNodeInRouting().ProductInStockingPoint_MP(); |
| | | // info( 'before----', ',', obom.StockingPointID(), pisp.StockingPointID(), pisp.ProductID() ); |
| | | obom.OldStockingPointID( obom.StockingPointID() ); |
| | | newpisp := pisp.Product_MP().AddToStockingPoint( stockingpoint ); |
| | | // obom.PISPNodeInRouting().ProductInStockingPoint_MP( relset, newpisp ); |
| | | obom.PISPNodeInRouting().Update( newpisp.Product_MP(), newpisp.StockingPoint_MP() ); |
| | | // afterpisp := obom.PISPNodeInRouting().ProductInStockingPoint_MP(); |
| | | obom.UpdateTypeIndex( obom.OperationID(), obom.ProductID(), stockingpoint.ID(), obom.IsInput() ); |
| | | // info( 'after----', obom.StockingPointID(), afterpisp.StockingPointID(), afterpisp.ProductID() ); |
| | | } |
| | | // info( '------------------------------', operation.SourceOperationLink( relsize ) ); |
| | | |
| | | operation.Copy( newroutingstep, stockingpoint, id, unit ); |
| | | } |
| | | |
| | | traverse( newrouting, RoutingStep.Operation.SourceOperationLink, ol ) |
| | | { |
| | | ol.SynchronizeAll( false ); |
| | | } |
| | | |
| | | newroutings.Add( routing ); |
| | | |
| | | return &newroutings; |
| | | *] |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod ValidateThermalTrialRatio ( |
| | | output String feedback_o, |
| | | Routing routing, |
| | | Number capacity, |
| | | Date start, |
| | | Date end, |
| | | Number ratio |
| | | ) declarative remote as Boolean |
| | | { |
| | | Description: 'Check input is valid' |
| | | TextBody: |
| | | [* |
| | | // Adhi Feb-10-2016 (created) |
| | | feedback_o := ''; |
| | | |
| | | if( isnull( routing ) or capacity < 1 or start = Date::MinDate() or end = Date::MinDate() or ratio < 1 ){ |
| | | feedback_o := Translations::MP_Routing_RequiredField(); |
| | | } |
| | | |
| | | |
| | | return feedback_o = ''; |
| | | *] |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type Routing #extension |
| | | { |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'Maximum thermal trial capacity' |
| | | Mask: 'NUMBER' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Label: '1:' |
| | | Mask: 'NUMBER' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | |
| | | |
| | | data := dhDialogData.Data(); |
| | | |
| | | //if( isnull( data.WrappedInstance() ) ) // New |
| | | //{ |
| | | // // When create product, parent relation must be null (as server method has logic to detect parent change using this relation) |
| | | // data.Parent( relflush ); |
| | | // data.Commit(); |
| | | // dhForm.Data().ListEventType().SelectByKey( data.WrappedInstance().Key() ); |
| | | //} |
| | | //else |
| | | //{ |
| | | // LibCal_EventType::Update( dhDialogData.Data().WrappedInstance(), efID.Text(), efName.Text() |
| | | // ,guard( selParent.Data(), null( LibCal_EventType ) ) ); |
| | | //} |
| | | newroutings := Routing::ThermalTrialRatio( data, [Number]efMaxCapacity.Text(), dsStartTime.Date(), dsEndTime.Date(), [Number]efThermalTrialRatio.Text() ); |
| | | |
| | | ApplicationMacroPlanner.SelectListObjects( dhForm.Data().ListRoutings(), newroutings ); |
| | | |
| | | this.Close(); |
| | | *] |
| | |
| | | #keys: '[415136.0.756140039]' |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | GroupServerCalls: true |
| | | Precondition: |
| | | [* |
| | | return Routing::ValidateThermalTrialRatio( feedback, ddlRouting.Data(), [Number]efMaxCapacity.Text(), dsStartTime.Date(), dsEndTime.Date(), [Number]efThermalTrialRatio.Text() ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | Form.ApplyChanges(); |
| | | Form.Close(); |
| | | Form.OnOK(); |
| | | *] |
| | | } |
| | | } |