提交 13f136f6 authored 作者: zhouzhigang's avatar zhouzhigang

经销商订单导出

上级 0578f8fd
......@@ -801,6 +801,9 @@ public class FgOrderServiceImpl extends BaseModelServiceImpl<Order,Integer> impl
public void excelExport(List<OrderInfoVo> list, HttpServletRequest request,
HttpServletResponse response) throws Exception {
if(list.size() == 0 || ArrayUtils.empty(list)){
throw new BaseException("订单列表中的订单没有对应班级");
}
//获取导出数据
List<ExportClassNameVo> classNameList = list.stream().map(v ->{
ExportClassNameVo vo = new ExportClassNameVo();
......@@ -809,9 +812,7 @@ public class FgOrderServiceImpl extends BaseModelServiceImpl<Order,Integer> impl
return vo;
}).distinct().collect(Collectors.toList());//班级名称列表作为excel中sheet0导出
if(classNameList.size() == 0 || ArrayUtils.empty(classNameList)){
throw new BaseException("订单列表中的订单没有对应班级");
}
Map<String,List<OrderInfoVo>> map = list.stream().collect(Collectors.groupingBy(OrderInfoVo::getClassName));//以班级名称进行分组,将对应班级下的教材以sheet导出,班级名称作为sheet名称
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论