lihongji
2024-11-13 4aa75980d1f773bf6f8ce0e4967900d684d1afff
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
Quintiq file version 2.0
#parent: #root
Method UpdateValue (
  String attrName,
  Real value
)
{
  TextBody:
  [*
    if ( attrName = "Package" ) { // 包装
      this.Package( value );
    }
    
    if ( attrName = "Unpacking" ) { // 拆包
     this.Unpacking( value );
    }
    
    if ( attrName = "Out" ) { // 调出
      unitID := ifexpr( this.PackagingPlanRow().Factory() = "大连工厂", "DL to CC", "CC to DL" ) + " " + this.PackagingPlanRow().Category() + " Transport";
      
      pit     := select( this.PackagingPlanRow().MacroPlan(), Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT,
                         tempPIT.Trip().LaneLeg().Lane().UnitID() = unitID                                 and
                         tempPIT.Trip().Departure().Date()        = this.PackagingPlanColumn().StartDate() and
                         tempPIT.ProductID()                      = this.PackagingPlanRow().ProductID() );
    
      pit.Update( value, true );
      this.Out( value );
      
      cell := select( this.PackagingPlanRow().MacroPlan(), PackagingPlanRow.PackagingPlanCell, tempPPCell, 
                      tempPPCell.PackagingPlanRow().Factory()      = ifexpr( this.PackagingPlanRow().Factory() = "大连工厂", "长春工厂", "大连工厂" ) and
                      tempPPCell.PackagingPlanRow().ProductID()    = this.PackagingPlanRow().ProductID()                                              and
                      tempPPCell.PackagingPlanColumn().StartDate() = pit.Trip().Arrival().Date() );
      cell.TransferIn( value );
    }
  *]
}