|  |  | 
 |  |  | import com.zy.acs.common.utils.RedisSupport; | 
 |  |  | import com.zy.acs.framework.common.Cools; | 
 |  |  | import com.zy.acs.framework.common.DateUtils; | 
 |  |  | import com.zy.acs.manager.core.constant.MapDataConstant; | 
 |  |  | import com.zy.acs.manager.core.domain.BackpackDto; | 
 |  |  | import com.zy.acs.manager.core.domain.VehicleFaultDto; | 
 |  |  | import com.zy.acs.manager.manager.entity.Agv; | 
 |  |  | 
 |  |  |             AGV_04_UP agv_04_up = (AGV_04_UP) msgBody; | 
 |  |  |             log.info("Agv [{}] 故障数据包 ===>> {}", protocol.getAgvNo(), JSON.toJSONString(agv_04_up)); | 
 |  |  |             faultProcessor.execute(new VehicleFaultDto<>(protocol.getAgvNo(), protocol.getTimestamp(), agv_04_up)); | 
 |  |  |             detail.setError(String.valueOf(agv_04_up.getFaultId())); | 
 |  |  |             detail.setError(agv_04_up.getHexFaultId()); | 
 |  |  |             detail.setErrorTime(new Date()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         // 故障复位 | 
 |  |  |         if (!Cools.isEmpty(detail.getError()) && !"NONE".equals(detail.getError())) { | 
 |  |  |         if (!Cools.isEmpty(detail.realError())) { | 
 |  |  |             assert detail.getErrorTime() != null; | 
 |  |  |             if (DateUtils.diffToSeconds(detail.getErrorTime(), new Date()) > 20) { | 
 |  |  |                 detail.setError("NONE"); | 
 |  |  |                 detail.setError(MapDataConstant.EMPTY_OF_ERROR); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         if (!agvDetailService.updateById(detail)) { |