This commit is contained in:
seesaw
2024-10-21 09:25:46 +08:00
parent 880689326b
commit 4a789a967f

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.member.controller.admin.customizeExcel;
import cn.hutool.core.date.DateUtil;
import cn.iocoder.yudao.framework.excel.core.handler.SelectSheetWriteHandler;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
@ -73,6 +74,16 @@ public class CustomizeExcelController {
* @throws IOException
*/
public void exporOrderDate(List<OrderExcelVO> data1,HttpServletResponse response) throws IOException {
data1.forEach(f->
{
f.setDayTime(f.getDayTime().substring(0,10));
if(f.getNickname()==null ){
f.setNickname("null");
}
if(f.getMobile()==null){
f.setMobile("null");
}
});
Map<String, List<OrderExcelVO>> collect = data1.stream().collect(Collectors.groupingBy(OrderExcelVO::getDayTime));
// 按key时间排序将数据按时间顺序放入列表
List<Map.Entry<String, List<OrderExcelVO>>> sortedEntries = collect.entrySet()