|
@@ -112,10 +112,13 @@ public class WcsTaskController extends BaseController {
|
|
|
public AjaxResult taskComplete(@PathVariable("taskNo") String taskNo) {
|
|
|
WcsTask wcsTask = wcsTaskService.selectWcsTaskByTaskNo(taskNo);
|
|
|
if (wcsTask == null) {
|
|
|
- AjaxResult.error("任务回调失败");
|
|
|
+ return AjaxResult.error("任务回调失败");
|
|
|
}
|
|
|
- wcsTaskService.callBackTaskComplete(wcsTask);
|
|
|
- return AjaxResult.success("任务回调完成");
|
|
|
+ if (!wcsTask.getState().equals("4")) {
|
|
|
+ return AjaxResult.error("任务未取货,不能直接完成!");
|
|
|
+ }
|
|
|
+ wcsTaskService.callBack(wcsTask.getTaskNo(),2,Integer.parseInt(wcsTask.getAgvNo()));
|
|
|
+ return AjaxResult.success("执行成功");
|
|
|
}
|
|
|
|
|
|
@Log(title = "任务取消", businessType = BusinessType.INSERT)
|