Browse Source

依赖FineKit

master
richie 5 years ago
parent
commit
e3e473fa96
  1. BIN
      lib/finekit-10.0.jar
  2. 1
      plugin.xml
  3. 7
      pom.xml
  4. 2
      src/main/java/com/fr/plugin/file/submit/oss/fun/OssUpload.java
  5. 5
      src/main/java/com/fr/plugin/file/submit/oss/job/OssSubmitJob.java
  6. 8
      src/main/java/com/fr/plugin/file/submit/oss/ui/Editors.java

BIN
lib/finekit-10.0.jar

Binary file not shown.

1
plugin.xml

@ -12,6 +12,7 @@
</dependence>
<change-notes><![CDATA[
[2020-04-23]新文件名即使没有后缀,上传后也用新文件名。<br/>
[2020-04-23]适配FineKit。<br/>
[2019-06-21]适配最新的版本,修改下载乱码问题。<br/>
[2019-03-11]适配最新的10.0。<br/>
[2018-12-29]移除内置的OSS配置,依赖公共的OSS配置。<br/>

7
pom.xml

@ -17,6 +17,13 @@
<artifactId>aliyun-sdk-oss</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>com.fanruan.api</groupId>
<artifactId>finekit</artifactId>
<version>10.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/finekit-10.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.fr.plugin.oss</groupId>
<artifactId>oss-universal-config</artifactId>

2
src/main/java/com/fr/plugin/file/submit/oss/fun/OssUpload.java

@ -66,7 +66,7 @@ public class OssUpload {
if (StringKit.isBlank(fileName)) {
fileName = "unnamed.png";
}
if (StringUtils.isNotEmpty(myFileName)) {
if (StringKit.isNotEmpty(myFileName)) {
realFileName = myFileName;
// int index = myFileName.lastIndexOf(".");
// if (index == -1) {

5
src/main/java/com/fr/plugin/file/submit/oss/job/OssSubmitJob.java

@ -1,8 +1,8 @@
package com.fr.plugin.file.submit.oss.job;
import com.aliyun.oss.OSSClient;
import com.fr.data.AbstractSubmitTask;
import com.fanruan.api.xml.XmlKit;
import com.fr.data.AbstractSubmitTask;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
import com.fr.plugin.file.submit.oss.fun.OssConstants;
@ -61,7 +61,8 @@ public class OssSubmitJob extends AbstractSubmitTask {
ColumnRow[] crs = calculateRelatedColumnRows(submitTargetConfig);
if (currentReport instanceof WB) {
WB wb = (WB) (currentReport);
wb.setCurrentColumnRow(crs, (ColumnRow) ca.getAttribute(ColumnRow.class), ca, new DBWriteAction() {
ColumnRow cr = ca.getAttribute(ColumnRow.class);
wb.setCurrentColumnRow(crs, cr, ca, new DBWriteAction() {
@Override
public void run(int index, Calculator ca, int groupIdx) throws Exception {
OssUpload.upload(ca, ossClient, submitTargetConfig);

8
src/main/java/com/fr/plugin/file/submit/oss/ui/Editors.java

@ -1,18 +1,18 @@
package com.fr.plugin.file.submit.oss.ui;
import com.fanruan.api.design.ui.editor.TypeFormulaEditor;
import com.fanruan.api.design.ui.editor.TypeTextEditor;
import com.fanruan.api.design.ui.editor.ValueEditorPane;
import com.fanruan.api.design.ui.editor.ValueEditors;
import com.fr.design.editor.editor.Editor;
import com.fr.design.editor.editor.FormulaEditor;
import com.fanruan.api.design.ui.editor.TextEditor;
import com.fr.design.i18n.Toolkit;
public class Editors {
public static ValueEditorPane createValueEditorPane() {
return ValueEditors.createValueEditorPane(new Editor[]{
new TextEditor(),
new FormulaEditor(Toolkit.i18nText("Plugin-File_Submit_Oss_Editor_Formula")),
new TypeTextEditor(),
new TypeFormulaEditor(Toolkit.i18nText("Plugin-File_Submit_Oss_Editor_Formula")),
});
}

Loading…
Cancel
Save