|
@@ -9,7 +9,9 @@ import com.fdkankan.model.constants.ConstantFilePath;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.nio.charset.Charset;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -71,5 +73,27 @@ public class SceneUtil {
|
|
|
return homePath;
|
|
|
}
|
|
|
|
|
|
+ public static Map<String, String> getPropertyFromDataSource(String dataSource){
|
|
|
+ if(StrUtil.isEmpty(dataSource)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ String homePath = getHomePath(dataSource);
|
|
|
+ homePath = homePath.substring(0, homePath.lastIndexOf("/"));
|
|
|
+ String[] arr = homePath.split("/");
|
|
|
+ Map<String, String> result = new HashMap<>();
|
|
|
+ result.put("homePath", homePath);
|
|
|
+ result.put("snCode", arr[1]);
|
|
|
+ result.put("fileId", arr[2]);
|
|
|
+ result.put("uuid", arr[3]);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String str = "27";
|
|
|
+ int n = 8;
|
|
|
+ System.out.println("10进制=" + Integer.parseInt(str, n));
|
|
|
+ System.out.println(Integer.toHexString(Integer.parseInt(str, n)));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|