|  |  | 
 |  |  |  | 
 |  |  |     public static CrnStatusType get(Short id) { | 
 |  |  |         if (null == id) { | 
 |  |  |             return null; | 
 |  |  |             return NONE; | 
 |  |  |         } | 
 |  |  |         for (CrnStatusType type : CrnStatusType.values()) { | 
 |  |  |             if (type.id.equals(id.intValue())) { | 
 |  |  |                 return type; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return null; | 
 |  |  |         return NONE; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public static CrnStatusType get(CrnStatusType type) { | 
 
 |  |  | 
 |  |  |  | 
 |  |  |             } else { | 
 |  |  |                 initCrn(); | 
 |  |  |                 OutputQueue.CRN.offer(MessageFormat.format("【{0}】读取堆垛机plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}] [rack:{4}] [slot:{5}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot())); | 
 |  |  |                 log.error("读取堆垛机plc状态信息失败 ===>> [id:{}] [ip:{}] [port:{}] [rack:{}] [slot:{}]", slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot()); | 
 |  |  |                 OutputQueue.CRN.offer(MessageFormat.format("【{0}】读取堆垛机plc状态信息失败1 ===>> [id:{1}] [ip:{2}] [port:{3}] [rack:{4}] [slot:{5}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot())); | 
 |  |  |                 log.error("读取堆垛机plc状态信息失败1 ===>> [id:{}] [ip:{}] [port:{}] [rack:{}] [slot:{}]", slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot()); | 
 |  |  |             } | 
 |  |  |         } catch (Exception e) { | 
 |  |  |             e.printStackTrace(); | 
 |  |  |             OutputQueue.CRN.offer(MessageFormat.format("【{0}】读取堆垛机plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); | 
 |  |  |             log.error("读取堆垛机plc状态信息失败 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); | 
 |  |  |             log.error("fail", e); | 
 |  |  |             OutputQueue.CRN.offer(MessageFormat.format("【{0}】读取堆垛机plc状态信息失败2 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); | 
 |  |  |             log.error("读取堆垛机plc状态信息失败2 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); | 
 |  |  |             initCrn(); | 
 |  |  |         } | 
 |  |  |     } |