Browse Source

update

master
wangtao 2 years ago
parent
commit
e18d0ad090
  1. BIN
      build/install/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.zip
  2. BIN
      build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar
  3. BIN
      build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar
  4. 2
      build/temp/plugin/plugin.xml
  5. 2
      plugin.xml
  6. 37
      src/main/java/com/fr/plugin/cafe_expand/designerhelp/JumpToAnalysis.java
  7. 7
      src/main/java/com/fr/plugin/cafe_expand/function/DoExpandFile.java
  8. 7
      src/main/java/com/fr/plugin/cafe_expand/function/UnitTools.java
  9. 3
      src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand.properties
  10. 3
      src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand_zh_CN.properties

BIN
build/install/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.zip → build/install/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.zip

Binary file not shown.

BIN
build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.jar → build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar

Binary file not shown.

BIN
build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.jar → build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar

Binary file not shown.

2
build/temp/plugin/plugin.xml

@ -4,7 +4,7 @@
<name><![CDATA[行列扩展辅助变更]]></name>
<active>yes</active>
<hidden>no</hidden>
<version>1.0.0</version>
<version>1.4.2</version>
<env-version>10.0</env-version>
<jartime>2020-01-01</jartime>
<vendor>crm</vendor>

2
plugin.xml

@ -4,7 +4,7 @@
<name><![CDATA[行列扩展辅助变更]]></name>
<active>yes</active>
<hidden>no</hidden>
<version>1.0.0</version>
<version>1.4.2</version>
<env-version>10.0</env-version>
<jartime>2020-01-01</jartime>
<vendor>crm</vendor>

37
src/main/java/com/fr/plugin/cafe_expand/designerhelp/JumpToAnalysis.java

