use of io.choerodon.agile.infra.statemachineclient.dto.InputDTO in project agile-service by open-hand.
the class IssueServiceImpl method updateIssueStatusWithoutRuleNotice.
@Override
public IssueVO updateIssueStatusWithoutRuleNotice(Long projectId, Long issueId, Long transformId, Long objectVersionNumber, String applyType, IssueDTO triggerIssue, boolean autoTranferFlag) {
Set<Long> influenceIssueIds = new HashSet<>();
IssueVO result = doStateMachineTransformAndCustomFlow(projectId, issueId, applyType, influenceIssueIds, new TriggerCarrierVO(), false, transformId, new InputDTO(issueId, "updateStatus", updateTrigger(autoTranferFlag, triggerIssue)));
if (backlogExpandService != null) {
backlogExpandService.changeDetection(issueId, projectId, ConvertUtil.getOrganizationId(projectId));
}
IssueVO issueVO = queryIssueByUpdate(projectId, issueId, Collections.singletonList(STATUS_ID));
issueVO.setInfluenceIssueIds(new ArrayList<>(influenceIssueIds));
if (result != null) {
issueVO.setErrorMsg(result.getErrorMsg());
}
return issueVO;
}
use of io.choerodon.agile.infra.statemachineclient.dto.InputDTO in project agile-service by open-hand.
the class BoardServiceImpl method move.
@Override
public IssueMoveVO move(Long projectId, Long issueId, Long transformId, IssueMoveVO issueMoveVO, Boolean isDemo) {
// 执行状态机转换
IssueDTO preIssueDTO = issueMapper.selectByPrimaryKey(issueId);
if (preIssueDTO == null) {
throw new CommonException("error.issue.notFound");
}
Long preStatusId = preIssueDTO.getStatusId();
Long nowStatusId = issueMoveVO.getStatusId();
InputDTO inputDTO = new InputDTO(issueId, UPDATE_STATUS_MOVE, JSON.toJSONString(handleIssueMoveRank(projectId, issueMoveVO)));
Set<Long> influenceIssueIds = new HashSet<>();
IssueVO issueVO = issueService.doStateMachineCustomFlowAndRuleNotice(projectId, issueId, SchemeApplyType.AGILE, influenceIssueIds, isDemo, transformId, inputDTO);
IssueDTO issueDTO = issueMapper.selectByPrimaryKey(issueId);
if (backlogExpandService != null) {
backlogExpandService.changeDetection(issueId, projectId, ConvertUtil.getOrganizationId(projectId));
}
IssueMoveVO result = modelMapper.map(issueDTO, IssueMoveVO.class);
if (!preStatusId.equals(nowStatusId)) {
sendMsgUtil.sendMsgByIssueMoveComplete(projectId, issueMoveVO, issueDTO, DetailsHelper.getUserDetails().getUserId());
}
if (!ObjectUtils.isEmpty(issueVO)) {
result.setErrorMsg(issueVO.getErrorMsg());
}
return result;
}
Aggregations