fix(88791): 标准拆分--编辑--导出--数据有问题

This commit is contained in:
yjz
2024-08-16 22:21:37 +08:00
parent b86acb17bf
commit c9e6b686d1
@@ -3915,6 +3915,11 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
.filter(e -> FieldTypeEnum.PERSON.getValue().equals(e.getFieldShowType()))
.collect(Collectors.toList());
List<String> fieldPersonList = onlCgformFieldPersonList.stream().map(LawsTag::getDbFieldName).collect(Collectors.toList());
// 部门选择
List<LawsTag> onlCgformFieldDepartList = fieldList.stream()
.filter(e -> FieldTypeEnum.GROUP_MANY.getValue().equals(e.getFieldShowType()))
.collect(Collectors.toList());
List<String> fieldDepartList = onlCgformFieldDepartList.stream().map(LawsTag::getDbFieldName).collect(Collectors.toList());
// 标准选择
List<LawsTag> onlCgformFieldStanList = fieldList.stream()
.filter(e -> FieldTypeEnum.STANDARD.getValue().equals(e.getFieldShowType()))
@@ -3950,7 +3955,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
.filter(e -> entry.getKey().equals(e.getDbFieldName()) && !FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType()))
.collect(Collectors.toList());
// 特殊翻译
if (entry.getKey().equals("applicable_components")){
if (entry.getKey().equals("part_name")){
String applicableComponents = (String) entry.getValue();
List<PartName> partNames = IPartNameService.queryEcho(applicableComponents);
entry.setValue(partNames.stream().map(PartName::getName).collect(Collectors.joining(",")));
@@ -3985,6 +3990,18 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
entry.setValue(value);
}
}
// 部门选择
if(fieldDepartList.contains(entry.getKey()) && StringUtils.isNotBlank((String)entry.getValue())) {
List<SysDepart> sysDepartList = sysDepartService.listByIds(Arrays.asList(entry.getValue().toString().split(",")));
if(CollectionUtil.isNotEmpty(sysDepartList)){
StringBuilder stringBuilder = new StringBuilder();
for(SysDepart sysDepart : sysDepartList){
stringBuilder.append(sysDepart.getDepartName()).append(",");
}
String value = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
entry.setValue(value);
}
}
}
}
return itemsDataForExport;