| | |
| | | public DayExcel() { |
| | | } |
| | | |
| | | /** |
| | | * 日报Excel |
| | | * |
| | | * @param rjz 日均值 |
| | | * @param lj 累计 |
| | | * @param ljtb 累计同比 |
| | | * @param ys 受影响因素及原因 |
| | | * @param fs 风速 |
| | | * @param fx 风向 |
| | | * @param wd 温度 |
| | | */ |
| | | public DayExcel(String rjz, String lj, String ljtb, String ys, String fs, String fx, String wd) { |
| | | this.rjz = rjz; |
| | | this.lj = lj; |
| | |
| | | public MonthExcel() { |
| | | } |
| | | |
| | | /** |
| | | * 月报Excel |
| | | * |
| | | * @param sy 上月 |
| | | * @param yhb 月环比 |
| | | * @param ytq 月同期 |
| | | * @param ytb 月同比 |
| | | * @param yhb2 月环比2 |
| | | * @param lj 累计 |
| | | * @param ljtb 累计同比 |
| | | * @param qyn 较前一年均值变化幅度 |
| | | * @param ys 受影响因素及原因 |
| | | * @param fs 风速 |
| | | * @param fx 风向 |
| | | * @param wd 温度 |
| | | */ |
| | | 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; |
| | |
| | | public WeekExcel() { |
| | | } |
| | | |
| | | /** |
| | | * 周报Excel |
| | | * |
| | | * @param sz 上周 |
| | | * @param zhb 周环比 |
| | | * @param ztq 周同期 |
| | | * @param ztb 周同比 |
| | | * @param zhb2 周环比2 |
| | | * @param lj 累计 |
| | | * @param ljtb 累计同比 |
| | | * @param syn 较上一年度变化幅度 |
| | | * @param ys 受影响因素及原因 |
| | | * @param fs 风速 |
| | | * @param fx 风向 |
| | | * @param wd 温度 |
| | | */ |
| | | 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; |
| | |
| | | double lj = mapper.selectAccumulate(yearStart, end, name); // 累计 |
| | | double lastLj = mapper.selectYearAccumulate(lastYear + "%", name); // 去年累计 |
| | | double ljtb = CalculateUtils.round2((lj - lastLj) / lastLj * 100); // 累计同比 |
| | | |
| | | MonitorPointPosition point = commonService.select3dCheckPointByName(name); |
| | | String id = point.getId().substring(0, point.getId().lastIndexOf("_") + 1) + "0"; |
| | | // List<SuYuan700> suList = mapper.selectSuYuanByTime(id, yyyy_mm_dd + " 00:00:00", yyyy_mm_dd + " 23:00:00"); |
| | |
| | | double lj = mapper.selectAccumulate(yearStart, intSun, name); // 累计 |
| | | double lastLj = mapper.selectYearAccumulate(lastYear + "%", name); // 去年累计 |
| | | double ljtb = CalculateUtils.round2((lj - lastLj) / lastLj * 100); // 累计同比 |
| | | |
| | | MonitorPointPosition point = commonService.select3dCheckPointByName(name); |
| | | String id = point.getId().substring(0, point.getId().lastIndexOf("_") + 1) + "0"; |
| | | List<SuYuan700> suList = mapper.selectSuYuanByStartAndEnd(id, name, yjz, intMon, intSun); |
| | | String ys = getYs(suList); |
| | | |
| | | list.add(new WeekExcel("" + sz, zhb + "%", "", ztb + "%", "", "" + lj, "" + ljtb, "", ys, "", "", "")); |
| | | } |
| | | saveResult("week", sun, list); |
| | |
| | | |
| | | List<MonthExcel> list = new ArrayList<>(); |
| | | for (int i = 1; i < 47; i++) { |
| | | String name = "AI-" + (i < 10 ? "0" : "") + i; |
| | | // |
| | | } |
| | | |
| | | String filePath = createExcel("month", end, list); |
| | | list.add(new MonthExcel()); |
| | | } |
| | | saveResult("month", end, list); |
| | | } catch (Exception ex) { |
| | | logger.error(ex.getMessage(), ex); |
| | | } |