燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-08-09 4db89f09402a812828589c486875f6dc94574f88
1
已修改6个文件
60 ■■■■■ 文件已修改
src/main/java/com/yssh/config/InitConfig.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/entity/xls/MonthExcel.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/entity/xls/WeekExcel.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/service/XlsExportService.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/month.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/templates/week.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/config/InitConfig.java
@@ -47,7 +47,9 @@
        // 读取dat数据
        commonService.readDatData();
        xlsService.createDayReport();
        // xlsService.createDayReport();
        // xlsService.createWeekReport();
        // xlsService.createMonthReport();
        //test();
        logger.info("***************** 系统启动完毕 *****************" + "\n");
src/main/java/com/yssh/entity/xls/MonthExcel.java
@@ -69,6 +69,21 @@
    public MonthExcel() {
    }
    public MonthExcel(String sy, String yhb, String ytq, String ytb, String yhb2, String lj, String ljtb, String qyn, String ys, String fs, String fx, String wd) {
        this.sy = sy;
        this.yhb = yhb;
        this.ytq = ytq;
        this.ytb = ytb;
        this.yhb2 = yhb2;
        this.lj = lj;
        this.ljtb = ljtb;
        this.qyn = qyn;
        this.ys = ys;
        this.fs = fs;
        this.fx = fx;
        this.wd = wd;
    }
    public String getSy() {
        return sy;
    }
src/main/java/com/yssh/entity/xls/WeekExcel.java
@@ -69,6 +69,21 @@
    public WeekExcel() {
    }
    public WeekExcel(String sz, String zhb, String ztq, String ztb, String zhb2, String lj, String ljtb, String syn, String ys, String fs, String fx, String wd) {
        this.sz = sz;
        this.zhb = zhb;
        this.ztq = ztq;
        this.ztb = ztb;
        this.zhb2 = zhb2;
        this.lj = lj;
        this.ljtb = ljtb;
        this.syn = syn;
        this.ys = ys;
        this.fs = fs;
        this.fx = fx;
        this.wd = wd;
    }
    public String getSz() {
        return sz;
    }
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);
        }
src/main/resources/templates/month.xlsx
Binary files differ
src/main/resources/templates/week.xlsx
Binary files differ