| | |
| | | // detail |
| | | String errorMSg = errorType != null ? errorType.getMsg() : agv_04_up.getHexFaultId(); |
| | | detail.setError(errorMSg); |
| | | detail.setErrorTime(new Date()); |
| | | detail.setErrorTime(now); |
| | | } |
| | | |
| | | // 故障复位 |
| | | if (!Cools.isEmpty(detail.realError())) { |
| | | assert detail.getErrorTime() != null; |
| | | if (DateUtils.diffToSeconds(detail.getErrorTime(), new Date()) > 20) { |
| | | if (DateUtils.diffToSeconds(detail.getErrorTime(), now) > 10) { |
| | | detail.setError(MapDataConstant.EMPTY_OF_ERROR); |
| | | } |
| | | } |
| | |
| | | private void sync(AGV_12_UP mesBody, AgvDetail detail) { |
| | | detail.setStatus(mesBody.getStatus()); |
| | | |
| | | Code code = codeService.selectByData(mesBody.getQrCode()); |
| | | Code code = codeService.getCacheByData(mesBody.getQrCode()); |
| | | if (null != code) { |
| | | detail.setCode(code.getId()); |
| | | detail.setLastCode(null); |
| | |
| | | private void sync(AGV_13_UP mesBody, AgvDetail detail) { |
| | | detail.setStatus(mesBody.getStatus()); |
| | | |
| | | Code code = codeService.selectByData(mesBody.getQrCode()); |
| | | Code code = codeService.getCacheByData(mesBody.getQrCode()); |
| | | if (null != code) { |
| | | |
| | | if (!detail.getAgvStatus().equals(AgvStatusType.CHARGE)) { |