|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Teamcenter二次开发源码:通过teamcenter SOA 开发查找Item4 @2 q+ L) j( @4 ~; N" m0 y
0 T# X+ J: w9 x K3 v% T9 x: gpublic static Item findExistingItem( DataManagementService dmService, String itemIDs){4 j4 c4 S" k9 d1 p8 {, V5 H( I
com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo infos[] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo[1];7 R: F+ G; P( P$ V6 q
infos[0] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo();
7 w* v& w; E4 a1 o: |infos[0].itemId = itemIDs;
- D2 Y% Q5 k4 B" O, j) D3 f! v3 G1 Qcom.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref pref = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref();
* @# V" l, M; _8 y0 k0 ^5 Kpref.prefs = new com.teamcenter.services.strong.core._2007_01.DataManagement.RelationFilter[0];5 S; ^& W4 \- _1 L
GetItemFromIdResponse resp = dmService.getItemFromId(infos, 0, pref);% t& h4 Z7 P) A: ^# M
Item result[] = new Item[ resp.output.length ];: K" M) }" ?- Q/ y8 a* ^2 n9 U
for ( int i = 0; i < resp.output.length; i++ )
, I+ S) U. d4 w" c; Iresult = resp.output.item;
) r6 _& @1 k3 B/ m' U5 s
/ f' P: Y3 O' [% dif ( resp.output.length > 0 )% L" U" A$ n: O" t8 `7 `! E0 J0 A
return result[0];
% T1 k# O1 |9 x( E- Velse3 X2 D4 L/ Q( e- [# ?" Q9 l+ s, \
return null;
4 h0 b/ f. u. ~3 x9 i7 h7 Q! `* |9 ]}0 [8 o' A0 Z) J3 A! I4 ]8 V5 d
1 _0 d7 }+ j$ A& O v! E
1 O" [$ v, {2 K/ b9 L% f
|
|