制度手册术语,适用范围异常处理

This commit is contained in:
lihongyu 2022-10-18 14:22:32 +08:00
parent 21f6bf8a5e
commit 130d37e7cd

View File

@ -531,10 +531,8 @@ public class Report1Gener {
Map<String, String> contentMap = getContentData(repositoryId, controlShapeId); Map<String, String> contentMap = getContentData(repositoryId, controlShapeId);
String listDef = contentMap.get("listDef"); String listDef = contentMap.get("listDef");
String contentXml = contentMap.get("content"); String contentXml = contentMap.get("content");
// 流程步骤的指标表格 // 流程步骤的指标表格
setTableValueOfKPI("kpi", repositoryId, KPITable, relationFileMap); setTableValueOfKPI("kpi", repositoryId, KPITable, relationFileMap);
if (search != null && search.size() > 0) { if (search != null && search.size() > 0) {
// 复制附件 // 复制附件
// int index = 1; // int index = 1;
@ -566,6 +564,7 @@ public class Report1Gener {
} }
JSONArray termTable = new JSONArray(); //术语定义Table JSONArray termTable = new JSONArray(); //术语定义Table
// 属性特征 属性代码KEY // 属性特征 属性代码KEY
try {
PALRepositoryPropertyModel term = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"term"); PALRepositoryPropertyModel term = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"term");
String termVal = term.getPropertyValue(); String termVal = term.getPropertyValue();
JSONObject termObj = JSONObject.parseObject(termVal); JSONObject termObj = JSONObject.parseObject(termVal);
@ -585,29 +584,37 @@ public class Report1Gener {
} }
} }
} }
} catch (Exception e) {
// TODO: handle exception
}
JSONArray organizationTable = new JSONArray(); //组织职责Table JSONArray organizationTable = new JSONArray(); //组织职责Table
// 属性特征 属性代码KEY // 属性特征 属性代码KEY
PALRepositoryPropertyModel Organizational = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"Organizational_role"); try {
String OrganizationalVal = Organizational.getPropertyValue(); PALRepositoryPropertyModel Organizational = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"Organizational_role");
JSONObject OrganizationalObj = JSONObject.parseObject(OrganizationalVal); String OrganizationalVal = Organizational.getPropertyValue();
if (OrganizationalObj != null && !OrganizationalObj.isEmpty()) { JSONObject OrganizationalObj = JSONObject.parseObject(OrganizationalVal);
JSONArray tableArr = OrganizationalObj.getJSONArray("table"); if (OrganizationalObj != null && !OrganizationalObj.isEmpty()) {
if (tableArr != null && !tableArr.isEmpty()) { JSONArray tableArr = OrganizationalObj.getJSONArray("table");
for (Object obj : tableArr) { if (tableArr != null && !tableArr.isEmpty()) {
JSONObject obj2 = (JSONObject) obj; for (Object obj : tableArr) {
if (!"table_head".equals(obj2.getString("id"))) { JSONObject obj2 = (JSONObject) obj;
String name = obj2.getString("name"); if (!"table_head".equals(obj2.getString("id"))) {
String desc = obj2.getString("desc"); String name = obj2.getString("name");
JSONObject tmp = new JSONObject(); String desc = obj2.getString("desc");
tmp.put("name", specialCharTransfer(name).replace("\n", WRAPSTRING)); JSONObject tmp = new JSONObject();
tmp.put("desc", specialCharTransfer(desc).replace("\n", WRAPSTRING)); tmp.put("name", specialCharTransfer(name).replace("\n", WRAPSTRING));
organizationTable.add(tmp); tmp.put("desc", specialCharTransfer(desc).replace("\n", WRAPSTRING));
organizationTable.add(tmp);
}
} }
} }
} }
} catch (Exception e) {
// TODO: handle exception
} }
//支持文件 //支持文件
JSONArray support_files = new JSONArray(); //组织职责Table JSONArray support_files = new JSONArray(); //组织职责Table
List<DesignerShapeRelationModel> relationList = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "support_files"); List<DesignerShapeRelationModel> relationList = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "support_files");
@ -745,7 +752,7 @@ public class Report1Gener {
Timestamp timestamp = UtilDate.parseTsFromDateTime(val); Timestamp timestamp = UtilDate.parseTsFromDateTime(val);
val = UtilDate.yearFormat(timestamp) + "" + Integer.parseInt(UtilDate.monthFormat(timestamp)) + "" + UtilDate.dayFormat(timestamp) + ""; val = UtilDate.yearFormat(timestamp) + "" + Integer.parseInt(UtilDate.monthFormat(timestamp)) + "" + UtilDate.dayFormat(timestamp) + "";
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); //e.printStackTrace();
} }
} }
obj.put(attr, val); obj.put(attr, val);