|
|
@ -77,8 +77,8 @@ public class AsyncService implements IAsyncService { |
|
|
|
@Override |
|
|
|
public void createHospitalOfNotExit(QuestionnaireDto.SaveQuestionnaire param, Long userId) throws Exception { |
|
|
|
String departmentCode = ""; |
|
|
|
if (Constant.DepartmentAndCode.SHEN_JING.name.equals(param.getDepartments())) { |
|
|
|
departmentCode = Constant.DepartmentAndCode.SHEN_JING.code; |
|
|
|
if (Constant.DepartmentAndCode.SHEN_NEI.name.equals(param.getDepartments())) { |
|
|
|
departmentCode = Constant.DepartmentAndCode.SHEN_NEI.code; |
|
|
|
} |
|
|
|
if (Constant.DepartmentAndCode.NEI_KE.name.equals(param.getDepartments())) { |
|
|
|
departmentCode = Constant.DepartmentAndCode.NEI_KE.code; |
|
|
@ -106,12 +106,18 @@ public class AsyncService implements IAsyncService { |
|
|
|
member.setName(param.getName()); |
|
|
|
member.setContact(param.getPhone()); |
|
|
|
organizationMemberDao.insertSelective(member); |
|
|
|
//添加成员职位
|
|
|
|
OrganizationMemberPosition position = new OrganizationMemberPosition(); |
|
|
|
position.setId(snowflake.nextId()); |
|
|
|
position.setPositionId(2L); |
|
|
|
position.setPositionId(param.getPositionId()); |
|
|
|
position.setDepartmentId(department.getId()); |
|
|
|
organizationMemberPositionMapper.insertSelective(position); |
|
|
|
|
|
|
|
//TODO 质控医生职位
|
|
|
|
OrganizationMemberPosition position1 = new OrganizationMemberPosition(); |
|
|
|
position1.setId(snowflake.nextId()); |
|
|
|
position1.setPositionId(3L); |
|
|
|
position1.setDepartmentId(department.getId()); |
|
|
|
organizationMemberPositionMapper.insertSelective(position1); |
|
|
|
//创建项目
|
|
|
|
createProject(newOrganization.getId(),param,userId); |
|
|
|
}else { |
|
|
@ -131,11 +137,18 @@ public class AsyncService implements IAsyncService { |
|
|
|
member.setName(param.getName()); |
|
|
|
member.setContact(param.getPhone()); |
|
|
|
organizationMemberDao.insertSelective(member); |
|
|
|
//添加成员职位
|
|
|
|
OrganizationMemberPosition position = new OrganizationMemberPosition(); |
|
|
|
position.setId(snowflake.nextId()); |
|
|
|
position.setPositionId(2L); |
|
|
|
position.setPositionId(param.getPositionId()); |
|
|
|
position.setDepartmentId(department.getId()); |
|
|
|
organizationMemberPositionMapper.insertSelective(position); |
|
|
|
//TODO 质控医生职位
|
|
|
|
OrganizationMemberPosition position1 = new OrganizationMemberPosition(); |
|
|
|
position1.setId(snowflake.nextId()); |
|
|
|
position1.setPositionId(3L); |
|
|
|
position1.setDepartmentId(department.getId()); |
|
|
|
organizationMemberPositionMapper.insertSelective(position1); |
|
|
|
//创建项目
|
|
|
|
createProject(organization.getId(),param,userId); |
|
|
|
}else { |
|
|
@ -145,11 +158,18 @@ public class AsyncService implements IAsyncService { |
|
|
|
member.setName(param.getName()); |
|
|
|
member.setContact(param.getPhone()); |
|
|
|
organizationMemberDao.insertSelective(member); |
|
|
|
//添加成员职位
|
|
|
|
OrganizationMemberPosition position = new OrganizationMemberPosition(); |
|
|
|
position.setId(snowflake.nextId()); |
|
|
|
position.setPositionId(2L); |
|
|
|
position.setPositionId(param.getPositionId()); |
|
|
|
position.setDepartmentId(department.getId()); |
|
|
|
organizationMemberPositionMapper.insertSelective(position); |
|
|
|
//TODO 质控医生职位
|
|
|
|
OrganizationMemberPosition position1 = new OrganizationMemberPosition(); |
|
|
|
position1.setId(snowflake.nextId()); |
|
|
|
position1.setPositionId(3L); |
|
|
|
position1.setDepartmentId(department.getId()); |
|
|
|
organizationMemberPositionMapper.insertSelective(position1); |
|
|
|
//创建项目
|
|
|
|
createProject(organization.getId(),param,userId); |
|
|
|
} |
|
|
|