燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-08-09 4db89f09402a812828589c486875f6dc94574f88
src/main/java/com/yssh/service/XlsExportService.java
@@ -1,6 +1,8 @@
package com.yssh.service;
import com.yssh.entity.xls.DayExcel;
import com.yssh.entity.xls.MonthExcel;
import com.yssh.entity.xls.WeekExcel;
import com.yssh.utils.ExcelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -73,7 +75,7 @@
            }
            String source = getXslTemplate(type);
            String target = String.format("%s\\%d.xlsx", getExpPath(type), 20230808);
            String target = String.format("%s\\%d.xlsx", getExpPath(type), 20230809);
            createExcel(source, target, list);
        } catch (Exception ex) {
@@ -86,8 +88,17 @@
     */
    public void createWeekReport() {
        try {
            String source = getXslTemplate("week");
            String type = "week";
            List<WeekExcel> list = new ArrayList<>();
            for (int i = 1; i < 47; i++) {
                WeekExcel day = new WeekExcel("AI-" + (i < 10 ? "0" : "") + i, "zhb", "ztq", "ztb", "zhb2", "lj", "ljtb", "syn", "ys", "fs", "fx", "wd");
                list.add(day);
            }
            String source = getXslTemplate(type);
            String target = String.format("%s\\%d.xlsx", getExpPath(type), 20230807);
            createExcel(source, target, list);
        } catch (Exception ex) {
            logger.error(ex.getMessage(), ex);
        }
@@ -98,8 +109,17 @@
     */
    public void createMonthReport() {
        try {
            String source = getXslTemplate("month");
            String type = "month";
            List<MonthExcel> list = new ArrayList<>();
            for (int i = 1; i < 47; i++) {
                MonthExcel day = new MonthExcel("AI-" + (i < 10 ? "0" : "") + i, "yhb", "ytq", "ytb", "yhb2", "lj", "ljtb", "qyn", "ys", "fs", "fx", "wd");
                list.add(day);
            }
            String source = getXslTemplate(type);
            String target = String.format("%s\\%d.xlsx", getExpPath(type), 202308);
            createExcel(source, target, list);
        } catch (Exception ex) {
            logger.error(ex.getMessage(), ex);
        }