fix: 修复大屏首页
This commit is contained in:
@@ -48,7 +48,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
CompletableFuture<List<NumberDto>> mixDayProductionTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<NumberDto>> mixDayProductionTask = CompletableFuture.supplyAsync(() -> {
|
||||||
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
||||||
// 查找sql
|
// 查找sql
|
||||||
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "1", "region_code", "HL"))
|
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "1", "region_code", "HL"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
@@ -71,7 +72,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
CompletableFuture<List<NumberDto>> pressDayProductionTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<NumberDto>> pressDayProductionTask = CompletableFuture.supplyAsync(() -> {
|
||||||
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
||||||
// 查找所有混捻每周的数据
|
// 查找所有混捻每周的数据
|
||||||
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "1", "region_code", "YZ")).process().getResultJSONArray(0);
|
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "1", "region_code", "YZ"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
res = result.toJavaList(NumberDto.class);
|
res = result.toJavaList(NumberDto.class);
|
||||||
setResultCompleteInProcessProduction(res, "YZ");
|
setResultCompleteInProcessProduction(res, "YZ");
|
||||||
@@ -88,7 +92,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
// TODO: 3、当日成品
|
// TODO: 3、当日成品
|
||||||
CompletableFuture<List<ManufacturedProductsDto>> manufacturedProductsDayProductionTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<ManufacturedProductsDto>> manufacturedProductsDayProductionTask
|
||||||
|
= CompletableFuture.supplyAsync(() -> {
|
||||||
List<ManufacturedProductsDto> res = new ArrayList<>();
|
List<ManufacturedProductsDto> res = new ArrayList<>();
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
// 使用随机数
|
// 使用随机数
|
||||||
@@ -152,11 +157,11 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// TODO: 6、最近10次设备故障
|
// TODO: 6、最近10次设备故障
|
||||||
CompletableFuture<List<FailureDeviceInfoDto>> lastTenFailureTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<FailureDeviceInfoDto>> lastTenFailureTask = CompletableFuture.supplyAsync(() -> {
|
||||||
List<FailureDeviceInfoDto> res = new ArrayList<>();
|
List<FailureDeviceInfoDto> res = new CopyOnWriteArrayList<>();
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
FailureDeviceInfoDto dto = new FailureDeviceInfoDto();
|
FailureDeviceInfoDto dto = new FailureDeviceInfoDto();
|
||||||
dto.setDevice_code("hn01");
|
dto.setDevice_code("hn01");
|
||||||
dto.setDevice_name("混黏01");
|
dto.setDevice_name("混撵01");
|
||||||
dto.setFailure_time("05-30 09:50:12");
|
dto.setFailure_time("05-30 09:50:12");
|
||||||
dto.setFailure_info("机器故障");
|
dto.setFailure_info("机器故障");
|
||||||
dto.setDevice_status_name("待机");
|
dto.setDevice_status_name("待机");
|
||||||
@@ -173,7 +178,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 7、压制码垛位情况显示
|
// 7、压制码垛位情况显示
|
||||||
CompletableFuture<JSONArray> stackingPositionTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> stackingPositionTask = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "5", "region_code", "YZ"))
|
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "5", "region_code", "YZ"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
return res;
|
return res;
|
||||||
@@ -192,7 +198,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 8、压机信息显示 todo: 压机的状态,请求acs
|
// 8、压机信息显示 todo: 压机的状态,请求acs
|
||||||
CompletableFuture<JSONArray> pressMachineTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> pressMachineTask = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "10"))
|
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "10"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
for (int i = 0; i < res.size(); i++) {
|
for (int i = 0; i < res.size(); i++) {
|
||||||
@@ -211,7 +218,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 9、混料机信息显示 todo: 设备状态,请求acs
|
// 9、混料机信息显示 todo: 设备状态,请求acs
|
||||||
CompletableFuture<JSONArray> mixMachineTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> mixMachineTask = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "11"))
|
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "11"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
for (int i = 0; i < res.size(); i++) {
|
for (int i = 0; i < res.size(); i++) {
|
||||||
@@ -230,7 +238,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 10、困料货架的信息显示
|
// 10、困料货架的信息显示
|
||||||
CompletableFuture<JSONArray> trappedMaterialShelfTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> trappedMaterialShelfTask = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "8"))
|
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "8"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
return res;
|
return res;
|
||||||
@@ -244,7 +253,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 11、半成品货架数据显示
|
// 11、半成品货架数据显示
|
||||||
CompletableFuture<JSONArray> semiFinishedProductShelfTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> semiFinishedProductShelfTask = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "9"))
|
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "9"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
return res;
|
return res;
|
||||||
@@ -258,8 +268,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 12、混料机下料位
|
// 12、混料机下料位
|
||||||
CompletableFuture<JSONArray> mixBlankingTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> mixBlankingTask = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_MIX_AND_TRAP").addParamMap(MapOf.of("flag", "3"))
|
JSONArray res = WQL.getWO("COCKPIT_MIX_AND_TRAP")
|
||||||
.process().getResultJSONArray(0);
|
.addParamMap(MapOf.of("flag", "3"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
return res;
|
return res;
|
||||||
}, pool);
|
}, pool);
|
||||||
mixBlankingTask.thenAccept(result -> {
|
mixBlankingTask.thenAccept(result -> {
|
||||||
@@ -271,8 +283,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 13、液压机旁边困料货架数据显示
|
// 13、液压机旁边困料货架数据显示
|
||||||
CompletableFuture<JSONArray> trappedShelfTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> trappedShelfTask = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "12"))
|
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
.process().getResultJSONArray(0);
|
.addParamMap(MapOf.of("flag", "12"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
return res;
|
return res;
|
||||||
}, pool);
|
}, pool);
|
||||||
trappedShelfTask.thenAccept(result -> {
|
trappedShelfTask.thenAccept(result -> {
|
||||||
@@ -284,7 +298,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 14、分拣拆码垛对接位
|
// 14、分拣拆码垛对接位
|
||||||
CompletableFuture<JSONArray> sortAndPalletizingTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> sortAndPalletizingTask = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "13"))
|
JSONArray res = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "13"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
// TODO: 颜色、实时数量请求acs系统
|
// TODO: 颜色、实时数量请求acs系统
|
||||||
@@ -314,7 +329,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
trappedShelfTask,
|
trappedShelfTask,
|
||||||
sortAndPalletizingTask,
|
sortAndPalletizingTask,
|
||||||
semiFinishedProductShelfTask);
|
semiFinishedProductShelfTask);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -335,7 +351,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
CompletableFuture<List<NumberDto>> mixMaterialStorage = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<NumberDto>> mixMaterialStorage = CompletableFuture.supplyAsync(() -> {
|
||||||
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
||||||
// 查找所有混料设备的数据
|
// 查找所有混料设备的数据
|
||||||
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "1", "region_code", "HL")).process().getResultJSONArray(0);
|
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "1", "region_code", "HL"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
res = result.toJavaList(NumberDto.class);
|
res = result.toJavaList(NumberDto.class);
|
||||||
// 设备空数据值
|
// 设备空数据值
|
||||||
@@ -352,8 +371,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
sumRealDay += numberDto.getReal_qty();
|
sumRealDay += numberDto.getReal_qty();
|
||||||
sumPlanDay += numberDto.getPlan_qty();
|
sumPlanDay += numberDto.getPlan_qty();
|
||||||
}
|
}
|
||||||
res.put("hl_plan_day", BigDecimal.valueOf(sumPlanDay / 1000).setScale(2, RoundingMode.HALF_UP).toString());
|
res.put("hl_plan_day",
|
||||||
res.put("hl_real_day", BigDecimal.valueOf(sumRealDay / 1000).setScale(2, RoundingMode.HALF_UP).toString());
|
BigDecimal.valueOf(sumPlanDay / 1000).setScale(2, RoundingMode.HALF_UP).toString());
|
||||||
|
res.put("hl_real_day",
|
||||||
|
BigDecimal.valueOf(sumRealDay / 1000).setScale(2, RoundingMode.HALF_UP).toString());
|
||||||
res.put("hl_productivity", (int)((sumRealDay / sumPlanDay)*100));
|
res.put("hl_productivity", (int)((sumRealDay / sumPlanDay)*100));
|
||||||
res.put("HLDayList", result);
|
res.put("HLDayList", result);
|
||||||
if (map.containsKey("HL")) { // 如果存在
|
if (map.containsKey("HL")) { // 如果存在
|
||||||
@@ -385,7 +406,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
CompletableFuture<List<NumberDto>> mixDeviceWeekDayStorage = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<NumberDto>> mixDeviceWeekDayStorage = CompletableFuture.supplyAsync(() -> {
|
||||||
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
||||||
// 查找所有混捻每周的数据
|
// 查找所有混捻每周的数据
|
||||||
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "2", "region_code", "HL")).process().getResultJSONArray(0);
|
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "2", "region_code", "HL"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
res = result.toJavaList(NumberDto.class);
|
res = result.toJavaList(NumberDto.class);
|
||||||
setResultCompleteInProcessProduction(res, "HL");
|
setResultCompleteInProcessProduction(res, "HL");
|
||||||
@@ -428,7 +452,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
CompletableFuture<List<NumberDto>> yzPlanAndRealStorage = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<NumberDto>> yzPlanAndRealStorage = CompletableFuture.supplyAsync(() -> {
|
||||||
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
||||||
// 查找所有压制的数据
|
// 查找所有压制的数据
|
||||||
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "1", "region_code", "YZ")).process().getResultJSONArray(0);
|
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "1", "region_code", "YZ"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
res = result.toJavaList(NumberDto.class);
|
res = result.toJavaList(NumberDto.class);
|
||||||
setResultCompleteInProcessProduction(res, "YZ");
|
setResultCompleteInProcessProduction(res, "YZ");
|
||||||
@@ -444,8 +471,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
sumRealDay += numberDto.getReal_qty();
|
sumRealDay += numberDto.getReal_qty();
|
||||||
sumPlanDay += numberDto.getPlan_qty();
|
sumPlanDay += numberDto.getPlan_qty();
|
||||||
}
|
}
|
||||||
res.put("yz_plan_day", BigDecimal.valueOf(sumPlanDay / 10000).setScale(2, RoundingMode.HALF_UP).toString());
|
res.put("yz_plan_day",
|
||||||
res.put("yz_real_day", BigDecimal.valueOf(sumRealDay / 10000).setScale(2, RoundingMode.HALF_UP).toString());
|
BigDecimal.valueOf(sumPlanDay / 10000).setScale(2, RoundingMode.HALF_UP).toString());
|
||||||
|
res.put("yz_real_day",
|
||||||
|
BigDecimal.valueOf(sumRealDay / 10000).setScale(2, RoundingMode.HALF_UP).toString());
|
||||||
res.put("yz_productivity", (int)((sumRealDay / sumPlanDay)*100));
|
res.put("yz_productivity", (int)((sumRealDay / sumPlanDay)*100));
|
||||||
res.put("YZDayList", result);
|
res.put("YZDayList", result);
|
||||||
if (map.containsKey("YZ")) { // 如果存在
|
if (map.containsKey("YZ")) { // 如果存在
|
||||||
@@ -477,7 +506,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
CompletableFuture<List<NumberDto>> yzDeviceWeekDayStorage = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<NumberDto>> yzDeviceWeekDayStorage = CompletableFuture.supplyAsync(() -> {
|
||||||
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
||||||
// 查找所有压制每周的数据
|
// 查找所有压制每周的数据
|
||||||
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "2", "region_code", "YZ")).process().getResultJSONArray(0);
|
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "2", "region_code", "YZ"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
res = result.toJavaList(NumberDto.class);
|
res = result.toJavaList(NumberDto.class);
|
||||||
setResultCompleteInProcessProduction(res, "YZ");
|
setResultCompleteInProcessProduction(res, "YZ");
|
||||||
@@ -520,7 +552,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
CompletableFuture<List<NumberDto>> bzPlanAndRealStorage = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<NumberDto>> bzPlanAndRealStorage = CompletableFuture.supplyAsync(() -> {
|
||||||
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
||||||
// 查找所有包装每天的数据
|
// 查找所有包装每天的数据
|
||||||
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "3")).process().getResultJSONArray(0);
|
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "3"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
res = result.toJavaList(NumberDto.class);
|
res = result.toJavaList(NumberDto.class);
|
||||||
}
|
}
|
||||||
@@ -567,7 +602,10 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
CompletableFuture<List<NumberDto>> bzDeviceWeekDayStorage = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<NumberDto>> bzDeviceWeekDayStorage = CompletableFuture.supplyAsync(() -> {
|
||||||
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
List<NumberDto> res = new CopyOnWriteArrayList<>();
|
||||||
// 查找所有包装每周的数据
|
// 查找所有包装每周的数据
|
||||||
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION").addParamMap(MapOf.of("flag", "4")).process().getResultJSONArray(0);
|
JSONArray result = WQL.getWO("COCKPIT_PROCESS_PRODUCTION")
|
||||||
|
.addParamMap(MapOf.of("flag", "4"))
|
||||||
|
.process()
|
||||||
|
.getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
res = result.toJavaList(NumberDto.class);
|
res = result.toJavaList(NumberDto.class);
|
||||||
}
|
}
|
||||||
@@ -662,7 +700,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
bzPlanAndRealStorage,
|
bzPlanAndRealStorage,
|
||||||
bzDeviceWeekDayStorage,
|
bzDeviceWeekDayStorage,
|
||||||
cpDeviceDataStorage);
|
cpDeviceDataStorage);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -741,7 +780,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
mixedDayListTask,
|
mixedDayListTask,
|
||||||
mixDevicePopoverInformationTask,
|
mixDevicePopoverInformationTask,
|
||||||
cupRackDisplayTask);
|
cupRackDisplayTask);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -781,7 +821,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 3、困料货架数据显示 - 40货位
|
// 3、困料货架数据显示 - 40货位
|
||||||
CompletableFuture<JSONArray> trappedShelf40Task = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> trappedShelf40Task = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_MIX_AND_TRAP").addParamMap(MapOf.of("flag", "6", "point_type", "1"))
|
JSONArray res = WQL.getWO("COCKPIT_MIX_AND_TRAP")
|
||||||
|
.addParamMap(MapOf.of("flag", "6", "point_type", "1"))
|
||||||
.process().getResultJSONArray(0);
|
.process().getResultJSONArray(0);
|
||||||
return res;
|
return res;
|
||||||
}, pool);
|
}, pool);
|
||||||
@@ -794,7 +835,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
});
|
});
|
||||||
// 4、困料货架数据显示 - 6货位
|
// 4、困料货架数据显示 - 6货位
|
||||||
CompletableFuture<JSONArray> trappedShelf6Task = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> trappedShelf6Task = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray res = WQL.getWO("COCKPIT_MIX_AND_TRAP").addParamMap(MapOf.of("flag", "6", "point_type", "2"))
|
JSONArray res = WQL.getWO("COCKPIT_MIX_AND_TRAP")
|
||||||
|
.addParamMap(MapOf.of("flag", "6", "point_type", "2"))
|
||||||
.process().getResultJSONArray(0);
|
.process().getResultJSONArray(0);
|
||||||
return res;
|
return res;
|
||||||
}, pool);
|
}, pool);
|
||||||
@@ -810,7 +852,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
trappedIOStockTask,
|
trappedIOStockTask,
|
||||||
trappedShelf40Task,
|
trappedShelf40Task,
|
||||||
trappedShelf6Task);
|
trappedShelf6Task);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -893,7 +936,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
pressPopoverTask,
|
pressPopoverTask,
|
||||||
trayStationPopoverTask,
|
trayStationPopoverTask,
|
||||||
manipulatorConditionTask);
|
manipulatorConditionTask);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -948,7 +992,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
moldingDayTask,
|
moldingDayTask,
|
||||||
semiFinishedProductShelfTask,
|
semiFinishedProductShelfTask,
|
||||||
moldingIOStoringTask);
|
moldingIOStoringTask);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -1029,7 +1074,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
semiFinishedIOTask,
|
semiFinishedIOTask,
|
||||||
fireInTheKilnTask,
|
fireInTheKilnTask,
|
||||||
coolingInTheKilnTask);
|
coolingInTheKilnTask);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -1057,7 +1103,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
// todo: 窑内数据
|
// todo: 窑内数据
|
||||||
CompletableFuture<Void> allQuery = CompletableFuture.allOf(
|
CompletableFuture<Void> allQuery = CompletableFuture.allOf(
|
||||||
finishedProductShelfTask);
|
finishedProductShelfTask);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -1109,7 +1156,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
// todo: 4、当日成品
|
// todo: 4、当日成品
|
||||||
CompletableFuture<List<ManufacturedProductsDto>> manufacturedProductsDayProductionTask = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<ManufacturedProductsDto>> manufacturedProductsDayProductionTask
|
||||||
|
= CompletableFuture.supplyAsync(() -> {
|
||||||
List<ManufacturedProductsDto> res = new ArrayList<>();
|
List<ManufacturedProductsDto> res = new ArrayList<>();
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
// 使用随机数
|
// 使用随机数
|
||||||
@@ -1135,7 +1183,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
packingAreaTask,
|
packingAreaTask,
|
||||||
sortingTask,
|
sortingTask,
|
||||||
manufacturedProductsDayProductionTask);
|
manufacturedProductsDayProductionTask);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -1202,7 +1251,8 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
splitOrPalletizingTask,
|
splitOrPalletizingTask,
|
||||||
devicesInfoTask,
|
devicesInfoTask,
|
||||||
halfSupportCacheTask);
|
halfSupportCacheTask);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future = allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@@ -1227,7 +1277,9 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
}
|
}
|
||||||
// 获取所有设备编码
|
// 获取所有设备编码
|
||||||
WQLObject deviceTab = WQLObject.getWQLObject("pdm_bi_device");
|
WQLObject deviceTab = WQLObject.getWQLObject("pdm_bi_device");
|
||||||
JSONArray resultJSONArray = deviceTab.query("region_code = '" + region_code + "' AND is_workorder = '1'").getResultJSONArray(0);
|
JSONArray resultJSONArray = deviceTab
|
||||||
|
.query("region_code = '" + region_code + "' AND is_workorder = '1'")
|
||||||
|
.getResultJSONArray(0);
|
||||||
for (int i = 0; i < resultJSONArray.size(); i++) {
|
for (int i = 0; i < resultJSONArray.size(); i++) {
|
||||||
JSONObject jsonObject = resultJSONArray.getJSONObject(i);
|
JSONObject jsonObject = resultJSONArray.getJSONObject(i);
|
||||||
if (!existingLabels.contains(jsonObject.getString("device_code"))) {
|
if (!existingLabels.contains(jsonObject.getString("device_code"))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user