fix:需求权限

This commit is contained in:
2026-02-04 10:00:06 +08:00
parent 927fa018f6
commit e9739b0add

View File

@@ -1333,14 +1333,17 @@ public class TaskServiceImpl implements ITaskService {
}
// 设置任务执行人对关联的需求文件夹设置权限
if (StringUtils.isNotEmpty(task.getDemandId())) {
SpdmDemandVo demand = demandMapper.getDemandListById(Collections.singletonList(task.getDemandId())).get(0);
for (Long currentUserId : currentUserIdList) {
BatchUpdatePermissionReq.FilePermissionItem item = new BatchUpdatePermissionReq.FilePermissionItem();
item.setUuid(demand.getUuid());
Map<Long, Byte> userPermissions = new HashMap<>();
userPermissions.put(currentUserId, FilePermissionEnum.BASE.getValue());
item.setUserPermissions(userPermissions);
filePermissions.add(item);
List<SpdmDemandVo> demandVoList = demandMapper.getDemandListById(Collections.singletonList(task.getDemandId()));
if (CollectionUtils.isNotEmpty(demandVoList)) {
SpdmDemandVo demand = demandVoList.get(0);
for (Long currentUserId : currentUserIdList) {
BatchUpdatePermissionReq.FilePermissionItem item = new BatchUpdatePermissionReq.FilePermissionItem();
item.setUuid(demand.getUuid());
Map<Long, Byte> userPermissions = new HashMap<>();
userPermissions.put(currentUserId, FilePermissionEnum.BASE.getValue());
item.setUserPermissions(userPermissions);
filePermissions.add(item);
}
}
}
batchUpdatePermission(filePermissions);
@@ -3786,14 +3789,17 @@ public class TaskServiceImpl implements ITaskService {
}
// 设置任务执行人对关联的需求文件夹设置权限
if (StringUtils.isNotEmpty(task.getDemandId())) {
SpdmDemandVo demand = demandMapper.getDemandListById(Collections.singletonList(task.getDemandId())).get(0);
for (Long currentUserId : currentUserIdList) {
BatchUpdatePermissionReq.FilePermissionItem item = new BatchUpdatePermissionReq.FilePermissionItem();
item.setUuid(demand.getUuid());
Map<Long, Byte> userPermissions = new HashMap<>();
userPermissions.put(currentUserId, FilePermissionEnum.BASE.getValue());
item.setUserPermissions(userPermissions);
filePermissions.add(item);
List<SpdmDemandVo> demandVoList = demandMapper.getDemandListById(Collections.singletonList(task.getDemandId()));
if (CollectionUtils.isNotEmpty(demandVoList)) {
SpdmDemandVo demand = demandVoList.get(0);
for (Long currentUserId : currentUserIdList) {
BatchUpdatePermissionReq.FilePermissionItem item = new BatchUpdatePermissionReq.FilePermissionItem();
item.setUuid(demand.getUuid());
Map<Long, Byte> userPermissions = new HashMap<>();
userPermissions.put(currentUserId, FilePermissionEnum.BASE.getValue());
item.setUserPermissions(userPermissions);
filePermissions.add(item);
}
}
}
batchUpdatePermission(filePermissions);