| | |
| | | package com.example.springboot.component; |
| | | import cn.hutool.json.JSONObject; |
| | | import java.sql.SQLException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import com.example.springboot.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import com.example.springboot.entity.Flowcard; |
| | | import com.example.springboot.entity.GlassInfo; |
| | | import com.example.springboot.entity.MeasureSetting; |
| | | import com.example.springboot.entity.Out_slice; |
| | | import com.example.springboot.entity.Queue; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.StorageTask; |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | import com.example.springboot.entity.device.PlcParameterObject; |
| | |
| | | private OutSliceServive outSliceServive; |
| | | private SpianMapper spianMapper; |
| | | private SpianService spianService; |
| | | private North_Glass_Buffer1Service north_Glass_Buffer1Service; |
| | | private JdbcConnections dbserve; |
| | | |
| | | // 出片队列是否允许出片 |
| | | public static Boolean isAllowQueue = true; |
| | |
| | | spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianService.class); |
| | | outSliceServive = WebSocketServer.applicationContext.getBean(OutSliceServive.class); |
| | | north_Glass_Buffer1Service = WebSocketServer.applicationContext |
| | | .getBean(North_Glass_Buffer1Service.class); |
| | | storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class); |
| | | dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class); |
| | | |
| | | // 笼子使用情况 |
| | | List<StorageCage> tableData = homeMapper.selectAll(); |
| | |
| | | List<alarmmg> alarmmg = homeMapper.SelectAlarmmgInfo(); |
| | | jsonObject.append("alarmmg", alarmmg); |
| | | |
| | | // 获取扫码位与上片位玻璃信息 |
| | | Queue form2 = homeMapper.GetQueueInfo(2); |
| | | Queue form3 = homeMapper.GetQueueInfo(1); |
| | | if (form2.getglassId() != null && form2.getglassId() != "") { |
| | | jsonObject.append("form2", form2); |
| | | } |
| | | if (form3.getglassId() != null && form3.getglassId() != "") { |
| | | jsonObject.append("form3", form3); |
| | | } |
| | | |
| | | // 获取出片队列信息 |
| | | List<Out_slice> listoutslice = outSliceServive.SelectProductionqueue(); |
| | | jsonObject.append("listoutslice", listoutslice); |
| | |
| | | // String J01id = new String( S7controlLK.getinstance().ReadByte("DB17.22",14)); |
| | | |
| | | |
| | | //查询理片笼信息 |
| | | List<StorageCage> StorageCageInfo = storageCageService.SelectStorageCageInfo(); |
| | | jsonObject.append("StorageCageInfo", StorageCageInfo); |
| | | |
| | | //查询当前进片任务 |
| | | List<StorageTask> StoragTaskeTaskFeed = storageCageService.SelectStorageTask(0); |
| | | jsonObject.append("StoragTaskeTaskFeed", StoragTaskeTaskFeed); |
| | | |
| | | //查询当前出片任务 |
| | | List<StorageTask> StoragTaskeTaskOut = storageCageService.SelectStorageTask(1); |
| | | jsonObject.append("StoragTaskeTaskOut", StoragTaskeTaskOut); |
| | | |
| | | //查询当前订单任务 |
| | | List<Flowcard> OrderTask = storageCageService.SelectOrderTask(); |
| | | jsonObject.append("OrderTask", OrderTask); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | // jsonObject.append("params", new short[] { 30, 40, }); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("Home"); |
| | | if (sendwServer != null) { |
| | |
| | | // // 将最后一个消息转换为整数类型的列表 |
| | | webserver.clearMessages(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |