use of io.choerodon.agile.infra.dto.business.IssueDTO in project agile-service by open-hand.
the class IssueServiceImpl method queryIssueByProjectIdAndIssueId.
@Override
public IssueConvertDTO queryIssueByProjectIdAndIssueId(Long projectId, Long issueId) {
IssueDTO issueDTO = new IssueDTO();
issueDTO.setProjectId(projectId);
issueDTO.setIssueId(issueId);
return modelMapper.map(issueMapper.selectOne(issueDTO), IssueConvertDTO.class);
}
use of io.choerodon.agile.infra.dto.business.IssueDTO in project agile-service by open-hand.
the class IssueServiceImpl method dragEpic.
@Override
public synchronized EpicDataVO dragEpic(Long projectId, EpicSequenceVO epicSequenceVO) {
if (epicSequenceVO.getAfterSequence() == null && epicSequenceVO.getBeforeSequence() == null) {
throw new CommonException("error.dragEpic.noSequence");
}
IssueDTO issueDTO = new IssueDTO();
issueDTO.setIssueId(epicSequenceVO.getEpicId());
issueDTO.setProjectId(projectId);
IssueConvertDTO issueConvertDTO = modelMapper.map(issueMapper.selectOne(issueDTO), IssueConvertDTO.class);
if (issueConvertDTO == null) {
throw new CommonException("error.issue.notFound");
} else {
if (epicSequenceVO.getAfterSequence() == null) {
Integer maxSequence = productVersionMapper.queryMaxAfterSequence(epicSequenceVO.getBeforeSequence(), projectId);
epicSequenceVO.setAfterSequence(maxSequence);
} else if (epicSequenceVO.getBeforeSequence() == null) {
Integer minSequence = productVersionMapper.queryMinBeforeSequence(epicSequenceVO.getAfterSequence(), projectId);
epicSequenceVO.setBeforeSequence(minSequence);
}
handleSequence(epicSequenceVO, projectId, issueConvertDTO);
}
return epicDataAssembler.toTarget(issueMapper.queryEpicListByEpic(epicSequenceVO.getEpicId(), projectId), EpicDataVO.class);
}
use of io.choerodon.agile.infra.dto.business.IssueDTO in project agile-service by open-hand.
the class IssueServiceImpl method buildTriggerCarrierVO.
@Override
public void buildTriggerCarrierVO(Long projectId, Long issueId, List<TriggerCarrierVO> list, List<Long> customFieldIds) {
IssueDTO issueDTO = issueMapper.selectByPrimaryKey(issueId);
if (ObjectUtils.isEmpty(issueDTO)) {
return;
}
TriggerCarrierVO triggerCarrierVO = new TriggerCarrierVO();
triggerCarrierVO.setInstanceId(issueId);
triggerCarrierVO.setProjectId(projectId);
triggerCarrierVO.setIssueTypeId(issueDTO.getIssueTypeId());
triggerCarrierVO.setNoticeInstanceId(issueId);
triggerCarrierVO.setFieldList(new ArrayList<>());
triggerCarrierVO.setExecutedRules(new ArrayList<>());
triggerCarrierVO.setMemberFieldIds(new HashSet<>(customFieldIds));
triggerCarrierVO.setAuditDomain(issueDTO);
list.add(triggerCarrierVO);
}
use of io.choerodon.agile.infra.dto.business.IssueDTO in project agile-service by open-hand.
the class IssueServiceImpl method pagedQueryByOptions.
@Override
public Page<IssueLinkVO> pagedQueryByOptions(Long projectId, PageRequest pageRequest, IssueQueryVO issueQueryVO) {
List<Long> issueIds = issueQueryVO.getIssueIds();
Page emptyPage = PageUtil.emptyPage(pageRequest.getPage(), pageRequest.getSize());
if (ObjectUtils.isEmpty(issueIds)) {
return emptyPage;
}
Page<IssueDTO> result = PageHelper.doPage(pageRequest, () -> issueMapper.listIssueInfoByIssueIds(projectId, issueIds, issueQueryVO));
List<IssueDTO> content = result.getContent();
if (ObjectUtils.isEmpty(content)) {
return emptyPage;
}
List<IssueLinkVO> list = issueAssembler.issueDTOTOVO(projectId, content);
return PageUtils.copyPropertiesAndResetContent(result, list);
}
use of io.choerodon.agile.infra.dto.business.IssueDTO in project agile-service by open-hand.
the class ProjectConfigServiceImpl method checkIssueUse.
private Boolean checkIssueUse(Long projectId, Long issueTypeId, Long statusId) {
if (issueTypeId == 0) {
return false;
}
IssueDTO issueDTO = new IssueDTO();
issueDTO.setProjectId(projectId);
issueDTO.setStatusId(statusId);
issueDTO.setIssueTypeId(issueTypeId);
List<IssueDTO> select = issueMapper.select(issueDTO);
return !CollectionUtils.isEmpty(select);
}
Aggregations