StrategySystemReviewTaskClose.java 1.45 KB
Newer Older
王飞's avatar
王飞 committed
1 2
package com.ruoyi.service.impl;

王飞's avatar
王飞 committed
3 4
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.exception.ServiceException;
王飞's avatar
王飞 committed
5 6 7 8 9 10 11 12 13 14
import com.ruoyi.domain.SystemReviewTask;
import com.ruoyi.service.StrategySystemReviewTask;
import com.ruoyi.web.response.SystemReviewTaskViewResponse;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service(SystemReviewTask.STATUS_CLOSE)
public class StrategySystemReviewTaskClose implements StrategySystemReviewTask {

王飞's avatar
王飞 committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
    @Override
    public void doStart(SystemReviewTask systemReviewTask) {
        throw new ServiceException("不能开始一个已关闭的任务", HttpStatus.ERROR);
    }

    @Override
    public void doSubmit(SystemReviewTask systemReviewTask) {
        throw new ServiceException("不能提交一个已关闭的任务", HttpStatus.ERROR);
    }

    @Override
    public void doClose(SystemReviewTask systemReviewTask) {
        throw new ServiceException("不能关闭一个已关闭的任务", HttpStatus.ERROR);
    }

王飞's avatar
王飞 committed
30 31 32 33 34 35 36 37 38 39 40 41 42
    // CLOSE状态下
    // 1.standard字段使用task中归档的问卷
    // 2.不查询场景变更任务
    // 3.无需联查问卷答案
    @Override
    public SystemReviewTaskViewResponse doView(SystemReviewTask systemReviewTask) {

        SystemReviewTaskViewResponse response = new SystemReviewTaskViewResponse();
        response.setSystemReviewTask(systemReviewTask);

        return response;
    }
}