| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.zy.asrs.entity.TaskWrk; |
| | | import com.zy.asrs.service.CommandInfoService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.service.TaskWrkService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.enums.CommandStatusType; |
| | |
| | | |
| | | @Autowired |
| | | private CommandInfoService commandInfoService; |
| | | |
| | | @Autowired |
| | | private TaskWrkService taskWrkService; |
| | | |
| | | @RequestMapping(value = "/commandInfo/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | return R.error("指令不存在"); |
| | | } |
| | | |
| | | TaskWrk taskWrk = taskWrkService.selectByWrkNo(commandInfo.getWrkNo()); |
| | | if (Cools.isEmpty(taskWrk)){ |
| | | return R.error("任务不存在"); |
| | | } |
| | | if (taskWrk.getWrkSts() !=3 && taskWrk.getWrkSts() !=12 ){ |
| | | return R.error("任务未处于执行状态"); |
| | | } |
| | | |
| | | commandInfo.setCommandStatus(CommandStatusType.EXECUTE.id);//执行状态 |
| | | commandInfo.setExecuteTime(new Date()); |
| | | if (commandInfoService.updateById(commandInfo)) { |