| | |
| | | redisCommand.setCommandStep(0);//命令执行步序 |
| | | redisCommand.setAssignCommand(assignCommand);//命令 |
| | | //任务数据保存到redis |
| | | redisUtil.set("lift_wrk_no_" + assignCommand.getTaskNo(), JSON.toJSONString(redisCommand)); |
| | | redisUtil.set(RedisKeyType.LIFT.key + assignCommand.getTaskNo(), JSON.toJSONString(redisCommand)); |
| | | liftProtocol.setAssignCommand(assignCommand); |
| | | liftProtocol.setProtocolStatus(LiftProtocolStatusType.WORKING); |
| | | //执行下发任务 |
| | |
| | | } |
| | | |
| | | WrkMastMapper wrkMastMapper = SpringUtils.getBean(WrkMastMapper.class); |
| | | Object o = redisUtil.get("lift_wrk_no_" + wrkNo); |
| | | Object o = redisUtil.get(RedisKeyType.LIFT.key + wrkNo); |
| | | if (o == null) { |
| | | return false; |
| | | } |
| | |
| | | commandStep++; |
| | | redisCommand.setCommandStep(commandStep); |
| | | //任务数据保存到redis |
| | | redisUtil.set("lift_wrk_no_" + redisCommand.getWrkNo(), JSON.toJSONString(redisCommand)); |
| | | redisUtil.set(RedisKeyType.LIFT.key + redisCommand.getWrkNo(), JSON.toJSONString(redisCommand)); |
| | | }else { |
| | | //已执行完成 |
| | | //删除redis |
| | | redisUtil.del("lift_wrk_no_" + redisCommand.getWrkNo()); |
| | | redisUtil.del(RedisKeyType.LIFT.key + redisCommand.getWrkNo()); |
| | | |
| | | //对主线程抛出等待确认状态waiting |
| | | liftProtocol.setProtocolStatus(LiftProtocolStatusType.WAITING); |