流程手册相关文件、支持文件增加查询使用中文件

This commit is contained in:
zhal 2024-07-29 13:36:23 +08:00
parent eab14d9b47
commit c96a7121f1
3 changed files with 64 additions and 7 deletions

View File

@ -558,7 +558,7 @@ public class Report1Gener {
//支持文件 //支持文件
JSONArray supportfiles = new JSONArray(); JSONArray supportfiles = new JSONArray();
try { /*try {
int count = 0; int count = 0;
String sql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'support_files'"; String sql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'support_files'";
String relatFileJson = DBSql.getString(sql); String relatFileJson = DBSql.getString(sql);
@ -579,9 +579,37 @@ public class Report1Gener {
} }
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
}*/
List<DesignerShapeRelationModel> relationList = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "support_files");
relationList.sort(Comparator.comparing(DesignerShapeRelationModel::getShapeText));
int index = 0;
if (relationList.size() > 0) {
for (DesignerShapeRelationModel relation : relationList) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
String name = null;
List<PALRepositoryModel> models = PALRepositoryCache.getByVersionId(relationFileId);
if (models != null && models.size() > 0) {
index++;
for (PALRepositoryModel oneModel : models) {
if (oneModel.isUse() == true) {
name = oneModel.getName();
}
}
}
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", index);
supportfiles.add(tmp);
}
} }
/* /*
* List<DesignerShapeRelationModel> relationList = * List<DesignerShapeRelationModel> relationList =
* DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", * DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "",
@ -603,12 +631,13 @@ public class Report1Gener {
try { try {
//相关文件 //相关文件
int count = 0; /*int count = 0;
String sql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'R_relevant_flies'"; String sql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'R_relevant_flies'";
String relatFileJson = DBSql.getString(sql); String relatFileJson = DBSql.getString(sql);
if(UtilString.isNotEmpty(relatFileJson)) { if(UtilString.isNotEmpty(relatFileJson)) {
JSONObject parseObject = JSONObject.parseObject(relatFileJson); JSONObject parseObject = JSONObject.parseObject(relatFileJson);
String fileNames = parseObject.getString("relationShapeText"); String fileNames = parseObject.getString("relationShapeText");
String relationFileId=parseObject.getString("relationFileId");
if(UtilString.isNotEmpty(fileNames)) { if(UtilString.isNotEmpty(fileNames)) {
String[] names = fileNames.split(","); String[] names = fileNames.split(",");
for (String name : names) { for (String name : names) {
@ -619,9 +648,37 @@ public class Report1Gener {
relevant_flies.add(tmp); relevant_flies.add(tmp);
} }
} }
}*/
List<DesignerShapeRelationModel> relationList2 = DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", "R_relevant_flies");
relationList2.sort(Comparator.comparing(DesignerShapeRelationModel::getShapeText));
int count = 0;
if (relationList2.size() > 0) {
for (DesignerShapeRelationModel relation : relationList2) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
String name = null;
List<PALRepositoryModel> models = PALRepositoryCache.getByVersionId(relationFileId);
if (models != null && models.size() > 0) {
count++;
for (PALRepositoryModel oneModel : models) {
if (oneModel.isUse() == true) {
name = oneModel.getName();
}
}
}
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", count);
relevant_flies.add(tmp);
}
} }
//外部相关文件 //外部相关文件
String sqlOut = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'Out_relevant_files'"; String sqlOut = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '"+repositoryModel.getId()+"' and PROPERTYID = 'Out_relevant_files'";
String outRelatFileJson = DBSql.getString(sqlOut); String outRelatFileJson = DBSql.getString(sqlOut);

View File

@ -28,7 +28,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
public class PrReportComment { public class PrReportComment {
public static String TARGET_METHOD_SCOPE = "process.bpmn2,process.epc,process.flowchart,process.scheme"; public static String TARGET_METHOD_SCOPE = "process.bpmn2,process.epc,process.flowchart";
public static String PROCESS_STEP = "userTask,serviceTask,manualTask,receiveTask,sendTask,scriptTask,businessRuleTask,callActivityCallingProcess,method,process,predefinedProcess,decision"; public static String PROCESS_STEP = "userTask,serviceTask,manualTask,receiveTask,sendTask,scriptTask,businessRuleTask,callActivityCallingProcess,method,process,predefinedProcess,decision";
/** /**