|
@@ -19,6 +19,7 @@ import thyyxxk.webserver.utils.StringUtil;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Comparator;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -118,9 +119,10 @@ public class HighReportService {
|
|
|
|
|
|
// 组装表头
|
|
|
List<HeadInfo> headInfoList = calHeadList(report.getTableDisplays());
|
|
|
+ List<HeadInfo> sortHeadInfo = headInfoList.stream().sorted(Comparator.comparing(HeadInfo::getSort)).collect(Collectors.toList());
|
|
|
|
|
|
// 导出
|
|
|
- ExcelUtil.exportExcelReport(response, list, headInfoList, exportName);
|
|
|
+ ExcelUtil.exportExcelReport(response, list, sortHeadInfo, exportName);
|
|
|
|
|
|
map.put("code", 0);
|
|
|
map.put("massage", "导出成功!");
|
|
@@ -155,14 +157,17 @@ public class HighReportService {
|
|
|
if(StringUtil.notBlank(pid) && id.equals(pid)){
|
|
|
headInfo.setDisplay(table.getLabel());
|
|
|
headInfo.setName(table.getProp());
|
|
|
+ headInfo.setSort(table.getSort());
|
|
|
} else if(StringUtil.notBlank(pid) && !id.equals(pid)){
|
|
|
HeadInfo headInfoChild = new HeadInfo();
|
|
|
headInfoChild.setDisplay(table.getLabel());
|
|
|
headInfoChild.setName(table.getProp());
|
|
|
+ headInfoChild.setSort(table.getSort());
|
|
|
headInfoChildrenList.add(headInfoChild);
|
|
|
} else {
|
|
|
headInfo.setDisplay(table.getLabel());
|
|
|
headInfo.setName(table.getProp());
|
|
|
+ headInfo.setSort(table.getSort());
|
|
|
}
|
|
|
}
|
|
|
if(headInfoChildrenList.size() > 0){
|