| | |
| | | if (taskWrk1 == null) { |
| | | return R.error(); |
| | | } |
| | | if ((taskWrk1.getIoType() == 1 || taskWrk1.getIoType() == 3) && taskWrk1.getWrkSts() >= 3 ){ |
| | | return R.error("任务已在执行,无法修改"); |
| | | } |
| | | if ((taskWrk1.getIoType() == 2 ) && taskWrk1.getWrkSts() >= 12 ){ |
| | | return R.error("任务已在执行,无法修改"); |
| | | } |
| | | if (Cools.isEmpty(taskWrk1.getStartPoint()) || Cools.isEmpty(taskWrk1.getTargetPoint())){ |
| | | return R.error("任务未分配库位,无法修改"); |
| | | } |
| | | |
| | | List<CommandInfo> commandInfos = commandInfoService.selectByTaskNo(taskWrk.getTaskNo()); |
| | | if (!Cools.isEmpty(commandInfos)){ |
| | | for (CommandInfo commandInfo:commandInfos){ |
| | | commandInfoService.deleteById(commandInfo); |
| | | } |
| | | } |
| | | InetAddress localHost = InetAddress.getLocalHost(); |
| | | String ipAddress = localHost.getHostAddress(); |
| | | |
| | |
| | | taskWrk1.setOriginTargetPoint(Utils.getWmsLocNo(taskWrk.getTargetPoint())); |
| | | taskWrk1.setOriginStartPoint(Utils.getWmsLocNo(taskWrk.getStartPoint())); |
| | | } |
| | | taskWrk1.setStatus(1); |
| | | taskWrk1.setModiTime(new Date()); |
| | | taskWrk1.setModiUser(getUserId()); |
| | | |