燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-08-11 8085bc4860f7efdf5c7fc7c9f891ccfe0bfd8312
1
已修改1个文件
16 ■■■■ 文件已修改
src/main/java/com/yssh/service/XlsReportService.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/service/XlsReportService.java
@@ -169,7 +169,7 @@
                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";
@@ -177,7 +177,7 @@
                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) {
@@ -217,28 +217,28 @@
                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) {