| | |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.TaskWrk; |
| | | import com.zy.asrs.entity.TaskWrkLog; |
| | | import com.zy.asrs.entity.param.NotifyDto; |
| | | import com.zy.asrs.entity.param.TaskOverToWms; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.CommandInfoService; |
| | |
| | | } |
| | | } |
| | | |
| | | @PostMapping(value = "/taskWrk/state") |
| | | // @ManagerAuth(memo = "接收RCS任务状态") |
| | | public R taskWrkState(@RequestBody NotifyDto notifyDto) { |
| | | log.info("接收RCS任务状态={}", notifyDto); |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(notifyDto.getSuperTaskNo());//wms任务号 |
| | | if (taskWrk == null) { |
| | | return R.error("没有找到该任务={"+notifyDto+"}"); |
| | | } |
| | | Date now = new Date(); |
| | | if(notifyDto.getMsgType().equals("task_complete")&&taskWrk.getIoType()==3){ |
| | | taskWrk.setWrkSts(9);//更新数据完成,直接转历史档 |
| | | |
| | | //更新源库位状态为空库位 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast.setLocSts("O"); |
| | | locMastService.updateById(locMast); |
| | | |
| | | //更新目标库状态为在库 |
| | | LocMast locMast2 = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast2.setLocSts("F"); |
| | | locMastService.updateById(locMast2); |
| | | taskWrk.setModiTime(now);//操作时间 |
| | | taskWrk.setModiUser(9998L);//操作员 |
| | | taskWrkService.updateById(taskWrk); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |