Browse Source

REPORT-135233 调整TemplateExportOperator

fbp/release
Destiny.Lin 2 months ago
parent
commit
b44b2fbc38
  1. 12
      designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java

12
designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java

@ -1,5 +1,7 @@
package com.fr.design.actions.file.export;
import com.fanruan.entity.template.TemplateExportBean;
import com.fanruan.repository.TemplateRepository;
import com.fr.design.actions.JTemplateAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.dialog.FineJOptionPane;
@ -18,12 +20,8 @@ import com.fr.log.FineLoggerFactory;
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;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
import javax.swing.UIManager;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.io.OutputStream;
import java.util.Map;
@ -215,9 +213,7 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
path = path.substring(ProjectConstants.REPORTLETS_NAME.length());
}
byte[] contents =
WorkContext.getCurrent().get(TemplateExportOperator.class)
.export(exportKey(), exportType(), null, path, para);
byte[] contents = TemplateRepository.getInstance().export(new TemplateExportBean().setKey(exportKey()).setType(exportType()).setPath(path).setParas(para));
outputStream.write(contents);
}

Loading…
Cancel
Save