手册导出低版本时,不显示高版本的修订记录

This commit is contained in:
lihongyu 2023-01-08 23:04:54 +08:00
parent 4a93b6553f
commit be52bcd966
2 changed files with 15 additions and 11 deletions

View File

@ -639,6 +639,9 @@ public class Report1Gener {
return m1.getVersion() - m2.getVersion() > 0 ? 1 : -1; return m1.getVersion() - m2.getVersion() > 0 ? 1 : -1;
}); });
for (PALRepositoryModel model : list) { for (PALRepositoryModel model : list) {
if(model.getVersion()>repositoryModel.getVersion()) {
continue;
}
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
Map<String, JSONObject> map = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(model.getId()); Map<String, JSONObject> map = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(model.getId());
// 版本P_versions // 版本P_versions

View File

@ -228,17 +228,15 @@ public class Report1Gener {
if (upfileModel.getFileName().contains(".xml")) { if (upfileModel.getFileName().contains(".xml")) {
if (dcProfile != null) { if (dcProfile != null) {
dcContextpdf = new DCContext(userContext, dcProfile, CoEConstant.APP_ID, upfileModel.getPl_uuid(), upfileModel.getShape_uuid(), upfileModel.getFileName()); dcContextpdf = new DCContext(userContext, dcProfile, CoEConstant.APP_ID, upfileModel.getPl_uuid(), upfileModel.getShape_uuid(), upfileModel.getFileName());
String path = dcContextpdf.getPath(); String fileName = /*
dcContextpdf.getFileName(); //创建实例加载doc测试文档 * String path = dcContextpdf.getPath(); String fileName =
com.spire.doc.Document docs = new com.spire.doc.Document(); * dcContextpdf.getFileName(); com.spire.doc.Document docs = new
docs.loadFromFile("/"+path+fileName); * com.spire.doc.Document(); docs.loadFromFile("/"+path+fileName); String
//保存为xml格式 * substring = fileName.substring(0, fileName.lastIndexOf(".xml"));
//nas/awsinst/doccenter/com.actionsoft.apps.coe.pal/COE_Upfile/03e55104-3ac6-4298-8a9f-6d1c03cad06b/obj_2ebe57d0f9b84bdeb7cf697945d3c5ab/液态奶事业部食品安全委员会运行管理规定.doc * docs.saveToFile("/"+path+substring+".xml",FileFormat.Word_ML); dcContextpdf =
String substring = fileName.substring(0, * new DCContext(userContext, dcProfile, CoEConstant.APP_ID,
fileName.lastIndexOf(".xml")); * upfileModel.getPl_uuid(), upfileModel.getShape_uuid(), substring+".xml");
docs.saveToFile("/"+path+substring+".xml",FileFormat.Word_ML); dcContextpdf = */
new DCContext(userContext, dcProfile, CoEConstant.APP_ID,
upfileModel.getPl_uuid(), upfileModel.getShape_uuid(), substring+".xml");
break; break;
} }
} }
@ -846,6 +844,9 @@ public class Report1Gener {
return m1.getVersion() - m2.getVersion() > 0 ? 1 : -1; return m1.getVersion() - m2.getVersion() > 0 ? 1 : -1;
}); });
for (PALRepositoryModel model : list) { for (PALRepositoryModel model : list) {
if(model.getVersion()>repositoryModel.getVersion()) {
continue;
}
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
Map<String, JSONObject> map = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(model.getId()); Map<String, JSONObject> map = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(model.getId());
// 版本P_versions制度用的是versions // 版本P_versions制度用的是versions