소스 검색

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

chenweida 8 년 전
부모
커밋
0f00e8a2d8

+ 16 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultTeamDao.java

@ -265,4 +265,20 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	//名医咨询 -我咨询的全部 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1  and a.del = '1' and b.del = '1'")
	Page<ConsultTeam> findMyFamousDoctorAllList(String uid, Pageable pageRequest);
	//名医咨询 -我咨询的 带symptoms 根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2 and a.id < ?3 and a.symptoms like ?4 and a.del = '1' and b.del = '1'")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, long id, String title, Pageable pageRequest);
	//名医咨询 -我咨询的 带symptoms 根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.symptoms like ?3 and a.del = '1' and b.del = '1'")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, String title, Pageable pageRequest);
	//名医咨询 -我咨询的 带symptoms根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.id < ?3 and  a.del = '1' and b.del = '1'")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, long id, Pageable pageRequest);
	//名医咨询 -我咨询的 带symptoms根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.del = '1' and b.del = '1'")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, Pageable pageRequest);
}

+ 26 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -135,10 +135,36 @@ public class ConsultTeamService extends ConsultService {
            case 10:
                //我咨询的
                return findByDoctorType10(uid, id, pagesize, title);
            case 11:
                //我咨询的 进行中
                return findByDoctorType11(uid,0, id, pagesize, title);
            case 12:
                //我咨询的 已结束中
                return findByDoctorType11(uid,1, id, pagesize, title);
        }
        return null;
    }
    private Page<ConsultTeam> findByDoctorType11(String uid, int status, long id, int pagesize, String title) {
        Sort sort = new Sort(Direction.DESC, "id");
        // 分页信息
        PageRequest pageRequest = new PageRequest(0, pagesize, sort);
        if (StringUtils.isNoneEmpty(title)) {
            title = "%" + title + "%";
            if (id > 0) {
                return consultTeamDao.findMyFamousDoctorListByStatus(uid,status, id, title, pageRequest);
            } else {
                return consultTeamDao.findMyFamousDoctorListByStatus(uid,status, title, pageRequest);
            }
        } else {
            if (id > 0) {
                return consultTeamDao.findMyFamousDoctorListByStatus(uid,status, id, pageRequest);
            } else {
                return consultTeamDao.findMyFamousDoctorListByStatus(uid,status, pageRequest);
            }
        }
    }
    private Page<ConsultTeam> findByDoctorType10(String uid, long id, int pagesize,String title) {
        Sort sort = new Sort(Direction.DESC, "id");
        // 分页信息

+ 6 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -93,8 +93,13 @@ public class DoctorConsultController extends WeixinBaseController {
                json.put("name", consult.getName());
                // 设置醫生标识
                json.put("doctor", consult.getDoctor());
                Doctor doctor=doctorService.findDoctorByCode(consult.getDoctor());
                // 设置醫生标识
                json.put("doctorName", doctorService.findDoctorByCode(consult.getDoctor()).getName());
                json.put("doctorName", doctor.getName());
                // 设置医生photo
                json.put("doctorPhoto", doctor.getPhoto());
                // 设置医生sex
                json.put("doctorSex", doctor.getSex());
                // 设置患者头像
                json.put("photo", consult.getPhoto());
                // 设置咨询标识