|
@ -654,16 +654,8 @@ public class DoctorInfoService extends BaseService {
|
|
|
}
|
|
|
//修改医生服务团队 删除旧的健康管理师
|
|
|
DoctorTeamMember doctorTeamMember = doctorTeamDoctor.findMemberByTeamAndCode(signFamily.getTeamCode(), oldDoctorCode);
|
|
|
doctorTeamMember.setDel("0");
|
|
|
//把患者移除旧的健康管理师的患者表
|
|
|
List<DoctorPatientGroupInfo> oldDoctorPatientGroupInfos = doctorPatientGroupInfoDao.findByPatientAndDoctor(patient, oldDoctorCode);
|
|
|
for (DoctorPatientGroupInfo doctorPatientGroupInfo : oldDoctorPatientGroupInfos) {
|
|
|
doctorPatientGroupInfo.setCzrq(new Date());
|
|
|
doctorPatientGroupInfo.setStatus(0);//设置为无效
|
|
|
//保存原来旧的分组
|
|
|
if (Integer.valueOf(doctorPatientGroupInfo.getGroup()) < 4) {
|
|
|
groupCode = doctorPatientGroupInfo.getGroup() + "";
|
|
|
}
|
|
|
if (doctorTeamMember != null) {
|
|
|
doctorTeamMember.setDel("0");
|
|
|
}
|
|
|
}
|
|
|
Patient patientObj = patientDao.findByCode(patient);
|
|
@ -683,19 +675,6 @@ public class DoctorInfoService extends BaseService {
|
|
|
newDoctorTeamMember.setDel("1");
|
|
|
newDoctorTeamMember.setCode(UUID.randomUUID().toString().replace("-", ""));
|
|
|
doctorTeamDoctor.save(newDoctorTeamMember);
|
|
|
|
|
|
//把患者加到新的健康管理师的患者表
|
|
|
DoctorPatientGroupInfo doctorPatientGroupInfo = new DoctorPatientGroupInfo();
|
|
|
doctorPatientGroupInfo.setCzrq(new Date());
|
|
|
doctorPatientGroupInfo.setDoctor(newDoctorCode);
|
|
|
doctorPatientGroupInfo.setStatus(1);
|
|
|
doctorPatientGroupInfo.setPatient(patientObj.getCode());
|
|
|
doctorPatientGroupInfo.setPname(patientObj.getName());
|
|
|
doctorPatientGroupInfo.setPartAmount(0);
|
|
|
doctorPatientGroupInfo.setGroup(groupCode);//默认健康分组
|
|
|
doctorPatientGroupInfo.setQyrq(new Date());
|
|
|
doctorPatientGroupInfo.setSignType("2");//家庭签约
|
|
|
doctorPatientGroupInfoDao.save(doctorPatientGroupInfo);
|
|
|
}
|
|
|
|
|
|
public void updateTeamHealthDoctors(String newDoctorCode, String oldDoctorCode, String patients) throws Exception {
|
|
@ -737,20 +716,21 @@ public class DoctorInfoService extends BaseService {
|
|
|
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
public void updatePassword(String newPassword1, String newPassword2, String oldPassword, String doctorCode) throws Exception{
|
|
|
if(!newPassword1.equals(newPassword2)){
|
|
|
throw new Exception("新密码不一致");
|
|
|
public void updatePassword(String newPassword1, String newPassword2, String oldPassword, String doctorCode) throws Exception {
|
|
|
if (!newPassword1.equals(newPassword2)) {
|
|
|
throw new Exception("新密码不一致");
|
|
|
}
|
|
|
if(newPassword1.equals(oldPassword)){
|
|
|
if (newPassword1.equals(oldPassword)) {
|
|
|
throw new Exception("新旧密码一致");
|
|
|
}
|
|
|
Doctor doctor=doctorDao.findByCode(doctorCode);
|
|
|
String oldPasswordTemp= MD5.GetMD5Code(oldPassword+doctor.getSalt());
|
|
|
if(!oldPasswordTemp.equals(doctor.getPassword())){
|
|
|
Doctor doctor = doctorDao.findByCode(doctorCode);
|
|
|
String oldPasswordTemp = MD5.GetMD5Code(oldPassword + doctor.getSalt());
|
|
|
if (!oldPasswordTemp.equals(doctor.getPassword())) {
|
|
|
throw new Exception("旧密码错误");
|
|
|
}
|
|
|
String newPassword1Temp= MD5.GetMD5Code(newPassword1+doctor.getSalt());
|
|
|
String newPassword1Temp = MD5.GetMD5Code(newPassword1 + doctor.getSalt());
|
|
|
doctor.setPassword(newPassword1Temp);
|
|
|
}
|
|
|
|