opt:获取设备数量加日志
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
package org.nl.acs.device_driver.tianneng.baoshijian;
|
package org.nl.acs.device_driver.tianneng.baoshijian;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
|
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
|
||||||
import org.nl.acs.device_driver.tianneng.guhuashi.GuhuashiSiteDeviceDriver;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -129,7 +127,7 @@ public class ItemProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//保湿间
|
//保湿间包片机
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
//0和1 1自动正常 0异常,其他状态 错误代码,动作模式没有,需要增加
|
//0和1 1自动正常 0异常,其他状态 错误代码,动作模式没有,需要增加
|
||||||
@@ -139,7 +137,8 @@ public class ItemProtocol {
|
|||||||
list.add(new ItemDto(item_x3, "门开到位", "400004"));
|
list.add(new ItemDto(item_x3, "门开到位", "400004"));
|
||||||
list.add(new ItemDto(item_x4, "门关到位", "400005"));
|
list.add(new ItemDto(item_x4, "门关到位", "400005"));
|
||||||
list.add(new ItemDto(item_x10, "备用字", "400011"));
|
list.add(new ItemDto(item_x10, "备用字", "400011"));
|
||||||
//list.add(new ItemDto(item_x10, "备用字", "400012"));
|
//list.add(new ItemDto(item_x11, "故障码1", "400012"));
|
||||||
|
//list.add(new ItemDto(item_x12, "故障码2", "400013"));
|
||||||
list.add(new ItemDto(item_x35, "架数", "400036"));
|
list.add(new ItemDto(item_x35, "架数", "400036"));
|
||||||
list.add(new ItemDto(item_x36, "备用字", "400037"));
|
list.add(new ItemDto(item_x36, "备用字", "400037"));
|
||||||
list.add(new ItemDto(item_x37, "机号", "400038"));
|
list.add(new ItemDto(item_x37, "机号", "400038"));
|
||||||
|
|||||||
@@ -912,9 +912,11 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
// 固化室详情
|
// 固化室详情
|
||||||
CompletableFuture<JSONArray> task1 = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<JSONArray> task1 = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray result = cockpitMapper.getGHSInteriorList();
|
JSONArray result = cockpitMapper.getGHSInteriorList();
|
||||||
|
log.info("读取固化室详情信息数量: {}", result.size());
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
JSONObject ghsDetailInfo = new JSONObject();
|
JSONObject ghsDetailInfo = new JSONObject();
|
||||||
JSONArray guHuaShi = (JSONArray) redisUtils.get("guhuashi");
|
JSONArray guHuaShi = (JSONArray) redisUtils.get("guhuashi");
|
||||||
|
log.info("读取acs缓存固化室数量: {}", guHuaShi.size());
|
||||||
if(ObjectUtil.isNotEmpty(guHuaShi)) {
|
if(ObjectUtil.isNotEmpty(guHuaShi)) {
|
||||||
//todo 待补充信号逻辑
|
//todo 待补充信号逻辑
|
||||||
for (Object object : guHuaShi) {
|
for (Object object : guHuaShi) {
|
||||||
@@ -942,13 +944,10 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
log.error("读取设备缓存信息: {}", e.getMessage(), e);
|
log.error("读取设备缓存信息: {}", e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
task1.exceptionally((e) -> {
|
|
||||||
log.error("读取设备缓存信息: {}", e.getMessage(), e);
|
|
||||||
return null;
|
|
||||||
});
|
|
||||||
//查询保湿间信息
|
//查询保湿间信息
|
||||||
CompletableFuture<List<Map<String, Object>>> task2 = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<Map<String, Object>>> task2 = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray baoShiJian = (JSONArray) redisUtils.get("baoshijian");
|
JSONArray baoShiJian = (JSONArray) redisUtils.get("baoshijian");
|
||||||
|
log.info("读取acs缓存保湿间数量: {}", baoShiJian.size());
|
||||||
//todo 设备状态待补充信号逻辑
|
//todo 设备状态待补充信号逻辑
|
||||||
if (ObjectUtil.isNotEmpty(baoShiJian)) {
|
if (ObjectUtil.isNotEmpty(baoShiJian)) {
|
||||||
for (Object object : baoShiJian) {
|
for (Object object : baoShiJian) {
|
||||||
@@ -970,6 +969,7 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
//查询检测站点数据
|
//查询检测站点数据
|
||||||
CompletableFuture<List<Map<String, Object>>> task3 = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<Map<String, Object>>> task3 = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray site = (JSONArray) redisUtils.get("site");
|
JSONArray site = (JSONArray) redisUtils.get("site");
|
||||||
|
log.info("读取acs缓存检测站点数量: {}", site.size());
|
||||||
//todo 待补充信号逻辑
|
//todo 待补充信号逻辑
|
||||||
if (ObjectUtil.isNotEmpty(site)) {
|
if (ObjectUtil.isNotEmpty(site)) {
|
||||||
for (Object object : site) {
|
for (Object object : site) {
|
||||||
@@ -992,6 +992,7 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
//查询AGV数据
|
//查询AGV数据
|
||||||
CompletableFuture<List<Map<String, Object>>> task4 = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<Map<String, Object>>> task4 = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray agv = (JSONArray) redisUtils.get("agv");
|
JSONArray agv = (JSONArray) redisUtils.get("agv");
|
||||||
|
log.info("读取acs缓存agv数量: {}", agv.size());
|
||||||
if (ObjectUtil.isNotEmpty(agv)) {
|
if (ObjectUtil.isNotEmpty(agv)) {
|
||||||
//todo 待补充信号逻辑
|
//todo 待补充信号逻辑
|
||||||
for (Object object : agv) {
|
for (Object object : agv) {
|
||||||
@@ -1020,6 +1021,7 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
//查询RGV设备信息
|
//查询RGV设备信息
|
||||||
CompletableFuture<List<Map<String, Object>>> task5 = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<Map<String, Object>>> task5 = CompletableFuture.supplyAsync(() -> {
|
||||||
JSONArray rgv = (JSONArray) redisUtils.get("rgv");
|
JSONArray rgv = (JSONArray) redisUtils.get("rgv");
|
||||||
|
log.info("读取acs缓存rgv数量: {}", rgv.size());
|
||||||
if (ObjectUtil.isNotEmpty(rgv)) {
|
if (ObjectUtil.isNotEmpty(rgv)) {
|
||||||
//todo 待补充信号逻辑
|
//todo 待补充信号逻辑
|
||||||
for (Object object : rgv) {
|
for (Object object : rgv) {
|
||||||
|
|||||||
Reference in New Issue
Block a user