| | |
| | | private static final String ALARM_CODE_SIZE = "sizeSame"; |
| | | private static final String ALARM_CODE_ID = "idSame"; |
| | | |
| | | private JSONObject jsonObject = new JSONObject(); |
| | | |
| | | public void queryDataSource1() throws Exception { |
| | | public JSONObject queryDataSource1() throws Exception { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.append("alarmInfo", productAlarmInfoService.list(new LambdaQueryWrapper<ProductAlarmInfo>() |
| | | .eq(ProductAlarmInfo::getState, Const.LOAD_RAW_GLASS_NEW) |
| | | .eq(ProductAlarmInfo::getAlarmModule, ALARM_MODULE) |
| | |
| | | //当前指定工程 |
| | | jsonObject.append("temperingEngineerId", redisUtil.getCacheObject("temperingEngineerId")); |
| | | |
| | | |
| | | return jsonObject; |
| | | } |
| | | |
| | | public void queryDataSource2() throws InterruptedException { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | //出片队列 |
| | | List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.list( |
| | | new LambdaQueryWrapper<TemperingGlassInfo>() |
| | |
| | | */ |
| | | @Scheduled(fixedDelay = 3000) |
| | | public void plcStorageCageTask() throws Exception { |
| | | jsonObject = new JSONObject(); |
| | | //查询使用数据源1查询数据 |
| | | queryDataSource1(); |
| | | JSONObject jsonObject = queryDataSource1(); |
| | | //查询使用数据源2查询数据 |
| | | // queryDataSource2(); |
| | | webSocketUtils.sendToWeb("slicecage", jsonObject); |