Переглянути джерело

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

chenweida 8 роки тому
батько
коміт
03c6eec9ec

+ 39 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -59,7 +59,6 @@ import javax.print.Doc;
 */
// Spring Service Bean的标识.
@Component
@Transactional
public class DoctorInfoService extends BaseService {
    @Autowired
@ -101,6 +100,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public List<Object> getDoctorSignPatients(String doctor) {
        return signFamilyDao.findDoctorSignPatients(doctor);
    }
@ -111,6 +111,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public List<Object> getDoctorSignPatientsLikeName(String doctor, String patientName) {
        return signFamilyDao.findDoctorSignPatientsLikeName(doctor, patientName);
    }
@ -121,6 +122,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public List<Object> getDoctorSignPatientsBySignType(String doctor, int type) {
        return signFamilyDao.findDoctorSignPatientsBySignType(doctor, type);
    }
@ -131,14 +133,17 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public List<Object> getDoctorSignPatientsByTypeName(String doctor, int type, String patientName) {
        return signFamilyDao.findDoctorSignPatientsByTypeName(doctor, type, patientName);
    }
    @Transactional
    public Doctor findDoctorByCode(String code) {
        return doctorDao.findByCode(code);
    }
    @Transactional
    public Doctor findDoctorByMobile(String mobile) {
        return doctorDao.findByMobile(mobile);
    }
@ -149,6 +154,7 @@ public class DoctorInfoService extends BaseService {
     * @param mobile
     * @return
     */
    @Transactional
    public Doctor findNormalByMobile(String mobile) {
        return doctorDao.findNormalByMobile(mobile);
    }
@ -159,6 +165,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public Doctor updateDoctor(Doctor doctor) {
        Province province = provinceDao.findByCode(doctor.getProvince());
        if (province != null) {
@ -190,6 +197,7 @@ public class DoctorInfoService extends BaseService {
    /**
     * 修改医生密码
     */
    @Transactional
    public void updateDoctorPwd(Doctor doctor) {
        EncodesUtil.entryptPassword(doctor);
        doctorDao.save(doctor);
@ -201,10 +209,12 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public List<Object> findPatientByDoctorSign(String doctor) {
        return doctorDao.findPatientByDoctorSign(doctor);
    }
    @Transactional
    public Page<Object> findPatientByDoctorSign(String doctor, long id,
                                                int pagesize, String patientName) {
        // return doctorDao.findPatientByDoctorSign(doctor);
@ -248,6 +258,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public int amountPatientByDoctorSign(String doctor) {
        return doctorDao.amountPatientByDoctorSign(doctor);
    }
@ -258,14 +269,17 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public Iterable<DoctorPatientGroup> findDoctorPatientGroup(String doctor) {
        return doctorDao.findDoctorPatientGroup(doctor);
    }
    @Transactional
    public Patient findPatientByCode(String code) {
        return doctorDao.findPatientByCode(code);
    }
    @Transactional
    public DoctorPatientGroupInfo findGroup(String user, String doctor) {
        return doctorDao.findGroup(user, doctor);
    }
@ -279,6 +293,7 @@ public class DoctorInfoService extends BaseService {
     *                 页数
     * @return
     */
    @Transactional
    public Page<Doctor> getDoctorListByHospital(String query, String hospital,
                                                long id, int pageSize) {
        // 排序
@ -304,22 +319,26 @@ public class DoctorInfoService extends BaseService {
        return doctorDao.findAll(spec, pageRequest);
    }
    @Transactional
    public List<Doctor> getDoctorCombobxByHospital(String type, String hospital) {
        return doctorDao.getDoctorCombobxByHospital(hospital, Integer.valueOf(type));
    }
    @Transactional
    public Doctor getDoctor(int consultType, String patientCode) {
        //根据病人ID查找团队
        //DoctorTeam doctorTeam =doctorTeamDao.getBy
        return null;
    }
    @Transactional
    public Page<Doctor> getDoctorListByPatientCode(int consultType, String patientCode, String name, int page, int pageSize) {
        //
        return null;
    }
    @Transactional
    public Page<Doctor> getDoctorListByHospital(String name, String paitentCode, Integer page, Integer pageSize) {
        if (pageSize == null | pageSize <= 0) {
            pageSize = 10;
@ -344,6 +363,7 @@ public class DoctorInfoService extends BaseService {
        return doctorDao.findAll(spec, pageRequest);
    }
    @Transactional
    public void doctor_1_Toteam(String teamCode, String doctor, String doctorName, String groupCode, String loginCode, String parientCode, String sickName, String sickNCode) {
        //得到患者所在的团队
        DoctorTeam doctorTeam = doctorTeamDao.findByParientCode(parientCode);
@ -395,6 +415,7 @@ public class DoctorInfoService extends BaseService {
    }
    @Transactional
    public Doctor getDoctor2ByParient(String parientCode, String consultCode) {
        //得到咨询的类别
        Consult consult = consultDao.findByCode(consultCode);
@ -412,6 +433,7 @@ public class DoctorInfoService extends BaseService {
        return doctor;
    }
    @Transactional
    public List<Map> findNoInConsultDoctor(String existDoc, String consultCode, int page, int pageSzie) {
        int start = (page - 1) * pageSzie;
        String sql = "select p.* from wlyy_doctor p where " +
@ -422,6 +444,7 @@ public class DoctorInfoService extends BaseService {
        return rs;
    }
    @Transactional
    public int countNoInConsultDoctor(String existDoc, String consultCode) {
        String sql = "SELECT count(*) as c FROM (" +
                "select 1 as c from wlyy_doctor p where " +
@ -432,6 +455,7 @@ public class DoctorInfoService extends BaseService {
        return ((Long) ((Map) rs.get(0)).get("c")).intValue();
    }
    @Transactional
    public Map<String, Object> getDoctor1ByParient(String consultCode, String parientCode, Integer page, Integer pageSzie) {
        Map<String, Object> returnMap = new HashMap<>();
        if (pageSzie == null | pageSzie <= 0) {
@ -509,6 +533,7 @@ public class DoctorInfoService extends BaseService {
        return returnMap;
    }
    @Transactional
    public List<Doctor> findDoctorByLevelAndHospital(String hospital, Integer level) {
        return doctorDao.findDoctorByLevelAndHospital(hospital, level);
    }
@ -520,6 +545,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public boolean updateDoctorIdcard(String idcard, String doctor) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        if (doc == null) {
@ -536,6 +562,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public boolean updateExpertise(String expertise, String doctor) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        if (doc == null) {
@ -552,6 +579,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public boolean updateSex(int sex, String doctor) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        if (doc == null) {
@ -568,6 +596,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public boolean updateIntroduce(String introduce, String doctor) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        if (doc == null) {
@ -592,6 +621,7 @@ public class DoctorInfoService extends BaseService {
        doctor.setIsFamous(status);
    }
    @Transactional
    public Page<Doctor> findDoctorByDept(String dept, String hosptial, String key, int page, int pageSize) {
        if (pageSize <= 0) {
            pageSize = 10;
@ -620,6 +650,7 @@ public class DoctorInfoService extends BaseService {
    }
    @Transactional
    public Page<Doctor> findFamousDoctor(String key, Integer type, int page, int pageSize, Integer level) {
        if (pageSize <= 0) {
            pageSize = 10;
@ -648,6 +679,7 @@ public class DoctorInfoService extends BaseService {
    }
    @Transactional
    public List<Doctor> findFamousDoctorList(String key, Integer type, int page, int pageSize, Integer level) throws Exception {
        if (pageSize <= 0) {
            pageSize = 10;
@ -708,9 +740,12 @@ public class DoctorInfoService extends BaseService {
    }
    @Transactional
    public void updateTeamHealthDoctor(String newDoctorCode, String oldDoctorCode, String patient) throws Exception {
        //得到患者的签约信息
        SignFamily signFamily = signFamilyDao.findByPatient(patient);
        //得到签约中的健管师
        oldDoctorCode=signFamily.getDoctorHealth();
        //如果存在旧的健管师
        if (!org.springframework.util.StringUtils.isEmpty(oldDoctorCode)) {
            //判断患者对旧的健管师是否存在健康咨询
@ -757,6 +792,7 @@ public class DoctorInfoService extends BaseService {
     * @param captcha 验证码
     * @return
     */
    @Transactional
    public int changeMobile(String doctor, String mobile, String captcha, int type) {
        Doctor doc = doctorDao.findByCode(doctor);
@ -806,6 +842,7 @@ public class DoctorInfoService extends BaseService {
     * @param doctor
     * @return
     */
    @Transactional
    public boolean isPatientSigned(String patient, String doctor) {
        boolean bo = false;
        //签约团队
@ -828,6 +865,7 @@ public class DoctorInfoService extends BaseService {
     * @param mobile
     * @return
     */
    @Transactional
    public int isMobileRegister(String mobile) {
        Doctor doc = doctorDao.findByMobile(mobile);