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