fix(项目管理产品需求重构): 完善需求规格逻辑

查询需求规格详情时需查询项目计划,不校验用户的数据权限

Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
OTTO 2024-12-16 09:30:06 +08:00
parent 55c0d58722
commit f4bbc53d65
2 changed files with 12 additions and 1 deletions

View File

@ -643,7 +643,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
productReqSpecsDetailVo.setProject(pmsProjectService.selectPmsProjectByIdNoCheckRole(pmsProductRequirement.getPmsProjectId()));
if (pmsProductRequirement.getProjectReqId() != null) {
productReqSpecsDetailVo.setProjectIssue(
pmsProjectIssuesService.selectPmsProjectIssueById(pmsProductRequirement.getProjectReqId(), pmsProductRequirement.getPmsProjectId()));
pmsProjectIssuesService.selectPmsProjectIssueByIdNoCheckRole(pmsProductRequirement.getProjectReqId(), pmsProductRequirement.getPmsProjectId()));
}
}
productReqSpecsDetailVo.setCreateBy(pmsCommonService.getSimpleSysUserByUsername(pmsProductRequirement.getCreateBy()));

View File

@ -171,6 +171,17 @@ public class PmsProjectIssuesService {
}
}
public JSONObject selectPmsProjectIssueByIdNoCheckRole(Long id, Long pmProjectId) {
PmsProject pmsProject = pmsProjectService.selectPmsProjectByIdNoCheckRole(pmProjectId);
try {
JSONObject result = setProjectIssueUserState(gitLinkRequestHelper.doGet(PmsGitLinkRequestUrl.GET_ISSUE(id, pmProjectId)));
result.put("pm_project_name", pmsProject.getProjectName());
return result;
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
}
private JSONObject setProjectIssueUserState(JSONObject issueResult) {
HashMap<Long, String> gitlinkUserNickNameMap = new HashMap<>();