@ -11,6 +11,7 @@ import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.cafe_expand.function.DoExpandFile;
import com.fr.plugin.cafe_expand.function.UnitTools;
import com.fr.record.analyzer.EnableMetrics;
@ -51,7 +52,7 @@ public class JumpToAnalysis extends AbstractDsinFrameUpButtonProvider {
if( template instanceof JWorkBook){
TemplateElementCase wb=((JWorkBook) template).getEditingElementCase();
int sheetNum=template.getEditingReportIndex();
int sheetNum=template.getEditingReportIndex()+1;
position="sheet:"+sheetNum;
String sheetKind=wb.getClass().toString();
@ -64,8 +65,6 @@ public class JumpToAnalysis extends AbstractDsinFrameUpButtonProvider {
else if(template instanceof JForm)
position="frm:"+template.getSelectElementCase().getWidgetName();
//visitTc(filePath,position);
JDialog fr = new JDialog();
fr.setSize(400, 250);
GUICoreUtils.centerWindow(fr);
@ -146,21 +145,25 @@ public class JumpToAnalysis extends AbstractDsinFrameUpButtonProvider {
if(StringUtils.isEmpty(row_num.getText()))
row="";
if(!StringUtils.isEmpty(row) || !StringUtils.isEmpty(col)) {
arr[2] = col;
arr[3] = row;
String result = d.run(arr).toString();
try {
DesignerFrameFileDealerPane.getInstance().getSelectedOperation().refresh();
DesignerFrameFileDealerPane.getInstance().stateChange();
lable_result.setText(InterProviderFactory.getProvider().getLocText("file_after_change") + result);
} catch (Exception e1) {
lable_result.setText(InterProviderFactory.getProvider().getLocText("error_info") + e1.getMessage());
}
//选了扩展多少行,但是没有没有选从哪一行开始扩展
if(StringUtils.isEmpty(row_position.getText()) && !StringUtils.isEmpty(row_num.getText()))
lable_result.setText(InterProviderFactory.getProvider().getLocText("row_not_select"));
else {
if (!StringUtils.isEmpty(row) || !StringUtils.isEmpty(col)) {
arr[2] = col;
arr[3] = row;
String result = d.run(arr).toString();
try {
DesignerFrameFileDealerPane.getInstance().getSelectedOperation().refresh();
DesignerFrameFileDealerPane.getInstance().stateChange();
lable_result.setText(InterProviderFactory.getProvider().getLocText("file_after_change") + result);
} catch (Exception e1) {
lable_result.setText(InterProviderFactory.getProvider().getLocText("error_info") + e1.getMessage());
}
} else
lable_result.setText(InterProviderFactory.getProvider().getLocText("attention_info"));
}
else
lable_result.setText(InterProviderFactory.getProvider().getLocText("attention_info"));
});
Box vBox = Box.createVerticalBox();

7
src/main/java/com/fr/plugin/cafe_expand/function/DoExpandFile.java

@ -1,6 +1,7 @@
package com.fr.plugin.cafe_expand.function;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.transform.FunctionRecorder;
import com.fr.script.AbstractFunction;
import com.fr.stable.StringUtils;
@ -39,8 +40,8 @@ public class DoExpandFile extends AbstractFunction {
rowExpandMap.put(path, rowMap);
String newPath = getNewPath(path);
Element ele = start(path, position);
try {
Element ele = start(path, position);
FileOutputStream out = new FileOutputStream(newPath, true);
out.write(ele.asXML().getBytes("utf-8"));
out.flush();
@ -67,7 +68,7 @@ public class DoExpandFile extends AbstractFunction {
String sheetArr[]=position.split(",");
sheetNum=Integer.parseInt(sheetArr[0].split(":")[1]);
int i=0;
int i=1;
List<Element> sheetReports = root.elements();
for (Element reportEle : sheetReports) {
String className = reportEle.attributeValue("class");
@ -331,7 +332,6 @@ public class DoExpandFile extends AbstractFunction {
}
try {
//替换后的,转换成新的ele,替换原来的report
Document new_ele = DocumentHelper.parseText(reportRoot.asXML());
elepar.set(index,new_ele.getRootElement());
@ -414,7 +414,6 @@ public class DoExpandFile extends AbstractFunction {
* */
private static void anaStr(String str,String filePath,Map<String, String> m)
{
String tempStr=str;
List<String> cafeList=new ArrayList();
UnitTools.getCellCafe(str,cafeList);
for(int i=0;i<cafeList.size();i++)

7
src/main/java/com/fr/plugin/cafe_expand/function/UnitTools.java

@ -218,8 +218,11 @@ public class UnitTools {
if (!"".equals(cafe))
break;
}
if (end > beg)
cafeList.add(strs.substring(beg, end));
if (end > beg){
String temp_cafe=strs.substring(beg, end);
if(!temp_cafe.startsWith("ds") || !strs.contains("dsName"))//如果查出来的cafe是 ds1 这种数据集,要去除
cafeList.add(temp_cafe);
}
if (!"".equals(cafe)) {
String nextStr = strs.substring(end);
getCellCafe(nextStr, cafeList);

3
src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand.properties

@ -8,4 +8,5 @@ file_after_change=file_afert_change
error_info=error_info
attention_info=attention:please fill in the expand value
col_expand=col expand at
row_expand=rol expand at
row_expand=rol expand at
row_not_select=attention:row not select

3
src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand_zh_CN.properties

@ -8,4 +8,5 @@ file_after_change=\u53d8\u66f4\u540e\u7684\u6a21\u677f\u4e3a\uff1a
error_info=\u9519\u8bef\uff1a
attention_info=\u63d0\u793a\uff1a\u8bf7\u586b\u5199\u9700\u8981\u6269\u5c55\u884c\u5217\u7684\u503c
col_expand=\u6269\u5c55\u5217\uff1a\u5728
row_expand=\u6269\u5c55\u884c\uff1a\u5728\u7b2c
row_expand=\u6269\u5c55\u884c\uff1a\u5728\u7b2c
row_not_select=\u63d0\u793a\uff1a\u8bf7\u586b\u5199\u9700\u8981\u6269\u5c55\u7684\u884c
Loading…
Cancel
Save