文档库--列表展示(标题)
This commit is contained in:
+23
-1
@@ -488,13 +488,31 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut, String searchFlag) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
String titleEn = "";
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
if ("search".equals(searchFlag)) {
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowSearch()))).collect(Collectors.toList());
|
||||
} else {
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
if(CutEnum.EN.getValue().equals(cut) && "title_en".equals(onlCgformField.getDbFieldName())){
|
||||
titleEn = onlCgformField.getDbFieldEnName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
if(CutEnum.EN.getValue().equals(cut) && "title".equals(onlCgformField.getDbFieldName())){
|
||||
onlCgformField.setDbFieldEnName(titleEn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fieldList = fieldList.stream()
|
||||
.filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))
|
||||
&& !"title_en".equals(e.getDbFieldName()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
//过滤掉英文标题字段
|
||||
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
@@ -3015,6 +3033,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<String> idList = new ArrayList<>();
|
||||
List<String> fileIdLidt = new ArrayList<>();
|
||||
for (Map record : records) {
|
||||
//处理标题
|
||||
if(CutEnum.EN.getValue().equals(cut)){
|
||||
record.put("title",record.get("title_en"));
|
||||
}
|
||||
Map<String, Object> record1 = (Map) record;
|
||||
idList.add((String) record1.get("id"));
|
||||
for (Map.Entry<String, Object> entry : record1.entrySet()) {
|
||||
|
||||
Reference in New Issue
Block a user