| | |
| | | @ManagerAuth(memo = "手动完成任务") |
| | | public R complete(@RequestParam String taskNo) { |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(taskNo); |
| | | if (Cools.isEmpty(taskWrk) || taskWrk.getStatus() >= 3) { |
| | | return R.error("已完结或已取消"); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | return R.error("找不到工作档"); |
| | | } |
| | | LocMast locMast = new LocMast(); |
| | | if (taskWrk.getIoType() == 1) {//入库任务完成库位为F |
| | |
| | | locMast.setBarcode(taskWrk.getBarcode()); |
| | | |
| | | } |
| | | toWmsService.addReportLog(taskWrk); |
| | | // toWmsService.addReportLog(taskWrk); |
| | | locMastService.updateById(locMast); |
| | | taskWrk.setCompleteTime(new Date()); |
| | | taskWrk.setStatus(7);//手动完成任务 |
| | | taskWrk.setModiTime(new Date()); |
| | | taskWrkService.updateById(taskWrk); |
| | |
| | | } catch (Exception e) { |
| | | taskWrk.setModiUser(9999L);//操作员 |
| | | } |
| | | toWmsService.addReportLog(taskWrk); |
| | | // toWmsService.addReportLog(taskWrk); |
| | | |
| | | taskWrk.setCompleteTime(now);//完结时间 |
| | | taskWrk.setCancelTime(now);//完结时间 |
| | | taskWrkService.updateById(taskWrk); |
| | | return R.ok(); |
| | | } |