|
@@ -70,7 +70,7 @@ public class FbsWorkingStatisticsController {
|
|
@Value("${jeecg.path.upvedio}")
|
|
@Value("${jeecg.path.upvedio}")
|
|
private String upVedio;
|
|
private String upVedio;
|
|
|
|
|
|
- public static void main(String[] srg) {
|
|
+ public static void main1(String[] srg) {
|
|
String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
|
String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
|
|
|
|
|
String dbURL = "jdbc:sqlserver://47.103.119.148;DatabaseName=UFDATA_100_2019";
|
|
String dbURL = "jdbc:sqlserver://47.103.119.148;DatabaseName=UFDATA_100_2019";
|
|
@@ -594,10 +594,16 @@ public class FbsWorkingStatisticsController {
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "getEsopFileList")
|
|
@RequestMapping(value = "getEsopFileList")
|
|
- public Result<List<Map<String,Object>>> getEsopFileList(){
|
|
+ public Result<List<Map<String,Object>>> getEsopFileList(String code){
|
|
Result<List<Map<String,Object>>> result=new Result<>();
|
|
Result<List<Map<String,Object>>> result=new Result<>();
|
|
ArrayList<String> list = new ArrayList<>();
|
|
ArrayList<String> list = new ArrayList<>();
|
|
- FileList.getAllFileName(upLoadPath,list);
|
|
+ String par = FileList.getAllFileName(upLoadPath+code,list);
|
|
|
|
+
|
|
|
|
+ if(par.equals("false")){
|
|
|
|
+ result.error500("文件为空");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
List<Map<String,Object>> resuleMap = new ArrayList<>();
|
|
List<Map<String,Object>> resuleMap = new ArrayList<>();
|
|
try {
|
|
try {
|
|
|
|
|
|
@@ -625,13 +631,22 @@ public class FbsWorkingStatisticsController {
|
|
FileList.getAllFileName(upVedio,list);
|
|
FileList.getAllFileName(upVedio,list);
|
|
List<Map<String,Object>> resuleMap = new ArrayList<>();
|
|
List<Map<String,Object>> resuleMap = new ArrayList<>();
|
|
try {
|
|
try {
|
|
-
|
|
+ Collections.sort(list);
|
|
for (String o:list){
|
|
for (String o:list){
|
|
Map<String,Object> map = new HashMap<>();
|
|
Map<String,Object> map = new HashMap<>();
|
|
map.put("fileName",o);
|
|
map.put("fileName",o);
|
|
map.put("fileType",getFileOf(o).toLowerCase());
|
|
map.put("fileType",getFileOf(o).toLowerCase());
|
|
|
|
+ String fileType = getFileOf(o).toLowerCase();
|
|
|
|
+ if(fileType.equals("jpg") || fileType.equals("jpeg") || fileType.equals("png")){
|
|
|
|
+ map.put("isImg",true);
|
|
|
|
+ }else if(fileType.equals("avi") || fileType.equals("mov") || fileType.equals("rmvb") || fileType.equals("rm")
|
|
|
|
+ || fileType.equals("flv") || fileType.equals("mp4") || fileType.equals("3gp")){
|
|
|
|
+ map.put("isImg",false);
|
|
|
|
+ }else{
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
resuleMap.add(map);
|
|
resuleMap.add(map);
|
|
- break;
|
|
+
|
|
}
|
|
}
|
|
result.setResult(resuleMap);
|
|
result.setResult(resuleMap);
|
|
result.success("操作成功");
|
|
result.success("操作成功");
|
|
@@ -692,4 +707,34 @@ public class FbsWorkingStatisticsController {
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ public static void main(String[] args) {
|
|
|
|
+
|
|
|
|
+ map.put("d", "44");
|
|
|
|
+ map.put("b", "2");
|
|
|
|
+ map.put("a", "3");
|
|
|
|
+ map.put("c", "4");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ List<Map.Entry<String,String>> list = new ArrayList<Map.Entry<String,String>>(map.entrySet());
|
|
|
|
+
|
|
|
|
+ Collections.sort(list,new Comparator<Map.Entry<String,String>>() {
|
|
|
|
+
|
|
|
|
+ public int compare(Map.Entry<String, String> o1,
|
|
|
|
+ Map.Entry<String, String> o2) {
|
|
|
|
+ return o1.getValue().compareTo(o2.getValue());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ for(Map.Entry<String,String> mapping:list){
|
|
|
|
+ System.out.println(mapping.getKey()+":"+mapping.getValue());
|
|
|
|
+ }*/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|