| | |
| | | //添加用户数据 如果没有输入密码,将会创建一个默认密码返回 |
| | | String defaultPassWord = ""; |
| | | SysUser sysUser = new SysUser(); |
| | | sysUser.setUsername(userRegVo.getUsername()); |
| | | sysUser.setUsername(userRegVo.getMobile()); |
| | | sysUser.setMobile(userRegVo.getMobile()); |
| | | if (StringUtils.isBlank(userRegVo.getPassword())) { |
| | | defaultPassWord = com.kidgrow.common.utils.RandomValueUtils.getRandom(6); |
| | |
| | | sysDictionaries.setCreateUserId(createUserId); |
| | | sysDictionaries.setCreateUserName(createUserName); |
| | | dicBool = sysDictionariesService.save(sysDictionaries); |
| | | if (dicBool) { |
| | | userRegVo.setDoctorRankId(sysDictionaries.getId()); |
| | | } |
| | | } |
| | | |
| | | if (dicBool) { |
| | | userRegVo.setDoctorRankId(sysDictionaries.getId()); |
| | | //写用户组织关系表 |
| | | List<SysUserOrg> sysUserOrgList = new ArrayList<SysUserOrg>(); |
| | | |
| | | sysUserOrgH.setUserId(sysUser.getId()); |
| | | sysUserOrgH.setOrgId(organizationHos); |
| | | sysUserOrgH.setFromLevel(CommonConstant.SYSTEM_ORG_HOS_LEVEL); |
| | |
| | | sysDoctor.setDoctorType(CommonConstant.H_DOCTOR_TYPE); |
| | | sysDoctor.setCreateUserId(isReg ? createUserId : sysUserd.getId()); |
| | | sysDoctor.setCreateUserName(isReg ? createUserName : sysUserd.getUsername()); |
| | | if (isReg) { |
| | | sysDoctor.setDoctorState(false); |
| | | } else { |
| | | sysDoctor.setDoctorState(true); |
| | | } |
| | | sysDoctor.setDoctorState(!isReg); |
| | | sysDoctor.setDoctorTel(userRegVo.getMobile()); |
| | | sysDoctor.setDoctorName(userRegVo.getNickname()); |
| | | sysDoctor.setServerUserId(isReg ? createUserId : sysUserd.getId()); |
| | |
| | | List<HospitalDoctorListVo> hospitalDoctorListVos = baseMapper.hospitalDoctorList(sysHospitalId, depatmentId, CommonConstant.HOSPITAL_DOCTOR_ID, CommonConstant.HOSPITAL_ADMIN_ID); |
| | | if (hospitalDoctorListVos != null) { |
| | | int doctorCount = hospitalDoctorListVos.size(); |
| | | int accountCount = sysDepartment.getAccountsCount(); |
| | | return (accountCount - doctorCount); |
| | | int accountCount = sysDepartment.getAccountsCount().intValue(); |
| | | int liveCount=accountCount - doctorCount; |
| | | return liveCount; |
| | | } else { |
| | | return 0; |
| | | } |