|
|
@@ -161,6 +161,7 @@ public class OrganizationUserServiceImpl extends SuperService {
|
|
|
OrgBindUserAllParam orgBindUserAllParam = new OrgBindUserAllParam();
|
|
|
orgBindUserAllParam.setId(param.getId());
|
|
|
orgBindUserAllParam.setUserId(userId);
|
|
|
+ // 要绑定的机构
|
|
|
orgBindUserAllParam.setOrgOid(organization.getOid());
|
|
|
orgBindUserAllParam.setCode(param.getCode());
|
|
|
orgBindUserAllParam.setPositionId(param.getPositionId());
|
|
|
@@ -169,6 +170,7 @@ public class OrganizationUserServiceImpl extends SuperService {
|
|
|
orgBindUserAllParam.setState(param.getState());
|
|
|
orgBindUserAllParam.setIsAdmin(param.getIsAdmin());
|
|
|
orgBindUserAllParam.setRemark(param.getRemark());
|
|
|
+ orgBindUserAllParam.setProjectOid(param.getProjectOid());
|
|
|
|
|
|
// 绑定用户到机构
|
|
|
ResultContent<OrganizationUser> bindUserContent = orgBindUser(orgBindUserAllParam);
|
|
|
@@ -201,7 +203,7 @@ public class OrganizationUserServiceImpl extends SuperService {
|
|
|
if (ObjectUtils.isEmpty(userAccount)) {
|
|
|
return ResultContent.buildFail(String.format("用户信息不存在:%s", param.getUserId()));
|
|
|
}
|
|
|
-
|
|
|
+ String projectOid = param.getProjectOid();
|
|
|
boolean isUpdate = false;
|
|
|
|
|
|
// 要绑定的机构 (不是项目)
|
|
|
@@ -222,8 +224,11 @@ public class OrganizationUserServiceImpl extends SuperService {
|
|
|
if (ObjectUtils.isEmpty(organizationUser)) {
|
|
|
return ResultContent.buildFail(String.format("数据不存在:%s", param.getId()));
|
|
|
}
|
|
|
+ if (StringUtils.isEmpty(projectOid)) {
|
|
|
+ projectOid = organizationUser.getProjectOid();
|
|
|
+ }
|
|
|
} else {
|
|
|
- organizationUser = organizationUserDao.findTopByOrganizationAndUser(organization, userAccount);
|
|
|
+ organizationUser = organizationUserDao.findTopByOrganizationAndUserAndProjectOid(organization, userAccount, projectOid);
|
|
|
}
|
|
|
|
|
|
if (ObjectUtils.isEmpty(organizationUser)) {
|
|
|
@@ -288,7 +293,7 @@ public class OrganizationUserServiceImpl extends SuperService {
|
|
|
// 设置部门
|
|
|
organizationUser.setDepartment(department);
|
|
|
|
|
|
- organizationUser.setProjectOid(oidAboutInfo.getProjectOid());
|
|
|
+ organizationUser.setProjectOid(projectOid);
|
|
|
organizationUser.setAboutOid(oidAboutInfo.getOid());
|
|
|
organizationUser.setAboutAuthType(oidAboutInfo.getAuthType());
|
|
|
organizationUser.setAuthType(organization.getAuthType());
|