windchill根据项目编号获取素有文档的附件

需要在windchill系统中根据项目编号或名称查询项目下的文档
问题相关代码,请勿粘贴截图
        QuerySpec qs = new QuerySpec();
        qs.setAdvancedQueryEnabled(true);
        int wIndex = qs.appendClassList(WTDocument.class, true);
        int pIndex = qs.appendClassList(PIProject.class, false);

        SearchCondition sc = new SearchCondition(
                WTDocument.class, "containerReference.key.id",
                SearchCondition.EQUAL, "com.pisx.pmgt.project.PIProjectContainer");
        qs.appendWhere(sc, new int[]{wIndex});
        qs.appendAnd();

        sc = new SearchCondition(WTDocument.class, "wt.ida3containerreference", PIProject.class, "pi.ida3containerreference and pi.projectshortname");
        qs.appendWhere(sc, new int[]{wIndex, pIndex});
        qs.appendAnd();

        sc = new SearchCondition(
                PIProject.class, "pi.projectshortname", SearchCondition.EQUAL, "xxxxx");
        qs.appendWhere(sc, new int[]{pIndex});

运行结果及报错内容

提示字段不对

我的解答思路和尝试过的方法

直接查询数据库也获取不到对应的文档

我想要达到的结果

获取到指定项目下的document所有最新对象,然后通过document获取附件进行传送

1、检查一下哪些字段对不上
2、查询数据库获取不到,是不是数据库中本就没有文档数据