流程手册 制度 表格开发完成。

This commit is contained in:
翟林帆 2022-07-05 23:54:12 +08:00
parent d101790c41
commit c3d516f7ae
10 changed files with 240 additions and 23583 deletions

View File

@ -15,6 +15,7 @@ import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
@ -40,6 +41,8 @@ import com.alibaba.fastjson.JSONObject;
import static com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil.specialCharTransfer;
import static com.actionsoft.apps.coe.pal.pal.repository.constant.CoeProcessLevelConstant.LINK_PREFIX;
import static com.alibaba.druid.util.FnvHash.Constants.NVARCHAR2;
/**
@ -163,7 +166,6 @@ public class Report1Gener {
}
JSONObject dataMap = getData(repositoryId, wizardJsonData, docPath, fileName);
if (dataMap != null) {
System.out.println("dataMap字段数为======"+dataMap.size());
OutputWordUtil.createDoc2(dataMap, tempPath, tempName, docName);
}
}
@ -357,6 +359,112 @@ public class Report1Gener {
}
}
JSONArray termTable = new JSONArray(); //术语定义Table
// 属性特征 属性代码KEY
PALRepositoryPropertyModel term = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"term");
String termVal = term.getPropertyValue();
JSONObject termObj = JSONObject.parseObject(termVal);
if (termObj != null && !termObj.isEmpty()) {
JSONArray tableArr = termObj.getJSONArray("table");
if (tableArr != null && !tableArr.isEmpty()) {
for (Object obj : tableArr) {
JSONObject obj2 = (JSONObject) obj;
if (!"table_head".equals(obj2.getString("id"))) {
String name = obj2.getString("name");
String desc = obj2.getString("desc");
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", desc);
termTable.add(tmp);
}
}
}
}
JSONArray organizationTable = new JSONArray(); //组织职责Table
// 属性特征 属性代码KEY
PALRepositoryPropertyModel Organizational = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"Organizational_role");
String OrganizationalVal = Organizational.getPropertyValue();
JSONObject OrganizationalObj = JSONObject.parseObject(OrganizationalVal);
if (OrganizationalObj != null && !OrganizationalObj.isEmpty()) {
JSONArray tableArr = OrganizationalObj.getJSONArray("table");
if (tableArr != null && !tableArr.isEmpty()) {
for (Object obj : tableArr) {
JSONObject obj2 = (JSONObject) obj;
if (!"table_head".equals(obj2.getString("id"))) {
String name = obj2.getString("name");
String desc = obj2.getString("desc");
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", desc);
organizationTable.add(tmp);
}
}
}
}
//支持文件
JSONArray supportfiles = new JSONArray(); //组织职责Table
List<DesignerShapeRelationModel> relationList = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "support_files");
int index = 0;
for (DesignerShapeRelationModel relation : relationList) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId);
if (model != null) {
index++;
String name = model.getName();
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", index);
supportfiles.add(tmp);
}
}
//相关文件 R_relevant_flies
JSONArray relevant_flies = new JSONArray(); //组织职责Table
List<DesignerShapeRelationModel> relationList2 = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "R_relevant_flies");
int count = 0;
for (DesignerShapeRelationModel relation : relationList2) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId);
if (model != null) {
count++;
String name = model.getName();
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", count);
relevant_flies.add(tmp);
}
}
// 2张表
// 文件属性内容文本内容
// 文件属性内容关联表
// 根据绩效所属模型查询绩效形状的详细信息
// 流程文件属性术语与定义表格类型
// 流程文件属性绩效形状的信息
// 流程文件属性相关文件和支持文件
//术语
dataMap.put("term_table", termTable);//table4
//组织和职责
dataMap.put("organization_table", organizationTable);//table5
//支持文件
dataMap.put("supports_table", supportfiles);//table6
//相关文件
dataMap.put("relevant_table", relevant_flies);//table7
dataMap.put(OutputWordUtil.TABLE_REPOSITORY_SHAPE, repositoryShapeTable);
dataMap.put("file_table", fileTable);
dataMap.put(OutputWordUtil.TABLE_DANGER, dangerTable);

View File

@ -76,7 +76,7 @@ public class PrReportComment {
dataMap.put(OutputWordUtil.PL_VERSION, "V" + repositoryModel.getVersion()+ ".0 " + date); // 版本
OutputWordUtil.setRepositoryDefaultValue2(TARGET_METHOD_SCOPE, dataMap);// 设置属性默认值空字符串
//System.out.println("表单数据内容获取==================");
JSONArray propertyArr = CoeProcessLevelUtil.getProcessLevelPropertyArr(repositoryModel.getId());
for (int i = 0; i < propertyArr.size(); i++) {
JSONObject propertyObj = propertyArr.getJSONObject(i);

File diff suppressed because it is too large Load Diff

View File

@ -14,6 +14,7 @@ import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
@ -350,6 +351,116 @@ public class Report1Gener {
index++;
}
}
JSONArray termTable = new JSONArray(); //术语定义Table
// 属性特征 属性代码KEY
PALRepositoryPropertyModel term = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"term");
String termVal = term.getPropertyValue();
JSONObject termObj = JSONObject.parseObject(termVal);
if (termObj != null && !termObj.isEmpty()) {
JSONArray tableArr = termObj.getJSONArray("table");
if (tableArr != null && !tableArr.isEmpty()) {
for (Object obj : tableArr) {
JSONObject obj2 = (JSONObject) obj;
if (!"table_head".equals(obj2.getString("id"))) {
String name = obj2.getString("name");
String desc = obj2.getString("desc");
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", desc);
termTable.add(tmp);
}
}
}
}
JSONArray organizationTable = new JSONArray(); //组织职责Table
// 属性特征 属性代码KEY
PALRepositoryPropertyModel Organizational = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(),"Organizational_role");
String OrganizationalVal = Organizational.getPropertyValue();
JSONObject OrganizationalObj = JSONObject.parseObject(OrganizationalVal);
if (OrganizationalObj != null && !OrganizationalObj.isEmpty()) {
JSONArray tableArr = OrganizationalObj.getJSONArray("table");
if (tableArr != null && !tableArr.isEmpty()) {
for (Object obj : tableArr) {
JSONObject obj2 = (JSONObject) obj;
if (!"table_head".equals(obj2.getString("id"))) {
String name = obj2.getString("name");
String desc = obj2.getString("desc");
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", desc);
organizationTable.add(tmp);
}
}
}
}
//支持文件
JSONArray support_files = new JSONArray(); //组织职责Table
List<DesignerShapeRelationModel> relationList = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "support_files");
int index = 0;
for (DesignerShapeRelationModel relation : relationList) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId);
if (model != null) {
index++;
String name = model.getName();
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", index);
support_files.add(tmp);
}
}
//相关文件 related_files
JSONArray related_files = new JSONArray(); //组织职责Table
List<DesignerShapeRelationModel> relationList2 = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "related_files");
int count = 0;
for (DesignerShapeRelationModel relation : relationList2) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId);
if (model != null) {
count++;
String name = model.getName();
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", count);
related_files.add(tmp);
}
}
// 2张表
// 文件属性内容文本内容
// 文件属性内容关联表
// 根据绩效所属模型查询绩效形状的详细信息
// 流程文件属性术语与定义表格类型
// 流程文件属性绩效形状的信息
// 流程文件属性相关文件和支持文件
//术语
dataMap.put("term_table", termTable);//table4
//组织和职责
dataMap.put("organization_table", organizationTable);//table5
//支持文件
dataMap.put("supports_table", support_files);//table6
//相关文件
dataMap.put("relevant_table", related_files);//table7
dataMap.put(OutputWordUtil.TABLE_REPOSITORY_SHAPE, repositoryShapeTable);
dataMap.put("file_table", fileTable);
@ -362,6 +473,13 @@ public class Report1Gener {
return dataMap;
}
/**
* 设置风险控制表格
* @param attrId