|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.dsideal.base.Tools.FillData.ExcelKit;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
|
|
import com.dsideal.base.DataEase.Model.ExcelReader;
|
|
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
|
@ -649,22 +650,15 @@ public class ExcelKit {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取单位
|
|
|
|
|
*
|
|
|
|
|
* @param xmlPath
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static int getMul(String xmlPath) {
|
|
|
|
|
try {
|
|
|
|
|
SAXReader reader = new SAXReader(); // 创建 SAXReader 对象,读取 XML 文件
|
|
|
|
|
Document document = reader.read(new File(xmlPath));
|
|
|
|
|
String xpath = "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:title/c:tx/c:rich/a:p/a:r/a:t";
|
|
|
|
|
Node node = document.selectSingleNode(xpath);
|
|
|
|
|
String s = node.getText();
|
|
|
|
|
if (s.contains("万")) return 10000;
|
|
|
|
|
if (s.contains("千")) return 1000;
|
|
|
|
|
if (s.contains("百")) return 100;
|
|
|
|
|
} catch (Exception err) {
|
|
|
|
|
System.out.println(err);
|
|
|
|
|
}
|
|
|
|
|
String s = FileUtil.readUtf8String(xmlPath);
|
|
|
|
|
if (s.contains("万")) return 10000;
|
|
|
|
|
if (s.contains("千")) return 1000;
|
|
|
|
|
if (s.contains("百")) return 100;
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|