文档库--多选日期
This commit is contained in:
+13
@@ -576,8 +576,21 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
public List<Map<String, Object>> getDocumentInfoById(String id, String cut) {
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BussDocumentLibraryEO::getId, id);
|
||||
//字段属性
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
|
||||
List<OnlCgformField> onlCgformFieldDateMoreList = fieldList.stream().filter(e -> FieldTypeEnum.DATE_MORE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
List<String> dateMoreList = onlCgformFieldDateMoreList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||
//通过id查询数据
|
||||
List<Map<String, Object>> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id);
|
||||
//处理多选日期
|
||||
for (Map.Entry<String, Object> entry : dataList.get(0).entrySet()) {
|
||||
String key = entry.getKey();
|
||||
if(dateMoreList.contains(key) && ObjectUtils.isNotEmpty(entry.getValue())){
|
||||
String value = (String) entry.getValue();
|
||||
entry.setValue(Arrays.asList(value.split(",")));
|
||||
}
|
||||
}
|
||||
|
||||
//查询所有
|
||||
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(null);
|
||||
//对应标准id
|
||||
|
||||
Reference in New Issue
Block a user