#
vincentlu
3 天以前 0267cc2886bbdce2c9a55755789c10e0dcaff9f0
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/TaskServiceImpl.java
@@ -68,8 +68,16 @@
    }
    @Override
    public Task selectByUuid(String uuid) {
        return this.getOne(new LambdaQueryWrapper<Task>().eq(Task::getUuid, uuid));
    public Task selectBySeqNum(Long busId, String seqNum) {
        if (Cools.isEmpty(seqNum)) {
            return null;
        }
        LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>();
        if (null != busId) {
            wrapper.eq(Task::getBusId, busId);
        }
        wrapper.eq(Task::getSeqNum, seqNum);
        return this.getOne(wrapper.last(Constants.LIMIT_ONE));
    }
    @Override
@@ -100,7 +108,7 @@
    @Override
    @Transactional
    public Boolean complete(Long taskId, Long userId) {
    public Boolean complete(Long taskId, Long userId, String from) {
        Task task = this.getById(taskId);
        if (null == task) {
            return Boolean.FALSE;
@@ -112,7 +120,7 @@
        task.setTaskSts(TaskStsType.COMPLETE.val());
        task.setUpdateTime(now);
        task.setUpdateBy(userId);
        task.setMemo(Constants.HANDLE + " " + TaskStsType.COMPLETE);
        task.setMemo(from + " " + TaskStsType.COMPLETE);
        if (!this.updateById(task)) {
            throw new CoolException(BaseRes.ERROR);
        }
@@ -141,7 +149,7 @@
    @Override
    @Transactional
    public Boolean cancel(Long taskId, Long userId) {
    public Boolean cancel(Long taskId, Long userId, String from) {
        Task task = this.getById(taskId);
        if (null == task) {
            return Boolean.FALSE;
@@ -153,7 +161,7 @@
        task.setTaskSts(TaskStsType.CANCEL.val());
        task.setUpdateTime(now);
        task.setUpdateBy(userId);
        task.setMemo(Constants.HANDLE + " " + TaskStsType.CANCEL);
        task.setMemo(from + " " + TaskStsType.CANCEL);
        if (!this.updateById(task)) {
            throw new CoolException(BaseRes.ERROR);
        }