ZengTao
2025-01-08 29f942cefe9d9f4272332eec0276f2c5a60d9d9e
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
@@ -63,6 +63,18 @@
        JSONObject jsonObject = new JSONObject();
        List<DownWorkstation> data = downWorkstationService.list();
        List<DownGlassTask> downGlassTasks = downGlassTaskService.list(
                new LambdaQueryWrapper<DownGlassTask>()
                        .eq(DownGlassTask::getEndCell, 7)
                        .eq(DownGlassTask::getTaskType, 3)
                        .lt(DownGlassTask::getTaskStatus, 3)
        );
        DownWorkstation downWorkstation = new DownWorkstation();
        downWorkstation.setWorkstationId(7);
        downWorkstation.setEnableState(1);
        downWorkstation.setRacksNumber(downGlassTasks.size());
        downWorkstation.setTotalQuantity(downGlassTasks.size());
        data.add(downWorkstation);
        jsonObject.append("params", data);
        log.info(jsonObject.toString());
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass");
@@ -167,10 +179,11 @@
                new QueryWrapper<DownGlassTask>()
                        .select("Top 1 *")
                        .eq("end_cell", Const.G13_WORK_STATION)
                        .eq("task_type", 3)
                        .lt("task_status", Const.UNLOAD_GLASS_DOWN)
                        .orderByAsc("id")
        );
        if(takeGlass!=null){
        if (takeGlass != null) {
            jsonObject4.append("takeGlass", takeGlass);
        }
@@ -224,8 +237,8 @@
                        log.info("按照玻璃id:{},无法找到玻璃信息", glassId);
                    } else {
                        for (WebSocketServer webserver : sendwServer) {
                                jsonObject.append("scanGlass", glassInfo);
                                webserver.sendMessage(jsonObject.toString());
                            jsonObject.append("scanGlass", glassInfo);
                            webserver.sendMessage(jsonObject.toString());
                        }
                    }
                }