use of io.choerodon.agile.api.vo.LookupTypeWithValuesVO in project agile-service by open-hand.
the class LookupValueServiceImpl method queryConstraintLookupValue.
@Override
public LookupTypeWithValuesVO queryConstraintLookupValue() {
LookupTypeWithValuesDTO typeWithValues = lookupValueMapper.queryLookupValueByCode("constraint");
LookupTypeWithValuesVO result = modelMapper.map(typeWithValues, LookupTypeWithValuesVO.class);
result.setLookupValues(modelMapper.map(typeWithValues.getLookupValues(), new TypeToken<List<LookupValueVO>>() {
}.getType()));
return result;
}
use of io.choerodon.agile.api.vo.LookupTypeWithValuesVO in project agile-service by open-hand.
the class LookupValueServiceImpl method queryLookupValueByCode.
@Override
public LookupTypeWithValuesVO queryLookupValueByCode(String typeCode, Long projectId) {
LookupTypeWithValuesDTO typeWithValues = lookupValueMapper.queryLookupValueByCode(typeCode);
if (LookupType.CONTEXT.equals(typeCode) && !ObjectUtils.isEmpty(projectId)) {
List<LookupValueDTO> backlogs = filterBacklog(projectId, typeWithValues);
List<LookupValueDTO> lookupValues = filterProjectType(projectId, typeWithValues);
lookupValues.addAll(backlogs);
typeWithValues.setLookupValues(lookupValues);
}
LookupTypeWithValuesVO result = modelMapper.map(typeWithValues, new TypeToken<LookupTypeWithValuesVO>() {
}.getType());
result.setLookupValues(modelMapper.map(typeWithValues.getLookupValues(), new TypeToken<List<LookupValueVO>>() {
}.getType()));
return result;
}
Aggregations