|
|
@@ -13,9 +13,12 @@ import org.apache.poi.ss.usermodel.ClientAnchor;
|
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
|
import org.apache.poi.ss.util.CellRangeAddress;
|
|
|
import org.apache.poi.util.Units;
|
|
|
+import org.springblade.common.constant.CommonConstant;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
|
+import org.springblade.common.utils.SystemUtils;
|
|
|
import org.springblade.common.vo.DataVO;
|
|
|
import org.springblade.core.tool.utils.IoUtil;
|
|
|
+import org.springblade.system.cache.ParamCache;
|
|
|
|
|
|
import javax.imageio.IIOImage;
|
|
|
import javax.imageio.ImageIO;
|
|
|
@@ -309,4 +312,38 @@ public class FileUtils {
|
|
|
doc.close();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public static String getSysLocalFileUrl() {
|
|
|
+ String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
+ String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
|
|
|
+
|
|
|
+ if (sys_isonline.equals("1")) { //正式环境
|
|
|
+ if (SystemUtils.isMacOs()) {
|
|
|
+ file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isWindows()) {
|
|
|
+ file_path = "C://upload//";
|
|
|
+ }
|
|
|
+ } else if (sys_isonline.equals("2")) { //109测试环境
|
|
|
+ if (SystemUtils.isMacOs()) {
|
|
|
+ file_path = "/www/wwwroot/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isWindows()) {
|
|
|
+ file_path = "C://upload//";
|
|
|
+ }
|
|
|
+ } else if (sys_isonline.equals("20")) { //183
|
|
|
+ if (SystemUtils.isLinux()) {
|
|
|
+ file_path = "/home/www/wwwroot/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isMacOs()) {
|
|
|
+ file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isWindows()) {
|
|
|
+ file_path = "C://upload//";
|
|
|
+ }
|
|
|
+ } else { //本地环境
|
|
|
+ if (SystemUtils.isMacOs()) {
|
|
|
+ file_path = "/Users/hongchuangyanfa/Desktop/";
|
|
|
+ } else if (SystemUtils.isWindows()) {
|
|
|
+ file_path = "C://upload//";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return file_path;
|
|
|
+ }
|
|
|
}
|