| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.service.*; |
| | |
| | | add("ea1f0459efc02a79f046f982767939ae"); |
| | | }}; |
| | | |
| | | //agv上报 |
| | | //AGV上报 |
| | | @PostMapping("/agvReport") |
| | | public R agvReport(@RequestBody HashMap<String, Object> param) { |
| | | String taskCode = param.get("taskCode").toString(); |
| | | System.out.println(JSON.toJSONString(param)); |
| | | |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(taskCode); |
| | | if(taskWrk == null) { |
| | | return R.error("任务不存在"); |
| | | } |
| | | |
| | | taskWrk.setStatus(TaskStatusType.COMPLETE.id); |
| | | taskWrk.setModiTime(new Date()); |
| | | taskWrkService.updateById(taskWrk); |
| | | return R.ok(); |
| | | } |
| | | |
| | | //生成AGV任务 |
| | | @PostMapping("/generateAgvTask") |
| | | public R generateAgvTask(@RequestBody GenerateAgvTaskParam param) { |
| | | boolean generated = openService.generateAgvTask(param); |
| | | if(generated) { |
| | | return R.ok(); |
| | | } |
| | | return R.error(); |
| | | } |
| | | |
| | | //创建任务 |
| | | @PostMapping("/taskCreate") |
| | | @Transactional |