فهرست منبع

修复患者行政团队分页失败问题

Sand 8 سال پیش
والد
کامیت
ea297fbba8

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/DoctorAdminTeamDao.java

@ -63,7 +63,7 @@ public interface DoctorAdminTeamDao extends
     */
    @Query("SELECT t.id, t.name, t.leaderCode, f.doctor, f.doctorName, f.doctorHealth, f.doctorHealthName " +
            "FROM SignFamily f, AdminTeam t WHERE f.patient = :patientCode AND f.status in (-3, 1) AND t.id=f.adminTeamId ORDER BY f.czrq DESC")
    Object findTop1AdminTeamByPatientSignTeam(@Param("patientCode") String patientCode);
    List<Object> findAdminTeamByPatientSignTeam(@Param("patientCode") String patientCode, Pageable pageable);
    @Query("SELECT t.id from AdminTeam t WHERE t.leaderCode = :leaderCode")
    Long findIdByLeaderCode(@Param("leaderCode") String leaderCode);

+ 3 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java

@ -83,9 +83,10 @@ public class AdminTeamService extends BaseService {
    public Map<String, Object> getPatientSigningTeam(String patientCode, String currentDoctor){
        Object result[] = (Object[]) teamDao.findTop1AdminTeamByPatientSignTeam(patientCode);
        if (result == null) return null;
        List<Object> results = teamDao.findAdminTeamByPatientSignTeam(patientCode, new PageRequest(0, 1));
        if (results == null || results.size() == 0) return null;
        Object[] result = (Object[]) results.get(0);
        Map<String, Object> team = new HashMap<>();
        team.put("teamId", result[0]);
        team.put("teamName", result[1]);