|
@ -16,10 +16,12 @@ import com.yihu.ehr.basic.user.service.DoctorService;
|
|
|
import com.yihu.ehr.basic.user.service.RoleUserService;
|
|
|
import com.yihu.ehr.basic.user.service.RolesService;
|
|
|
import com.yihu.ehr.basic.user.service.UserService;
|
|
|
import com.yihu.ehr.basic.util.IdcardValidator;
|
|
|
import com.yihu.ehr.constants.ApiVersion;
|
|
|
import com.yihu.ehr.constants.ServiceApi;
|
|
|
import com.yihu.ehr.controller.EnvelopRestEndPoint;
|
|
|
import com.yihu.ehr.entity.patient.DemographicInfo;
|
|
|
import com.yihu.ehr.model.common.Result;
|
|
|
import com.yihu.ehr.model.org.MOrgDeptJson;
|
|
|
import com.yihu.ehr.model.user.MDoctor;
|
|
|
import com.yihu.ehr.util.datetime.DateUtil;
|
|
@ -76,6 +78,8 @@ public class DoctorEndPoint extends EnvelopRestEndPoint {
|
|
|
private RolesService rolesService;
|
|
|
@Autowired
|
|
|
private RoleUserService roleUserService;
|
|
|
@Autowired
|
|
|
private IdcardValidator idcardValidator;
|
|
|
|
|
|
@RequestMapping(value = ServiceApi.Doctors.Doctors, method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取医生列表", notes = "根据查询条件获取医生列表在前端表格展示")
|
|
@ -133,6 +137,9 @@ public class DoctorEndPoint extends EnvelopRestEndPoint {
|
|
|
Organization organization = orgService.getOrgById(mOrgDeptJson.getOrgId());
|
|
|
OrgDept orgDept = orgDeptService.searchBydeptId(Integer.parseInt(mOrgDeptJson.getDeptIds().split(",")[0]));
|
|
|
Doctors doctor = toEntity(doctoJsonData, Doctors.class);
|
|
|
if (!idcardValidator.isValidatedAllIdcard(doctor.getIdCardNo())){
|
|
|
return null;
|
|
|
}
|
|
|
doctor.setStatus("1");
|
|
|
doctor.setPyCode(PinyinUtil.getPinYinHeadChar(doctor.getName(), false));
|
|
|
doctor.setOrgId(organization.getId().toString());
|