fix:大屏、看板、弹窗接口完善
This commit is contained in:
@@ -7,7 +7,7 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
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: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}
|
||||
password: ${DB_PWD:123456}
|
||||
# 初始连接数
|
||||
|
||||
@@ -294,17 +294,17 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
||||
&& 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
|
||||
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
||||
&& 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) {
|
||||
// 红色
|
||||
jsonObject.put("color_status", ColorEnum.RED.getIndex());
|
||||
jsonObject.put("device_status", ColorEnum.RED.getIndex());
|
||||
} else { // 有托盘人工
|
||||
jsonObject.put("color_status", ColorEnum.GREEN.getIndex());
|
||||
jsonObject.put("device_status", ColorEnum.GREEN.getIndex());
|
||||
}
|
||||
}
|
||||
return data;
|
||||
@@ -427,17 +427,17 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
||||
&& 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
|
||||
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
|
||||
&& 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) {
|
||||
// 红色
|
||||
jsonObject.put("color_status", ColorEnum.RED.getIndex());
|
||||
jsonObject.put("device_status", ColorEnum.RED.getIndex());
|
||||
} else { // 有托盘人工
|
||||
jsonObject.put("color_status", ColorEnum.GREEN.getIndex());
|
||||
jsonObject.put("device_status", ColorEnum.GREEN.getIndex());
|
||||
}
|
||||
}
|
||||
return fjcmdData;
|
||||
@@ -449,6 +449,29 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
map.put("SortAndPalletizingList", e);
|
||||
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(
|
||||
stackingPositionTask,
|
||||
pressMachineTask,
|
||||
@@ -456,7 +479,9 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
mixMachineTask,
|
||||
sortAndPalletizingTask,
|
||||
manipulatorInfoTask,
|
||||
mixBlankingTask
|
||||
mixBlankingTask,
|
||||
outKilnHchjTask,
|
||||
manualSortingTask
|
||||
);
|
||||
CompletableFuture<ConcurrentHashMap<String, Object>> future
|
||||
= allQuery.thenApply((result) -> map).exceptionally((e) -> {
|
||||
|
||||
@@ -51,4 +51,8 @@ public interface CockPitMapper {
|
||||
List<String> selectJxsPoints();
|
||||
|
||||
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
|
||||
ORDER BY r.record_time desc limit 100
|
||||
</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>
|
||||
|
||||
@@ -10,7 +10,7 @@ spring:
|
||||
datasource:
|
||||
mysql:
|
||||
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}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user