| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class); |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianServiceNew.class); |
| | | albaniaMapper = WebSocketServer.applicationContext.getBean(AlbaniaMapper.class); |
| | | |
| | | // spianService.selectout(1); |
| | | // spianService.mateOut(); |
| | | // 读取DB14区文件 |
| | |
| | | String IDStatus1 = plcmes.getPlcParameter("IDStatus1").getValue();// 1号任务完成 |
| | | String MESToPLCStatus1 = plcmes.getPlcParameter("MESToPLCStatus1").getValue();// 1号确认字 |
| | | String MESToPLC = plcmes.getPlcParameter("MESToPLC").getValue();// 发送任务字 |
| | | String GaToMES = plcmes.getPlcParameter("GaToMES").getValue();// 测量成功信号 |
| | | |
| | | int taskcont = albaniaMapper.SelectTaskcount(); // 正在进行的任务数量 |
| | | int outtask = albaniaMapper.SelectOutTaskCount(); // 等待补发的出片任务数量 |
| | |
| | | // 运送车请求和测量完成请求 |
| | | GlassInfo glass = albaniaMapper.SelectGlass(); |
| | | if (PLCToMES != null && glass != null && MESToPLC != null) { |
| | | if (PLCToMES.equals("1") == true && MESToPLC.equals("0") == true && MESToPLCStatus1.equals("0") == true&&outtask == 0) { |
| | | if (PLCToMES.equals("1")&& MESToPLC.equals("0")&&("1".equals(GaToMES)||"2".equals(GaToMES))&& taskcont == 0) { |
| | | try { |
| | | Thread.sleep(100); // 每100毫秒检查一次 |
| | | } catch (InterruptedException e) { |
| | | Thread.currentThread().interrupt(); // 处理线程中断 |
| | | } |
| | | // System.out |
| | | // .println("进片状态:MESToPLC:" + MESToPLC + "PLCToMES:" + PLCToMES + "MESToPLCStatus1:" + MESToPLCStatus1); |
| | | spianService.selectAll(glass); |
| | | } |
| | | } |