| | |
| | | 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); |
| | | } |