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 DetectingNegativeValues (
| MacroPlan macroPlan
| ) as String
| {
| Description: '检测负值'
| TextBody:
| [*
| res := "";
|
| // 循环遍历明细数据
| traverse ( macroPlan, NewAssemblyOnlinePlanRow, naopr, naopr.Type() = "1" ) {
| traverse ( naopr, NewAssemblyOnlinePlanCell, naopcell, naopcell.Quantity() < 0 ) {
| res := res +
| "产线:" + naopr.ProductionLine() + " " +
| "产品:" + naopr.ProductID() + " " +
| "时间:" + naopcell.NewAssemblyOnlinePlanColumn().StartDate().Format( "Y-M2-D2" ) + " " +
| "数量:" + [String]naopcell.Quantity() + "\n";
| }
| }
|
| if ( res = "" ) {
| res := "暂未出现负值";
| }
|
| return res;
| *]
| }
|
|