导出
This commit is contained in:
@ -1,33 +1,27 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.customizeExcel;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
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;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.business.vo.BusinessPageReqVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.business.vo.BusinessRespVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo.OrderExcelVO;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.business.BusinessDO;
|
||||
import cn.iocoder.yudao.module.member.service.business.BusinessService;
|
||||
import cn.iocoder.yudao.module.member.service.customizeExcel.CustomizeExcelService;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.converters.longconverter.LongStringConverter;
|
||||
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
|
||||
@ -51,5 +45,6 @@ public class CustomizeExcelController {
|
||||
ExcelUtils.write(response, "订单详情统计.xls", "数据", OrderExcelVO.class,
|
||||
orderExcelVOS);
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.customizeExcel.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.format.NumberFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@ -21,18 +22,21 @@ public class OrderExcelVO {
|
||||
private String timeSlot;
|
||||
|
||||
@ExcelProperty("总价")
|
||||
@NumberFormat("#0.00")
|
||||
private BigDecimal totalMoney;
|
||||
|
||||
@ExcelProperty("菜名")
|
||||
private String dishesName;
|
||||
|
||||
@ExcelProperty("单价(元/50g)")
|
||||
@NumberFormat("#0.00")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ExcelProperty("重量(g)")
|
||||
private String weight;
|
||||
|
||||
@ExcelProperty("价格(元)")
|
||||
@NumberFormat("#0.00")
|
||||
private BigDecimal price;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user