fix:大屏、看板、弹窗接口完善
This commit is contained in:
@@ -7,7 +7,7 @@ spring:
|
|||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.93.41.198}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.93.41.198}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:nd_hh_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:123456}
|
password: ${DB_PWD:123456}
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
|
|||||||
@@ -294,17 +294,17 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
||||||
&& jsonObject.getInteger("encoder_qty") > 0) {
|
&& jsonObject.getInteger("encoder_qty") > 0) {
|
||||||
// 绿色
|
// 绿色
|
||||||
jsonObject.put("color_status", ColorEnum.GREEN.getIndex());
|
jsonObject.put("device_status", ColorEnum.GREEN.getIndex());
|
||||||
} else if (jsonObject.getInteger("move") != 0
|
} else if (jsonObject.getInteger("move") != 0
|
||||||
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
||||||
&& jsonObject.getInteger("encoder_qty") == 0) {
|
&& jsonObject.getInteger("encoder_qty") == 0) {
|
||||||
// 黄色
|
// 黄色
|
||||||
jsonObject.put("color_status", ColorEnum.YELLOW.getIndex());
|
jsonObject.put("device_status", ColorEnum.YELLOW.getIndex());
|
||||||
} else if (jsonObject.getInteger("move") == 0) {
|
} else if (jsonObject.getInteger("move") == 0) {
|
||||||
// 红色
|
// 红色
|
||||||
jsonObject.put("color_status", ColorEnum.RED.getIndex());
|
jsonObject.put("device_status", ColorEnum.RED.getIndex());
|
||||||
} else { // 有托盘人工
|
} else { // 有托盘人工
|
||||||
jsonObject.put("color_status", ColorEnum.GREEN.getIndex());
|
jsonObject.put("device_status", ColorEnum.GREEN.getIndex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
@@ -427,17 +427,17 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
||||||
&& jsonObject.getInteger("encoder_qty") > 0) {
|
&& jsonObject.getInteger("encoder_qty") > 0) {
|
||||||
// 绿色
|
// 绿色
|
||||||
jsonObject.put("color_status", ColorEnum.GREEN.getIndex());
|
jsonObject.put("device_status", ColorEnum.GREEN.getIndex());
|
||||||
} else if (jsonObject.getInteger("move") != 0
|
} else if (jsonObject.getInteger("move") != 0
|
||||||
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
||||||
&& jsonObject.getInteger("encoder_qty") == 0) {
|
&& jsonObject.getInteger("encoder_qty") == 0) {
|
||||||
// 黄色
|
// 黄色
|
||||||
jsonObject.put("color_status", ColorEnum.YELLOW.getIndex());
|
jsonObject.put("device_status", ColorEnum.YELLOW.getIndex());
|
||||||
} else if (jsonObject.getInteger("move") == 0) {
|
} else if (jsonObject.getInteger("move") == 0) {
|
||||||
// 红色
|
// 红色
|
||||||
jsonObject.put("color_status", ColorEnum.RED.getIndex());
|
jsonObject.put("device_status", ColorEnum.RED.getIndex());
|
||||||
} else { // 有托盘人工
|
} else { // 有托盘人工
|
||||||
jsonObject.put("color_status", ColorEnum.GREEN.getIndex());
|
jsonObject.put("device_status", ColorEnum.GREEN.getIndex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fjcmdData;
|
return fjcmdData;
|
||||||
@@ -449,6 +449,29 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
map.put("SortAndPalletizingList", e);
|
map.put("SortAndPalletizingList", e);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 出窑缓存货架
|
||||||
|
CompletableFuture<List<MixingRelativeVo>> outKilnHchjTask = CompletableFuture.supplyAsync(() -> {
|
||||||
|
return cockPitMapper.selectHchjList();
|
||||||
|
}, pool);
|
||||||
|
outKilnHchjTask.thenAccept(result -> {
|
||||||
|
map.put("hchjList", result);
|
||||||
|
}).exceptionally((e) -> {
|
||||||
|
log.error("出窑缓存货架显示: {}", e.getMessage(), e);
|
||||||
|
map.put("hchjList", null);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
// 人工分拣拆垛
|
||||||
|
CompletableFuture<List<MixingRelativeVo>> manualSortingTask = CompletableFuture.supplyAsync(() -> {
|
||||||
|
return cockPitMapper.selecManualSortingList();
|
||||||
|
}, pool);
|
||||||
|
manualSortingTask.thenAccept(result -> {
|
||||||
|
map.put("manualSortingList", result);
|
||||||
|
}).exceptionally((e) -> {
|
||||||
|
log.error("人工分拣拆垛位显示: {}", e.getMessage(), e);
|
||||||
|
map.put("manualSortingList", null);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
CompletableFuture<Void> allQuery = CompletableFuture.allOf(
|
CompletableFuture<Void> allQuery = CompletableFuture.allOf(
|
||||||
stackingPositionTask,
|
stackingPositionTask,
|
||||||
pressMachineTask,
|
pressMachineTask,
|
||||||
@@ -456,7 +479,9 @@ public class CockpitServiceImpl implements CockpitService {
|
|||||||
mixMachineTask,
|
mixMachineTask,
|
||||||
sortAndPalletizingTask,
|
sortAndPalletizingTask,
|
||||||
manipulatorInfoTask,
|
manipulatorInfoTask,
|
||||||
mixBlankingTask
|
mixBlankingTask,
|
||||||
|
outKilnHchjTask,
|
||||||
|
manualSortingTask
|
||||||
);
|
);
|
||||||
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||||
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||||
|
|||||||
@@ -51,4 +51,8 @@ public interface CockPitMapper {
|
|||||||
List<String> selectJxsPoints();
|
List<String> selectJxsPoints();
|
||||||
|
|
||||||
List<ErrorRecordVo> queryRecord();
|
List<ErrorRecordVo> queryRecord();
|
||||||
|
|
||||||
|
List<MixingRelativeVo> selectHchjList();
|
||||||
|
|
||||||
|
List<MixingRelativeVo> selecManualSortingList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -265,5 +265,21 @@
|
|||||||
LEFT JOIN sch_base_point p ON r.device_code = p.point_code
|
LEFT JOIN sch_base_point p ON r.device_code = p.point_code
|
||||||
ORDER BY r.record_time desc limit 100
|
ORDER BY r.record_time desc limit 100
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectHchjList" resultType="org.nl.wms.cockpit.service.dao.MixingRelativeVo">
|
||||||
|
SELECT p.point_code as pointCode,
|
||||||
|
p.point_name as pointName,
|
||||||
|
p.point_status as pointStatus
|
||||||
|
FROM `sch_base_point` p
|
||||||
|
WHERE p.region_code ='HCHJ'
|
||||||
|
ORDER BY p.point_code
|
||||||
|
</select>
|
||||||
|
<select id="selecManualSortingList" resultType="org.nl.wms.cockpit.service.dao.MixingRelativeVo">
|
||||||
|
SELECT p.point_code as pointCode,
|
||||||
|
p.point_name as pointName,
|
||||||
|
p.point_status as pointStatus
|
||||||
|
FROM `sch_base_point` p
|
||||||
|
WHERE p.region_code ='RGFJ'
|
||||||
|
ORDER BY p.point_code
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
mysql:
|
mysql:
|
||||||
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:10.93.41.198}:${DB_PORT:3306}/${DB_NAME:rl_mg_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:nnhh_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:123456}
|
password: ${DB_PWD:123456}
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:rtmg_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:rtmg_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
|
|||||||
Reference in New Issue
Block a user