Commit 5d39036d authored by 韩桐桐's avatar 韩桐桐

导出BUGFIX

parent 97218446
...@@ -333,15 +333,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -333,15 +333,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String fieldName = field.getName(); String fieldName = field.getName();
field.setAccessible(true); field.setAccessible(true);
String underscoreFieldName = StringUtils.camelToUnderline(fieldName).toUpperCase(); String underscoreFieldName = StringUtils.camelToUnderline(fieldName).toUpperCase();
Object value; Object value = null;
try { try {
value = field.get(object); value = field.get(object);
// 需要转为jsonArray的字段 // 需要转为jsonArray的字段
if (!ValidationUtil.isEmpty(strToJsonArrayFields) && Arrays.asList(strToJsonArrayFields).contains(underscoreFieldName) && value instanceof String) { if (!ValidationUtil.isEmpty(strToJsonArrayFields) && Arrays.asList(strToJsonArrayFields).contains(underscoreFieldName) && value instanceof String) {
value = JSON.parse((String) field.get(object)); value = JSON.parse((String) field.get(object));
} }
} catch (IllegalAccessException e) { } catch (Exception e) {
throw new RuntimeException(e); log.warn("JSON转化失败:{}",e.getMessage());
} }
if (!ValidationUtil.isEmpty(value)) { if (!ValidationUtil.isEmpty(value)) {
result.put(underscoreFieldName.toUpperCase(), value); result.put(underscoreFieldName.toUpperCase(), value);
......
...@@ -844,7 +844,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService { ...@@ -844,7 +844,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
int totalPage = (int) Math.ceil((double) pageResult.getTotal() / PAGE_SIZE); int totalPage = (int) Math.ceil((double) pageResult.getTotal() / PAGE_SIZE);
List<CompletableFuture<List<String>>> futures = new ArrayList<>(); List<CompletableFuture<List<String>>> futures = new ArrayList<>();
List<String> idsCollected = pageResult.getRecords().stream() List<String> idsCollected = pageResult.getRecords().stream()
.map(item -> isAdmin ? item.getOrDefault("uid", null) : item.getOrDefault("sequenceNbr", null)) .map(item -> item.getOrDefault("sequenceNbr", null))
.filter(Objects::nonNull) .filter(Objects::nonNull)
.map(String::valueOf) .map(String::valueOf)
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -857,7 +857,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService { ...@@ -857,7 +857,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
tcmServiceFeignClient.page(String.valueOf(pageIndex), String.valueOf(PAGE_SIZE), null, map); tcmServiceFeignClient.page(String.valueOf(pageIndex), String.valueOf(PAGE_SIZE), null, map);
Page<Map<String, String>> resultPage = page1.getResult(); Page<Map<String, String>> resultPage = page1.getResult();
return resultPage.getRecords().stream() return resultPage.getRecords().stream()
.map(item -> isAdmin ? item.getOrDefault("uid", null) : item.getOrDefault("sequenceNbr", null)) .map(item -> item.getOrDefault("sequenceNbr", null))
.filter(Objects::nonNull) .filter(Objects::nonNull)
.map(String::valueOf) .map(String::valueOf)
.collect(Collectors.toList()); .collect(Collectors.toList());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment