lazhen
2024-10-31 0382a81753b0b1ee1dfbc9cab7f529703fa643cf
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateData (
  InterfaceDataset owner,
  String werk,
  Date startdate,
  Date enddate,
  String versionfrom,
  String versionto,
  Boolean versionflag,
  const Product_MPs products,
  String executor
)
{
  TextBody:
  [*
    // 甄兰鸽 Aug-23-2024 (created)
    loginfo                := maxobject(  owner, InterfaceLoginfo, loginfo, loginfo.Name() = Translations::InterfaceDataset_AOnlineAndMOfflinePlanMS64_Name(), loginfo.InterfaceDateTime() );
    if( not isnull( loginfo ) ){
      if( not loginfo.IsShow() ){
        loginfo.Delete();
      }else{
        loginfo.Last( false );
      }
      owner.AOnlineAndMOfflinePlanMS64( relflush );
    }
    nowdate                := DateTime::ActualTime();
    loginfo                := owner.InterfaceLoginfo( relnew, ExecuteUser := executor
                                                      , Name := Translations::InterfaceDataset_AOnlineAndMOfflinePlanMS64_Name()
                                                      , InterfaceDateTime := nowdate
                                                      , Message := '装配上线计划 + 机加下线计划 - MS64'
                                                      , IsShow := false
                                                      , Last := true
                                                      , ReturnSuccess := true
                                                      , ReturnMsg := 'Success'
                                                      , Success := true
                                                      );
    ms64                   := owner.AOnlineAndMOfflinePlanMS64( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := AOnlineAndMOfflinePlanPIR::GetWerk( werk ), StartDate := startdate, EndDate := enddate
                                                                , VersionFrom := versionfrom
                                                                , VersionTo := versionto, IsActive := versionflag );
    loginfo.AOnlineAndMOfflinePlanMS64( relinsert, ms64 );
    traverse( products, Elements, product, product.IsLeaf() ){
      ms64.MS64Data( relnew, Product := product.ID() );
    }
    loginfo.TotalRow( ms64.MS64Data( relsize ) );
    InterfaceLoginfo::CallInterfaceForSAPGet( owner, loginfo );
  *]
}