haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Quintiq file version 2.0
#parent: #root
Method DoCall (
  const GlobalOTDTable globalData,
  GlobalOTDSOP otdSop,
  String callBy
) as PRHistoryData
{
  Description: '调用'
  TextBody:
  [*
    // yypsybs Sep-11-2023 (created)
    result := otdSop.PRHistoryData( relnew );
    
    // 照搬部分
    result.AuthorizationStatus( this.AuthorizationStatus() );
    
    result.BusinessType( this.BusinessType() );
    result.DataID( this.DataID() );
    result.DeliverToRequestorId( this.DeliverToRequestorId() );
    result.DestinationOrganizationID( this.DestinationOrganizationID() );
    result.DestinationTypeCode( this.DestinationTypeCode() );
    result.HeaderDescription( this.HeaderDescription() );
    result.LineAttribute1( this.LineAttribute1() );
    result.LineAttribute6( this.LineAttribute6() );
    result.LineType( this.LineType() );
    result.LineTypeId( this.LineTypeId() );
    result.MRPCalverNo( this.MRPCalverNo() );
    result.OrganCode( this.OrganCode() );
    result.OrgId( this.OrgId() );
    result.PreparerID( this.PreparerId() );
    result.DeliveryDate( this.DeliveryDate() );
    result.ProductID( this.ProductID() );
    result.ProductName( this.ProductName() );
    result.ProviderCode( this.ProviderCode() );
    result.ProviderName( this.ProviderName() );
    result.Quantity( this.Quantity() );
    result.RequisitionType( this.RequisitionType() );
    result.StockingPointID( this.StockingPointID() );
    result.UnitOfMeasure( this.UnitOfMeasure() );
    result.UnitPrice( this.UnitPrice() );
    
    // 请求部分
    request := ERPRequestOfPR::Create( result );
    response := request.DoCall();
    
    // 响应部分
    result.ReceiveError( response.ErrorDescription() );
    result.ReceiveStatus( response.Status() );
    result.ReceiveTime( DateTime::Now() );
    
    // 主记录修改
    result.SendStatus( "已发送" );
    result.ReleaseBy( callBy );
    result.SendTime( DateTime::Now() );
    this.PRReleaseStatus( "已发送" );
    this.CreateTime( DateTime::Now() );
    this.CreateBy( callBy );
    
    return result;
  *]
}