| | |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.BasDevpOpt; |
| | | import com.zy.asrs.entity.BasRgvMap; |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | import com.zy.asrs.service.BasDevpOptService; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.BasRgvMapService; |
| | | import com.zy.asrs.service.BasRgvOptService; |
| | | import com.zy.common.utils.News; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | |
| | | log.error("写入输送线命令失败。输送线plc编号={},站点数据={},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | } |
| | | }while (writeCount<5); |
| | | try { |
| | | // 日志记录 |
| | | BasDevpOptService bean = SpringUtils.getBean(BasDevpOptService.class); |
| | | BasDevpOpt basDevpOpt = new BasDevpOpt( |
| | | staProtocol.getWorkNo(), |
| | | new Date(), |
| | | staProtocol.getSiteId(), |
| | | (int)staProtocol.getStaNo(), |
| | | new Date(), |
| | | String.valueOf(staProtocol.isLoading()), |
| | | staProtocol.getBarcode(), |
| | | staProtocol.isFrontErr()? 1L:0L, |
| | | staProtocol.isBackErr()? 1L:0L, |
| | | staProtocol.isHighErr()? 1L:0L, |
| | | staProtocol.isLeftErr()? 1L:0L, |
| | | staProtocol.isRightErr()? 1L:0L, |
| | | staProtocol.isBarcodeErr()? 1L:0L |
| | | |
| | | ); |
| | | bean.insert(basDevpOpt); |
| | | } catch (Exception ignore) { |
| | | log.error(ignore.getMessage()); |
| | | } |
| | | |
| | | if (!write.IsSuccess) { |
| | | staProtocol = station.get(staProtocol.getSiteId()); |