| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasCrnOpt; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.asrs.service.BasCrnOptService; |
| | | import com.zy.asrs.service.BasCrnpService; |
| | | import com.zy.common.utils.News; |
| | | import com.zy.entity.BasCrnOpt; |
| | | import com.zy.entity.BasCrnp; |
| | | import com.zy.service.BasCrnOptService; |
| | | import com.zy.service.BasCrnpService; |
| | | import com.zy.utils.News; |
| | | import com.zy.core.CrnThread; |
| | | import com.zy.core.ThreadHandler; |
| | | import com.zy.core.cache.MessageQueue; |
| | |
| | | crnProtocol.setyDistance((short)0); |
| | | crnProtocol.setxDuration((short)0); |
| | | crnProtocol.setyDuration((short)0); |
| | | try{ |
| | | // 根据实时信息更新数据库 |
| | | BasCrnpService basCrnpService = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnp basCrnp = new BasCrnp(); |
| | | basCrnp.setCrnErr(crnProtocol.getAlarm()==null?0:crnProtocol.getAlarm().longValue()); |
| | | basCrnp.setCrnNo(slave.getId()); |
| | | basCrnp.setCrnSts((int)crnProtocol.getMode()); |
| | | if (!basCrnpService.updateById(crnProtocol.toSqlModel(basCrnp))){ |
| | | News.error("MelsecCrn"+" - 4"+" - 堆垛机plc数据库更新失败 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort()); |
| | | } |
| | | } catch (Exception e){ |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |