Merge remote-tracking branch 'origin/dev_PMS' into dev_PMS
This commit is contained in:
commit
bc00c8b2ce
|
@ -209,6 +209,7 @@ public class PmsCommonAsyncServiceImpl implements IPmsCommonAsyncService {
|
|||
@Override
|
||||
public void syncGitlinkOrganizationUserToPmsEnterprise(Long enterpriseId, List<GitLinkUserToEnterpriseInputVo> gitLinkUserToEnterpriseInputVoList) {
|
||||
PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseById(enterpriseId);
|
||||
try {
|
||||
pmsEnterpriseService.increaseOpenEnterpriseProcessCount(pmsEnterprise.getGitlinkOrgId());
|
||||
// 获取组织下所有团队
|
||||
List<GitlinkOrganizationTeamVo> gitlinkOrganizationTeamVoList = pmsCommonService.getAllGitlinkOrgTeams(pmsEnterprise.getGitlinkOrgId());
|
||||
|
@ -253,13 +254,18 @@ public class PmsCommonAsyncServiceImpl implements IPmsCommonAsyncService {
|
|||
for (GitlinkOrganizationTeamVo gitlinkOrganizationTeamVo : gitlinkOrganizationTeamVoList) {
|
||||
gitLinkRequestHelper.doDelete(PmsGitLinkRequestUrl.DELETE_ORGANIZATION_TEAM(pmsEnterprise.getGitlinkOrgId(), gitlinkOrganizationTeamVo.getId()));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("同步Gitlink组织用户到企业失败:{0}", e);
|
||||
} finally {
|
||||
pmsEnterpriseService.decreaseOpenEnterpriseProcessCount(pmsEnterprise.getGitlinkOrgId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Async
|
||||
public void syncInitPmsEnterpriseData(Long id, Long creatorGitLinkUserId) {
|
||||
PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseById(id);
|
||||
try {
|
||||
pmsEnterpriseService.increaseOpenEnterpriseProcessCount(pmsEnterprise.getGitlinkOrgId());
|
||||
Long pmsProjectId = initializePmsProject(id, creatorGitLinkUserId);
|
||||
initializePmsProjectIssues(pmsProjectId, creatorGitLinkUserId);
|
||||
|
@ -267,9 +273,14 @@ public class PmsCommonAsyncServiceImpl implements IPmsCommonAsyncService {
|
|||
Long pmsTestcaseId = initializePmsTestcase(pmsProjectId, creatorGitLinkUserId);
|
||||
Long pmsTestSheetId = initializePmsTestSheet(pmsProjectId, creatorGitLinkUserId, pmsProjectSprintId, pmsTestcaseId);
|
||||
initializePmsTestReport(pmsProjectId, pmsTestSheetId);
|
||||
} catch (Exception e) {
|
||||
logger.error("初始化企业数据失败:{0}", e);
|
||||
} finally {
|
||||
pmsEnterpriseService.decreaseOpenEnterpriseProcessCount(pmsEnterprise.getGitlinkOrgId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initializePmsTestReport(Long pmsProjectId, Long pmsTestSheetId) {
|
||||
PmsProjectTestReportInputVo pmsProjectTestReportInputVo = new PmsProjectTestReportInputVo();
|
||||
String name = "测试报告";
|
||||
|
|
|
@ -265,11 +265,11 @@ public class PmsEnterpriseServiceImpl implements IPmsEnterpriseService {
|
|||
}
|
||||
|
||||
private String createEnterprise(PmsEnterprise pmsEnterpriseInput, List<GitLinkUserToEnterpriseInputVo> gitLinkUserToEnterpriseInputVoList) {
|
||||
increaseOpenEnterpriseProcessCount(pmsEnterpriseInput.getGitlinkOrgId());
|
||||
// 当前会话中忽略数据权限校验
|
||||
SecurityUtils.setIgnoreDataScopeCheck();
|
||||
checkPmsEnterprise(pmsEnterpriseInput);
|
||||
try {
|
||||
increaseOpenEnterpriseProcessCount(pmsEnterpriseInput.getGitlinkOrgId());
|
||||
// 基于企业信息在若依下新建部门
|
||||
Long deptId = FeignUtils.getReturnData(remoteDeptService.addDeptByPmsEnterprise(pmsEnterpriseInput.getEnterpriseName(), SecurityConstants.INNER));
|
||||
pmsEnterpriseInput.setDeptId(deptId);
|
||||
|
|
|
@ -125,7 +125,7 @@ public class PmsProjectController extends BaseController
|
|||
return toAjax(pmsProjectService.editProjectNotice(pmsProjectNoticeUpdateVo));
|
||||
}
|
||||
|
||||
@RequiresPermissions(value = {"system:notice:query", "pms:pmsProject:noticeManage"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"system:notice:query", "pms:pmsProject:noticeManage", "pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
|
||||
@GetMapping("/getNotice/{noticeId}")
|
||||
@ApiOperation(value = "获取项目公告详情")
|
||||
public AjaxResult getProjectNotice( @PathVariable Long noticeId) {
|
||||
|
|
Loading…
Reference in New Issue