| | |
| | | |
| | | double ljjz = mapper.selectYearAccumulate(yyyy + "%", name); // 今年累计均值 |
| | | double qnLjjz = mapper.selectYearAccumulate(lastYear + "%", name); // 去年累计均值 |
| | | double ljtb = CalculateUtils.round2((ljjz - qnLjjz) / qnLjjz * 100); // 累计同比 |
| | | String ljtb = 0 == qnLjjz ? "--" : CalculateUtils.round2((ljjz - qnLjjz) / qnLjjz * 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, dayStart, end); |
| | | String ys = getYs(suList); // 受影响因素及原因 |
| | | |
| | | list.add(new DayExcel(rjz + "", lj + "", ljtb + "%", ys, "", "", "")); |
| | | list.add(new DayExcel("" + rjz, "" + lj, ljtb, ys, "", "", "")); |
| | | } |
| | | saveResult("day", yesterday, list); |
| | | } catch (Exception ex) { |
| | |
| | | double sz = mapper.selectAccumulate(intMon, intSun, name); // 上周 |
| | | |
| | | double ssz = mapper.selectAccumulate(intLastMon, intLastSun, name); // 上上周 |
| | | double zhb = CalculateUtils.round2((sz - ssz) / ssz * 100); // 周环比 |
| | | String zhb = 0 == ssz ? "--" : CalculateUtils.round2((sz - ssz) / ssz * 100) + "%"; // 周环比 |
| | | |
| | | double qntq = mapper.selectAccumulate(intLastYear1, intLastYear7, name); // 去年同期 |
| | | double ztq = CalculateUtils.round2((sz - qntq) / qntq * 100); // 周同期 |
| | | String ztq = 0 == qntq ? "--" : CalculateUtils.round2((sz - qntq) / qntq * 100) + "%"; // 周同期 |
| | | |
| | | double qntz = mapper.selectAccumulate(intLastYearMon, intLastYearSun, name); // 去年同周 |
| | | double ztb = CalculateUtils.round2((sz - qntz) / qntz * 100); // 周同比 |
| | | String ztb = 0 == qntz ? "--" : CalculateUtils.round2((sz - qntz) / qntz * 100) + "%"; // 周同比 |
| | | |
| | | double lj = mapper.selectAccumulate(yearStart, intSun, name); // 累计 |
| | | |
| | | double ljjz = mapper.selectYearAccumulate(yyyy + "%", name); // 今年累计均值 |
| | | double qnLjjz = mapper.selectYearAccumulate(lastYear + "%", name); // 去年累计均值 |
| | | double ljtb = CalculateUtils.round2((ljjz - qnLjjz) / qnLjjz * 100); // 累计同比 |
| | | String ljtb = 0 == qnLjjz ? "--" : CalculateUtils.round2((ljjz - qnLjjz) / qnLjjz * 100) + "%"; // 累计同比 |
| | | |
| | | double syn = CalculateUtils.round2((ljjz - qnLjjz) / qnLjjz * 100); // 较上一年度变化幅度 |
| | | String syn = 0 == qnLjjz ? "--" : CalculateUtils.round2((ljjz - qnLjjz) / qnLjjz * 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 + "%", ztq + "", ztb + "%", lj + "", ljtb + "", syn + "", ys, "", "", "")); |
| | | list.add(new WeekExcel("" + sz, zhb, ztq, ztb, "" + lj, ljtb, syn, ys, "", "", "")); |
| | | } |
| | | saveResult("week", sun, list); |
| | | } catch (Exception ex) { |