fix[project]: 修改同步待办权限相关
This commit is contained in:
@@ -412,6 +412,7 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
SdmResponse<PageDataResp<List<CIDUserResp>>> pageDataRespSdmResponse = sysUserFeignClient.listUser(userListReq);
|
||||
if (pageDataRespSdmResponse.isSuccess() && pageDataRespSdmResponse.getData().getData() != null) {
|
||||
List<CIDUserResp> userList = pageDataRespSdmResponse.getData().getData();
|
||||
log.info("userList为:{}",userList);
|
||||
usernameToUserIdMap = userList.stream().collect(Collectors.toMap(CIDUserResp::getUsername, CIDUserResp::getUserId));
|
||||
}
|
||||
|
||||
@@ -664,10 +665,11 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
// permissionList.add(buildUpdatePermissionReq(demandUuid, currentUserId, null));
|
||||
|
||||
// 仿真负责人权限
|
||||
String verifier = todo.getVerifier();
|
||||
String verifier = todo.getVerifierNo();
|
||||
if (StringUtils.isNotBlank(verifier)) {
|
||||
String[] pArray = verifier.split(",");
|
||||
for (String pUserId : pArray) {
|
||||
log.info("添加仿真负责人权限,用户ID:{}", pUserId);
|
||||
addPermissionReq(usernameToUserIdMap.get(pUserId), demandUuid, permissionList, MemberTypeEnum.PRINCIPAL.getCode());
|
||||
}
|
||||
}
|
||||
@@ -677,19 +679,21 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
if (StringUtils.isNotBlank(introduceBy)) {
|
||||
String[] iArray = introduceBy.split(",");
|
||||
for (String iUserId : iArray) {
|
||||
log.info("添加需求创建人权限,用户ID:{}", iUserId);
|
||||
addPermissionReq(usernameToUserIdMap.get(iUserId), demandUuid, permissionList, MemberTypeEnum.CREATOR.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
// 需求执行人权限
|
||||
String followBy = todo.getFollowBy();
|
||||
if (StringUtils.isNotBlank(followBy)) {
|
||||
String[] fArray = followBy.split(",");
|
||||
String performer = todo.getPerformer();
|
||||
if (StringUtils.isNotBlank(performer)) {
|
||||
String[] fArray = performer.split(",");
|
||||
for (String fUserId : fArray) {
|
||||
log.info("添加需求执行人权限,用户ID:{}", fUserId);
|
||||
addPermissionReq(usernameToUserIdMap.get(fUserId), demandUuid, permissionList, MemberTypeEnum.EXECUTOR.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
log.info("待办:{},permissionList为:{}",todo.getTodoId(),permissionList);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -891,7 +895,7 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
if (CollectionUtils.isNotEmpty(filePermissions)) {
|
||||
BatchUpdatePermissionReq batchReq = new BatchUpdatePermissionReq();
|
||||
batchReq.setFilePermissions(filePermissions);
|
||||
log.info("同步项目阶段时,批量更新权限,任务数量:{}", filePermissions.size());
|
||||
log.info("同步项目阶段时,批量更新权限,参数为:{}", filePermissions);
|
||||
SdmResponse response = dataFeignClient.batchUpdatePermission(batchReq);
|
||||
log.info("同步项目阶段时,批量更新权限结果:{}", response);
|
||||
if (!response.isSuccess()) {
|
||||
|
||||
@@ -3832,7 +3832,9 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
addDemandMember(todoItem.getFollowBy(), MemberTypeEnum.ATTENTION.getCode(), demandUuid, currentUserId, currentTimeStr, memberList,permissionReqList,usernameToUserIdMap);
|
||||
|
||||
// 需求创建人添加权限
|
||||
addUserPermission(permissionReqList, demandUuid, usernameToUserIdMap.get(todoItem.getIntroduceBy()),FilePermissionEnum.ALL.getValue());
|
||||
for (String userIdStr : Arrays.stream(todoItem.getIntroduceBy().split(",")).toList()) {
|
||||
addUserPermission(permissionReqList, demandUuid, usernameToUserIdMap.get(userIdStr),FilePermissionEnum.ALL.getValue());
|
||||
}
|
||||
|
||||
// 仿真执行人
|
||||
// addDemandMember(todoItem.getEmulationExecutor(), 1, demandUuid, currentUserId, currentTimeStr, memberList, permissionReqList);
|
||||
|
||||
Reference in New Issue
Block a user