|
@@ -121,7 +121,7 @@ public interface PaperRepo extends JpaRepository<Paper, Long>, JpaSpecificationE
|
|
|
"SUM(IF(p.`is_shift` = 1, 1, 0))," +
|
|
|
"SUM(IF(p.`is_shift_score` = 1, 1, 0))" +
|
|
|
"FROM paper p " +
|
|
|
- "WHERE p.`question_id` = ? and p.is_missing = false and p.is_test = ? " +
|
|
|
+ "WHERE p.`question_id` = ? and p.is_missing = false and p.is_test = ? and p.batch_no is not null " +
|
|
|
"GROUP BY p.`level` ORDER BY p.`level`", nativeQuery = true)
|
|
|
List<Object[]> countGroupByLevelAll(Long questionId, int test);
|
|
|
|
|
@@ -389,7 +389,7 @@ public interface PaperRepo extends JpaRepository<Paper, Long>, JpaSpecificationE
|
|
|
void updateScoreByWorkIdAndSubject(Long workId, String name);
|
|
|
|
|
|
@Modifying
|
|
|
- @Query(value = "update paper p set p.level = null, p.redo_level = null, p.batch_no = null, p.is_active = false, p.is_arbitrated = false, p.is_manual = false, p.is_rejected = false, p.is_tagged = false, p.mark_by_leader = false, p.is_one_click = false where p.work_id = ?1 and p.subject = ?2", nativeQuery = true)
|
|
|
+ @Query(value = "update paper p set p.level = case p.is_sample when true then p.level else null end, p.redo_level = null, p.batch_no = null, p.is_active = false, p.is_arbitrated = false, p.is_manual = false, p.is_rejected = false, p.is_tagged = false, p.mark_by_leader = false, p.is_one_click = false where p.work_id = ?1 and p.subject = ?2", nativeQuery = true)
|
|
|
void updateLevelByWorkIdAndSubject(Long workId, String name);
|
|
|
|
|
|
// List<Paper> findByWorkIdAndSubjectAndInspectRange(Long workId, Subject subject, Long inspectRange);
|