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