From be52bcd9662b029c4457226b56e6baa7c4100e94 Mon Sep 17 00:00:00 2001 From: lihongyu <504404568@qq.com> Date: Sun, 8 Jan 2023 23:04:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=86=8C=E5=AF=BC=E5=87=BA=E4=BD=8E?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=97=B6=EF=BC=8C=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=AB=98=E7=89=88=E6=9C=AC=E7=9A=84=E4=BF=AE=E8=AE=A2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pal/output/pr/report1/Report1Gener.java | 3 +++ .../pal/output/zd/report1/Report1Gener.java | 23 ++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java b/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java index cfd60d49..2cca87d3 100644 --- a/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java +++ b/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java @@ -639,6 +639,9 @@ public class Report1Gener { return m1.getVersion() - m2.getVersion() > 0 ? 1 : -1; }); for (PALRepositoryModel model : list) { + if(model.getVersion()>repositoryModel.getVersion()) { + continue; + } JSONObject obj = new JSONObject(); Map map = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(model.getId()); // 版本P_versions diff --git a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java index 0efddfe0..30ed6ea8 100644 --- a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java +++ b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java @@ -228,17 +228,15 @@ public class Report1Gener { if (upfileModel.getFileName().contains(".xml")) { if (dcProfile != null) { 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测试文档 - com.spire.doc.Document docs = new com.spire.doc.Document(); - docs.loadFromFile("/"+path+fileName); - //保存为xml格式 - //nas/awsinst/doccenter/com.actionsoft.apps.coe.pal/COE_Upfile/03e55104-3ac6-4298-8a9f-6d1c03cad06b/obj_2ebe57d0f9b84bdeb7cf697945d3c5ab/液态奶事业部食品安全委员会运行管理规定.doc - String substring = fileName.substring(0, - fileName.lastIndexOf(".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"); + /* + * String path = dcContextpdf.getPath(); String fileName = + * dcContextpdf.getFileName(); com.spire.doc.Document docs = new + * com.spire.doc.Document(); docs.loadFromFile("/"+path+fileName); String + * substring = fileName.substring(0, fileName.lastIndexOf(".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; } } @@ -846,6 +844,9 @@ public class Report1Gener { return m1.getVersion() - m2.getVersion() > 0 ? 1 : -1; }); for (PALRepositoryModel model : list) { + if(model.getVersion()>repositoryModel.getVersion()) { + continue; + } JSONObject obj = new JSONObject(); Map map = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(model.getId()); // 版本P_versions,制度用的是versions