新增了hcp登录2
This commit is contained in:
parent
72ebcefef7
commit
75d13febeb
@ -134,7 +134,10 @@ public class UserService {
|
||||
user.setDepartmentName(data.getOfficeName());
|
||||
user.setTitle(StringToInt.DoctorTitleToInt(data.getPositionName()));
|
||||
user.setAddress(data.getProvName());
|
||||
save(user);
|
||||
int res = userDao.insert(user);
|
||||
if (res <= 0){
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
}else{
|
||||
if (!Objects.equals(user.getUserName(), data.getRealname())){
|
||||
user.setUserName(data.getRealname());
|
||||
@ -171,6 +174,32 @@ public class UserService {
|
||||
userDao.updateById(updateUser);
|
||||
}
|
||||
|
||||
// 获取对应医生数据
|
||||
LambdaQueryWrapper<CaseClinicalDoctorModel> caseClinicalDoctorWrapper = new LambdaQueryWrapper<>();
|
||||
caseClinicalDoctorWrapper.eq(CaseClinicalDoctorModel::getDoctorIden, user.getUserIden());
|
||||
CaseClinicalDoctorModel caseClinicalDoctor = caseClinicalDoctorDao.selectOne(caseClinicalDoctorWrapper);
|
||||
if (caseClinicalDoctor == null){
|
||||
CaseClinicalDoctorModel c = new CaseClinicalDoctorModel();
|
||||
c.setDoctorName(user.getUserName());
|
||||
c.setDoctorIden(user.getUserIden());
|
||||
c.setHospitalId(user.getHospitalId());
|
||||
c.setAvatar(user.getAvatar());
|
||||
int res = caseClinicalDoctorDao.insert(c);
|
||||
if (res <= 0){
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
}else{
|
||||
if (!Objects.equals(caseClinicalDoctor.getDoctorName(), data.getRealname())){
|
||||
caseClinicalDoctor.setDoctorName(data.getRealname());
|
||||
}
|
||||
|
||||
if (!Objects.equals(basicHospital.getHospitalId(), caseClinicalDoctor.getHospitalId())){
|
||||
caseClinicalDoctor.setHospitalId(basicHospital.getHospitalId());
|
||||
}
|
||||
|
||||
caseClinicalDoctorDao.updateById(caseClinicalDoctor);
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user