|
@@ -22,6 +22,7 @@ import org.jfree.data.xy.XYSeries;
|
|
|
import org.jfree.data.xy.XYSeriesCollection;
|
|
|
import org.jsoup.Jsoup;
|
|
|
import org.jsoup.nodes.Document;
|
|
|
+import org.springblade.common.utils.BaseUtils;
|
|
|
import org.springblade.core.tool.utils.CollectionUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.core.tool.utils.IoUtil;
|
|
@@ -320,30 +321,7 @@ public class FormulaUtils {
|
|
|
itemNames.stream().map(FormulaUtils::checkItemName).forEach(System.out::println);
|
|
|
}*/
|
|
|
|
|
|
- /**
|
|
|
- * @Description 深度拷贝
|
|
|
- * @Param [originalList]
|
|
|
- * @return java.util.List<T>
|
|
|
- * @Author yangyj
|
|
|
- * @Date 2023.04.28 14:18
|
|
|
- **/
|
|
|
- public static <T extends Serializable> List<T> copyList(List<T> originalList) {
|
|
|
- try {
|
|
|
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
|
|
- ObjectOutputStream oos = new ObjectOutputStream(baos);
|
|
|
- oos.writeObject(originalList);
|
|
|
- oos.close();
|
|
|
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
|
|
|
- ObjectInputStream ois = new ObjectInputStream(bais);
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- List<T> copiedList = (List<T>) ois.readObject();
|
|
|
- ois.close();
|
|
|
- return copiedList;
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return null;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -611,8 +589,9 @@ public class FormulaUtils {
|
|
|
return list;
|
|
|
}
|
|
|
/**从时间段中获取最后一个日期*/
|
|
|
+ static final String RANGE_DATE_REG="^\\[(\\d{4}[年.\\-]\\d{2}[月.\\-]\\d{2}[日]?),\\s+(\\d{4}[年.\\-]\\d{2}[月.\\-]\\d{2}[日]?)]$";
|
|
|
public static String range2end(String t){
|
|
|
- if(t!=null&&Pattern.matches("^\\[(\\d{4}[年.\\-]\\d{2}[月.\\-]\\d{2}[日]?),\\s+(\\d{4}[年.\\-]\\d{2}[月.\\-]\\d{2}[日]?)]$",t)){
|
|
|
+ if(t!=null&&Pattern.matches(RANGE_DATE_REG,t)){
|
|
|
t=t.replaceAll("^\\[|]$","").split(",")[1].trim();
|
|
|
}
|
|
|
return t;
|
|
@@ -620,8 +599,6 @@ public class FormulaUtils {
|
|
|
|
|
|
public static FormData createFormDataFast(String name,String code,String values,String coords){
|
|
|
if(StringUtils.isNotEmpty(code,name)){
|
|
|
- //String[] arr=code.split(":");
|
|
|
- // String coords = tec.getCoordinateMap().get(arr[0]).get(arr[1]);
|
|
|
if(StringUtils.isNotEmpty(coords)) {
|
|
|
/*定位信息存在才合法*/
|
|
|
List<Coords> coordsList = Stream.of(coords).flatMap(s -> Arrays.stream(s.split(";"))).map(s -> {
|
|
@@ -657,6 +634,8 @@ public class FormulaUtils {
|
|
|
}
|
|
|
FormData one = new FormData(code, eds, null, coords);
|
|
|
one.setEName(name);
|
|
|
+ /*备份原始数据,用于更新比较*/
|
|
|
+ one.init();
|
|
|
return one;
|
|
|
}
|
|
|
}
|
|
@@ -756,4 +735,6 @@ public class FormulaUtils {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
}
|