在code editor模块 ,循环是不生效的吗?count0的结果始终为0( F% ~$ ?' C; ]. x* l, ~, b, O7 f
/**Custom Code*/& M+ p6 O6 {. ?# l/ a
Object current = param(1);4 s0 [6 t, B% v) p l
treenode activity = param(2);
0 a9 j& V# u6 I& `Token token = param(3);
% T( q3 K3 J, b- ]Variant assignTo = param(4);/ {# i/ K5 B3 F' J) L
string labelName = param(5);4 E2 T+ q% d: @" Y" C
treenode processFlow = ownerobject(activity);% N, E8 V: t9 L2 I6 }9 ?& M
# d9 \+ t0 `0 V% x/ M G9 a3 W1 {double count0=0;double count1=0;
. r* [. m/ U4 e! M
, L/ {' {- T8 {2 z5 [, q: M) f8 ^9 e. }: y [) W+ u6 q
//本工序前暂存区# B) G& S: b4 d- M2 G7 V9 u3 p
- g2 Y2 h1 n; S9 c+ h! F5 gfor (i = 0; i < Model.find("Plane5/1号暂存区").subnodes.length; i++) {0 [5 [4 ^( f9 T2 C% D
2 C% v" ?9 f* o: ^- p1 D; r3 Q J
// 检查 type 属性是否为 3ded
% m! V6 ^' d, A- ~5 L if (getlabel(Model.find("Plane5/1号暂存区").subnodes[i],"type") == getlabel(current,"LastProduction")) {
: X4 N8 U" f( L7 \, I" L3 Z count0++;& v4 b+ Z) M1 D, ^: ?) j. H
}; ]. c/ w& w. W* L9 E7 R
}
; t+ q; v, Z' o: B2 r# v8 h//上一工序前暂存区
7 c1 t; n4 e6 z7 a( {/ Q- U2 T, m2 Q( d
for (i = 0; i < Model.find("Plane5/2号暂存区").subnodes.length; i++) {0 u' r) S/ e* V
8 E" T; L. z& B6 u! y9 H
// 检查 type 属性是否为 3ded0 i6 P8 y, Q8 D% i# J" W& S2 h6 X
if (getlabel(Model.find("Plane5/2号暂存区").subnodes[i],"type") == getlabel(current,"LastProduction")) {
$ e* M. M0 l* ]# N# L' i count1++;6 [- ~- Y) Y& T0 W2 ?
}
! S/ j3 F" k8 u8 i5 T9 E& f7 W. `& b}
( `5 o! X" i& g6 v% G& W2 [, h. t9 ~/ z" _
return count0;
2 b$ b% f4 D, W1 ~+ C6 R0 Q/ }+ O0 }3 E- e* ~7 u! H6 b
! S4 [+ N# \ m |