mitao
2025-03-27 1f5ef3a86b1227f49c6840b2205174e4ab2f0f14
medicalWaste-system/src/main/java/com/sinata/system/service/impl/MwCheckoutRecordServiceImpl.java
@@ -9,6 +9,7 @@
import com.sinata.common.utils.CollUtils;
import com.sinata.common.utils.DateUtils;
import com.sinata.common.utils.StringUtils;
import com.sinata.system.config.AutoColumnWidthStrategy;
import com.sinata.system.domain.MwCheckoutRecord;
import com.sinata.system.domain.dto.CollectTotalUpDto;
import com.sinata.system.domain.query.CheckoutRecordQuery;
@@ -85,7 +86,10 @@
        // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
        String fileName = URLEncoder.encode("转运记录", "UTF-8").replaceAll("\\+", "%20");
        response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
        FastExcel.write(response.getOutputStream(), MwCheckoutRecordExcelVO.class).sheet("转运记录").doWrite(mwCheckoutRecordExcelVOS);
        FastExcel.write(response.getOutputStream(), MwCheckoutRecordExcelVO.class)
                .registerWriteHandler(new AutoColumnWidthStrategy())
                .sheet("转运记录")
                .doWrite(mwCheckoutRecordExcelVOS);
    }
    @Override