| | |
| | | ZyCrnStatusEntity crnStatus = zyCrnConnectDriver.getStatus(); |
| | | if (crnStatus == null) { |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}】读取堆垛机plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort())); |
| | | News.error("SiemensCrn"+" - 5"+" - 读取堆垛机plc状态信息失败 ===>> [id:{}] [ip:{}] [port:{}]", deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort()); |
| | | return; |
| | | } |
| | | |
| | |
| | | crnProtocol.setDeviceDataLog(System.currentTimeMillis()); |
| | | } |
| | | |
| | | BasCrnpService basCrnpService = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnpService basCrnpService = null; |
| | | try { |
| | | basCrnpService = SpringUtils.getBean(BasCrnpService.class); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | if (basCrnpService != null) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | if(basCrnp == null) { |
| | |
| | | basCrnp.setStatus(1); |
| | | basCrnp.setInEnable("N"); |
| | | basCrnp.setOutEnable("N"); |
| | | basCrnp.setMaxInTask(5); |
| | | basCrnp.setMaxOutTask(5); |
| | | basCrnp.setCreateTime(new Date()); |
| | | basCrnpService.insert(basCrnp); |
| | | } |