|
@@ -134,7 +134,7 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
* @param name
|
|
* @param name
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @Query(value = "select tui.phone,tui.pet_name as petName,tui.password,tui.gender,tui.birthday,tui.profession,tui.institution_name as institutionName,tui.institution_no as institutionNo,tui.user_status as userStatus,tui.addition_info as additionInfo,tur.id as id,tur.test_date as testDate ,tur.test_result as testResult from t_user_info tui join t_user_record tur on tur.phone = tui.phone and tui.role_type='1' and tui.institution_no=tur.institution_no where tui.institution_no= :institutionNo and tur.name= :name and " +
|
|
|
|
|
|
+ @Query(value = "select tui.phone,tui.pet_name as petName,tui.password,tui.gender,tui.birthday,tui.profession,tui.institution_name as institutionName,tui.institution_no as institutionNo,tui.user_status as userStatus,tur.id as id,tur.test_date as testDate ,tur.test_result as testResult from t_user_info tui join t_user_record tur on tur.phone = tui.phone and tui.role_type='1' and tui.institution_no=tur.institution_no where tui.institution_no= :institutionNo and tur.name= :name and " +
|
|
"if(:beginFormat is not null and :beginFormat!='',tur.test_date>:beginFormat ,1=1) and if(:endFormat is not null and :endFormat!='', tur.test_date<:endFormat ,1=1) and " +
|
|
"if(:beginFormat is not null and :beginFormat!='',tur.test_date>:beginFormat ,1=1) and if(:endFormat is not null and :endFormat!='', tur.test_date<:endFormat ,1=1) and " +
|
|
"( if(:searchKey is not null and :searchKey!='',tui.pet_name like CONCAT('%',:searchKey,'%') ,1=1) or if(:searchKey is not null and :searchKey!='',tui.phone like CONCAT('%',:searchKey,'%') ,1=1) ) order by tur.test_date desc ", nativeQuery = true)
|
|
"( if(:searchKey is not null and :searchKey!='',tui.pet_name like CONCAT('%',:searchKey,'%') ,1=1) or if(:searchKey is not null and :searchKey!='',tui.phone like CONCAT('%',:searchKey,'%') ,1=1) ) order by tur.test_date desc ", nativeQuery = true)
|
|
List<InstitutionRecordingUserDTO> getInstitutionRecording(Pageable pageable, @Param("institutionNo") String institutionNo, @Param("name") String name, @Param("searchKey") String searchKey, @Param("beginFormat") String beginFormat, @Param("endFormat") String endFormat);
|
|
List<InstitutionRecordingUserDTO> getInstitutionRecording(Pageable pageable, @Param("institutionNo") String institutionNo, @Param("name") String name, @Param("searchKey") String searchKey, @Param("beginFormat") String beginFormat, @Param("endFormat") String endFormat);
|
|
@@ -163,12 +163,11 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
" pet_name petName,\n" +
|
|
" pet_name petName,\n" +
|
|
" birthday,\n" +
|
|
" birthday,\n" +
|
|
" profession,\n" +
|
|
" profession,\n" +
|
|
- " addition_info additionInfo,\n" +
|
|
|
|
" institution_name institutionName,\n" +
|
|
" institution_name institutionName,\n" +
|
|
" tui.institution_no institutionNo,\n" +
|
|
" tui.institution_no institutionNo,\n" +
|
|
" user_status userStatus,\n" +
|
|
" user_status userStatus,\n" +
|
|
" g_id groupId,\n" +
|
|
" g_id groupId,\n" +
|
|
- " model_phone modelPhone,\n" +
|
|
|
|
|
|
+ " model modelPhone,\n" +
|
|
" tur.id recordingId,\n" +
|
|
" tur.id recordingId,\n" +
|
|
" flag,\n" +
|
|
" flag,\n" +
|
|
" tui.phone,\n" +
|
|
" tui.phone,\n" +
|
|
@@ -190,12 +189,11 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
" pet_name petName,\n" +
|
|
" pet_name petName,\n" +
|
|
" birthday,\n" +
|
|
" birthday,\n" +
|
|
" profession,\n" +
|
|
" profession,\n" +
|
|
- " addition_info additionInfo,\n" +
|
|
|
|
" institution_name institutionName,\n" +
|
|
" institution_name institutionName,\n" +
|
|
" tui.institution_no institutionNo,\n" +
|
|
" tui.institution_no institutionNo,\n" +
|
|
" user_status userStatus,\n" +
|
|
" user_status userStatus,\n" +
|
|
" g_id groupId,\n" +
|
|
" g_id groupId,\n" +
|
|
- " model_phone modelPhone,\n" +
|
|
|
|
|
|
+ " model modelPhone,\n" +
|
|
" tur.id recordingId,\n" +
|
|
" tur.id recordingId,\n" +
|
|
" flag,\n" +
|
|
" flag,\n" +
|
|
" tui.phone,\n" +
|
|
" tui.phone,\n" +
|
|
@@ -216,10 +214,7 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
@Query(value = "SELECT * FROM t_user_record WHERE phone in(SELECT phone FROM t_user_info WHERE institution_no = '10007')", nativeQuery = true)
|
|
@Query(value = "SELECT * FROM t_user_record WHERE phone in(SELECT phone FROM t_user_info WHERE institution_no = '10007')", nativeQuery = true)
|
|
List<UserRecordEntity> findAll1();
|
|
List<UserRecordEntity> findAll1();
|
|
|
|
|
|
- //@Query(value = "SELECT * FROM t_user_record WHERE test_plan_id = :testPlanId", nativeQuery = true)
|
|
|
|
- @Query(value = "SELECT * FROM t_user_record WHERE test_plan_id = 'ff80818180c27c7a0180cc18180d0280' AND phone in(\n" +
|
|
|
|
- "select phone from t_user_info where institution_no = '10017' and addition_info = '20220518' and model_phone !=0\n" +
|
|
|
|
- ") and test_date <= '2022年05月23日16时30分00秒';", nativeQuery = true)
|
|
|
|
|
|
+ @Query(value = "SELECT * FROM t_user_record WHERE test_plan_id = :testPlanId", nativeQuery = true)
|
|
List<UserRecordEntity> getUserRecordByPlanId(@Param("testPlanId") String testPlanId);
|
|
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)
|
|
@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)
|
|
@@ -230,12 +225,11 @@ public interface UserRecordRepository extends BaseRepository<UserRecordEntity, S
|
|
" pet_name petName,\n" +
|
|
" pet_name petName,\n" +
|
|
" birthday,\n" +
|
|
" birthday,\n" +
|
|
" profession,\n" +
|
|
" profession,\n" +
|
|
- " addition_info additionInfo,\n" +
|
|
|
|
" institution_name institutionName,\n" +
|
|
" institution_name institutionName,\n" +
|
|
" tui.institution_no institutionNo,\n" +
|
|
" tui.institution_no institutionNo,\n" +
|
|
" user_status userStatus,\n" +
|
|
" user_status userStatus,\n" +
|
|
" g_id groupId,\n" +
|
|
" g_id groupId,\n" +
|
|
- " model_phone modelPhone,\n" +
|
|
|
|
|
|
+ " model modelPhone,\n" +
|
|
" tur.id recordingId,\n" +
|
|
" tur.id recordingId,\n" +
|
|
" flag,\n" +
|
|
" flag,\n" +
|
|
" tui.phone,\n" +
|
|
" tui.phone,\n" +
|