|
@@ -1959,16 +1959,19 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
beforeUseTime=useTimeMap.get(ip);
|
|
|
}
|
|
|
|
|
|
+ ToolCostomAddressHistory minTool=null;
|
|
|
//获取机床启动程序时间的数据采集
|
|
|
+ if(beforeUseTime == 0){
|
|
|
+ minTool = baseMapper.getMinTool(item.getStartTime(),ip);
|
|
|
+ }else{
|
|
|
+ Optional<ToolCostomAddressHistory> minFirst = minProduct.stream().filter(it -> it.getIp().equals(ip)).findFirst();
|
|
|
+ minTool=minFirst.isPresent() ? minFirst.get():null;
|
|
|
+ }
|
|
|
|
|
|
- Optional<ToolCostomAddressHistory> minFirst = minProduct.stream().filter(it -> it.getIp().equals(ip)).findFirst();
|
|
|
Optional<ToolCostomAddressHistory> first = maxProduct.stream().filter(it -> it.getIp().equals(ip)).findFirst();
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- if(minFirst.isPresent() && first.isPresent()){
|
|
|
- String minValue = minFirst.get().getValue();
|
|
|
- cn.hutool.json.JSONObject jsonObject=new cn.hutool.json.JSONObject(minValue);
|
|
|
+ if(minTool!=null && first.isPresent()){
|
|
|
+ cn.hutool.json.JSONObject jsonObject=new cn.hutool.json.JSONObject(minTool.getValue());
|
|
|
JSONArray minJsonArray = JSONArray.parseArray(jsonObject.get("values").toString());
|
|
|
String min = minJsonArray.get(101).toString();
|
|
|
|