田源
2025-01-16 cfd8d4c470cc6db6f6689ebf01eae07e47a46990
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
UIFUtils 1210
 
/**
     * ¸ù¾ÝIDÏÂÔØÎļþ¶ÔÏóÐÅÏ¢
     * @param docOid documentOID
     * @return
     * @throws VCIError
     * @throws VCIException
     */
    public BusinessObject[] getDocumentFileData(String docOid) throws VCIError {
        Map<String, String> conditions = new HashMap<String, String>();
        conditions.put("documentoid", docOid);
        QueryTemplate qt2 = new QueryTemplate();
        qt2.setId("btmQuery");
        qt2.setBtmType(FILE_TYPE);
        qt2.setType("btm");
        List<String> clauseList = new ArrayList<String>();
        clauseList.add("*");
        qt2.setClauseList(clauseList);
        
        Condition cond = plm.oq.objectQuery.common.Tool.getCondition(conditions);
        qt2.setCondition(cond);
    
        BusinessObject[] bos = QTClient.getService().findBTMObjects(qt2.getId(),  plm.oq.objectQuery.common.Tool.qtTOXMl(qt2).asXML());
        return bos;
    }
 
/**
     * Í¨¹ýid×÷Ϊfrom¶Ë²éѯËùÓÐ×ÓµÄloºÍbo¡£
     * 
     * @param foid
     *            BO¶ÔÏóµÄoid¡£
     * @param loName
     *            LO¶ÔÏóµÄÀàÐÍ¡£
     * @param btmName
     *            BO¶ÔÏóµÄÀàÐÍ
     * @return
     * @throws VCIError
     */
    public BOAndLO[] searchChildrenLoAndBoOfLastRV(String foid, String loName,
            String btmName) throws VCIError {
        QueryTemplate qt = new QueryTemplate();
        List<String> clauseList = new ArrayList<String>();
        clauseList.add("*");
        qt.setClauseList(clauseList);
        qt.setLinkType(loName);
        qt.setVersion(Version.lastRevLastVer);
        qt.setBtmType(btmName);
        qt.setId("d");
        qt.setType("link");
        qt.setDirection("positive");
        qt.setLevel(10);
        Map<String, String> map = new HashMap<String, String>();
        map.put("f_oid", foid);
        Condition condition = Tool.getCondition(map);
        qt.setCondition(condition);
        BOAndLO[] boAndLOS = QTClient.getService().getBOAndLOS(qt.getId(),
                Tool.qtTOXMl(qt).asXML(), "");
        return boAndLOS;
    }