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
| Quintiq file version 2.0
| #parent: #root
| StaticMethod UpdateOrder (
| NewOfflinePlanCell nopc,
| String value,
| String attrName
| )
| {
| TextBody:
| [*
| if ( value.Length() <> 3 ) {
| error( "字符长度不等于3" );
| }
|
| if ( value.SubString( 0, 1 ) <> "#" ) {
| error( "字符没有以“# ”开头" );
| }
|
| if ( guard( [Number]value.SubString( 1, 2 ) <= 0, true ) ) {
| error( "不符合格式" );
| }
|
| if ( exists( nopc, NewOfflinePlanColumn.NewOfflinePlanCell, tempNOPCell,
| tempNOPCell <> nopc and
| tempNOPCell.NewOfflinePlanRow().Type() = "1" and
| tempNOPCell.NewOfflinePlanRow().ProductionLine() = nopc.NewOfflinePlanRow().ProductionLine(),
| tempNOPCell.OrderNr() = [Number]value.SubString( 1, 2 ) )
| ) {
| error( "已经存在Order:", [Number]value.SubString( 1, 2 ) );
| }
|
| nopc.Order( value );
| nopc.OrderNr( [Number]value.SubString( 1, 2 ) );
| *]
| }
|
|