1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod Transfer ( 
 |    MacroPlan oldMP, 
 |    MacroPlan newMP 
 |  ) 
 |  { 
 |    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 ); 
 |      //} 
 |    *] 
 |  } 
 |  
  |