修复相关文件、支持文件删除版本导致无法导出问题

This commit is contained in:
zhal 2024-07-18 15:32:02 +08:00
parent 6c21801238
commit 0326526591
3 changed files with 3 additions and 20 deletions

View File

@ -734,33 +734,22 @@ public class OutputWordUtil {
if (relationList2.size() > 0) {
for (DesignerShapeRelationModel relation : relationList2) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId);
if (model != null) {
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();
}
}
}
count++;
//String name = model.getName();
JSONObject tmp = new JSONObject();
tmp.put("name", name);
tmp.put("desc", count);
relevant_flies.add(tmp);
}
if(relationFileId.equals("079c0c2e-fc24-4d92-a13f-6987492bfc5d")){
//String name = model.getName();
JSONObject tmp = new JSONObject();
tmp.put("name", "液奶产品无菌试验标准");
tmp.put("desc", 1);
relevant_flies.add(tmp);
}
}
CharacterFormat format = new CharacterFormat();
@ -989,14 +978,10 @@ public class OutputWordUtil {
if (relationList.size() > 0) {
for (DesignerShapeRelationModel relation : relationList) {
String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID
PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId);
if (model != null) {
index++;
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();
@ -1009,7 +994,6 @@ public class OutputWordUtil {
tmp.put("name", name);
tmp.put("desc", index);
supportfiles.add(tmp);
}
}

View File

@ -4257,7 +4257,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
if (model == null)
throw new AWSException("没有找到文件:" + uuid);
String taskId = "";
if (model.getMethodId().contains("process.")) {
if (model.getMethodId().contains("process.") && !"process.scheme".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result")))
@ -4265,7 +4265,6 @@ public class DesignerRelationShapeWeb extends ActionWeb {
else
throw new AWSException("创建流程手册失败:" + uuid);
} else if ("data.form".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result")))