From 2a08379fa653dc40d9466c1ee19b8050c19d81ab Mon Sep 17 00:00:00 2001 From: yujh Date: Thu, 29 Aug 2024 14:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=88=E5=90=8C=E6=AD=A3?= =?UTF-8?q?=E6=96=87=E4=B8=8B=E8=BD=BD=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/coe/pal/CoEPALController.java | 13 +++++++++++++ .../web/DesignerRelationShapeWeb.java | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java index 2119f446..91f51183 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java @@ -3777,4 +3777,17 @@ public class CoEPALController { return web.createOutputPrReportsByEstimatePPTFile(me, fileId); } + /** + * 下载一个合同正文模版文件 + * @param me + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_downloadTpmFile") + public String downloadTpmFile(UserContext me) { + DesignerRelationShapeWeb web = new DesignerRelationShapeWeb(me); + return web.downloadTpmFile(); + } + + + } diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java index 5d82ab65..106eb79c 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java @@ -7,6 +7,7 @@ import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; +import com.actionsoft.apps.coe.pal.constant.YiliWpsConst; import com.actionsoft.apps.coe.pal.pal.output.constant.OutputConst; import com.actionsoft.apps.coe.pal.pal.repository.upfile.web.UpfileWeb; import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext; @@ -5098,5 +5099,23 @@ public class DesignerRelationShapeWeb extends ActionWeb { } + /** + * 获取模版附件下载地址 + * @return + */ + public String downloadTpmFile(){ + ResponseObject ro = ResponseObject.newOkResponse(); + //先获取附件模版 + System.out.println(" >>>>进入模版文件" ); + String repositoryName = "!form-ui-file-"; + BO bo = SDK.getBOAPI().query(YiliWpsConst.BO_EU_SYSTEM_DEMO_FILE).addQuery("FILESTATE=", true).detail(); + List files = SDK.getBOAPI().getFiles(bo.getId(), "SYSTEMFILE"); + FormFile formFile = files.get(0); + DCContext sourceDc = SDK.getBOAPI().getFileDCContext(formFile, repositoryName); + sourceDc.setSession(this.getContext()); + ro.put("url",sourceDc.getDownloadURL()); + return ro.toString(); + } + } \ No newline at end of file