提交 037223d2 作者: 925993793@qq.com

专题数据导出时,动态标签bug处理

上级 23f88672
...@@ -518,8 +518,10 @@ public class FileController { ...@@ -518,8 +518,10 @@ public class FileController {
private List<String> supplyHeaders(String[] arr, List<LabelModelVo> labelTypeVos) { private List<String> supplyHeaders(String[] arr, List<LabelModelVo> labelTypeVos) {
List<String> headers = new ArrayList<>(Arrays.asList(arr)); List<String> headers = new ArrayList<>(Arrays.asList(arr));
if (CollectionUtils.isNotEmpty(labelTypeVos)) { if (CollectionUtils.isNotEmpty(labelTypeVos)) {
for (LabelModelVo labelTypeVo : labelTypeVos) { for (int i = 0; i < labelTypeVos.size(); i++) {
LabelModelVo labelTypeVo = labelTypeVos.get(i);
headers.add(labelTypeVo.getLabelName()); headers.add(labelTypeVo.getLabelName());
labelTypeVo.setOrderNo(i);
} }
} }
return headers; return headers;
...@@ -669,7 +671,6 @@ public class FileController { ...@@ -669,7 +671,6 @@ public class FileController {
data.add(sb.substring(1)); data.add(sb.substring(1));
} }
} }
} }
list.add(data); list.add(data);
} }
......
...@@ -48,6 +48,8 @@ public class CommonServiceImpl implements CommonService { ...@@ -48,6 +48,8 @@ public class CommonServiceImpl implements CommonService {
private SubjectKeywordsService subjectKeywordsService; private SubjectKeywordsService subjectKeywordsService;
@Autowired @Autowired
private ObsUtil obsUtil; private ObsUtil obsUtil;
@Autowired
private SubjectDictMapService subjectDictMapService;
@Override @Override
...@@ -299,7 +301,24 @@ public class CommonServiceImpl implements CommonService { ...@@ -299,7 +301,24 @@ public class CommonServiceImpl implements CommonService {
@Override @Override
public List<LabelModelVo> subjectModelBindLabels(List<String> subjectIds) { public List<LabelModelVo> subjectModelBindLabels(List<String> subjectIds) {
return commonMapper.subjectModelBindLabels(subjectIds); Set<LabelModelVo> dataSet = new HashSet<>();
List<DictVO> allList = new ArrayList<>();
for (String subjectId : subjectIds) {
List<DictVO> boundList = subjectDictMapService.boundList(subjectId);
allList.addAll(boundList);
}
for (DictVO dictVO : allList) {
LabelModelVo labelModelVo = new LabelModelVo();
labelModelVo.setLabelName(dictVO.getName());
String labelMark = StringUtils.isEmpty(dictVO.getLabelMark()) ? dictVO.getCode() : dictVO.getLabelMark();
if ("enterprise".equals(labelMark)) {
labelModelVo.setLabelMark("company_label");
} else {
labelModelVo.setLabelMark(labelMark);
}
dataSet.add(labelModelVo);
}
return new ArrayList<>(dataSet);
} }
@Override @Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论