| | |
| | | // 读取dat数据 |
| | | commonService.readDatData(); |
| | | |
| | | xlsService.createDayReport(); |
| | | // xlsService.createDayReport(); |
| | | // xlsService.createWeekReport(); |
| | | // xlsService.createMonthReport(); |
| | | |
| | | //test(); |
| | | logger.info("***************** 系统启动完毕 *****************" + "\n"); |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | 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) { |
| | |
| | | */ |
| | | 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); |
| | | } |
| | |
| | | */ |
| | | 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); |
| | | } |