Przeglądaj źródła

Merge branch 'dev' of lyr/patient-co-management into dev

lyr 8 lat temu
rodzic
commit
d4c301c33c

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

@ -59,6 +59,17 @@ public interface DoctorAdminTeamDao extends
                                                 @Param(value = "teamId") long teamId,
                                                 Pageable pageable);
    /**
     * 团队内,健康管理师的签约患者。
     *
     * @param healthDoctorCode
     * @return
     */
    @Query("SELECT p FROM SignFamily s, Patient p WHERE s.doctorHealth = :healthDoctorCode AND s.patient = p.code and s.status >0 AND" +
            " s.adminTeamId = :teamId AND s.type = 2")
    List<Patient> getHealthDoctorSigningPatients(@Param(value = "healthDoctorCode") String healthDoctorCode,
                                                 @Param(value = "teamId") long teamId);
    /**
     * 通过患者约团队取得行政团队。
     *

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

@ -72,7 +72,7 @@ public class AdminTeamService extends BaseService {
        return team;
    }
    public void deleteTeam(long teamId){
    public void deleteTeam(long teamId) {
        teamDao.delete(teamId);
    }
@ -269,9 +269,13 @@ public class AdminTeamService extends BaseService {
     * @return
     */
    public List<Patient> getMemberSigningPatients(long teamId, String healthDoctorCode, int page, int size) {
        Page<Patient> result = teamDao.getHealthDoctorSigningPatients(healthDoctorCode, teamId, new PageRequest(page, size));
        return result.getContent();
        if (page == 0 && size == 0) {
            List<Patient> result = teamDao.getHealthDoctorSigningPatients(healthDoctorCode, teamId);
            return result;
        } else {
            Page<Patient> result = teamDao.getHealthDoctorSigningPatients(healthDoctorCode, teamId, new PageRequest(page, size));
            return result.getContent();
        }
    }
    /**

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/team/AdminTeamController.java

@ -266,8 +266,8 @@ public class AdminTeamController extends BaseController {
    public String getDoctorSignPatients(@PathVariable("team_id") long teamId,
                                        @ApiParam(value = "健康管理师代码")
                                        @PathVariable("doctor_code") String healthDoctorCode,
                                        @RequestParam(value = "page", defaultValue = "1", required = false) int page,
                                        @RequestParam(value = "size", defaultValue = "10", required = false) int size) {
                                        @RequestParam(value = "page", defaultValue = "0", required = false) int page,
                                        @RequestParam(value = "size", defaultValue = "0", required = false) int size) {
        try {
            page = page <= 0 ? 0 : page - 1;
            List<Patient> patients = memberService.getMemberSigningPatients(teamId, healthDoctorCode, page, size);