From 8d58c40af40493bd5f066cbfdb1ffd9f113c22fc Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期三, 03 九月 2025 16:37:21 +0800
Subject: [PATCH] 1.前端推数据使用了最新的webSokect客户现场总是掉线,修改为接口方式 2.设备交互整体增加异常处理以及PLC连接方式改为短连接

---
 JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MachineTask.java |  376 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 214 insertions(+), 162 deletions(-)

diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MachineTask.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MachineTask.java
index 073b79d..5bced79 100644
--- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MachineTask.java
+++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MachineTask.java
@@ -2,30 +2,26 @@
 
 import cn.hutool.json.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
-import com.mes.common.S7objectFlipSlice;
-import com.mes.common.S7objectMachine;
-import com.mes.common.S7objectMarking;
-import com.mes.device.PlcParameterInfo;
-import com.mes.device.PlcParameterObject;
 import com.mes.md.entity.*;
 import com.mes.md.mapper.GlassInfoMapper;
 import com.mes.md.mapper.MachineMapper;
 import com.mes.md.mapper.TaskingMapper;
 import com.mes.md.service.*;
-import com.mes.tools.WebSocketServer;
+import com.mes.websocket.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
 /**
  * 鑷姩鎵撴爣鏈�
+ *
  * @Author : yanzhxiin
  * @Date: 2024/8/20 11:19
  * @Description:
@@ -50,6 +46,8 @@
     KBBTJPDrawingBPService kBBTJPDrawingBPService;
     @Autowired
     LineConfigurationService lineConfigurationService;
+    @Resource
+    WebSocketServer webSocketServer;
     @Autowired
     private GlassInfoMapper glassInfoMapper;
     public List<Map> sendRecords = new ArrayList<>();
@@ -64,210 +62,264 @@
     private List<Machine> machineListLamination;
 
     //鏈烘鎵�
-    @Scheduled(fixedDelay = 500)
-    public void MarkingTasks() {
-        machineListLoad =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"涓婄墖"));
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "loadTask");
-        for (Machine machine : machineListLoad) {
-            JSONObject jsonObjectItem = new JSONObject();
-            //鏍囧噯妯″紡  鎵惧凡棰嗗彇鏈畬鎴愮殑绗竴鏉′换鍔�
-            LineConfiguration lineConfiguration=lineConfigurationService.machineLineConfiguration(machine);
-            //姝ょ嚎璺凡棰嗗彇鐨勪换鍔�
-            List<PrimitiveTask> findPrimitiveTasking=primitiveTaskService.findPrimitiveTasking(machine,lineConfiguration.getLineId());
-            //姝ょ嚎璺湭棰嗗彇鐨勪换鍔�  鏈湴
-            //List<PrimitiveTask> findPrimitiveTask=primitiveTaskService.findPrimitiveTaskNotFinish();
-            //姝ょ嚎璺湭棰嗗彇鐨勪换鍔�  瀹㈡埛鏁版嵁搴�
-            List<KBBTJPDrawingBP> list =kBBTJPDrawingBPService.notReceiveKBBTJPDrawingBP();
-            jsonObjectItem.append("findPrimitiveTask", list);
-            jsonObjectItem.append("findPrimitiveTasking", findPrimitiveTasking);
-            //jsonObject.append("findPrimitiveTask", findPrimitiveTask);
-            jsonObjectItem.append("machine", machine);
-            jsonObjectItem.append("sendRecords", sendRecords);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+    //@Scheduled(fixedDelay = 500)
+    public void loadTasks() {
+        try {
+            machineListLoad = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "涓婄墖"));
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "loadTask");
+            for (Machine machine : machineListLoad) {
+                JSONObject jsonObjectItem = new JSONObject();
+                //鏍囧噯妯″紡  鎵惧凡棰嗗彇鏈畬鎴愮殑绗竴鏉′换鍔�
+                LineConfiguration lineConfiguration = lineConfigurationService.machineLineConfiguration(machine);
+                //姝ょ嚎璺凡棰嗗彇鐨勪换鍔�
+                List<PrimitiveTask> findPrimitiveTasking = primitiveTaskService.findPrimitiveTasking(machine, lineConfiguration.getLineId());
+                //姝ょ嚎璺湭棰嗗彇鐨勪换鍔�  鏈湴
+                //List<PrimitiveTask> findPrimitiveTask=primitiveTaskService.findPrimitiveTaskNotFinish();
+                //姝ょ嚎璺湭棰嗗彇鐨勪换鍔�  瀹㈡埛鏁版嵁搴�
+                List<KBBTJPDrawingBP> list = kBBTJPDrawingBPService.notReceiveKBBTJPDrawingBP();
+                jsonObjectItem.append("findPrimitiveTask", list);
+                jsonObjectItem.append("findPrimitiveTasking", findPrimitiveTasking);
+                //jsonObject.append("findPrimitiveTask", findPrimitiveTask);
+                jsonObjectItem.append("machine", machine);
+                jsonObjectItem.append("sendRecords", sendRecords);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("MarkingTasks:{}", exception.getMessage());
         }
-        this.webSocketServer(jsonObject);
     }
+
     //纾ㄨ竟鏈�
-    @Scheduled(fixedDelay = 500)
+    //@Scheduled(fixedDelay = 500)
     public void edgingTasks() {
-        machineListEdging =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"纾ㄨ竟"));
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "edgingTask");
-        for (Machine machine : machineListEdging) {
-            JSONObject jsonObjectItem = new JSONObject();
-            List<Tasking> taskingList=taskingService.findMachineTask(machine);
-            jsonObjectItem.append("taskingList", taskingList);
-            jsonObjectItem.append("machine", machine);
-            jsonObjectItem.append("sendRecords", sendRecords);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+        try {
+            machineListEdging = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "纾ㄨ竟"));
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "edgingTask");
+            for (Machine machine : machineListEdging) {
+                JSONObject jsonObjectItem = new JSONObject();
+                List<Tasking> taskingList = taskingService.findMachineTask(machine);
+                jsonObjectItem.append("taskingList", taskingList);
+                jsonObjectItem.append("machine", machine);
+                jsonObjectItem.append("sendRecords", sendRecords);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("edgingTasks:{}", exception.getMessage());
         }
-        this.webSocketServer(jsonObject);
     }
 
     //缈荤墖鍙�
-    @Scheduled(fixedDelay = 500)
+    //@Scheduled(fixedDelay = 500)
     public void flipSliceTasks() {
-        machineListFlipSlice =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"缈荤墖"));
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "flipSlice");
-        for (Machine machine : machineListFlipSlice) {
-            JSONObject jsonObjectItem = new JSONObject();
-            List<Tasking> taskingList=taskingService.findMachineTask(machine);
-            jsonObjectItem.append("taskingList", taskingList);
-            jsonObjectItem.append("machine", machine);
-            jsonObjectItem.append("sendRecords", sendRecords);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+        try {
+            machineListFlipSlice = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "缈荤墖"));
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "flipSlice");
+            for (Machine machine : machineListFlipSlice) {
+                JSONObject jsonObjectItem = new JSONObject();
+                List<Tasking> taskingList = taskingService.findMachineTask(machine);
+                jsonObjectItem.append("taskingList", taskingList);
+                jsonObjectItem.append("machine", machine);
+                jsonObjectItem.append("sendRecords", sendRecords);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("flipSliceTasks:{}", exception.getMessage());
         }
-        this.webSocketServer(jsonObject);
+
     }
 
     //鎵撴爣鏈�
-    @Scheduled(fixedDelay = 500)
+    //@Scheduled(fixedDelay = 500)
     public void markingTasks() {
-        machineListMarking =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"鑷姩鎵撴爣鏈�"));
+        try {
+            machineListMarking = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "鑷姩鎵撴爣鏈�"));
 
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "marking");
-        for (Machine machine : machineListMarking) {
-            JSONObject jsonObjectItem = new JSONObject();
-            List<Tasking> taskingList=taskingService.findMachineTask(machine);
-            jsonObjectItem.append("taskingList", taskingList);
-            jsonObjectItem.append("machine", machine);
-            jsonObjectItem.append("sendRecords", sendRecords);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "marking");
+            for (Machine machine : machineListMarking) {
+                JSONObject jsonObjectItem = new JSONObject();
+                List<Tasking> taskingList = taskingService.findMachineTask(machine);
+                jsonObjectItem.append("taskingList", taskingList);
+                jsonObjectItem.append("machine", machine);
+                jsonObjectItem.append("sendRecords", sendRecords);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("markingTasks:{}", exception.getMessage());
         }
-        this.webSocketServer(jsonObject);
     }
 
     //涓濆嵃鏈�
-    @Scheduled(fixedDelay = 500)
+    //@Scheduled(fixedDelay = 500)
     public void silkScreenTasks() {
-        machineListSilkScreen =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"鑷姩涓濆嵃鏈�"));
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "silkScreenTask");
-        for (Machine machine : machineListSilkScreen) {
-            JSONObject jsonObjectItem = new JSONObject();
-            List<Tasking> taskingList=taskingService.findMachineTask(machine);
-            jsonObjectItem.append("taskingList", taskingList);
-            jsonObjectItem.append("machine", machine);
-            jsonObjectItem.append("sendRecords", sendRecords);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+        try {
+            machineListSilkScreen = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "鑷姩涓濆嵃鏈�"));
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "silkScreenTask");
+            for (Machine machine : machineListSilkScreen) {
+                JSONObject jsonObjectItem = new JSONObject();
+                List<Tasking> taskingList = taskingService.findMachineTask(machine);
+                jsonObjectItem.append("taskingList", taskingList);
+                jsonObjectItem.append("machine", machine);
+                jsonObjectItem.append("sendRecords", sendRecords);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("silkScreenTasks:{}", exception.getMessage());
         }
-        this.webSocketServer(jsonObject);
     }
+
     //鐐硅兌鏈�
     //@Scheduled(fixedDelay = 500)
     public void glueDispenserTasks() {
-        machineListGlueDispenser =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"鑷姩鐐硅兌鏈�"));
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "glueDispenser");
-        for (Machine machine : machineListGlueDispenser) {
-            JSONObject jsonObjectItem = new JSONObject();
-            List<Tasking> taskingList=taskingService.findMachineTask(machine);
-            jsonObjectItem.append("taskingList", taskingList);
-            jsonObjectItem.append("machine", machine);
-            jsonObjectItem.append("sendRecords", sendRecords);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+        try {
+            machineListGlueDispenser = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "鑷姩鐐硅兌鏈�"));
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "glueDispenser");
+            for (Machine machine : machineListGlueDispenser) {
+                JSONObject jsonObjectItem = new JSONObject();
+                List<Tasking> taskingList = taskingService.findMachineTask(machine);
+                jsonObjectItem.append("taskingList", taskingList);
+                jsonObjectItem.append("machine", machine);
+                jsonObjectItem.append("sendRecords", sendRecords);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("glueDispenserTasks:{}", exception.getMessage());
         }
-        this.webSocketServer(jsonObject);
     }
+
     //鏃嬭浆鍙�
-    @Scheduled(fixedDelay = 500)
+    //@Scheduled(fixedDelay = 500)
     public void rotateTasks() {
-        machineListRotate =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"鏃嬭浆鍙�"));
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "rotate");
-        for (Machine machine : machineListRotate) {
-            JSONObject jsonObjectItem = new JSONObject();
-            List<Tasking> taskingList=taskingService.findMachineTask(machine);
-            jsonObjectItem.append("taskingList", taskingList);
-            jsonObjectItem.append("machine", machine);
-            jsonObjectItem.append("sendRecords", sendRecords);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+        try {
+            machineListRotate = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "鏃嬭浆鍙�"));
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "rotate");
+            for (Machine machine : machineListRotate) {
+                JSONObject jsonObjectItem = new JSONObject();
+                List<Tasking> taskingList = taskingService.findMachineTask(machine);
+                jsonObjectItem.append("taskingList", taskingList);
+                jsonObjectItem.append("machine", machine);
+                jsonObjectItem.append("sendRecords", sendRecords);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("rotateTasks:{}", exception.getMessage());
         }
-        this.webSocketServer(jsonObject);
     }
+
     //璐磋啘鏈�
-    @Scheduled(fixedDelay = 500)
+    //@Scheduled(fixedDelay = 500)
     public void laminationTasks() {
-        machineListLamination =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"鑷姩璐磋啘鏈�"));
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "lamination");
-        for (Machine machine : machineListLamination) {
-            JSONObject jsonObjectItem = new JSONObject();
-            List<Tasking> taskingList=taskingService.findMachineTask(machine);
-            jsonObjectItem.append("taskingList", taskingList);
-            jsonObjectItem.append("machine", machine);
-            jsonObjectItem.append("sendRecords", sendRecords);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+        try {
+            machineListLamination = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "鑷姩璐磋啘鏈�"));
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "lamination");
+            for (Machine machine : machineListLamination) {
+                JSONObject jsonObjectItem = new JSONObject();
+                List<Tasking> taskingList = taskingService.findMachineTask(machine);
+                jsonObjectItem.append("taskingList", taskingList);
+                jsonObjectItem.append("machine", machine);
+                jsonObjectItem.append("sendRecords", sendRecords);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("laminationTasks:{}", exception.getMessage());
         }
-        this.webSocketServer(jsonObject);
     }
 
 
     //鎶ュ伐椤甸潰鏌ヨ
-    @Scheduled(fixedDelay = 1000)
+    //@Scheduled(fixedDelay = 1000)
     public void manualReporting() {
+        try {
+            machineListScanQrCode = machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName, "璇嗗埆鎶ュ伐"));
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.append("sessionMapName", "manualReporting");
+            for (Machine machine : machineListScanQrCode) {
+                JSONObject jsonObjectItem = new JSONObject();
+                List<Tasking> taskingList = taskingMapper.selectJoinList(Tasking.class, new MPJLambdaWrapper<Tasking>()
+                        .selectAll(Tasking.class)
+                        .innerJoin(LineConfiguration.class, LineConfiguration::getId, Tasking::getLineConfigurationId)
+                        .innerJoin(Machine.class, Machine::getId, LineConfiguration::getMachineId)
+                        .eq(LineConfiguration::getMachineId, machine.getId())
+                        .eq(Tasking::getGlassState, "姝e父")
+                        .eq(Tasking::getState, "绾夸笂")
+                        .ne(Tasking::getWorkState, "瀹屽伐")
+                        .orderByDesc(Tasking::getOperationRecordTime));
+                jsonObjectItem.append("taskingList", taskingList);
+                jsonObjectItem.append("machine", machine);
+                jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            }
 
-        machineListScanQrCode =machineMapper.selectList(new QueryWrapper<Machine>().lambda().eq(Machine::getName,"璇嗗埆鎶ュ伐"));
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.append("sessionMapName", "manualReporting");
-        for (Machine machine : machineListScanQrCode) {
-            JSONObject jsonObjectItem = new JSONObject();
-            List<Tasking> taskingList=taskingMapper.selectJoinList(Tasking.class,new MPJLambdaWrapper<Tasking>()
-                    .selectAll(Tasking.class)
-                    .innerJoin(LineConfiguration.class,LineConfiguration::getId,Tasking::getLineConfigurationId)
-                    .innerJoin(Machine.class,Machine::getId,LineConfiguration::getMachineId)
-                    .eq(LineConfiguration::getMachineId,machine.getId())
-                    .eq(Tasking::getGlassState,"姝e父")
-                    .eq(Tasking::getState,"绾夸笂")
-                    .ne(Tasking::getWorkState,"瀹屽伐")
-                    .orderByDesc(Tasking::getOperationRecordTime));
-            jsonObjectItem.append("taskingList", taskingList);
-            jsonObjectItem.append("machine", machine);
-            jsonObject.append(machine.getId().toString(), jsonObjectItem);
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("manualReporting:{}", exception.getMessage());
         }
-
-        this.webSocketServer(jsonObject);
     }
+
     //绾夸笅鐜荤拑鏌ヨ
-    @Scheduled(fixedDelay = 1000)
+    //@Scheduled(fixedDelay = 1000)
     public void downLineTask() {
-        JSONObject jsonObject = new JSONObject();
-        List<Tasking> downLineTask=taskingService.findDownLineTask();
-        jsonObject.append("sessionMapName", "downLineTask");
-        jsonObject.append("downLineTask", downLineTask);
-        this.webSocketServer(jsonObject);
+        try {
+            JSONObject jsonObject = new JSONObject();
+            List<Tasking> downLineTask = taskingService.findDownLineTask();
+            jsonObject.append("sessionMapName", "downLineTask");
+            jsonObject.append("downLineTask", downLineTask);
+            this.webSocketServer(jsonObject);
+        } catch (Exception exception) {
+            log.info("downLineTask:{}", exception.getMessage());
+        }
     }
-
 
     public void webSocketServer(JSONObject jsonObject) {
         try {
-            String sessionMapName=jsonObject.getJSONArray("sessionMapName").get(0).toString();
-            ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get(sessionMapName);
-            if (sendwServer != null) {
-                for (WebSocketServer webserver : sendwServer) {
-                    if (webserver != null) {
-                        try {
-                            webserver.sendMessage(jsonObject.toString());
-                            List<String> messages = webserver.getMessages();
-                            if (!messages.isEmpty()) {
-                                // // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
-                                webserver.clearMessages();
-                            }
-                        }catch (Exception e) {
-
-                        }
-                    } else {
-                        log.info("Home is closed");
-                    }
-                }
-            }
-        }catch (Exception e) {
-
+            log.info("鍙戦�佹暟鎹細{}", jsonObject.getJSONArray("sessionMapName").get(0).toString());
+            String sessionMapName = jsonObject.getJSONArray("sessionMapName").get(0).toString();
+            webSocketServer.sendToWeb(sessionMapName, jsonObject.toString());
+        } catch (Exception ex) {
+            log.info("{}鍙戦�佹暟鎹け璐ワ細{}", "rawGlassStorage", ex.getMessage());
         }
-
     }
+//    public void webSocketServer(JSONObject jsonObject) {
+//        try {
+//            String sessionMapName=jsonObject.getJSONArray("sessionMapName").get(0).toString();
+//            ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get(sessionMapName);
+//            if (sendwServer != null) {
+//                for (WebSocketServer webserver : sendwServer) {
+//                    try {
+//                        webserver.sendMessage(jsonObject.toString());
+//                        List<String> messages = webserver.getMessages();
+//                        if (!messages.isEmpty()) {
+//                            // // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
+//                            webserver.clearMessages();
+//                        }
+//                    }catch (Exception e) {
+//                        if (webserver != null) {
+//
+//                        } else {
+//                            log.info("Home is closed");
+//                        }
+//                    }
+//
+//                }
+//            }
+//        }catch (Exception e) {
+//
+//        }
+//
+//    }
 
 }

--
Gitblit v1.8.0