From c4e7452a3711b4db21d0049c211eacb69188f412 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Tue, 27 Aug 2024 16:48:16 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-131064=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=A8=A1=E6=9D=BF=E5=A4=B1=E8=B4=A5=EF=BC=8C?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E6=A8=A1=E6=9D=BF=E8=A7=A3=E6=9E=90=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E3=80=911=E3=80=81=E5=AF=BC=E5=87=BA=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E8=B7=AF=E5=BE=84=E9=BB=98=E8=AE=A4=E4=BC=A0?= =?UTF-8?q?=E7=9A=84=E5=8F=82=E6=95=B0=E4=B8=BA=E4=BB=A5=E2=80=9Creportlet?= =?UTF-8?q?s=E2=80=9D=E5=BC=80=E5=A7=8B=E7=9A=84=EF=BC=8C=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E6=A8=A1=E6=9D=BF=E6=97=B6=E4=BC=9A=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=8B=BC=E6=8E=A5=E2=80=9Creportlets=E2=80=9D=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=89=BE=E4=B8=8D=E5=88=B0=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E3=80=82=202=E3=80=81=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E7=9A=84=E5=AF=BC=E5=87=BA=E7=BB=93=E6=9E=9C=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=98=AF=E8=BF=94=E5=9B=9E=E5=AD=97=E8=8A=82=E6=95=B0=E7=BB=84?= =?UTF-8?q?=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=90=AF=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E6=9C=AA=E5=B0=86=E5=AD=97?= =?UTF-8?q?=E8=8A=82=E6=95=B0=E7=BB=84=E5=86=99=E5=85=A5=E5=88=B0=E6=B5=81?= =?UTF-8?q?=E4=B8=AD=E3=80=82=20=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D?= =?UTF-8?q?=E8=B7=AF=E3=80=911=E3=80=81=E5=88=A4=E6=96=AD=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E2=80=9Creportlets=E2=80=9D=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E3=80=82=202=E3=80=81=E5=B0=86=E5=AD=97?= =?UTF-8?q?=E8=8A=82=E6=95=B0=E7=BB=84=E5=86=99=E5=85=A5=E5=88=B0=E6=B5=81?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../file/export/AbstractExportAction.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java index f62243a8c4..7dc25799f3 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java @@ -15,8 +15,8 @@ import com.fr.file.filter.ChooseFileFilter; import com.fr.io.exporter.DesignExportType; import com.fr.io.exporter.ExporterKey; import com.fr.log.FineLoggerFactory; -import com.fanruan.product.ProductConstants; import com.fr.stable.StringUtils; +import com.fr.stable.project.ProjectConstants; import com.fr.third.jodd.io.FileNameUtil; import com.fr.workspace.WorkContext; import com.fr.workspace.server.exporter.TemplateExportOperator; @@ -211,19 +211,15 @@ public abstract class AbstractExportAction> extends JT } private void dealExporter(OutputStream outputStream, String path, final Map para) throws Exception { + if (path.startsWith(ProjectConstants.REPORTLETS_NAME)) { + path = path.substring(ProjectConstants.REPORTLETS_NAME.length()); + } - // 没有办法处理这个 isLocal 判断,因为一个是修改参数传递结果,一个是返回值做结果 - // todo 后续想想办法 - if (WorkContext.getCurrent().isLocal()) { - WorkContext.getCurrent().get(TemplateExportOperator.class) - .export(exportKey(), exportType(), outputStream, path, para); - } else { - byte[] contents = - WorkContext.getCurrent().get(TemplateExportOperator.class) - .export(exportKey(), exportType(), null, path, para); + byte[] contents = + WorkContext.getCurrent().get(TemplateExportOperator.class) + .export(exportKey(), exportType(), null, path, para); - outputStream.write(contents); - } + outputStream.write(contents); } @Override