package com.vci.client.portal.utility;
|
|
import java.lang.reflect.InvocationTargetException;
|
import java.util.ArrayList;
|
import java.util.HashMap;
|
import java.util.Iterator;
|
import java.util.LinkedHashMap;
|
import java.util.List;
|
import java.util.Map;
|
|
import org.dom4j.DocumentException;
|
import org.dom4j.DocumentHelper;
|
|
import com.vci.corba.common.VCIError;
|
import com.vci.omd.utils.ObjectTool;
|
import com.vci.omd.constants.FileObjectType;
|
import com.vci.corba.omd.atm.AttribItem;
|
import com.vci.corba.omd.data.BusinessObject;
|
import com.vci.corba.omd.data.LinkObject;
|
import com.vci.corba.omd.etm.EnumChild;
|
import com.vci.corba.omd.etm.EnumItem;
|
import com.vci.corba.omd.qtm.QTInfo;
|
import com.vci.corba.portal.data.PLPageDefination;
|
import com.vci.corba.portal.data.PLUILayout;
|
import com.vci.corba.portal.data.PLTabPage;
|
import com.vci.corba.portal.data.PortalVI;
|
import com.vci.corba.query.data.RefPath;
|
import com.vci.client.common.oq.OQTool;
|
import com.vci.client.omd.provider.ApProvider;
|
import com.vci.client.omd.provider.EnumProvider;
|
import com.vci.client.oq.QTClient;
|
import com.vci.client.oq.QTDClient;
|
import com.vci.client.portal.custom.CommonFileUI;
|
import com.vci.client.portal.custom.ICommonFileUI;
|
import com.vci.client.portal.custom.ICustomDefine;
|
import com.vci.client.refquery.PLMReferenceQueryFacade;
|
import com.vci.common.qt.object.Condition;
|
import com.vci.common.qt.object.Connector;
|
import com.vci.common.qt.object.OrderInfo;
|
import com.vci.common.qt.object.PageInfo;
|
import com.vci.common.qt.object.QTConstants;
|
import com.vci.common.qt.object.QueryTemplate;
|
|
|
public class DataModelFactory implements IDataModelFactory{
|
|
private Map<String, AttribItem> attributeMap = new HashMap<String, AttribItem>();
|
private Map<String, String> enumNameMap = new HashMap<String, String>();
|
private Map<String, EnumItem> enumItemMap = new HashMap<String, EnumItem>();
|
@Override
|
public DataGridModel getDataGridModelById(String datagridId) throws VCIError {
|
return getDataGridModelById(datagridId, "", "", null, false, true, null, true, null);
|
}
|
|
/**
|
* 查询列表的值
|
* @param datagridId
|
* @param isRomoveDot, 是否在返回值中去除key中的点,true为去除,false为不去除,默认为去除
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelById(String datagridId, boolean isRomoveDot) throws VCIError {
|
return getDataGridModelById(datagridId, "", "", null, false, true, null, isRomoveDot, null);
|
}
|
|
/**
|
* 根据类别ID和用户自定义的查询条件进行查询
|
*
|
* @param datagridId, 列表ID
|
* @param conditions,查询条件
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelByCondition(String datagridId, Map<String, String> conditions) throws VCIError {
|
return getDataGridModelById(datagridId, "", "", null, false, true, conditions, true, null);
|
}
|
|
/**
|
* 根据类别ID和用户自定义的查询条件进行查询
|
*
|
* @param datagridId, 列表ID
|
* @param conditions,查询条件
|
* @param isRomoveDot, 是否在返回值中去除key中的点,true为去除,false为不去除,默认为去除
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelByCondition(String datagridId, Map<String, String> conditions, boolean isRomoveDot) throws VCIError {
|
return getDataGridModelById(datagridId, "", "", null, false, true, conditions, isRomoveDot, null);
|
}
|
|
/**
|
* 查询列表中的数据
|
*
|
* @param datagridId,列表ID
|
* @param typeName,查询对象类型名称
|
* @param relationName,查询链接对象类型名称
|
* @param replaceMap,替换Map
|
* @param isRelated,是否关联, true代表关联,false代表不关联
|
* @param direction,方向,true代表正向,false代表反向
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelById(String datagridId, String typeName, String relationName, Map<String, String> replaceMap,
|
boolean isRelated, boolean direction) throws VCIError {
|
return getDataGridModelById(datagridId, typeName, relationName, replaceMap, isRelated, direction, null, true, null);
|
}
|
|
/**
|
* 查询列表中的数据
|
*
|
* @param datagridId,列表ID
|
* @param typeName,查询对象类型名称
|
* @param relationName,查询链接对象类型名称
|
* @param replaceMap,替换Map
|
* @param isRelated,是否关联, true代表关联,false代表不关联
|
* @param direction,方向,true代表正向,false代表反向
|
* @param isRomoveDot, 是否在返回值中去除key中的点,true为去除,false为不去除,默认为去除
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelById(String datagridId, String typeName, String relationName, Map<String, String> replaceMap,
|
boolean isRelated, boolean direction, boolean isRomoveDot) throws VCIError {
|
return getDataGridModelById(datagridId, typeName, relationName, replaceMap, isRelated, direction, null, isRomoveDot, null);
|
}
|
|
public int getDataGridRowNum(String datagridId, String typeName, Map<String, String> replaceMap) throws VCIError, DocumentException {
|
PortalVI p = UITools.getService().getPortalVIById(datagridId);
|
PRM prm = UITools.getPRM(p.prm);
|
String queryTemplate = prm.getPrmItemList().get(0).getItemQtName();
|
QTInfo wrapper = QTDClient.getService().getQT(queryTemplate);
|
QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), queryTemplate);
|
QueryTemplate qt_ = OQTool.replaceQTValues(qt, replaceMap);
|
int total = (int)QTClient.getService().findTotalCount(qt_.getId(),OQTool.qtTOXMl(qt_).asXML());
|
return total;
|
}
|
|
public int getDataGridRowNum(String datagridId, Map<String, String> replaceMap, Map<String, String> conditionsMap) throws VCIError, DocumentException {
|
PortalVI p = UITools.getService().getPortalVIById(datagridId);
|
PRM prm = UITools.getPRM(p.prm);
|
String queryTemplate = prm.getPrmItemList().get(0).getItemQtName();
|
QTInfo wrapper = QTDClient.getService().getQT(queryTemplate);
|
QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), queryTemplate);
|
QueryTemplate qt_ = OQTool.replaceQTValues(qt, replaceMap);
|
if (conditionsMap != null && conditionsMap.size() > 0) {
|
Condition condition = OQTool.getCondition(conditionsMap);
|
Condition mergeCondition = OQTool.mergeCondition(qt_.getCondition(), condition, Connector.AND);
|
qt_.setCondition(mergeCondition);
|
}
|
int total = (int)QTClient.getService().findTotalCount(qt_.getId(),OQTool.qtTOXMl(qt_).asXML());
|
return total;
|
}
|
|
/**
|
* 查询列表中数据
|
*
|
* @param datagridId,列表ID
|
* @param typeName,查询对象类型名称
|
* @param relationName,查询链接对象类型名称
|
* @param replaceMap,替换Map
|
* @param isRelated,是否关联, true代表关联,false代表不关联
|
* @param direction,方向,true代表正向,false代表反向
|
* @param conditions,查询条件,附件到查询模版之后的查询条件
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelById(String datagridId, String typeName, String relationName, Map<String, String> replaceMap,
|
boolean isRelated, boolean direction, Map<String, String> conditions) throws VCIError {
|
return getDataGridModelById(datagridId, typeName, relationName, replaceMap, isRelated, direction, conditions, true, null);
|
}
|
|
/**
|
* 查询列表中数据
|
*
|
* @param datagridId,列表ID
|
* @param typeName,查询对象类型名称
|
* @param relationName,查询链接对象类型名称
|
* @param replaceMap,替换Map
|
* @param isRelated,是否关联, true代表关联,false代表不关联
|
* @param direction,方向,true代表正向,false代表反向
|
* @param conditions,查询条件,附件到查询模版之后的查询条件
|
* @param isRomoveDot, 是否在返回值中去除key中的点,true为去除,false为不去除,默认为去除
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelById(String datagridId, String typeName, String relationName, Map<String, String> replaceMap,
|
boolean isRelated, boolean direction, Map<String, String> conditions, boolean isRomoveDot, Map<String, String> orderMap) throws VCIError {
|
|
PortalVI p = UITools.getService().getPortalVIById(datagridId);
|
PRM prm = UITools.getPRM(p.prm);
|
|
Map<String, String> columnMap = new LinkedHashMap<String, String>();
|
String sheetId = prm.getPrmItemList().get(0).getItemInObj();
|
String[] column = prm.getPrmItemList().get(0).getItemOutFields().split(",");
|
|
for (int i = 0; i < column.length; i++) {
|
columnMap.put(column[i], column[i]);
|
}
|
|
Map<String, List<String>> selectValues = new HashMap<String, List<String>>();
|
Map<String, PRMItem> multiFiles = new HashMap<String, PRMItem>();
|
Map<String, PRMItem> customCols = new HashMap<String, PRMItem>();
|
Map<String, String> columnTypeMap = new HashMap<String, String>();
|
List<RowModel> rows = getDataModelRows(columnMap, columnTypeMap, selectValues, multiFiles, customCols, sheetId, isRomoveDot, false);
|
|
Map<String, List<String>> referenceKeyMap = getReferenceColumnMap(columnMap);
|
|
String queryTemplate = prm.getPrmItemList().get(0).getItemQtName();
|
List<Map<String, String>> cols =
|
queryBusinessObject(typeName, relationName, columnMap, referenceKeyMap, queryTemplate, replaceMap, isRelated, direction, selectValues, conditions, isRomoveDot, orderMap, columnTypeMap);
|
if (multiFiles.size() > 0) {
|
fetchObjectRelatedOids(multiFiles, cols);
|
}
|
if (customCols.size() > 0) {
|
fetchCustomColumns(customCols, cols);
|
}
|
DataGridModel model = new DataGridModel();
|
model.setRows(rows);
|
model.setIdField("oid");
|
model.setSheetId(sheetId);
|
model.setTitle(p.viName);
|
model.setTypeName(p.typeName);
|
|
model.setCols(cols);
|
|
return model;
|
}
|
|
/**
|
* 根据表单的ID及其相关内容获取当前表单对象的数据
|
*
|
* @param formId,表单ID
|
* @param isRomoveDot,是否移除key中的点
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelByFormId(String formId, boolean isRomoveDot) throws VCIError {
|
return getDataGridModelByFormId(formId, "", "", null, false, true, null, isRomoveDot, null);
|
}
|
|
/**
|
* 根据表单的ID及其相关内容获取当前表单对象的数据
|
* @param formId,表单ID
|
* @param typeName,类型名称
|
* @param relationName,链接类型名称
|
* @param replaceMap,替换Map
|
* @param isRelated,是否关联
|
* @param direction,方向
|
* @param conditions,查询条件
|
* @param isRomoveDot,是否移除key中的点
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public DataGridModel getDataGridModelByFormId(String formId, String typeName, String relationName, Map<String, String> replaceMap,
|
boolean isRelated, boolean direction, Map<String, String> conditions, boolean isRomoveDot, Map<String, String> orderMap) throws VCIError {
|
|
PortalVI p = UITools.getService().getPortalVIById(formId);
|
PRM prm = UITools.getPRM(p.prm);
|
|
Map<String, String> columnMap = new LinkedHashMap<String, String>();
|
String sheetId = formId;
|
|
Map<String, List<String>> selectValues = new HashMap<String, List<String>>();
|
Map<String, PRMItem> multiFiles = new HashMap<String, PRMItem>();
|
Map<String, PRMItem> customCols = new HashMap<String, PRMItem>();
|
Map<String, String> columnTypeMap = new HashMap<String, String>();
|
List<RowModel> rows = getDataModelRows(columnMap, columnTypeMap, selectValues, multiFiles, customCols, sheetId, isRomoveDot, true);
|
|
Map<String, List<String>> referenceKeyMap = getReferenceColumnMap(columnMap);
|
|
String queryTemplate = prm.getFormQtName();
|
List<Map<String, String>> cols =
|
queryBusinessObject(typeName, relationName, columnMap, referenceKeyMap, queryTemplate, replaceMap, isRelated, direction, selectValues, conditions, isRomoveDot, orderMap, columnTypeMap);
|
if (multiFiles.size() > 0) {
|
fetchObjectRelatedOids(multiFiles, cols);
|
}
|
|
if (customCols.size() > 0) {
|
fetchCustomColumns(customCols, cols);
|
}
|
|
DataGridModel model = new DataGridModel();
|
model.setRows(rows);
|
model.setIdField("oid");
|
model.setSheetId(sheetId);
|
model.setTitle(p.viName);
|
model.setTypeName(p.typeName);
|
|
model.setCols(cols);
|
|
return model;
|
}
|
|
@Override
|
public DataGridModel getDataGridModelRow(String datagridId) throws VCIError {
|
return getDataGridModelRow(datagridId, true);
|
}
|
|
|
public DataGridModel getDataGridModelRow(String datagridId, boolean isRomoveDot) throws VCIError {
|
PortalVI p = UITools.getService().getPortalVIById(datagridId);
|
PRM prm = UITools.getPRM(p.prm);
|
|
Map<String, String> columnMap = new LinkedHashMap<String, String>();
|
String sheetId = prm.getPrmItemList().get(0).getItemInObj();
|
String[] column = prm.getPrmItemList().get(0).getItemOutFields().split(",");
|
for (int i = 0; i < column.length; i++) {
|
columnMap.put(column[i], column[i]);
|
}
|
|
Map<String, List<String>> selectValues = new HashMap<String, List<String>>();
|
Map<String, PRMItem> multiFiles = new HashMap<String, PRMItem>();
|
Map<String, PRMItem> customCols = new HashMap<String, PRMItem>();
|
Map<String, String> columnTypeMap = new HashMap<String, String>();
|
List<RowModel> rows = getDataModelRows(columnMap, columnTypeMap, selectValues, multiFiles, customCols, sheetId, isRomoveDot, false);
|
|
DataGridModel model = new DataGridModel();
|
model.setRows(rows);
|
model.setIdField("oid");
|
model.setSheetId(sheetId);
|
model.setTitle(p.viName);
|
model.setTypeName(p.typeName);
|
|
return model;
|
}
|
|
/**
|
* 根据table模版获取显示的列头信息
|
* @param prm
|
* @return
|
* @throws PLMError
|
*/
|
private List<RowModel> getDataModelRows(Map<String, String> map, Map<String, String> columnTypeMap, Map<String, List<String>> selectValues,
|
Map<String, PRMItem> multiFiles, Map<String, PRMItem> customCols, String sheetId, boolean isRomoveDot, boolean isForm) throws VCIError {
|
PortalVI sheet = UITools.getService().getPortalVIById(sheetId);
|
PRM sheetPrm = UITools.getPRM(sheet.prm);
|
Map<String, String> undiaplayMap = new HashMap<String, String>();
|
for (int i = 0; i < sheetPrm.getPrmItemList().size(); i++) {
|
String key = sheetPrm.getPrmItemList().get(i).getItemField();
|
if (isForm) {
|
map.put(key, "");
|
}
|
if (map.containsKey(key)) {
|
map.put(key, sheetPrm.getPrmItemList().get(i).getItemName());
|
columnTypeMap.put(key, sheetPrm.getPrmItemList().get(i).getItemType());
|
if (sheetPrm.getPrmItemList().get(i).getItemType().equalsIgnoreCase("multiFile")) {
|
multiFiles.put(key, sheetPrm.getPrmItemList().get(i));
|
} else if (sheetPrm.getPrmItemList().get(i).getItemType().equalsIgnoreCase("custom")) {
|
customCols.put(key, sheetPrm.getPrmItemList().get(i));
|
}
|
if (!sheetPrm.getPrmItemList().get(i).getItemType().equalsIgnoreCase("select")) {
|
continue;
|
}
|
selectValues.put(key, sheetPrm.getPrmItemList().get(i).getItemValueList());
|
} else {
|
undiaplayMap.put(key, "");
|
}
|
}
|
List<RowModel> rows = new ArrayList<RowModel>();
|
RowModel row = new RowModel("oid", "oid");
|
rows.add(row);
|
Iterator<String> itor = map.keySet().iterator();
|
while (itor.hasNext()) {
|
String key = itor.next();
|
String cKey = "";
|
if (isRomoveDot) {
|
cKey = key.replaceAll("\\.", "");
|
} else {
|
cKey = key;
|
}
|
row = new RowModel(cKey, (String)map.get(key));
|
rows.add(row);
|
}
|
|
map.putAll(undiaplayMap);
|
|
return rows;
|
}
|
|
/**
|
* 获取显示列中为引用的列信息
|
* @param rows
|
* @return
|
*/
|
private Map<String, List<String>> getReferenceColumnMap(Map<String, String> columnMap) {
|
Map<String, List<String>> referenceKeyMap = new HashMap<String, List<String>>(); //引用首字段Map
|
Iterator<String> itor = columnMap.keySet().iterator();
|
while (itor.hasNext()) {
|
String key = itor.next();
|
String[] keyArray = key.split("\\.");
|
if (keyArray.length > 1) {
|
List<String> refList = null;
|
if (referenceKeyMap.get(keyArray[0]) == null) {
|
refList = new ArrayList<String>();
|
|
} else {
|
refList = referenceKeyMap.get(keyArray[0]);
|
}
|
refList.add(key);
|
referenceKeyMap.put(keyArray[0], refList);
|
}
|
}
|
|
return referenceKeyMap;
|
}
|
|
/**
|
* 根据查询模版查询符合条件的业务对象,并将其构建为可以显示的对象
|
* @param typeName
|
* @param columns
|
* @param referenceMap
|
* @param referenceKeyMap
|
* @param refNum
|
* @param queryTemplate
|
* @return
|
* @throws DocumentException
|
*/
|
private List<Map<String, String>> queryBusinessObject(String typeName, String relationName, Map<String, String> columnMap, Map<String, List<String>> referenceKeyMap,
|
String queryTemplate, Map<String, String> replaceMap, boolean isRelated, boolean direction, Map<String, List<String>> selectValues, Map<String, String> conditions,
|
boolean isRomoveDot, Map<String, String> orderMap, Map<String, String> columnTypeMap) {
|
|
try {
|
List<Map<String, String>> listMap = new ArrayList<Map<String, String>>();
|
Map<String, Map<String, String>> rowRefMap = new LinkedHashMap<String, Map<String, String>>();
|
|
firstQuery(queryTemplate, isRelated, direction, columnMap, referenceKeyMap, rowRefMap, listMap, replaceMap,
|
selectValues, conditions, orderMap, columnTypeMap);
|
if (referenceKeyMap != null && referenceKeyMap.keySet().size() > 0) {
|
secondQuery(rowRefMap, typeName, relationName, isRelated, referenceKeyMap, listMap, isRomoveDot);
|
}
|
return listMap;
|
} catch (VCIError e) {
|
e.printStackTrace();
|
} catch (DocumentException e) {
|
e.printStackTrace();
|
}
|
return null;
|
}
|
|
/**
|
* 首次查询
|
* @param queryTemplate
|
* @param isRelated
|
* @param direction
|
* @param columnMap
|
* @param referenceKeyMap
|
* @param rowRefMap
|
* @param listMap
|
* @param replaceMap
|
* @throws PLMError
|
* @throws VciException
|
* @throws DocumentException
|
*/
|
private void firstQuery(String queryTemplate, boolean isRelated, boolean direction, Map<String, String> columnMap, Map<String, List<String>> referenceKeyMap,
|
Map<String, Map<String, String>> rowRefMap, List<Map<String, String>> listMap, Map<String, String> replaceMap, Map<String, List<String>> selectValues,
|
Map<String, String> conditions, Map<String, String> orderMap, Map<String, String> columnTypeMap) throws VCIError, DocumentException {
|
|
QTInfo wrapper = QTDClient.getService().getQT(queryTemplate);
|
|
//查询数据
|
Map<String, String> map = null;
|
Map<String, String> refInstanceMap = null;
|
String oid = "";
|
int len = 0;
|
if (isRelated) {
|
LinkObject[] linkObjects = null;
|
|
QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), queryTemplate);
|
PageInfo pageInfo = null;
|
if(replaceMap.containsKey("_PAGESIZE") && replaceMap.containsKey("_PAGENO")){
|
int pageSize = Integer.valueOf(replaceMap.get("_PAGESIZE"));
|
int pageNO = Integer.valueOf(replaceMap.get("_PAGENO"));
|
replaceMap.remove("_PAGESIZE");
|
replaceMap.remove("_PAGENO");
|
pageInfo = new PageInfo();
|
pageInfo.setPageNO(pageNO);
|
pageInfo.setRowCount(pageSize);
|
}
|
QueryTemplate qt_ = OQTool.replaceQTValues(qt, replaceMap);
|
if (conditions != null && conditions.size() > 0) {
|
Condition condition = OQTool.getCondition(conditions);
|
Condition mergeCondition = OQTool.mergeCondition(qt_.getCondition(), condition, Connector.AND);
|
qt_.setCondition(mergeCondition);
|
}
|
if(pageInfo != null){
|
qt_.setPageInfo(pageInfo);
|
}
|
updateQTOrderCondition(orderMap, qt_, columnMap, columnTypeMap);
|
linkObjects = QTClient.getService().findLTObjects(qt.getId(), OQTool.qtTOXMl(qt_).asXML());
|
|
Iterator<String> refIterator = columnMap.keySet().iterator();
|
while (refIterator.hasNext()) {
|
String ckey = refIterator.next();
|
if (ckey.indexOf("t_oid") >= 0) {
|
direction = true;
|
} else {
|
direction = false;
|
}
|
break;
|
}
|
|
len = linkObjects.length;
|
for (int i = 0; i < len; i++) {
|
map = new HashMap<String, String>();
|
refInstanceMap = new LinkedHashMap<String, String>();
|
oid = "";
|
for (int j = 0; j < linkObjects[i].hisAttrValList.length; j++) {
|
if ("oid".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
map.put("linkoid", linkObjects[i].hisAttrValList[j].attrVal);
|
} else if ("ts".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
map.put("linkts", linkObjects[i].hisAttrValList[j].attrVal);
|
}
|
if (direction) {
|
if ("t_oid".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
oid = linkObjects[i].hisAttrValList[j].attrVal;
|
map.put("oid", linkObjects[i].hisAttrValList[j].attrVal);
|
} else if ("t_revisionoid".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
map.put("revisionoid", linkObjects[i].hisAttrValList[j].attrVal);
|
} else if ("t_nameoid".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
map.put("nameoid", linkObjects[i].hisAttrValList[j].attrVal);
|
} else if ("t_btwname".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
map.put("btmname", linkObjects[i].hisAttrValList[j].attrVal);
|
}
|
} else {
|
if ("f_oid".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
oid = linkObjects[i].hisAttrValList[j].attrVal;
|
map.put("oid", linkObjects[i].hisAttrValList[j].attrVal);
|
} else if ("f_revisionoid".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
map.put("revisionoid", linkObjects[i].hisAttrValList[j].attrVal);
|
} else if ("f_nameoid".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
map.put("nameoid", linkObjects[i].hisAttrValList[j].attrVal);
|
} else if ("f_btwname".equalsIgnoreCase(linkObjects[i].hisAttrValList[j].attrName)) {
|
map.put("btmname", linkObjects[i].hisAttrValList[j].attrVal);
|
}
|
}
|
if (columnMap.containsKey(linkObjects[i].hisAttrValList[j].attrName.toLowerCase())) {
|
map.put(linkObjects[i].hisAttrValList[j].attrName.toLowerCase(),
|
getDisplayValue(linkObjects[i].hisAttrValList[j].attrName.toLowerCase(), linkObjects[i].hisAttrValList[j].attrVal, selectValues));
|
} else {
|
map.put(linkObjects[i].hisAttrValList[j].attrName.toLowerCase(), linkObjects[i].hisAttrValList[j].attrVal);
|
}
|
}
|
listMap.add(map);
|
|
refIterator = columnMap.keySet().iterator();
|
boolean isFisrt = true;
|
while (refIterator.hasNext()) {
|
String ckey = refIterator.next();
|
if (ckey.split("\\.").length == 1) {
|
continue;
|
}
|
if (isFisrt) {
|
if (ckey.indexOf("t_oid") >= 0) {
|
refInstanceMap.put("t_oid", oid);
|
} else {
|
refInstanceMap.put("f_oid", oid);
|
}
|
} else {
|
isFisrt = false;
|
}
|
|
refInstanceMap.put(ckey, oid);
|
}
|
rowRefMap.put(oid, refInstanceMap);
|
}
|
} else {
|
BusinessObject[] v = null;
|
QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), queryTemplate);
|
PageInfo pageInfo = null;
|
if(replaceMap.containsKey("_PAGESIZE") && replaceMap.containsKey("_PAGENO")){
|
int pageSize = Integer.valueOf(replaceMap.get("_PAGESIZE"));
|
int pageNO = Integer.valueOf(replaceMap.get("_PAGENO"));
|
replaceMap.remove("_PAGESIZE");
|
replaceMap.remove("_PAGENO");
|
pageInfo = new PageInfo();
|
pageInfo.setPageNO(pageNO);
|
pageInfo.setRowCount(pageSize);
|
}
|
QueryTemplate qt_ = OQTool.replaceQTValues(qt, replaceMap);
|
if (conditions != null && conditions.size() > 0) {
|
Condition condition = OQTool.getCondition(conditions);
|
Condition mergeCondition = OQTool.mergeCondition(qt_.getCondition(), condition, Connector.AND);
|
qt_.setCondition(mergeCondition);
|
}
|
if(pageInfo != null){
|
qt_.setPageInfo(pageInfo);
|
}
|
updateQTOrderCondition(orderMap, qt_, columnMap, columnTypeMap);
|
v = QTClient.getService().findBTMObjects(qt.getId(), OQTool.qtTOXMl(qt_).asXML());
|
len = v.length;
|
for (int i = 0; i < len; i++) {
|
map = new HashMap<String, String>();
|
refInstanceMap = new HashMap<String, String>();
|
oid = "";
|
for (int j = 0; j < v[i].hisAttrValList.length; j++) {
|
if ("oid".equalsIgnoreCase(v[i].hisAttrValList[j].attrName)) {
|
oid = v[i].hisAttrValList[j].attrVal;
|
map.put("oid", v[i].hisAttrValList[j].attrVal);
|
continue;
|
} else if ("revisionoid".equalsIgnoreCase(v[i].hisAttrValList[j].attrName)) {
|
map.put("revisionoid", v[i].hisAttrValList[j].attrVal);
|
continue;
|
} else if ("nameoid".equalsIgnoreCase(v[i].hisAttrValList[j].attrName)) {
|
map.put("nameoid", v[i].hisAttrValList[j].attrVal);
|
continue;
|
} else if ("btmname".equalsIgnoreCase(v[i].hisAttrValList[j].attrName)) {
|
map.put("btmname", v[i].hisAttrValList[j].attrVal);
|
continue;
|
}
|
|
if (columnMap.containsKey(v[i].hisAttrValList[j].attrName.toLowerCase())) {
|
map.put(v[i].hisAttrValList[j].attrName.toLowerCase(),
|
getDisplayValue(v[i].hisAttrValList[j].attrName.toLowerCase(), v[i].hisAttrValList[j].attrVal, selectValues));
|
} else {
|
map.put(v[i].hisAttrValList[j].attrName.toLowerCase(), v[i].hisAttrValList[j].attrVal);
|
}
|
if (referenceKeyMap.keySet().contains(v[i].hisAttrValList[j].attrName.toLowerCase())) {
|
refInstanceMap.put(v[i].hisAttrValList[j].attrName.toLowerCase(), v[i].hisAttrValList[j].attrVal);
|
}
|
}
|
listMap.add(map);
|
rowRefMap.put(oid, refInstanceMap);
|
}
|
}
|
}
|
|
|
private void updateQTOrderCondition(Map<String, String> orderMap, QueryTemplate qt, Map<String, String> columnMap,
|
Map<String, String> columnTypeMap) {
|
if (orderMap == null || orderMap.size() == 0) {
|
return;
|
}
|
List<OrderInfo> orderInfoList = qt.getOrderInfoList();
|
if (orderInfoList == null) {
|
orderInfoList = new ArrayList<OrderInfo>();
|
qt.setOrderInfoList(orderInfoList);
|
}
|
|
Iterator<String> itor = orderMap.keySet().iterator();
|
int i = 1;
|
boolean isFirst = true;
|
while (itor.hasNext()) {
|
String key = itor.next();
|
String ckey = getTrueColumnName(columnMap, key);
|
if (ckey == null) {
|
continue;
|
}
|
boolean isOk = isOrder(columnTypeMap, ckey);
|
if (!isOk) {
|
continue;
|
}
|
ckey = ckey.toUpperCase();
|
if (isFirst && orderInfoList.size() > 0) {
|
orderInfoList.clear();
|
isFirst = false;
|
}
|
String value = orderMap.get(key);
|
OrderInfo e = new OrderInfo();
|
e.setLevel(i);
|
e.setOrderField(ckey);
|
if (value != null && value.equalsIgnoreCase("DESC")) {
|
e.setOrderMode(QTConstants.ORDERMODE_DESC);
|
} else {
|
e.setOrderMode(QTConstants.ORDERMODE_ASC);
|
}
|
orderInfoList.add(e);
|
i++;
|
}
|
}
|
|
private String getTrueColumnName(Map<String, String> columnMap, String column) {
|
Iterator<String> itor = columnMap.keySet().iterator();
|
while (itor.hasNext()) {
|
String key = itor.next();
|
if (key.split("\\.").length > 2) {
|
continue;
|
}
|
if (column.equals(key.replaceAll("\\.", ""))) {
|
return key;
|
}
|
}
|
return null;
|
}
|
|
private boolean isOrder(Map<String, String> columnTypeMap, String column) {
|
String columnType = columnTypeMap.get(column);
|
if (columnType == null
|
|| columnType.equalsIgnoreCase("file")
|
|| columnType.equalsIgnoreCase("multiFile")
|
|| columnType.equalsIgnoreCase("custom")) {
|
return false;
|
}
|
return true;
|
}
|
|
/**
|
* 根据查询条件获取查询对象的总数
|
* @param isRelated,是否链接类型,true代表是,false代表否
|
* @param direction,方向,true代表正向,false代码反向
|
* @param conditions,查询条件,业务对象至少包含type,链接类型至少包含type、linkType和fromToOid
|
* @return
|
* @throws PLMError
|
* @throws VciException
|
*/
|
public int fetchConditionResultCount(boolean isRelated, boolean direction, Map<String, String> conditions) throws VCIError {
|
int count = 0;
|
if (conditions == null || conditions.size() == 0) {
|
return 0;
|
}
|
|
if (isRelated) {
|
QueryTemplate qt2 = new QueryTemplate();
|
qt2.setId("ltQuery");
|
qt2.setLinkType(conditions.get("linkType"));
|
qt2.setType("link");
|
List<String> clauseList = new ArrayList<String>();
|
clauseList.add("*");
|
qt2.setClauseList(clauseList);
|
String queryType = conditions.get("type");
|
String fromOrToOid = conditions.get("fromToOid");
|
conditions.remove("type");
|
conditions.remove("linkType");
|
conditions.remove("fromToOid");
|
if(direction){
|
qt2.setDirection(QTConstants.DIRECTION_POSITIVE);
|
}else{
|
qt2.setDirection(QTConstants.DIRECTION_OPPOSITE);
|
}
|
if(conditions.containsKey("_PAGESIZE") && conditions.containsKey("_PAGENO")){
|
int pageSize = Integer.valueOf(conditions.get("_PAGESIZE"));
|
int pageNO = Integer.valueOf(conditions.get("_PAGENO"));
|
conditions.remove("_PAGESIZE");
|
conditions.remove("_PAGENO");
|
PageInfo pageInfo = new PageInfo();
|
pageInfo.setPageNO(pageNO);
|
pageInfo.setRowCount(pageSize);
|
qt2.setPageInfo(pageInfo);
|
}
|
Condition cond = OQTool.getConditionForLink(qt2.getDirection(), fromOrToOid, queryType, conditions);
|
qt2.setCondition(cond);
|
|
count = (int)QTClient.getService().findTotalCount(qt2.getId(), OQTool.qtTOXMl(qt2).asXML());
|
} else {
|
QueryTemplate qt2 = new QueryTemplate();
|
qt2.setId("btmQuery");
|
qt2.setBtmType(conditions.get("type"));
|
qt2.setType("btm");
|
List<String> clauseList = new ArrayList<String>();
|
clauseList.add("*");
|
qt2.setClauseList(clauseList);
|
conditions.remove("type");
|
if(conditions.containsKey("_PAGESIZE") && conditions.containsKey("_PAGENO")){
|
int pageSize = Integer.valueOf(conditions.get("_PAGESIZE"));
|
int pageNO = Integer.valueOf(conditions.get("_PAGENO"));
|
conditions.remove("_PAGESIZE");
|
conditions.remove("_PAGENO");
|
PageInfo pageInfo = new PageInfo();
|
pageInfo.setPageNO(pageNO);
|
pageInfo.setRowCount(pageSize);
|
qt2.setPageInfo(pageInfo);
|
}
|
Condition cond = OQTool.getCondition(conditions);
|
qt2.setCondition(cond);
|
count = (int)QTClient.getService().findTotalCount(qt2.getId(), OQTool.qtTOXMl(qt2).asXML());
|
}
|
return count;
|
}
|
|
private String getDisplayValue(String key , String value, Map<String, List<String>> selectValues) {
|
if (!selectValues.containsKey(key)) {
|
return value;
|
}
|
if (selectValues.get(key).size() == 0) {
|
return getEnumDisplayValue(key, value);
|
}
|
List<String> list = selectValues.get(key);
|
for (int i = 0; i < list.size(); i++) {
|
String valueStr = list.get(i);
|
String ckey = valueStr.substring(0, valueStr.indexOf("{"));
|
String cvalue = valueStr.substring(valueStr.indexOf("{") + 1, valueStr.indexOf("}"));
|
if (value.equals(cvalue)) {
|
return ckey;
|
}
|
}
|
return value;
|
}
|
|
private String getEnumDisplayValue(String field, String value) {
|
AttribItem attr = null;
|
if (attributeMap.containsKey(field)) {
|
attr = attributeMap.get(field);
|
} else {
|
attr = ApProvider.getInstance().getAbItemByName(field);
|
attributeMap.put(field, attr);
|
}
|
String enumName = null;
|
if (enumNameMap.containsKey(field)) {
|
enumName = enumNameMap.get(field);
|
} else {
|
enumName = ApProvider.getInstance().getOtherValueByType(attr.other, "enumName");
|
enumNameMap.put(field, enumName);
|
}
|
if (enumName== null || enumName.equals("")) {
|
return value;
|
}
|
EnumItem enumItem = null;
|
if (enumItemMap.containsKey(enumName)) {
|
enumItem = enumItemMap.get(enumName);
|
} else {
|
enumItem = EnumProvider.getInstance().getEnumByName(enumName);
|
enumItemMap.put(enumName, enumItem);
|
}
|
for (EnumChild child : enumItem.children) {
|
if (value.equals(child.value)) {
|
return child.name;
|
}
|
}
|
return value;
|
}
|
|
/**
|
* 二次查询
|
* @param rowRefMap
|
* @param typeName
|
* @param isRelated
|
* @param referenceKeyMap
|
* @param listMap
|
*/
|
private void secondQuery(Map<String, Map<String, String>> rowRefMap, String typeName, String relationName, boolean isRelated, Map<String,
|
List<String>> referenceKeyMap, List<Map<String, String>> listMap, boolean isRomoveDot) {
|
Iterator<String> itor = rowRefMap.keySet().iterator();
|
Map<String, String> queryMap = new LinkedHashMap<String, String>();
|
boolean isFirstRow = true;
|
String firstCol = "";
|
String ctypeName = typeName;
|
if (isRelated) {
|
ctypeName = relationName;
|
}
|
while (itor.hasNext()) {
|
String key = itor.next();
|
Map<String, String> instanceMap = rowRefMap.get(key);
|
Iterator<String> citor = instanceMap.keySet().iterator();
|
while (citor.hasNext()) {
|
String ckey = citor.next();
|
String cVal = instanceMap.get(ckey);
|
if (isFirstRow) {
|
queryMap.put(ckey, ctypeName + "." + ckey + "=" + cVal);
|
} else {
|
queryMap.put(ckey, queryMap.get(ckey) + "," + cVal);
|
}
|
|
List<String> rList = referenceKeyMap.get(ckey);
|
if (rList == null || isRelated) {
|
continue;
|
}
|
for (int i = 0; i < rList.size(); i++) {
|
if (isFirstRow) {
|
queryMap.put(rList.get(i), ctypeName + firstCol +"." + rList.get(i) + "=" + cVal);
|
} else {
|
queryMap.put(rList.get(i), queryMap.get(rList.get(i)) + "," + cVal);
|
}
|
}
|
}
|
isFirstRow = false;
|
}
|
if (queryMap.size() > 0) {
|
int colNum = queryMap.size();
|
|
RefPath[] refPaths = queryReference(queryMap, typeName);
|
if (refPaths == null) {
|
return;
|
}
|
for (int i = 0; i < listMap.size(); i++) {
|
Map<String, String> rowVal = listMap.get(i);
|
for (int j = 0; j < colNum; j++) {
|
String key = queryMap.keySet().toArray(new String[colNum])[j];
|
if (referenceKeyMap.containsKey(key)) {
|
continue;
|
}
|
//TODO 获取value的显示值,如果为enum类型,应该显示名称
|
String[] keys = key.split("\\.");
|
String cVal = "";
|
if (i < refPaths[j].values.length) {
|
cVal = getEnumDisplayValue(keys[keys.length - 1], refPaths[j].values[i].value);
|
}
|
|
String refereceKey = "";
|
if (isRomoveDot) {
|
refereceKey = queryMap.keySet().toArray(new String[colNum])[j].replaceAll("\\.", "");
|
} else {
|
refereceKey = queryMap.keySet().toArray(new String[colNum])[j];
|
}
|
rowVal.put(refereceKey, cVal);
|
}
|
|
}
|
}
|
}
|
|
/**
|
* 查询参照对象
|
* @param map
|
* @return
|
*/
|
private RefPath[] queryReference(Map<String, String> map, String typeName) {
|
PLMReferenceQueryFacade facade = new PLMReferenceQueryFacade();
|
try {
|
List<String> queryList = new ArrayList<String>();
|
Iterator<String> itor = map.keySet().iterator();
|
while(itor.hasNext()) {
|
queryList.add(map.get(itor.next()));
|
}
|
RefPath[] refPath = facade.query(queryList.toArray(new String[queryList.size()]), typeName);
|
return refPath;
|
} catch (Throwable e) {
|
e.printStackTrace();
|
}
|
return null;
|
}
|
|
@Override
|
public PortalVI getFormViewById(String formId) throws VCIError {
|
PortalVI sheet = UITools.getService().getPortalVIById(formId);
|
return sheet;
|
}
|
|
@Override
|
public PLTabPage[] getPageLayoutTab(String typeName, String pageLayoutName) throws VCIError {
|
PLTabPage[] tabPages = UITools.getService().getPLTabPagesByTypeANDCode(typeName, pageLayoutName);
|
return tabPages;
|
}
|
|
@Override
|
public PortalVI getTableDefinationByTypeAndTableName(String type, String tableName) throws VCIError {
|
PortalVI table = UITools.getService().getPortalVIByTypeNameAndVIName(type, tableName);
|
return table;
|
}
|
|
@Override
|
public PLUILayout getContextDefination(String type, String contextName) throws VCIError {
|
PLUILayout[] obj = UITools.getService().getPLUILayoutsByRelatedType(type);
|
PLUILayout context = null;
|
for (int i = 0; i < obj.length; i++) {
|
if (obj[i].plCode.equals(contextName)) {
|
context = obj[i];
|
break;
|
}
|
}
|
return context;
|
}
|
|
public PLTabPage[] getTabDefinationByContextId(String contextId) throws VCIError {
|
PLTabPage[] tabs = UITools.getService().getPLTabPagesByPageDefinationOId(contextId);
|
return tabs;
|
}
|
|
public PLPageDefination[] getPageDefinationById(String tabId) throws Throwable {
|
PLPageDefination[] pageDefinations = UITools.getService().getPLPageDefinationsByPageContextOId(tabId);
|
return pageDefinations;
|
}
|
|
public BusinessObject[] getAllTypeInfo(String typeName) throws VCIError {
|
QueryTemplate qt2 = new QueryTemplate();
|
qt2.setId("btm");
|
qt2.setBtmType(typeName);
|
qt2.setType("btm");
|
List<String> clauseList = new ArrayList<String>();
|
clauseList.add("*");
|
qt2.setClauseList(clauseList);
|
|
BusinessObject[] bos = QTClient.getService().findBTMObjects(qt2.getId(), OQTool.qtTOXMl(qt2).asXML());
|
|
return bos;
|
}
|
|
private void fetchObjectRelatedOids(Map<String, PRMItem> prmMap, List<Map<String, String>> cols) throws VCIError {
|
Iterator<String> fileItor = prmMap.keySet().iterator();
|
while (fileItor.hasNext()) {
|
String key = fileItor.next();
|
PRMItem prm = prmMap.get(key);
|
String customCls = prm.getItemCustomClass();
|
if (customCls == null || customCls.trim().equals("")) {
|
Iterator<Map<String, String>> itor = cols.iterator();
|
Map<String, Map<String, String>> cboMap = new HashMap<String, Map<String, String>>();
|
List<String> idList = new ArrayList<String>();
|
while (itor.hasNext()) {
|
Map<String, String> map = itor.next();
|
String oid = map.get("oid");
|
idList.add(oid);
|
cboMap.put(oid, map);
|
}
|
ICommonFileUI fileUI = new CommonFileUI();
|
BusinessObject[] bos = fileUI.getMultiObjectFiles(idList.toArray(new String[0]));
|
Map<String, List<BusinessObject>> sboFiles = new HashMap<String, List<BusinessObject>>();
|
for (int i = 0; i < bos.length; i++) {
|
String oid = ObjectTool.getBOAttributeValue(bos[i], FileObjectType.SELECT_DOCUMENT_ID);
|
if (sboFiles.get(oid) == null) {
|
List<BusinessObject> fileBO = new ArrayList<BusinessObject>();
|
fileBO.add(bos[i]);
|
sboFiles.put(oid, fileBO);
|
} else {
|
List<BusinessObject> fileBO = sboFiles.get(oid);
|
fileBO.add(bos[i]);
|
}
|
}
|
Iterator<String> boIter = cboMap.keySet().iterator();
|
while (boIter.hasNext()) {
|
String oid = boIter.next();
|
if (sboFiles.get(oid) == null) {
|
continue;
|
}
|
BusinessObject[] fileBo = sboFiles.get(oid).toArray(new BusinessObject[0]);
|
StringBuffer idBuffer = new StringBuffer();
|
for (int i = 0; i < fileBo.length; i++) {
|
if (i != 0) {
|
idBuffer.append(",");
|
}
|
idBuffer.append(fileBo[i].oid).append(":").append(fileBo[i].name);
|
}
|
Map<String, String> map = cboMap.get(oid);
|
map.put(key, idBuffer.toString());
|
}
|
// while (itor.hasNext()) {
|
// Map<String, String> map = itor.next();
|
// String oid = map.get("oid");
|
// ICommonFileUI fileUI = new CommonFileUI();
|
// BusinessObject[] bos = fileUI.getAllFile(oid);
|
// StringBuffer idBuffer = new StringBuffer();
|
// for (int i = 0; i < bos.length; i++) {
|
// if (i != 0) {
|
// idBuffer.append(",");
|
// }
|
// idBuffer.append(bos[i].oid).append(":").append(bos[i].name);
|
// }
|
// map.put(key, idBuffer.toString());
|
// }
|
} else {
|
try {
|
Class<?> cls = Class.forName(customCls);
|
ICustomDefine custom = (ICustomDefine)cls.getConstructor().newInstance();;
|
custom.getCustomValue(key, prmMap, cols);
|
} catch (ClassNotFoundException e) {
|
e.printStackTrace();
|
} catch (IllegalArgumentException e) {
|
e.printStackTrace();
|
} catch (SecurityException e) {
|
e.printStackTrace();
|
} catch (InstantiationException e) {
|
e.printStackTrace();
|
} catch (IllegalAccessException e) {
|
e.printStackTrace();
|
} catch (InvocationTargetException e) {
|
e.printStackTrace();
|
} catch (NoSuchMethodException e) {
|
e.printStackTrace();
|
}
|
}
|
}
|
|
}
|
|
private void fetchCustomColumns(Map<String, PRMItem> prmMap, List<Map<String, String>> cols) throws VCIError {
|
Iterator<String> itor = prmMap.keySet().iterator();
|
|
while (itor.hasNext()) {
|
String key = itor.next();
|
PRMItem prm = prmMap.get(key);
|
String sql = prm.getItemAddFilter();
|
if (sql == null || sql.trim().equals("")) {
|
continue;
|
}
|
String customCls = prm.getItemCustomClass();
|
try {
|
Class<?> cls = Class.forName(customCls);
|
ICustomDefine custom = (ICustomDefine)cls.getConstructor().newInstance();;
|
custom.getCustomValue(key, prmMap, cols);
|
} catch (ClassNotFoundException e) {
|
e.printStackTrace();
|
} catch (IllegalArgumentException e) {
|
e.printStackTrace();
|
} catch (SecurityException e) {
|
e.printStackTrace();
|
} catch (InstantiationException e) {
|
e.printStackTrace();
|
} catch (IllegalAccessException e) {
|
e.printStackTrace();
|
} catch (InvocationTargetException e) {
|
e.printStackTrace();
|
} catch (NoSuchMethodException e) {
|
e.printStackTrace();
|
} catch (Exception e) {
|
e.printStackTrace();
|
} catch (Throwable e) {
|
e.printStackTrace();
|
}
|
|
}
|
}
|
|
/**
|
* 根据类型名称和上下文获得对应的form定义
|
*
|
* @param type
|
* @param contextName
|
* @return
|
* @throws Throwable
|
*/
|
public String getFormNameByByTypeAndContext(String type, String contextName) throws Throwable {
|
PLUILayout context = this.getContextDefination(type, contextName);
|
if (context == null) {
|
return "";
|
}
|
PLTabPage[] tabs = UITools.getService().getTabPagesByContextIdAndType(context.plOId, (short)2);
|
if (tabs.length < 1) {
|
return "";
|
}
|
PLPageDefination[] pageDefinations = UITools.getService().getPLPageDefinationsByPageContextOId(tabs[0].plOId);
|
PLDefination defination = UITools.getPLDefination(pageDefinations[0].plDefination);
|
if (defination == null) {
|
return "";
|
}
|
return defination.getTemplateId();
|
}
|
|
public static void main(String[] args) {
|
DataModelFactory factory = new DataModelFactory();
|
DataGridModel data = null;
|
try {
|
Map<String, String> replaceMap = new HashMap<String, String>();
|
replaceMap.put("type", "issue");
|
replaceMap.put("linkType", "IssueRelation");
|
replaceMap.put("f_oid", "55EF9EA0-5EE2-83BE-24B3-1B919788F802");
|
// replaceMap.put("creator", "1");
|
// data = factory.getDataGridModelById("5EDBA58B-C29A-E85F-26F3-33F95B91A512", "staff", "", null, false, true);
|
// data = factory.getDataGridModelwById("3B04B622-8924-35EF-674F-B8F45F628D38");
|
data = factory.getDataGridModelById("1504A199-F286-B19D-C39B-C21F2278701D", "issue", "IssueRelation", replaceMap, true, true, null, false, null);
|
// String formName = factory.getFormNameByByTypeAndContext("Document", "Document");
|
System.out.println(data);
|
} catch (VCIError e) {
|
e.printStackTrace();
|
}
|
}
|
}
|