文档库--详情(标准类型字段)
This commit is contained in:
+356
-132
@@ -726,6 +726,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getInfoById(String id, String cut) {
|
||||
//字段属性
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
//标准选择字段
|
||||
List<OnlCgformField> standardOnlCgformFieldList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.STANDARD.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
List<String> standFieldList = standardOnlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||
//通过id查询数据
|
||||
List<Map<String, Object>> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id);
|
||||
|
||||
@@ -738,129 +744,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//查询所有
|
||||
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(null);
|
||||
|
||||
//原始对应标准,代替标准,被代替标准(原始数据存的是iD)
|
||||
String correspondingStandardId = "";
|
||||
String replaceStandardId = "";//代替标准
|
||||
if (!dataList.isEmpty()) {
|
||||
correspondingStandardId = (String) dataList.get(0).get("corresponding_standard");//对应标准
|
||||
replaceStandardId = (String) dataList.get(0).get("replace_standard");//代替标准
|
||||
}
|
||||
|
||||
//被代替标准
|
||||
List<String> replacedStandardIdList = new ArrayList<>();//代替标准
|
||||
|
||||
//对应标准,代替标准,被代替标准对应的编码
|
||||
List<String> correspondingStandardNameList = new ArrayList<>();//对应标准编码
|
||||
List<String> replaceStandardNameList = new ArrayList<>();//代替标准编码
|
||||
List<String> replacedStandardNameList = new ArrayList<>();//被代替标准编码
|
||||
|
||||
List<Map<String, Object>> listCorrespondingStandard = new ArrayList<>();
|
||||
List<Map<String, Object>> listReplaceStandard = new ArrayList<>();
|
||||
List<Map<String, Object>> listReplacedStandard = new ArrayList<>();
|
||||
|
||||
|
||||
//处理被代替标准和对应标准
|
||||
for (Map<String, Object> map : mapList) {
|
||||
Map<String, Object> stringObjectMap = new HashMap<>();
|
||||
//对应标准处理
|
||||
if (StringUtils.isNotBlank(correspondingStandardId) && correspondingStandardId.contains((String) map.get("id"))) {
|
||||
for (String s : correspondingStandardId.split(",")) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
if (s.equals((String) map.get("id"))) {
|
||||
correspondingStandardNameList.add((String) map.get("serial_number"));
|
||||
mapTemp.put("title", (String) map.get("serial_number"));
|
||||
mapTemp.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listCorrespondingStandard.add(mapTemp);
|
||||
}
|
||||
} else {
|
||||
boolean flag = isId(s);
|
||||
if (!flag && !correspondingStandardNameList.contains(s)) {
|
||||
correspondingStandardNameList.add(s);
|
||||
mapTemp.put("title", s);
|
||||
mapTemp.put("id", "");
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listCorrespondingStandard.add(mapTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(correspondingStandardId)) {
|
||||
for (String s : correspondingStandardId.split(",")) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
boolean flag = isId(s);
|
||||
if (!flag && !correspondingStandardNameList.contains(s)) {
|
||||
correspondingStandardNameList.add(s);
|
||||
mapTemp.put("title", s);
|
||||
mapTemp.put("id", "");
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listCorrespondingStandard.add(mapTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//代替标准
|
||||
if (StringUtils.isNotBlank(replaceStandardId) && replaceStandardId.contains((String) map.get("id"))) {
|
||||
for (String s : replaceStandardId.split(",")) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
if (s.equals((String) map.get("id"))) {
|
||||
replaceStandardNameList.add((String) map.get("serial_number"));
|
||||
mapTemp.put("title", (String) map.get("serial_number"));
|
||||
mapTemp.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listReplaceStandard.add(mapTemp);
|
||||
}
|
||||
} else {
|
||||
boolean flag = isId(s);
|
||||
if (!flag && !replaceStandardNameList.contains(s)) {
|
||||
replaceStandardNameList.add(s);
|
||||
mapTemp.put("title", s);
|
||||
mapTemp.put("id", "");
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listReplaceStandard.add(mapTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(replaceStandardId)) {
|
||||
for (String s : replaceStandardId.split(",")) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
boolean flag = isId(s);
|
||||
if (!flag && !replaceStandardNameList.contains(s)) {
|
||||
replaceStandardNameList.add(s);
|
||||
mapTemp.put("title", s);
|
||||
mapTemp.put("id", "");
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listReplaceStandard.add(mapTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//被代替标准
|
||||
String replaceStandard = (String) map.get("replace_standard");
|
||||
if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains(id)) {
|
||||
replacedStandardIdList.add((String) map.get("id"));
|
||||
String serialNumber = (String) map.get("serial_number");
|
||||
replacedStandardNameList.add(serialNumber);
|
||||
stringObjectMap.put("title", (String) map.get("serial_number"));
|
||||
stringObjectMap.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(stringObjectMap)) {
|
||||
listReplacedStandard.add(stringObjectMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//区域管理
|
||||
OnlCgformArea onlCgformArea = new OnlCgformArea();
|
||||
onlCgformArea.setIsModel(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
List<OnlCgformArea> areaList = onlCgformAreaServiceImpl.queryList(onlCgformArea);
|
||||
//字段属性
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
|
||||
|
||||
//过滤出下拉选
|
||||
List<OnlCgformField> onlCgformFieldList = fieldList.stream()
|
||||
@@ -1005,22 +892,34 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
} else {
|
||||
//处理字段类型为文件之外的字段
|
||||
if (dataList.size() != 0) {
|
||||
List<String> standardNameList = new ArrayList<>();//对应标准编码
|
||||
List<Map<String, Object>> listStandard = new ArrayList<>();
|
||||
String finalValue = value;
|
||||
dataList.get(0).entrySet().forEach(entry -> {
|
||||
if (onlCgformField.getDbFieldName().equals(entry.getKey())) {
|
||||
if (onlCgformField.getDbFieldName().equals("replace_standard")) {
|
||||
//代替标准
|
||||
map.put("value", StringUtils.join(replaceStandardNameList, ","));
|
||||
map.put("list", listReplaceStandard);
|
||||
} else if (onlCgformField.getDbFieldName().equals("replaced_standard")) {
|
||||
//被代替标准
|
||||
map.put("value", StringUtils.join(replacedStandardNameList, ","));
|
||||
map.put("list", listReplacedStandard);
|
||||
} else if (onlCgformField.getDbFieldName().equals("corresponding_standard")) {
|
||||
//对应标准
|
||||
map.put("value", StringUtils.join(correspondingStandardNameList, ","));
|
||||
map.put("list", listCorrespondingStandard);
|
||||
} else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||
//标准类型字段处理
|
||||
if(standFieldList.contains(entry.getKey())){
|
||||
if(ObjectUtils.isNotEmpty(entry.getValue())){
|
||||
for (Map<String, Object> map1 : mapList) {
|
||||
//对应标准处理
|
||||
if (ObjectUtils.isNotEmpty(entry.getValue())) {
|
||||
for (String s : entry.getValue().toString().split(",")) {
|
||||
Map<String, Object> mapTemp1 = new HashMap<>();
|
||||
if (s.equals((String) map1.get("serial_number"))) {
|
||||
standardNameList.add((String) map1.get("serial_number"));
|
||||
mapTemp1.put("title", (String) map1.get("serial_number"));
|
||||
mapTemp1.put("id", (String) map1.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(mapTemp1)) {
|
||||
listStandard.add(mapTemp1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("value", entry.getValue().toString());
|
||||
map.put("list", listStandard);
|
||||
}
|
||||
}else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||
map.put("value", finalValue);
|
||||
} else {
|
||||
map.put("value", entry.getValue());
|
||||
@@ -1050,6 +949,331 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// public List<Map<String, Object>> getInfoById(String id, String cut) {
|
||||
// //通过id查询数据
|
||||
// List<Map<String, Object>> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id);
|
||||
//
|
||||
// List<Map<String, Object>> result = new ArrayList<>(); // 要返回的结果
|
||||
// if (dataList.isEmpty()){
|
||||
// // 取不到数据,直接返回空结果
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// //查询所有
|
||||
// List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(null);
|
||||
//
|
||||
// //原始对应标准,代替标准,被代替标准(原始数据存的是iD)
|
||||
// String correspondingStandardId = "";
|
||||
// String replaceStandardId = "";//代替标准
|
||||
// if (!dataList.isEmpty()) {
|
||||
// correspondingStandardId = (String) dataList.get(0).get("corresponding_standard");//对应标准
|
||||
// replaceStandardId = (String) dataList.get(0).get("replace_standard");//代替标准
|
||||
// }
|
||||
//
|
||||
// //被代替标准
|
||||
// List<String> replacedStandardIdList = new ArrayList<>();//代替标准
|
||||
//
|
||||
// //对应标准,代替标准,被代替标准对应的编码
|
||||
// List<String> correspondingStandardNameList = new ArrayList<>();//对应标准编码
|
||||
// List<String> replaceStandardNameList = new ArrayList<>();//代替标准编码
|
||||
// List<String> replacedStandardNameList = new ArrayList<>();//被代替标准编码
|
||||
//
|
||||
// List<Map<String, Object>> listCorrespondingStandard = new ArrayList<>();
|
||||
// List<Map<String, Object>> listReplaceStandard = new ArrayList<>();
|
||||
// List<Map<String, Object>> listReplacedStandard = new ArrayList<>();
|
||||
//
|
||||
//
|
||||
// //处理被代替标准和对应标准
|
||||
// for (Map<String, Object> map : mapList) {
|
||||
// Map<String, Object> stringObjectMap = new HashMap<>();
|
||||
// //对应标准处理
|
||||
// if (StringUtils.isNotBlank(correspondingStandardId) && correspondingStandardId.contains((String) map.get("id"))) {
|
||||
// for (String s : correspondingStandardId.split(",")) {
|
||||
// Map<String, Object> mapTemp = new HashMap<>();
|
||||
// if (s.equals((String) map.get("id"))) {
|
||||
// correspondingStandardNameList.add((String) map.get("serial_number"));
|
||||
// mapTemp.put("title", (String) map.get("serial_number"));
|
||||
// mapTemp.put("id", (String) map.get("id"));
|
||||
// if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
// listCorrespondingStandard.add(mapTemp);
|
||||
// }
|
||||
// } else {
|
||||
// boolean flag = isId(s);
|
||||
// if (!flag && !correspondingStandardNameList.contains(s)) {
|
||||
// correspondingStandardNameList.add(s);
|
||||
// mapTemp.put("title", s);
|
||||
// mapTemp.put("id", "");
|
||||
// if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
// listCorrespondingStandard.add(mapTemp);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isNotBlank(correspondingStandardId)) {
|
||||
// for (String s : correspondingStandardId.split(",")) {
|
||||
// Map<String, Object> mapTemp = new HashMap<>();
|
||||
// boolean flag = isId(s);
|
||||
// if (!flag && !correspondingStandardNameList.contains(s)) {
|
||||
// correspondingStandardNameList.add(s);
|
||||
// mapTemp.put("title", s);
|
||||
// mapTemp.put("id", "");
|
||||
// if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
// listCorrespondingStandard.add(mapTemp);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// //代替标准
|
||||
// if (StringUtils.isNotBlank(replaceStandardId) && replaceStandardId.contains((String) map.get("id"))) {
|
||||
// for (String s : replaceStandardId.split(",")) {
|
||||
// Map<String, Object> mapTemp = new HashMap<>();
|
||||
// if (s.equals((String) map.get("id"))) {
|
||||
// replaceStandardNameList.add((String) map.get("serial_number"));
|
||||
// mapTemp.put("title", (String) map.get("serial_number"));
|
||||
// mapTemp.put("id", (String) map.get("id"));
|
||||
// if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
// listReplaceStandard.add(mapTemp);
|
||||
// }
|
||||
// } else {
|
||||
// boolean flag = isId(s);
|
||||
// if (!flag && !replaceStandardNameList.contains(s)) {
|
||||
// replaceStandardNameList.add(s);
|
||||
// mapTemp.put("title", s);
|
||||
// mapTemp.put("id", "");
|
||||
// if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
// listReplaceStandard.add(mapTemp);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// if (StringUtils.isNotBlank(replaceStandardId)) {
|
||||
// for (String s : replaceStandardId.split(",")) {
|
||||
// Map<String, Object> mapTemp = new HashMap<>();
|
||||
// boolean flag = isId(s);
|
||||
// if (!flag && !replaceStandardNameList.contains(s)) {
|
||||
// replaceStandardNameList.add(s);
|
||||
// mapTemp.put("title", s);
|
||||
// mapTemp.put("id", "");
|
||||
// if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
// listReplaceStandard.add(mapTemp);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// //被代替标准
|
||||
// String replaceStandard = (String) map.get("replace_standard");
|
||||
// if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains(id)) {
|
||||
// replacedStandardIdList.add((String) map.get("id"));
|
||||
// String serialNumber = (String) map.get("serial_number");
|
||||
// replacedStandardNameList.add(serialNumber);
|
||||
// stringObjectMap.put("title", (String) map.get("serial_number"));
|
||||
// stringObjectMap.put("id", (String) map.get("id"));
|
||||
// if (ObjectUtils.isNotEmpty(stringObjectMap)) {
|
||||
// listReplacedStandard.add(stringObjectMap);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //区域管理
|
||||
// OnlCgformArea onlCgformArea = new OnlCgformArea();
|
||||
// onlCgformArea.setIsModel(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
// List<OnlCgformArea> areaList = onlCgformAreaServiceImpl.queryList(onlCgformArea);
|
||||
// //字段属性
|
||||
// List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
|
||||
//
|
||||
// //过滤出下拉选
|
||||
// List<OnlCgformField> onlCgformFieldList = fieldList.stream()
|
||||
// .filter(e -> FieldTypeEnum.PULL_SINGLE.getValue().equals(e.getFieldShowType())
|
||||
// || FieldTypeEnum.PULL_MORE.getValue().equals(e.getFieldShowType()))
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// //过滤出树形字段
|
||||
// List<OnlCgformField> treeFieldList = fieldList.stream()
|
||||
// .filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType()))
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// //下拉选字段
|
||||
// List<String> fieldPullList = onlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||
//
|
||||
// //数据字典
|
||||
// List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
//
|
||||
// //树形数据字典
|
||||
// List<SysCategory> categoryList = sysCategoryService.list();
|
||||
// //处理树形数据字典
|
||||
// dataList.get(0).entrySet().forEach(entry -> {
|
||||
// //下拉选处理数据字典
|
||||
// treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
||||
// });
|
||||
//
|
||||
// //下拉单选和下拉多选数据字典处理
|
||||
// List<OnlCgformField> finalFieldList = fieldList;
|
||||
// dataList.get(0).entrySet().forEach(entry -> {
|
||||
// if (fieldPullList.contains(entry.getKey())) {
|
||||
// //下拉选处理数据字典
|
||||
// dictItem(sysDictItems, entry, cut, finalFieldList,null);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// if (fieldList.size() != 0) {
|
||||
// //过滤出表单字段(is_show_form-->表单是否显示0否 1是)
|
||||
// fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList());
|
||||
// }
|
||||
//
|
||||
// for (OnlCgformArea onlCgformAreaTemp : areaList) {
|
||||
// String areaName = "";
|
||||
// if (CutEnum.CN.getValue().equals(cut)) {
|
||||
// areaName = onlCgformAreaTemp.getShowArea();
|
||||
// } else {
|
||||
// areaName = onlCgformAreaTemp.getEnName();
|
||||
// }
|
||||
// Map<String, Object> mapTemp = new HashMap<>();
|
||||
// List<Map<String, Object>> resultTemp = new ArrayList<>();
|
||||
// List<OnlCgformField> fieldListTemp = fieldList.stream().filter(e -> onlCgformAreaTemp.getId().equals(e.getShowArea())).collect(Collectors.toList());
|
||||
// for (OnlCgformField onlCgformField : fieldListTemp) {
|
||||
// //字段
|
||||
// String dbFieldName = onlCgformField.getDbFieldName();
|
||||
// //字段类型
|
||||
// String fieldShowType = onlCgformField.getFieldShowType();
|
||||
// String value = "";
|
||||
// if (FieldTypeEnum.DATE_SINGLE.getValue().equals(fieldShowType)) {
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// if (ObjectUtils.isNotEmpty(dataList.get(0).get(dbFieldName))) {
|
||||
// value = sdf.format(dataList.get(0).get(dbFieldName));
|
||||
// }
|
||||
// } else {
|
||||
// value = String.valueOf(dataList.get(0).get(dbFieldName));
|
||||
// if("null".equals(value)){
|
||||
// value = "";
|
||||
// }
|
||||
// }
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// //处理文件
|
||||
// if (FieldTypeEnum.FILE.getValue().equals(fieldShowType)) {
|
||||
// //处理文本信息和关联信息区域之外的区域中文件类型字段返归结果格式
|
||||
// if(!"文本信息".equals(onlCgformAreaTemp.getShowArea()) && !"关联信息".equals(onlCgformAreaTemp.getShowArea())){
|
||||
// List<OSSFile> fileInfos = iOSSFileService.getFileInfosByConnectId(value);
|
||||
// List<String> fileIdList = fileInfos.stream().map(OSSFile::getId).collect(Collectors.toList());
|
||||
// Map<String, Object> mapNew = new HashMap<>();
|
||||
// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null);
|
||||
// mapNew.put("value",fileIdList);
|
||||
// resultTemp.add(mapNew);
|
||||
// }else{
|
||||
// if (StringUtils.isNotBlank(value)) {
|
||||
// List<OSSFile> fileInfos = iOSSFileService.getFileInfosByConnectId(value);
|
||||
// //多文件处理
|
||||
// if (fileInfos.size() > 1) {
|
||||
// if (fileInfos.size() != 0) {
|
||||
// int i = 0;
|
||||
// for (OSSFile fileInfo : fileInfos) {
|
||||
// if (i == 0) {
|
||||
// Map<String, Object> mapNew = new HashMap<>();
|
||||
// mapNew.put("value", fileInfo);
|
||||
// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null);
|
||||
// mapNew.put("count", fileInfos.size());
|
||||
// // 添加标准分解单跳转
|
||||
// List<SarFileSplitInfoEO> infoEOList = sarFileSplitInfoService.queryByFileId(fileInfo.getId());
|
||||
// if (CollectionUtil.isNotEmpty(infoEOList)) {
|
||||
// mapNew.put("splitFlag", 1);
|
||||
// mapNew.put("splitInfoId", infoEOList.get(0).getId());
|
||||
// } else{
|
||||
// mapNew.put("splitFlag", 0);
|
||||
// }
|
||||
//
|
||||
// resultTemp.add(mapNew);
|
||||
// i++;
|
||||
// } else {
|
||||
// Map<String, Object> mapNew = new HashMap<>();
|
||||
// mapNew.put("value", fileInfo);
|
||||
// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null);
|
||||
// // 添加标准分解单跳转
|
||||
// List<SarFileSplitInfoEO> infoEOList = sarFileSplitInfoService.queryByFileId(fileInfo.getId());
|
||||
// if (CollectionUtil.isNotEmpty(infoEOList)) {
|
||||
// mapNew.put("splitFlag", 1);
|
||||
// mapNew.put("splitInfoId", infoEOList.get(0).getId());
|
||||
// } else{
|
||||
// mapNew.put("splitFlag", 0);
|
||||
// }
|
||||
// resultTemp.add(mapNew);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else if (fileInfos.size() == 1) {
|
||||
// //单个文件处理
|
||||
// Map<String, Object> mapNew = new HashMap<>();
|
||||
// mapNew.put("count", fileInfos.size());
|
||||
// mapNew.put("value", fileInfos.get(0));
|
||||
// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null);
|
||||
// // 添加标准分解单跳转
|
||||
// List<SarFileSplitInfoEO> infoEOList = sarFileSplitInfoService.queryByFileId(fileInfos.get(0).getId());
|
||||
// if (CollectionUtil.isNotEmpty(infoEOList)) {
|
||||
// mapNew.put("splitFlag", 1);
|
||||
// mapNew.put("splitInfoId", infoEOList.get(0).getId());
|
||||
// } else{
|
||||
// mapNew.put("splitFlag", 0);
|
||||
// }
|
||||
// resultTemp.add(mapNew);
|
||||
// }
|
||||
// } else {
|
||||
// Map<String, Object> mapNew = new HashMap<>();
|
||||
// mapNew.put("value", "");
|
||||
// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null);
|
||||
// resultTemp.add(mapNew);
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //处理字段类型为文件之外的字段
|
||||
// if (dataList.size() != 0) {
|
||||
// String finalValue = value;
|
||||
// dataList.get(0).entrySet().forEach(entry -> {
|
||||
// if (onlCgformField.getDbFieldName().equals(entry.getKey())) {
|
||||
// if (onlCgformField.getDbFieldName().equals("replace_standard")) {
|
||||
// //代替标准
|
||||
// map.put("value", StringUtils.join(replaceStandardNameList, ","));
|
||||
// map.put("list", listReplaceStandard);
|
||||
// } else if (onlCgformField.getDbFieldName().equals("replaced_standard")) {
|
||||
// //被代替标准
|
||||
// map.put("value", StringUtils.join(replacedStandardNameList, ","));
|
||||
// map.put("list", listReplacedStandard);
|
||||
// } else if (onlCgformField.getDbFieldName().equals("corresponding_standard")) {
|
||||
// //对应标准
|
||||
// map.put("value", StringUtils.join(correspondingStandardNameList, ","));
|
||||
// map.put("list", listCorrespondingStandard);
|
||||
// } else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||
// map.put("value", finalValue);
|
||||
// } else {
|
||||
// map.put("value", entry.getValue());
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// mapPut(cut, map, "field_show_type",
|
||||
// onlCgformField.getFieldShowType(), "dict_field",
|
||||
// onlCgformField.getDictField(), "db_field_name",
|
||||
// onlCgformField.getDbFieldName(), "db_field_txt",
|
||||
// onlCgformField.getDbFieldTxt(), "db_field_en_name",
|
||||
// onlCgformField.getDbFieldEnName(), "area", areaName, null);
|
||||
// }
|
||||
// if (map.size() != 0) {
|
||||
// resultTemp.add(map);
|
||||
// }
|
||||
// }
|
||||
// if (CutEnum.CN.getValue().equals(cut)) {
|
||||
// areaName = onlCgformAreaTemp.getShowArea();
|
||||
// mapTemp.put(areaName, resultTemp);
|
||||
// } else {
|
||||
// areaName = onlCgformAreaTemp.getEnName();
|
||||
// mapTemp.put(areaName, resultTemp);
|
||||
// }
|
||||
// result.add(mapTemp);
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
private void mapPut(String cut, Map<String, Object> map, String field_show_type,
|
||||
String fieldShowType2, String dict_field, String dictField,
|
||||
|
||||
Reference in New Issue
Block a user