#
vincentlu
9 天以前 c851a06ffee1079c178d2e5a64b2f1d306c6f9a9
zy-acs-manager/src/main/java/com/zy/acs/manager/core/HandlerController.java
@@ -196,6 +196,7 @@
                if (!taskService.removeById(task.getId())) {
                    throw new BusinessException("failed to remove task");
                }
                task = null;
                if (!mainLockWrapService.buildMinorTask(agv.getId(), param.getTaskMode(), endCode.getData(), null)) {
                    return R.error();
                }
@@ -205,6 +206,7 @@
                if (!taskService.removeById(task.getId())) {
                    throw new BusinessException("failed to remove task");
                }
                task = null;
                if (!mainLockWrapService.buildMinorTask(agv.getId(), param.getTaskMode(), null, null)) {
                    return R.error();
                }
@@ -287,6 +289,7 @@
                if (null == staReserveService.reserveStaIn(destSta, task, 1)) {
                    throw new BusinessException("destSta:" + destSta.getStaNo() + " 预约失败");
                }
                staReserveService.allocateCallBack(destSta, task, agv.getId());
                // task
                task.setOriLoc(oriLoc.getId());
@@ -308,6 +311,7 @@
                if (null == staReserveService.reserveStaOut(oriSta, task, 1)) {
                    throw new BusinessException("oriSta:" + oriSta.getStaNo() + " 预约失败");
                }
                staReserveService.allocateCallBack(oriSta, task, agv.getId());
                // destLoc
                if (!Cools.isEmpty(param.getEndLocNo())) {
@@ -348,6 +352,7 @@
                if (null == staReserveService.reserveStaOut(oriSta, task, 1)) {
                    throw new BusinessException("oriSta:" + oriSta.getStaNo() + " 预约失败");
                }
                staReserveService.allocateCallBack(oriSta, task, agv.getId());
                // destSta
                if (!Cools.isEmpty(param.getEndStaNo())) {
@@ -362,6 +367,7 @@
                if (null == staReserveService.reserveStaIn(destSta, task, 1)) {
                    throw new BusinessException("destSta:" + destSta.getStaNo() + " 预约失败");
                }
                staReserveService.allocateCallBack(destSta, task, agv.getId());
                // task
                task.setOriSta(oriSta.getId());
@@ -373,8 +379,10 @@
                break;
        }
        if (!taskService.updateById(task)) {
            throw new BusinessException("任务更新失败");
        if (null != task) {
            if (!taskService.updateById(task)) {
                throw new BusinessException("任务更新失败");
            }
        }
        return R.ok();
    }