1、bug fix

This commit is contained in:
2026-02-06 18:33:41 +08:00
parent 81324c3229
commit b3cf96c134
5 changed files with 52 additions and 5 deletions

View File

@@ -49,6 +49,12 @@ public class SimulationLyricNodeController {
return lyricInternalService.getTodoList("http");
}
@GetMapping("/optimisedGetTodoList")
@Operation(summary = "获取待办列表(优化版)", description = "获取待办列表(优化版)")
public SdmResponse optimisedGetTodoList() {
return lyricInternalService.optimisedGetTodoList("http");
}
@GetMapping("/getProjectList")
@Operation(summary = "获取项目列表", description = "获取项目列表")
public SdmResponse getProjectList() {

View File

@@ -52,4 +52,5 @@ public interface ILyricInternalService {
SdmResponse listNoPermission(SpdmNodeListReq req);
SdmResponse optimisedGetTodoList(String http);
}

View File

@@ -283,7 +283,21 @@ public class DemandServiceImpl extends BaseService implements IDemandService {
userPermissions.put(member.getUserId(), FilePermissionEnum.BASE.getValue());
});
}
updatePermissionReq.setUserPermissions(userPermissions);
// 仿真负责人还需要对选择的节点有创建和预览权限
UpdatePermissionReq updateNodePermissionReq = new UpdatePermissionReq();
updateNodePermissionReq.setUuid(req.getWorkspaceId());
Map<Long, Byte> userForNodePermissions = new HashMap<>();
if (StringUtils.isNotBlank(pMemberList)) {
String[] pMemberArray = pMemberList.split(",");
for (String pUserId : pMemberArray) {
userForNodePermissions.put(Long.valueOf(pUserId), FilePermissionEnum.ALL_EXCLUDE_DELETE.getValue());
}
updateNodePermissionReq.setUserPermissions(userForNodePermissions);
log.info("创建需求时,更新需求仿真负责人(确认人)工位节点权限的参数为:{}",updateNodePermissionReq);
SdmResponse updateNodePermissionResponse = dataFeignClient.updatePermission(updateNodePermissionReq);
log.info("创建需求时,更新需求仿真负责人(确认人)工位节点权限的返回值为:{}",updateNodePermissionResponse);
}
log.info("创建需求时,更新需求创建人和需求仿真负责人(确认人)权限的参数为:{}",updatePermissionReq);
SdmResponse updatePermissionResponse = dataFeignClient.updatePermission(updatePermissionReq);
log.info("创建需求时,更新需求创建人和需求仿真负责人(确认人)权限的返回值为:{}",updatePermissionResponse);
@@ -1384,6 +1398,22 @@ public class DemandServiceImpl extends BaseService implements IDemandService {
userPermissions.put(member.getUserId(), FilePermissionEnum.BASE.getValue());
});
}
// 仿真负责人还需要对选择的节点有创建和预览权限
UpdatePermissionReq updateNodePermissionReq = new UpdatePermissionReq();
updateNodePermissionReq.setUuid(req.getWorkspaceId());
Map<Long, Byte> userForNodePermissions = new HashMap<>();
if (StringUtils.isNotBlank(pMemberList)) {
String[] pMemberArray = pMemberList.split(",");
for (String pUserId : pMemberArray) {
userForNodePermissions.put(Long.valueOf(pUserId), FilePermissionEnum.ALL_EXCLUDE_DELETE.getValue());
}
updateNodePermissionReq.setUserPermissions(userForNodePermissions);
log.info("创建需求时,更新需求仿真负责人(确认人)工位节点权限的参数为:{}",updateNodePermissionReq);
SdmResponse updateNodePermissionResponse = dataFeignClient.updatePermission(updateNodePermissionReq);
log.info("创建需求时,更新需求仿真负责人(确认人)工位节点权限的返回值为:{}",updateNodePermissionResponse);
}
updatePermissionReq.setUserPermissions(userPermissions);
log.info("创建需求时(无权限校验),更新需求创建人和需求仿真负责人(确认人)权限的参数为:{}",updatePermissionReq);
SdmResponse updatePermissionResponse = dataFeignClient.updatePermission(updatePermissionReq);

View File

@@ -2059,6 +2059,16 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
return SdmResponse.success(jsonObject);
}
@Override
public SdmResponse optimisedGetTodoList(String http) {
// 先查询系统内所有待办
return null;
}
private SdmResponse httpSyncTodoData( List<SimulationNode> projectNodeList,List<LyricVTodoEmulationInfoDM> todoInfoList){
String traceId = MdcUtil.getTraceId();
CompletableFuture<SdmResponse> syncTodoDataFeature = CompletableFuture.supplyAsync(() ->

View File

@@ -3955,10 +3955,6 @@ public class TaskServiceImpl implements ITaskService {
return SdmResponse.failed("编辑仿真执行人失败");
}
}
// 发送消息通知
newUserIdList.forEach(i -> {
sendMessage(MessageTemplateEnum.TASK_ISSUE, req.getNodeName(), String.valueOf(i), taskId);
});
List<BatchUpdatePermissionReq.FilePermissionItem> filePermissions = new ArrayList<>();
BatchUpdatePermissionReq.FilePermissionItem item = new BatchUpdatePermissionReq.FilePermissionItem();
item.setUuid(task.getUuid());
@@ -4066,6 +4062,10 @@ public class TaskServiceImpl implements ITaskService {
}
}
batchUpdatePermission(filePermissions);
// 发送消息通知
newUserIdList.forEach(i -> {
sendMessage(MessageTemplateEnum.TASK_ISSUE, req.getNodeName(), String.valueOf(i), taskId);
});
}
return SdmResponse.success();
}