liujie
2026-05-21 34fb8efd9fef8a6ed0d7cbaff74f37f06bf2db60
admin-server/src/main/java/com/estate/expert/admin/service/impl/CheckServiceImpl.java
@@ -17,6 +17,7 @@
import com.estate.expert.admin.service.CheckService;
import com.estate.expert.admin.service.CheckTaskService;
import com.estate.expert.admin.service.ClientService;
import com.estate.expert.common.exception.BizException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -77,16 +78,16 @@
        //1.校验任务id
        CheckTask checkTask = checkTaskService.get(request.getCheckTaskIdId());
        if (Objects.isNull(checkTask)) {
            throw new RuntimeException("检查任务不存在");
            throw new BizException("检查任务不存在");
        }
        Client client = clientService.get(checkTask.getProject().getClient().getId());
        if (Objects.isNull(client)) {
            throw new RuntimeException("委托方不存在");
            throw new BizException("委托方不存在");
        }
        //校验是否已检查
        Long count = lambdaQuery().eq(Check::getCheckTaskId, request.getCheckTaskIdId()).count();
        if (count > 0) {
            throw new RuntimeException("已检查不可重复上传");
            throw new BizException("已检查不可重复上传");
        }
        // 1. 创建 Check 实体对象(MyBatis Plus 实体)
        Check check = new Check();
@@ -124,7 +125,7 @@
        // 1. 根据 id 查询现有的 Check 实体
        Check check = getById(request.getId());
        if (check == null) {
            throw new RuntimeException("检查信息不存在");
            throw new BizException("检查信息不存在");
        }
        // 2. 更新字段