Procházet zdrojové kódy

修改告警信息

wanghc před 3 roky
rodič
revize
6cbb9db0ba

+ 2 - 2
ipfcst-console/pom.xml

@@ -251,7 +251,7 @@
     <profile>
       <id>window</id>
       <properties>
-        <npm>npm.cmd</npm>
+        <npm>npm</npm>
       </properties>
       <activation>
         <activeByDefault>true</activeByDefault>
@@ -300,7 +300,7 @@
             <!--<verbose />-->
             <!-- 解决maven命令编译报错,因为rt.jar 和jce.jar在jre的lib下面,不在jdk的lib下面,
             导致maven找不到(java7以后会出现这个问题),将这2个jar包拷贝到jdk的lib下面估计也好使-->
-            <bootclasspath>${java.home}\lib\rt.jar;${java.home}\lib\jce.jar</bootclasspath>
+            <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
           </compilerArguments>
         </configuration>
       </plugin>

+ 3 - 3
ipfcst-console/src/main/java/com/jiayue/ipfcst/console/service/ReceiveDataService.java

@@ -254,11 +254,11 @@ public class ReceiveDataService extends BaseService {
     } catch (Exception e) {
       log.info(electricField.getName()+equipmentType.getMessage()+"接数程序异常");
       // 进行告警
-      String errorInfo = "接数程序异常";
+      String errorInfo = electricField.getStationCode()+equipmentType.getMessage()+"接数程序异常";
       String name = "接数程序异常";
       String describe = "";
       String solution = "";
-      sysAlarmService.saveSysAlarm(AlarmTypeEnum.E1, name, describe, errorInfo, solution,electricField.getStationCode());
+      sysAlarmService.saveSysAlarm(AlarmTypeEnum.E5, name, describe, errorInfo, solution,electricField.getStationCode());
       e.printStackTrace();
     }
   }
@@ -285,7 +285,7 @@ public class ReceiveDataService extends BaseService {
       HttpEntity responseEntity = response.getEntity();
       body = EntityUtils.toString(responseEntity, StandardCharsets.UTF_8);
     }catch (RuntimeException | IOException e){
-      String errorInfo = "请求异常";
+      String errorInfo = "发送http请求数据异常";
       log.info(errorInfo);
       log.info("所用线程"+Thread.currentThread().getName());
       log.info("停止请求数据");

+ 12 - 12
ipfcst-console/src/main/java/com/jiayue/ipfcst/fileupload/service/E63UploadFileService.java

@@ -172,8 +172,8 @@ public class E63UploadFileService extends BaseUploadFileService {
       } catch (Exception e) {
         log.error(stationCode + "生成短期异常", e);
         // 进行告警
-        String errorInfo = "生成短期异常";
-        String name = "生成短期异常";
+        String errorInfo = stationCode+"生成短期预测上报文件异常";
+        String name = "生成短期文件异常";
         String describe = "";
         String solution = "";
         sysAlarmService.saveSysAlarm(AlarmTypeEnum.E1, name, describe, errorInfo, solution,electricFieldInfo.getStationCode());
@@ -251,8 +251,8 @@ public class E63UploadFileService extends BaseUploadFileService {
       } catch (Exception e) {
         log.error(stationCode + "生成可用短期异常", e);
         // 进行告警
-        String errorInfo = "生成可用短期异常";
-        String name = "生成可用短期异常";
+        String errorInfo = stationCode+"生成可用短期预测上报文件异常";
+        String name = "生成可用短期文件异常";
         String describe = "";
         String solution = "";
         sysAlarmService.saveSysAlarm(AlarmTypeEnum.E1, name, describe, errorInfo, solution,electricFieldInfo.getStationCode());
@@ -337,8 +337,8 @@ public class E63UploadFileService extends BaseUploadFileService {
       } catch (Exception e) {
         log.error(stationCode + "生成超短期异常", e);
         // 进行告警
-        String errorInfo = "生成超短期异常";
-        String name = "生成超短期异常";
+        String errorInfo = stationCode+"生成超短期预测上报文件异常";
+        String name = "生成超短期文件异常";
         String describe = "";
         String solution = "";
         sysAlarmService.saveSysAlarm(AlarmTypeEnum.E1, name, describe, errorInfo, solution,electricFieldInfo.getStationCode());
@@ -425,8 +425,8 @@ public class E63UploadFileService extends BaseUploadFileService {
       } catch (Exception e) {
         log.error(stationCode + "生成可用超短期异常", e);
         // 进行告警
-        String errorInfo = "生成可用超短期异常";
-        String name = "生成可用超短期异常";
+        String errorInfo = stationCode+"生成可用超短期预测上报文件异常";
+        String name = "生成可用超短期文件异常";
         String describe = "";
         String solution = "";
         sysAlarmService.saveSysAlarm(AlarmTypeEnum.E1, name, describe, errorInfo, solution,electricFieldInfo.getStationCode());
@@ -476,7 +476,7 @@ public class E63UploadFileService extends BaseUploadFileService {
       } catch (Exception e) {
         log.error(stationCode + "生成气象站或者测风塔文件异常", e);
         // 进行告警
-        String errorInfo = "生成气象站或者测风塔文件异常";
+        String errorInfo = stationCode+"生成气象站或者测风塔文件异常";
         String name = "生成气象站或者测风塔文件异常";
         String describe = "";
         String solution = "";
@@ -926,7 +926,7 @@ public class E63UploadFileService extends BaseUploadFileService {
       } catch (Exception e) {
         log.error(stationCode + "生成逆变器或风机文件异常", e);
         // 进行告警
-        String errorInfo = "生成逆变器或风机文件异常";
+        String errorInfo = stationCode+"生成逆变器或风机文件异常";
         String name = "生成逆变器或风机文件异常";
         String describe = "";
         String solution = "";
@@ -1357,9 +1357,9 @@ public class E63UploadFileService extends BaseUploadFileService {
           }
         }
       } catch (Exception e) {
-        log.error(stationCode + "生成文件异常", e);
+        log.error(stationCode + "生成理论功率文件异常", e);
         // 进行告警
-        String errorInfo = "生成理论功率文件异常";
+        String errorInfo = stationCode+"生成理论功率上报文件异常";
         String name = "生成理论功率文件异常";
         String describe = "";
         String solution = "";

+ 2 - 2
ipfcst-console/src/main/java/com/jiayue/ipfcst/fileupload/service/FtpUploadService.java

@@ -144,7 +144,7 @@ public class FtpUploadService extends BaseUploadFileService{
                   errorInfo = "与 " + uploadFileChannel.getRemoteIp() + " 连接畅通.";
                 }
                 // 进行告警
-                String name = "上报文件异常";
+                String name = "FTP上报文件异常";
                 String describe = "";
                 String solution = "";
                 sysAlarmService.saveSysAlarm(AlarmTypeEnum.E2, name, describe, errorInfo, solution,"");
@@ -212,7 +212,7 @@ public class FtpUploadService extends BaseUploadFileService{
                 }
 
                 // 进行告警
-                String name = "上报文件异常";
+                String name = "SFTP上报文件异常";
                 String describe = "";
                 String solution = "";
                 sysAlarmService.saveSysAlarm(AlarmTypeEnum.E2, name, describe, errorInfo, solution,"");