“mitao”
2026-03-25 309b5eb17c510c781daec96bbfef3b693f3a4d7e
admin-server/src/main/java/com/estate/expert/admin/domain/exam/task/check/CheckTaskRepository.java
@@ -1,7 +1,9 @@
package com.estate.expert.admin.domain.exam.task.check;
import com.estate.expert.admin.domain.common.EntityBaseRepository;
import com.estate.expert.admin.domain.plan.PlanState;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
@@ -56,4 +58,12 @@
    List<CheckTask> findAllByPlanIdAndDeleted(Integer planId, boolean deleted);
    CheckTask getFirstByPlanIdAndProjectIdAndDeleted(Integer planId, Integer projectId, boolean deleted);
    @Query("select t.id from CheckTask t " +
            "where t.deleted = false " +
            "and t.project.id = :projectId " +
            "and t.plan.deleted = false " +
            "and t.plan.state = :planState")
    List<Integer> listTaskIdsByProjectAndPlanState(@Param("projectId") Integer projectId,
                                                   @Param("planState") PlanState planState);
}