| | |
| | | 0.0, 0.0, false, true ); |
| | | } |
| | | |
| | | ManufactureLTProcessSection::CreateOrUpdate( op ); |
| | | // ManufactureLTProcessSection::CreateOrUpdate( op ); |
| | | } |
| | | info( "========" ) |
| | | // 遍历routing,进行link |
| | |
| | | Description: '移交控制权' |
| | | TextBody: |
| | | [* |
| | | // yypsybs Aug-25-2023 (created) |
| | | if( isnull( oldMP ) ) { |
| | | info( "========transfer ManufactureLTImputations to macroPlan " + [String]newMP.MDSID() + "========" ); |
| | | } else { |
| | | info( "========transfer ManufactureLTImputations from macroPlan " + [String]oldMP.MDSID() + " to macroPlan " + [String]newMP.MDSID() + "========" ); |
| | | } |
| | | // 清空新的,老的复制到新的,清空老的 |
| | | if( not isnull( oldMP ) and not isnull( newMP ) ) { |
| | | info( "old ManufactureLTImputation size : " + [String]oldMP.ManufactureLTImputation( relsize ) ) |
| | | traverse( oldMP, ManufactureLTImputation, parent, true ) { |
| | | traverse( parent, ManufactureLTProcessSection, child, true ) { |
| | | ManufactureLTProcessSection::CreateOrUpdate( newMP, parent.OrgCode(), parent.SkuID(), parent.Describe(), |
| | | child.ProcessSection(), child.Sequence(), child.Line(), child.SystemLT(), |
| | | child.Edited(), child.EditLT(), child.Describe() ); |
| | | } |
| | | } |
| | | } |
| | | // 处理新的的operation |
| | | traverse( newMP, Routing.RoutingStep.Operation, item ) { |
| | | ManufactureLTProcessSection::CreateOrUpdate( item ); |
| | | } |
| | | //// yypsybs Aug-25-2023 (created) |
| | | //if( isnull( oldMP ) ) { |
| | | // info( "========transfer ManufactureLTImputations to macroPlan " + [String]newMP.MDSID() + "========" ); |
| | | //} else { |
| | | // info( "========transfer ManufactureLTImputations from macroPlan " + [String]oldMP.MDSID() + " to macroPlan " + [String]newMP.MDSID() + "========" ); |
| | | //} |
| | | //// 清空新的,老的复制到新的,清空老的 |
| | | //if( not isnull( oldMP ) and not isnull( newMP ) ) { |
| | | // info( "old ManufactureLTImputation size : " + [String]oldMP.ManufactureLTImputation( relsize ) ) |
| | | // traverse( oldMP, ManufactureLTImputation, parent, true ) { |
| | | // traverse( parent, ManufactureLTProcessSection, child, true ) { |
| | | // ManufactureLTProcessSection::CreateOrUpdate( newMP, parent.OrgCode(), parent.SkuID(), parent.Describe(), |
| | | // child.ProcessSection(), child.Sequence(), child.Line(), child.SystemLT(), |
| | | // child.Edited(), child.EditLT(), child.Describe() ); |
| | | // } |
| | | // } |
| | | //} |
| | | //// 处理新的的operation |
| | | //traverse( newMP, Routing.RoutingStep.Operation, item ) { |
| | | // ManufactureLTProcessSection::CreateOrUpdate( item ); |
| | | //} |
| | | *] |
| | | } |
| | |
| | | line := operationNameSplit.Element( 2 ); |
| | | } |
| | | child := null( ManufactureLTProcessSection ); |
| | | if( orgCode <> "" and productId <> "" and processStep <> "" and sequence <> "" ) { |
| | | parent := ManufactureLTImputation::CreateOrUpdate( op.RoutingStep().Routing().MacroPlan(), orgCode, productId, "" ); |
| | | info( "DaysAsReal : " + [String]op.UserLeadTime().DaysAsReal() ); |
| | | child := ManufactureLTProcessSection::CreateOrUpdate( parent, processStep, false, sequence, line, op.UserLeadTime().DaysAsReal(), 0.0, "" ); |
| | | } |
| | | //if( orgCode <> "" and productId <> "" and processStep <> "" and sequence <> "" ) { |
| | | // parent := ManufactureLTImputation::CreateOrUpdate( op.RoutingStep().Routing().MacroPlan(), orgCode, productId, "" ); |
| | | // info( "DaysAsReal : " + [String]op.UserLeadTime().DaysAsReal() ); |
| | | // child := ManufactureLTProcessSection::CreateOrUpdate( parent, processStep, false, sequence, line, op.UserLeadTime().DaysAsReal(), 0.0, "" ); |
| | | //} |
| | | return child; |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // yypsybs Aug-25-2023 (created) |
| | | info( "Operation::OnCommitCustom" ) |
| | | ManufactureLTProcessSection::CreateOrUpdate( this ); |
| | | //info( "Operation::OnCommitCustom" ) |
| | | //ManufactureLTProcessSection::CreateOrUpdate( this ); |
| | | *] |
| | | } |