liujie
2026-04-17 8afcc37e0de5aa3ca3cc3f175f180e9339f60424
admin-server/src/main/java/com/estate/expert/admin/domain/exam/task/check/CheckTaskRepository.java
@@ -66,4 +66,41 @@
            "and t.plan.state = :planState")
    List<Integer> listTaskIdsByProjectAndPlanState(@Param("projectId") Integer projectId,
                                                   @Param("planState") PlanState planState);
    @Query("select t.id from CheckTask t " +
            "where t.deleted = false " +
            "and t.project.id = :projectId " +
            "and t.project.client.id = :clientId " +
            "and t.plan.deleted = false " +
            "and t.plan.state = :planState")
    List<Integer> listTaskIdsByProjectAndClientAndPlanState(@Param("projectId") Integer projectId,
                                                             @Param("clientId") Integer clientId,
                                                             @Param("planState") PlanState planState);
    @Query("select t.id from CheckTask t " +
            "where t.deleted = false " +
            "and t.project.id = :projectId " +
            "and t.project.client.id = :clientId " +
            "and t.plan.deleted = false")
    List<Integer> listTaskIdsByProjectAndClient(@Param("projectId") Integer projectId,
                                                 @Param("clientId") Integer clientId);
    @Query("select t from CheckTask t " +
            "where t.deleted = false " +
            "and t.project.id = :projectId " +
            "and t.project.client.id = :clientId " +
            "and t.plan.deleted = false " +
            "and t.plan.state = :planState")
    List<CheckTask> listByProjectAndClientAndPlanState(@Param("projectId") Integer projectId,
                                                        @Param("clientId") Integer clientId,
                                                        @Param("planState") PlanState planState);
    @Query("select t from CheckTask t " +
            "where t.deleted = false " +
            "and t.project.id = :projectId " +
            "and t.project.client.id = :clientId " +
            "and t.plan.deleted = false " +
            "and t.state >= 3")
    List<CheckTask> listClosedByProjectAndClient(@Param("projectId") Integer projectId,
                                                  @Param("clientId") Integer clientId);
}