|
|
|
@ -79,7 +79,7 @@ public class AssignProcess extends KCommand {
|
|
|
|
|
revPs.add(revP);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
boolean find = true;
|
|
|
|
|
for (TCComponentItemRevision revP : revPs) {
|
|
|
|
|
if (revPs.size() > 1) {
|
|
|
|
|
// TCComponentItemRevision revP = (TCComponentItemRevision)whereUsed[i];
|
|
|
|
@ -88,11 +88,23 @@ public class AssignProcess extends KCommand {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
find = false;
|
|
|
|
|
TCComponentItemRevision item = getTopZzItem(revP);
|
|
|
|
|
if (item != null) {
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(find) {
|
|
|
|
|
//lidy20240605如果选中的物料通过使用找到多个物料,且都没有P,那么找一个最新的物料版本,向上找P即可
|
|
|
|
|
for (TCComponentItemRevision revP : revPs) {
|
|
|
|
|
if(revP != revP.getItem().getLatestItemRevision())
|
|
|
|
|
continue;
|
|
|
|
|
TCComponentItemRevision item = getTopZzItem(revP);
|
|
|
|
|
if (item != null) {
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// Auto-generated catch block
|
|
|
|
|