陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
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
Quintiq file version 2.0
#parent: #root
StaticMethod Publish (
  InterfaceLoginfo loginfo
)
{
  TextBody:
  [*
    //// 甄兰鸽 Jul-17-2024 (created)
    jsonarray          := JSON::Array();
    traverse( loginfo, DispatchShiftPlan, shiftPlan ){
      shiftPlanjson          := JSON::Object()
                                    .Add( "productLine", shiftPlan.ProductLine() )
                                    .Add( "shiftDate", shiftPlan.ShiftDate().Format( 'Y-M2-D2' ) )//"2024-10-01" 
                                    .Add( "shiftQty", shiftPlan.ShiftQty() )
                                    .Add( "tips", shiftPlan.Tips() )
                                    .Add( "versionName", shiftPlan.VersionName() )
                                    .Add( "factoryName", shiftPlan.FactoryName() )
                                    .Add( "fac", shiftPlan.Fac() )
                                    .Add( "interfaceTime", shiftPlan.InterfaceTime().Format( 'Y-M2-D2 H2:m:s' ) )/*"2024-10-01 12:00:00" )*/
                                    .Build();
      jsonarray.Add( shiftPlanjson );
    }
    loginfo.RequestBody( jsonarray.Build().AsString() );
    info( loginfo.RequestBody() );
    data     := InterfaceLoginfo::CallInterfaceForDataCenter( loginfo.InterfaceDataset(), loginfo );
    info( '----------------', data.AsString() );
  *]
}