Commit ebe46889 by wangweidong

土工平台修改

parent e2233e1f
......@@ -13,15 +13,69 @@ import java.util.List;
public class CollectUtil {
public static void main(String[] args) {
File file = new File("D://界限含水率(联合测定)S-1.txt");
File file = new File("D://颗粒分析试验 GB SieveS-99.txt");
try {
FileInputStream io = new FileInputStream(file);
txt2StringWuxing(io);
txt2StringKeliFenxi(io);
}catch (Exception e){
}
}
public static List<SoilExperimentCollectDataVO> txt2StringKeliFenxi(InputStream io){
StringBuilder result = new StringBuilder();
List<SoilExperimentCollectDataVO> dataList = new ArrayList<>();
try {
InputStreamReader inputReader = new InputStreamReader(io,"GBK");
BufferedReader brCheck = new BufferedReader(inputReader);//构造一个BufferedReader类来读取文件
BufferedReader br = new BufferedReader(inputReader);//构造一个BufferedReader类来读取文件
String s = null;
StringBuffer sbAll = new StringBuffer();
List<String> allStringList = new ArrayList<>();
String gcbh = "";
String sampleCode = "";
while((s = brCheck.readLine())!=null){
// s = s.replace("─","").replace("┌","").
// replace("┬","").replace("┐","").
// replace("├","").replace("┼","").
// replace("┴","").replace("└","").
// replace("┘","").replace("┤","").
// replace("─","").replace("─","");
System.out.println(s);
allStringList.add(s);
String content = s.replace(" ","");
sbAll.append(content);
}
System.out.println();
System.out.println(sampleCode);
}catch (Exception e){
}
return dataList;
}
public static List<SoilExperimentCollectDataVO> txt2StringWuxing(InputStream io){
StringBuilder result = new StringBuilder();
List<SoilExperimentCollectDataVO> dataList = new ArrayList<>();
......
......@@ -3168,6 +3168,8 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
replaceMap.put("#{title}","附录"+(count)+" "+type.getExperiment()+"试验成果图\n" +
"APPENDIX "+count+" "+testEnglish);
replaceMap.put("#{reportCode}",StringHandleUtils.getString(type.getEntrustCode()));
try {
HSSFWorkbookUtil.replaceModel(replaceMap,xssfWorkbook);
HSSFWorkbookUtil.insertImage(xssfWorkbook,fileMap,true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment