|
|
|
@ -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<E extends JTemplate<?, ?>> extends JT
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void dealExporter(OutputStream outputStream, String path, final Map<String, Object> 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 |
|
|
|
|