| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.zy.acs.common.domain.AgvProtocol; |
| | | import com.zy.acs.common.domain.protocol.*; |
| | | import com.zy.acs.common.enums.AgvStatusType; |
| | | import com.zy.acs.common.utils.GsonUtils; |
| | | import com.zy.acs.common.utils.RedisSupport; |
| | | import com.zy.acs.framework.common.Cools; |
| | |
| | | |
| | | // 有码实时数据包 |
| | | private void sync(AGV_12_UP mesBody, AgvDetail detail) { |
| | | detail.setStatus(mesBody.getStatus()); |
| | | |
| | | Code code = codeService.selectByData(mesBody.getQrCode()); |
| | | if (null != code) { |
| | | detail.setCode(code.getId()); |
| | |
| | | } else { |
| | | log.error("Agv [{}] 更新定位数据失败 !!!上传条码:{}", agvService.getById(detail.getAgvId()).getUuid(), mesBody.getQrCode()); |
| | | } |
| | | |
| | | detail.setStatus(mesBody.getStatus()); |
| | | |
| | | // 地面码偏移 |
| | | detail.setCodeOffsert(JSON.toJSONString(Cools |
| | |
| | | |
| | | // 无码实时数据包 |
| | | private void sync(AGV_13_UP mesBody, AgvDetail detail) { |
| | | detail.setStatus(mesBody.getStatus()); |
| | | |
| | | Code code = codeService.selectByData(mesBody.getQrCode()); |
| | | if (null != code) { |
| | | |
| | | if (!detail.getAgvStatus().equals(AgvStatusType.CHARGE)) { |
| | | detail.setCode(null); |
| | | detail.setLastCode(code.getId()); |
| | | detail.setPos(0); |
| | | // if (!agvDetailService.updateUnPosCode(detail.getId(), code.getId())) { |
| | | // log.error("Agv [{}] 更新定位数据失败 !!!", agvService.getById(detail.getAgvId()).getUuid()); |
| | | // } |
| | | } else { |
| | | detail.setCode(code.getId()); |
| | | detail.setLastCode(null); |
| | | detail.setPos(1); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | log.error("Agv [{}] 更新定位数据失败 !!!上传条码:{}", agvService.getById(detail.getAgvId()).getUuid(), mesBody.getQrCode()); |
| | | } |