|
@@ -35,6 +35,12 @@ public class EbaUtils {
|
|
|
public static JSONObject realDataDevice;
|
|
|
public static JSONObject crmProjectInfo;
|
|
|
|
|
|
+ private static ResourceBundle resource;
|
|
|
+
|
|
|
+ static {
|
|
|
+ resource = ResourceBundle.getBundle("eba");
|
|
|
+ }
|
|
|
+
|
|
|
@Autowired
|
|
|
public void setMongoTemplate(MongoTemplate mongoTemplate) {
|
|
|
EbaUtils.mongoTemplate = mongoTemplate;
|
|
@@ -197,4 +203,15 @@ public class EbaUtils {
|
|
|
sortSet.addAll(project.keySet());
|
|
|
return sortSet;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 给eba项目排序
|
|
|
+ *
|
|
|
+ * @param list
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static List<Map> sortList(List<Map> list) {
|
|
|
+ Collections.sort(list, Comparator.comparingInt(o -> Integer.parseInt(resource.getString(o.get("ebaId").toString()))));
|
|
|
+ return list;
|
|
|
+ }
|
|
|
}
|