|  | @ -8,6 +8,8 @@ import com.yihu.jw.base.dao.dict.DictDoctorDutyDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.dao.dict.DictHospitalDeptDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.dao.dict.DictJobTitleDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.dao.doctor.BaseDoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.dao.doctor.BaseDoctorRoleDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.dao.doctor.BaseDoctorRoleInfoDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.service.dict.DictDoctorDutyService;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.service.dict.DictHospitalDeptService;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.dao.doctor.BaseDoctorHospitalDao;
 | 
	
	
		
			
				|  | @ -27,6 +29,7 @@ import com.yihu.jw.entity.base.dict.DictDoctorDutyDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorRoleInfoDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.org.BaseOrgDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.exception.business.ManageException;
 | 
	
		
			
				|  |  | import com.yihu.mysql.query.BaseJpaService;
 | 
	
	
		
			
				|  | @ -90,6 +93,10 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private DictHospitalDeptService dictHospitalDeptService;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private BaseDoctorRoleDao doctorRoleDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private BaseDoctorRoleInfoDao doctorRoleInfoDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
	
		
			
				|  | @ -662,24 +669,21 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
 | 
	
		
			
				|  |  |                     doctorHospitalList.add(doctorHospitalDO);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 doctorHospitalDao.save(doctorHospitalList);
 | 
	
		
			
				|  |  |                 if(!StringUtils.isEmpty(one.getRoleInfo())){
 | 
	
		
			
				|  |  |                     BaseDoctorRoleDO baseDoctorRoleDO = null;
 | 
	
		
			
				|  |  |                     DictJobTitleDO dictJobTitleDO = null;
 | 
	
		
			
				|  |  |                     String[] roles = one.getRoleInfo().split(";");
 | 
	
		
			
				|  |  |                     List<BaseDoctorRoleDO> baseDoctorRoleDOList = new ArrayList<>();
 | 
	
		
			
				|  |  |                     for(String role:roles){
 | 
	
		
			
				|  |  |                         String[] element = role.split(",");
 | 
	
		
			
				|  |  |                         String roleCode = element[0];
 | 
	
		
			
				|  |  |                         dictJobTitleDO = jobTitleDao.findByCode(roleCode);
 | 
	
		
			
				|  |  |                         baseDoctorRoleDO = new BaseDoctorRoleDO();
 | 
	
		
			
				|  |  |                         baseDoctorRoleDO.setDoctorCode(baseDoctorDO.getId());
 | 
	
		
			
				|  |  | //                        baseDoctorRoleDO.setRoleModuleCode(dictJobTitleDO.getCode());
 | 
	
		
			
				|  |  | //                        baseDoctorRoleDO.setName(dictJobTitleDO.getName());
 | 
	
		
			
				|  |  | //                        baseDoctorRoleDO.setDel("1");
 | 
	
		
			
				|  |  |                         baseDoctorRoleDOList.add(baseDoctorRoleDO);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     baseDoctorRoleService.batchInsert(baseDoctorRoleDOList);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if(!StringUtils.isEmpty(one.getRoleInfo())){
 | 
	
		
			
				|  |  |                 BaseDoctorRoleDO baseDoctorRoleDO = null;
 | 
	
		
			
				|  |  |                 String[] roles = one.getRoleInfo().split(";");
 | 
	
		
			
				|  |  |                 List<BaseDoctorRoleDO> baseDoctorRoleDOList = new ArrayList<>();
 | 
	
		
			
				|  |  |                 for(String role:roles){
 | 
	
		
			
				|  |  |                     String[] element = role.split(",");
 | 
	
		
			
				|  |  |                     String roleCode = element[0];
 | 
	
		
			
				|  |  |                     baseDoctorRoleDO = new BaseDoctorRoleDO();
 | 
	
		
			
				|  |  |                     baseDoctorRoleDO.setDoctorCode(baseDoctorDO.getId());
 | 
	
		
			
				|  |  |                     baseDoctorRoleDO.setRoleCode(roleCode);
 | 
	
		
			
				|  |  |                     baseDoctorRoleDOList.add(baseDoctorRoleDO);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 baseDoctorRoleService.batchInsert(baseDoctorRoleDOList);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         result.put("correctCount", doctors.size());
 |