燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2024-03-22 d9df4df5fae06fad27a5199d2c8e0e6571b7a9ee
1
已修改2个文件
20 ■■■■■ 文件已修改
src/main/java/com/yssh/config/ScheduleConfig.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/service/EmailService.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/config/ScheduleConfig.java
@@ -246,7 +246,9 @@
    public void autoCalcData() {
        if (enableEmail) {
            //System.out.println("${email.times}");
            logger.info("***************** 开始数据预警计算 *****************" + "\n");
            emailService.calcData();
            logger.info("***************** 数据预警计算完成 *****************" + "\n");
        }
    }
}
src/main/java/com/yssh/service/EmailService.java
@@ -144,15 +144,15 @@
        String[] strs = names.split(",");
        int count = countCsv(bigPath, hours);
        if (0 == count) {
            list.add(strs[0] + "近" + hours + "小时存在文件缺失,");
            list.add(strs[0]);
        }
        count = countCsv(filePath, hours);
        if (0 == count) {
            list.add(strs[1] + "近" + hours + "小时存在文件缺失,");
            list.add(strs[1]);
        }
        count = countCsv(vocPath, hours);
        if (0 == count) {
            list.add(strs[2] + "近" + hours + "小时存在文件缺失,");
            list.add(strs[2]);
        }
        Calendar calendar = getCalendar(0);
@@ -164,28 +164,28 @@
        count = qxshMapper.countGcsjByTime(iStart, iEnd);
        if (0 == count) {
            list.add(strs[3] + "近" + hours + "小时存在数据缺失");
            list.add(strs[3]);
        }
        count = qxshMapper.countQxshByTime(iStart, iEnd);
        if (0 == count) {
            list.add(strs[4] + "近" + hours + "小时存在数据缺失");
            list.add(strs[4]);
        }
        count = qxshMapper.countSuYuan46ByTime(sStart, sEnd);
        if (0 == count) {
            list.add(strs[5] + "近" + hours + "小时存在数据缺失");
            list.add(strs[5]);
        }
        count = qxshMapper.countSuYuan70ByTime(sStart, sEnd);
        if (0 == count) {
            list.add(strs[6] + "近" + hours + "小时存在数据缺失");
            list.add(strs[6]);
        }
        count = qxshMapper.countSuYuanFastByTime(sStart, sEnd);
        if (0 == count) {
            list.add(strs[7] + "近" + hours + "小时存在数据缺失");
            list.add(strs[7]);
        }
        int size = list.size();
        if (size > 0) {
            String text = String.join(",", list.toArray(new String[list.size()])) + "。";
            String text = String.join("、", list.toArray(new String[list.size()])) + ",近" + hours + "小时内存在数据缺失。";
            send(title, text);
        }