|
@ -51,13 +51,6 @@ public class CockpitServiceImpl implements CockpitService { |
|
|
JSONArray result = WQL.getWO("COCKPIT_PRODUCTION").addParam("flag", "1").process().getResultJSONArray(0); |
|
|
JSONArray result = WQL.getWO("COCKPIT_PRODUCTION").addParam("flag", "1").process().getResultJSONArray(0); |
|
|
if (ObjectUtil.isNotEmpty(result)) { |
|
|
if (ObjectUtil.isNotEmpty(result)) { |
|
|
res = result.toJavaList(WorkorderDto.class); |
|
|
res = result.toJavaList(WorkorderDto.class); |
|
|
// res.forEach(r -> {
|
|
|
|
|
|
// r.setCust_name("新余钢铁");
|
|
|
|
|
|
// if(StringUtils.isNotEmpty(r.getLabel())) {
|
|
|
|
|
|
// r.setLabel(r.getLabel().substring(0, 2));
|
|
|
|
|
|
// r.setShift_type(r.getLabel().substring(0, 2) + "白班");
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
|
|
|
|
|
} |
|
|
} |
|
|
return res; |
|
|
return res; |
|
|
}, pool); |
|
|
}, pool); |
|
@ -91,20 +84,22 @@ public class CockpitServiceImpl implements CockpitService { |
|
|
finishedTask.thenAccept((result) -> { |
|
|
finishedTask.thenAccept((result) -> { |
|
|
List<ProductionStatisticsDto> planRes = new CopyOnWriteArrayList<>(); |
|
|
List<ProductionStatisticsDto> planRes = new CopyOnWriteArrayList<>(); |
|
|
List<ProductionStatisticsDto> finishedRes = new CopyOnWriteArrayList<>(); |
|
|
List<ProductionStatisticsDto> finishedRes = new CopyOnWriteArrayList<>(); |
|
|
if (ObjectUtil.isNotEmpty(result)) { |
|
|
|
|
|
//成品计划完成情况,应前端要求分开两个一样的数据结果,简化调用数据采集
|
|
|
//成品计划完成情况,应前端要求分开两个一样的数据结果,简化调用数据采集
|
|
|
planRes = result.toJavaList(ProductionStatisticsDto.class); |
|
|
planRes = result.toJavaList(ProductionStatisticsDto.class); |
|
|
setResultComplete(planRes); |
|
|
setResultComplete(planRes); |
|
|
//今日压制量,干燥量,成品量
|
|
|
//今日压制量,干燥量,成品量
|
|
|
finishedRes = result.toJavaList(ProductionStatisticsDto.class); |
|
|
finishedRes = result.toJavaList(ProductionStatisticsDto.class); |
|
|
setResultComplete(finishedRes); |
|
|
setResultComplete(finishedRes); |
|
|
} |
|
|
|
|
|
map.put("planRes", planRes); |
|
|
map.put("planRes", planRes); |
|
|
map.put("finishedRes", finishedRes); |
|
|
map.put("finishedRes", finishedRes); |
|
|
}).exceptionally((e) -> { |
|
|
}).exceptionally((e) -> { |
|
|
log.error("获取成品计划完成情况: {}", e.getMessage(), e); |
|
|
log.error("获取成品计划完成情况: {}", e.getMessage(), e); |
|
|
map.put("planRes", ""); |
|
|
List<ProductionStatisticsDto> planRes = new CopyOnWriteArrayList<>(); |
|
|
map.put("finishedRes", ""); |
|
|
List<ProductionStatisticsDto> finishedRes = new CopyOnWriteArrayList<>(); |
|
|
|
|
|
setResultComplete(planRes); |
|
|
|
|
|
setResultComplete(finishedRes); |
|
|
|
|
|
map.put("planRes", planRes); |
|
|
|
|
|
map.put("finishedRes", finishedRes); |
|
|
return null; |
|
|
return null; |
|
|
}); |
|
|
}); |
|
|
CompletableFuture<Void> allQuery = CompletableFuture.allOf(productionTask, materialTask, finishedTask); |
|
|
CompletableFuture<Void> allQuery = CompletableFuture.allOf(productionTask, materialTask, finishedTask); |
|
@ -398,26 +393,6 @@ public class CockpitServiceImpl implements CockpitService { |
|
|
Collections.sort(result, Comparator.comparing(dto -> Integer.parseInt(dto.getLabel()))); |
|
|
Collections.sort(result, Comparator.comparing(dto -> Integer.parseInt(dto.getLabel()))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 处理工序字段 |
|
|
|
|
|
*/ |
|
|
|
|
|
private void getProcedureName(List<ProductionStatisticsDto> result, int type) { |
|
|
|
|
|
// if(type == 1) {
|
|
|
|
|
|
// result.forEach(r -> {
|
|
|
|
|
|
// if(StringUtils.isNotEmpty(r.getWorkorder_procedure())) {
|
|
|
|
|
|
// r.setWorkorder_procedure(ProductionStatisticsEnum.getName(r.getWorkorder_procedure()));
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
|
|
|
|
|
// }
|
|
|
|
|
|
// else{
|
|
|
|
|
|
// result.forEach(r -> {
|
|
|
|
|
|
// if(StringUtils.isNotEmpty(r.getWorkorder_procedure())) { // 处理字段
|
|
|
|
|
|
// r.setWorkorder_procedure(ProductionStatisticsEnum.getName(r.getWorkorder_procedure()));
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
|
|
|
|
|
// }
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 判断静置状态 |
|
|
* 判断静置状态 |
|
|
*/ |
|
|
*/ |
|
|