From 60edff747d52eb42aadb036e3fbd580252de4c05 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期四, 28 八月 2025 08:15:54 +0800 Subject: [PATCH] 1 --- zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java index 07c84af..0d41401 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java @@ -64,6 +64,12 @@ } @Override + public Task selectBySeqNum(String seqNum) { + return this.list(new LambdaQueryWrapper<Task>().eq(Task::getSeqNum, seqNum)).get(0); + } + + + @Override public List<Task> selectBySts(TaskStsType taskStsType) { LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>(); wrapper.eq(Task::getTaskSts, taskStsType.val()); @@ -128,6 +134,29 @@ } @Override + @Transactional + public Boolean cancelCheckTaskSts(Long taskId, Long userId) { + Task task = this.getById(taskId); + if (null == task) { + return Boolean.FALSE; + } + if ( task.getTaskSts() >= TaskStsType.ASSIGN.val()){ + throw new BusinessException("浠诲姟宸插垎閰嶆垨鎵ц锛屼笉鑳藉彇娑�"); + } + + this.maintainLocSts(task, Boolean.FALSE); + + task.setTaskSts(TaskStsType.CANCEL.val()); + task.setUpdateTime(new Date()); + task.setUpdateBy(userId); + if (!this.updateById(task)) { + throw new CoolException(BaseRes.ERROR); + } + busService.checkoutComplete(task.getBusId()); + return Boolean.TRUE; + } + + @Override public Lane checkoutOriginLane(Task task) { Long codeId = null; TaskTypeType typeType = TaskTypeType.get(task.getTaskTypeEl()); -- Gitblit v1.9.1