xiaoding721
2024-12-09 bc05ba97955c569e0c2887c51d6c3e054dbcdf63
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
Quintiq file version 2.0
#parent: #root
StaticMethod Publish (
  InterfaceDataset owner,
  InterfaceLoginfo loginfo
)
{
  TextBody:
  [*
    //// 甄兰鸽 Jul-17-2024 (created)
    jsonarray          := JSON::Array();
    traverse( owner, AssemblyOnlinePlanPPPSPush, aopdata ){
      aopdatajson      := JSON::Object().Add( "product", aopdata.Product() ).Add( "planningDate", aopdata.PlanningDate().Format( 'Y-M2-D2' ) )//"2024-10-01" )
                                    .Add( "planningQty", aopdata.PlanningQty() )
                                    .Add( "sequence", aopdata.Sequence() )
                                    .Add( "factoryName", aopdata.FactoryName() )
                                    .Add( "remark", aopdata.Note() )
                                    .Add( "fac", aopdata.Fac() )
                                    .Add( "versionName", aopdata.VersionName() )
                                    .Add( "interfaceTime", aopdata.InterfaceTime().Format( 'Y-M2-D2 H:m:s' ) ).Build();/*"2024-10-01 12:00:00" )*/
      jsonarray.Add( aopdatajson );
    }
    loginfo.RequestBody( jsonarray.Build().AsString() );
    info( loginfo.RequestBody() );
    data     := InterfaceLoginfo::CallInterfaceForDataCenter( owner, loginfo );
    info( '----------------', data.AsString() );
  *]
}