|
@@ -3,12 +3,16 @@ package com.rongwei.rwapsserver.aps.util;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
+import com.rongwei.rwapsserver.aps.domain.ProductionProcesses;
|
|
|
import com.rongwei.rwapsserver.aps.vo.ProductionScheduleRetVo;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Paths;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.Comparator;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author :sc
|
|
@@ -28,7 +32,10 @@ public class StringToJsonUtil {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) throws IOException {
|
|
|
- String filePath = "C:\\Users\\shangmi\\Downloads\\retjson.txt";
|
|
|
- readFromJson(filePath);
|
|
|
+ String filePath = "E:\\temp\\cx\\logs\\rw-aps-log\\0226\\retjson.txt";
|
|
|
+ ProductionScheduleRetVo productionScheduleRetVo = readFromJson(filePath);
|
|
|
+ List<ProductionProcesses> processes = productionScheduleRetVo.getProcesses().stream().filter(v -> !v.getIfLock() && v.getEquipmentId().equals("0001be252874536843730b100151")).collect(Collectors.toList());
|
|
|
+ Collections.sort(processes, Comparator.comparing(pro -> pro.getStartTime()));
|
|
|
+ System.out.println(processes.size());
|
|
|
}
|
|
|
}
|