|
@@ -59,7 +59,7 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
|
* @param type
|
|
|
* @return
|
|
|
*/
|
|
|
- @Query(value = "select a.id,a.flag,b.pet_name as phone,a.test_date,a.file_name,a.test_result,a.type,a.name,a.img,a.test_record,a.test_results,b.institution_no,a.test_plan_id from t_user_record a INNER JOIN t_user_info b ON a.phone = b.phone and b.role_type='1' and a.institution_no=b.institution_no where a.phone = :phone and " +
|
|
|
+ @Query(value = "select a.id,a.flag,b.pet_name as phone,a.test_date,a.file_name,a.test_result,a.type,a.name,a.img,a.test_record,a.test_results,b.institution_no,a.test_plan_id ,a.conclusion from t_user_record a INNER JOIN t_user_info b ON a.phone = b.phone and b.role_type='1' and a.institution_no=b.institution_no where a.phone = :phone and " +
|
|
|
"b.institution_no= :institutionNo and if(:beginTime is not null and :beginTime!='',a.test_date>:beginTime ,1=1) and if(:endTime is not null and :endTime!='', a.test_date<:endTime ,1=1) and type= :type order by test_date desc limit :pageNum ,:pageSize ", nativeQuery = true)
|
|
|
List<UserRecordEntity> getListByPhoneAndType(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize, @Param("phone") String phone, @Param("institutionNo") String institutionNo, @Param("type") String type, @Param("beginTime") String beginTime, @Param("endTime") String
|
|
|
endTime);
|
|
@@ -88,7 +88,7 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- @Query(value = "select id,flag,phone,test_date,file_name,test_result,type,name,img,test_record,test_results,institution_no,test_plan_id from t_user_record where id = :id ", nativeQuery = true)
|
|
|
+ @Query(value = "select id,flag,phone,test_date,file_name,test_result,type,name,img,test_record,test_results,institution_no,test_plan_id,conclusion from t_user_record where id = :id ", nativeQuery = true)
|
|
|
UserRecordEntity getUserRecordById(@Param("id") String id);
|
|
|
|
|
|
/**
|
|
@@ -96,16 +96,10 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- @Query(value = "select id,flag,phone,test_date,file_name,test_result,type,name,img,test_record,test_results,institution_no,test_plan_id from t_user_record where phone = :phone and flag = 'RHYTHM' and institution_no=:institutionNo ORDER BY test_date DESC LIMIT 1", nativeQuery = true)
|
|
|
+ @Query(value = "select id,flag,phone,test_date,file_name,test_result,type,name,img,test_record,test_results,institution_no,test_plan_id,conclusion from t_user_record where phone = :phone and flag = 'RHYTHM' and institution_no=:institutionNo ORDER BY test_date DESC LIMIT 1", nativeQuery = true)
|
|
|
UserRecordEntity getRHYTHM(@Param("phone") String phone, @Param("institutionNo") String institutionNo);
|
|
|
|
|
|
- /**
|
|
|
- * 用户查询枪林弹雨
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @Query(value = "select id,flag,phone,test_date,file_name,test_result,type,name,img,test_record,test_results,institution_no,test_plan_id from t_user_record where phone = :phone and flag = 'GUNSBULLETS' and institution_no=:institutionNo ORDER BY test_date DESC LIMIT 1", nativeQuery = true)
|
|
|
- List<UserRecordEntity> getGUNSBULLETS(@Param("phone") String phone, @Param("institutionNo") String institutionNo);
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询机构下所有用户已经做的测试记录
|
|
@@ -219,8 +213,7 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
|
@Query(value = "SELECT * FROM t_user_record WHERE test_plan_id = :testPlanId", nativeQuery = true)
|
|
|
List<UserRecordEntity> getUserRecordByPlanId(@Param("testPlanId") String testPlanId);
|
|
|
|
|
|
- @Query(value = "select id,flag,phone,test_date,file_name,test_result,type,name,img,test_record,test_results,institution_no,test_plan_id from t_user_record where phone = :phone and flag = :flag", nativeQuery = true)
|
|
|
- List<UserRecordEntity> getuserRecordByPhone(@Param("phone") String phone,@Param("flag") String flag);
|
|
|
+
|
|
|
|
|
|
@Query(value = "select tui.id userId,\n" +
|
|
|
" gender,\n" +
|