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_MSG
oracle
+ pgdevice0_
@@ -520,7 +143,6 @@
-
@@ -528,6 +150,11 @@
+
+
+
+
+
@@ -571,10 +198,10 @@
-
-
-
-
+
+
+
+
@@ -582,8 +209,9 @@
-
+
+
@@ -633,7 +261,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -643,27 +289,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -684,13 +310,12 @@
-
-
+
@@ -878,18 +503,28 @@
1583376035104
-
+
+
+
+
+ 1583481566842
+
+
+
+ 1583481566842
+
+
-
+
-
+
@@ -900,7 +535,7 @@
-
+
@@ -965,14 +600,15 @@
+
+
+
+
-
-
-
@@ -987,9 +623,6 @@
-
-
-
@@ -997,23 +630,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1021,9 +637,6 @@
-
-
-
@@ -1031,19 +644,12 @@
-
-
-
-
-
-
-
-
+
@@ -1067,24 +673,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1092,9 +684,6 @@
-
-
-
@@ -1102,9 +691,6 @@
-
-
-
@@ -1112,19 +698,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1156,21 +729,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1178,13 +736,6 @@
-
-
-
-
-
-
-
@@ -1220,13 +771,6 @@
-
-
-
-
-
-
-
@@ -1238,9 +782,6 @@
-
-
-
@@ -1255,13 +796,6 @@
-
-
-
-
-
-
-
@@ -1269,13 +803,6 @@
-
-
-
-
-
-
-
@@ -1286,18 +813,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/workspace.xml b/.idea/workspace.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 +143,6 @@
-
@@ -528,6 +150,11 @@
+
+
+
+
+
@@ -571,10 +198,10 @@
-
-
-
-
+
+
+
+
@@ -582,8 +209,9 @@
-
+
+
@@ -633,7 +261,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -643,27 +289,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -684,13 +310,12 @@
-
-
+
@@ -878,18 +503,28 @@
1583376035104
-
+
+
+
+
+ 1583481566842
+
+
+
+ 1583481566842
+
+
-
+
-
+
@@ -900,7 +535,7 @@
-
+
@@ -965,14 +600,15 @@
+
+
+
+
-
-
-
@@ -987,9 +623,6 @@
-
-
-
@@ -997,23 +630,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1021,9 +637,6 @@
-
-
-
@@ -1031,19 +644,12 @@
-
-
-
-
-
-
-
-
+
@@ -1067,24 +673,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1092,9 +684,6 @@
-
-
-
@@ -1102,9 +691,6 @@
-
-
-
@@ -1112,19 +698,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1156,21 +729,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1178,13 +736,6 @@
-
-
-
-
-
-
-
@@ -1220,13 +771,6 @@
-
-
-
-
-
-
-
@@ -1238,9 +782,6 @@
-
-
-
@@ -1255,13 +796,6 @@
-
-
-
-
-
-
-
@@ -1269,13 +803,6 @@
-
-
-
-
-
-
-
@@ -1286,18 +813,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
index ad9d569..d3bc27f 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
@@ -20,7 +20,9 @@
private Long id;
private String alarmValue;//报警值
private Date alarmDate;//报警时间
+ private Date logTime;//消警时间
private String description;//描述
+ private String logDesc;//消警描述
private PgAlarmType alarmTypeId;//报警类型
private PgDevice alarmDevId;//报警设备
private PgUser userId;//责任人
@@ -55,6 +57,24 @@
this.alarmDate = alarmDate;
}
+ @Column(name="LOG_TIME")
+ public Date getLogTime() {
+ return logTime;
+ }
+
+ public void setLogTime(Date logTime) {
+ this.logTime = logTime;
+ }
+
+ @Column(name="LOG_DESC")
+ public String getLogDesc() {
+ return logDesc;
+ }
+
+ public void setLogDesc(String logDesc) {
+ this.logDesc = logDesc;
+ }
+
@Column(name = "DESCRIPTION")
public String getDescription() {
return description;
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index bde2282..523e99c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,395 +8,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -423,59 +40,64 @@
-
+
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
+
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -503,6 +125,7 @@
compositeFilter
PG_CON_REMOVE_MSG
oracle
+ pgdevice0_
@@ -520,7 +143,6 @@
-
@@ -528,6 +150,11 @@
+
+
+
+
+
@@ -571,10 +198,10 @@
-
-
-
-
+
+
+
+
@@ -582,8 +209,9 @@
-
+
+
@@ -633,7 +261,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -643,27 +289,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -684,13 +310,12 @@
-
-
+
@@ -878,18 +503,28 @@
1583376035104
-
+
+
+
+
+ 1583481566842
+
+
+
+ 1583481566842
+
+
-
+
-
+
@@ -900,7 +535,7 @@
-
+
@@ -965,14 +600,15 @@
+
+
+
+
-
-
-
@@ -987,9 +623,6 @@
-
-
-
@@ -997,23 +630,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1021,9 +637,6 @@
-
-
-
@@ -1031,19 +644,12 @@
-
-
-
-
-
-
-
-
+
@@ -1067,24 +673,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1092,9 +684,6 @@
-
-
-
@@ -1102,9 +691,6 @@
-
-
-
@@ -1112,19 +698,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1156,21 +729,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1178,13 +736,6 @@
-
-
-
-
-
-
-
@@ -1220,13 +771,6 @@
-
-
-
-
-
-
-
@@ -1238,9 +782,6 @@
-
-
-
@@ -1255,13 +796,6 @@
-
-
-
-
-
-
-
@@ -1269,13 +803,6 @@
-
-
-
-
-
-
-
@@ -1286,18 +813,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
index ad9d569..d3bc27f 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
@@ -20,7 +20,9 @@
private Long id;
private String alarmValue;//报警值
private Date alarmDate;//报警时间
+ private Date logTime;//消警时间
private String description;//描述
+ private String logDesc;//消警描述
private PgAlarmType alarmTypeId;//报警类型
private PgDevice alarmDevId;//报警设备
private PgUser userId;//责任人
@@ -55,6 +57,24 @@
this.alarmDate = alarmDate;
}
+ @Column(name="LOG_TIME")
+ public Date getLogTime() {
+ return logTime;
+ }
+
+ public void setLogTime(Date logTime) {
+ this.logTime = logTime;
+ }
+
+ @Column(name="LOG_DESC")
+ public String getLogDesc() {
+ return logDesc;
+ }
+
+ public void setLogDesc(String logDesc) {
+ this.logDesc = logDesc;
+ }
+
@Column(name = "DESCRIPTION")
public String getDescription() {
return description;
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
index 6a8e293..92a6b47 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -73,7 +73,7 @@
public int getAlarmNum(String isDevFault) {
String hql = "select count(distinct alarmDevId) from PgAlarm pgAlarm ";
- if(isDevFault!=null) {
+ if(StringUtils.isNotBlank(isDevFault)) {
if (isDevFault.equals("true"))
hql += " where pgAlarm.alarmTypeId.alarmType = '设备运行状态报警'";
else
@@ -140,15 +140,14 @@
String hql="from PgAlarm a where a.active = 1";
- if(isDevFault!=null)
+ if(StringUtils.isNotBlank(isDevFault))
if(isDevFault.equals("true"))
hql+=" and a.alarmTypeId = " + pgAlarmType.getId();
else if(isDevFault.equals("false"))
hql+=" and a.alarmTypeId != " + pgAlarmType.getId();
Query query=this.getSession().createQuery(hql);
- ListpgAlarmList=query.list();
- //List pgAlarmList = (List)criteria.list();
+ ListpgAlarmList=query.list();
List pgAlarmDtoList=new ArrayList<>();
for(PgAlarm pgAlarm : pgAlarmList)
{
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index bde2282..523e99c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,395 +8,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -423,59 +40,64 @@
-
+
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
+
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -503,6 +125,7 @@
compositeFilter
PG_CON_REMOVE_MSG
oracle
+ pgdevice0_
@@ -520,7 +143,6 @@
-
@@ -528,6 +150,11 @@
+
+
+
+
+
@@ -571,10 +198,10 @@
-
-
-
-
+
+
+
+
@@ -582,8 +209,9 @@
-
+
+
@@ -633,7 +261,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -643,27 +289,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -684,13 +310,12 @@
-
-
+
@@ -878,18 +503,28 @@
1583376035104
-
+
+
+
+
+ 1583481566842
+
+
+
+ 1583481566842
+
+
-
+
-
+
@@ -900,7 +535,7 @@
-
+
@@ -965,14 +600,15 @@
+
+
+
+
-
-
-
@@ -987,9 +623,6 @@
-
-
-
@@ -997,23 +630,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1021,9 +637,6 @@
-
-
-
@@ -1031,19 +644,12 @@
-
-
-
-
-
-
-
-
+
@@ -1067,24 +673,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1092,9 +684,6 @@
-
-
-
@@ -1102,9 +691,6 @@
-
-
-
@@ -1112,19 +698,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1156,21 +729,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1178,13 +736,6 @@
-
-
-
-
-
-
-
@@ -1220,13 +771,6 @@
-
-
-
-
-
-
-
@@ -1238,9 +782,6 @@
-
-
-
@@ -1255,13 +796,6 @@
-
-
-
-
-
-
-
@@ -1269,13 +803,6 @@
-
-
-
-
-
-
-
@@ -1286,18 +813,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
index ad9d569..d3bc27f 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
@@ -20,7 +20,9 @@
private Long id;
private String alarmValue;//报警值
private Date alarmDate;//报警时间
+ private Date logTime;//消警时间
private String description;//描述
+ private String logDesc;//消警描述
private PgAlarmType alarmTypeId;//报警类型
private PgDevice alarmDevId;//报警设备
private PgUser userId;//责任人
@@ -55,6 +57,24 @@
this.alarmDate = alarmDate;
}
+ @Column(name="LOG_TIME")
+ public Date getLogTime() {
+ return logTime;
+ }
+
+ public void setLogTime(Date logTime) {
+ this.logTime = logTime;
+ }
+
+ @Column(name="LOG_DESC")
+ public String getLogDesc() {
+ return logDesc;
+ }
+
+ public void setLogDesc(String logDesc) {
+ this.logDesc = logDesc;
+ }
+
@Column(name = "DESCRIPTION")
public String getDescription() {
return description;
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
index 6a8e293..92a6b47 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -73,7 +73,7 @@
public int getAlarmNum(String isDevFault) {
String hql = "select count(distinct alarmDevId) from PgAlarm pgAlarm ";
- if(isDevFault!=null) {
+ if(StringUtils.isNotBlank(isDevFault)) {
if (isDevFault.equals("true"))
hql += " where pgAlarm.alarmTypeId.alarmType = '设备运行状态报警'";
else
@@ -140,15 +140,14 @@
String hql="from PgAlarm a where a.active = 1";
- if(isDevFault!=null)
+ if(StringUtils.isNotBlank(isDevFault))
if(isDevFault.equals("true"))
hql+=" and a.alarmTypeId = " + pgAlarmType.getId();
else if(isDevFault.equals("false"))
hql+=" and a.alarmTypeId != " + pgAlarmType.getId();
Query query=this.getSession().createQuery(hql);
- ListpgAlarmList=query.list();
- //List pgAlarmList = (List)criteria.list();
+ ListpgAlarmList=query.list();
List pgAlarmDtoList=new ArrayList<>();
for(PgAlarm pgAlarm : pgAlarmList)
{
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
index 7866ed2..ceceff3 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
@@ -17,10 +17,7 @@
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* Created by yxw on 2017/11/4.
@@ -80,6 +77,8 @@
result = "false";
} else {
pgAlarm.setActive(0);
+ pgAlarm.setLogTime(new Date());
+ pgAlarm.setLogDesc("人工消警");
pgAlarmManager.save(pgAlarm);
msg = "报警信息清除成功";
result = "true";
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index bde2282..523e99c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,395 +8,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -423,59 +40,64 @@
-
+
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
+
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -503,6 +125,7 @@
compositeFilter
PG_CON_REMOVE_MSG
oracle
+ pgdevice0_
@@ -520,7 +143,6 @@
-
@@ -528,6 +150,11 @@
+
+
+
+
+
@@ -571,10 +198,10 @@
-
-
-
-
+
+
+
+
@@ -582,8 +209,9 @@
-
+
+
@@ -633,7 +261,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -643,27 +289,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -684,13 +310,12 @@
-
-
+
@@ -878,18 +503,28 @@
1583376035104
-
+
+
+
+
+ 1583481566842
+
+
+
+ 1583481566842
+
+
-
+
-
+
@@ -900,7 +535,7 @@
-
+
@@ -965,14 +600,15 @@
+
+
+
+
-
-
-
@@ -987,9 +623,6 @@
-
-
-
@@ -997,23 +630,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1021,9 +637,6 @@
-
-
-
@@ -1031,19 +644,12 @@
-
-
-
-
-
-
-
-
+
@@ -1067,24 +673,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1092,9 +684,6 @@
-
-
-
@@ -1102,9 +691,6 @@
-
-
-
@@ -1112,19 +698,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1156,21 +729,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1178,13 +736,6 @@
-
-
-
-
-
-
-
@@ -1220,13 +771,6 @@
-
-
-
-
-
-
-
@@ -1238,9 +782,6 @@
-
-
-
@@ -1255,13 +796,6 @@
-
-
-
-
-
-
-
@@ -1269,13 +803,6 @@
-
-
-
-
-
-
-
@@ -1286,18 +813,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
index ad9d569..d3bc27f 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
@@ -20,7 +20,9 @@
private Long id;
private String alarmValue;//报警值
private Date alarmDate;//报警时间
+ private Date logTime;//消警时间
private String description;//描述
+ private String logDesc;//消警描述
private PgAlarmType alarmTypeId;//报警类型
private PgDevice alarmDevId;//报警设备
private PgUser userId;//责任人
@@ -55,6 +57,24 @@
this.alarmDate = alarmDate;
}
+ @Column(name="LOG_TIME")
+ public Date getLogTime() {
+ return logTime;
+ }
+
+ public void setLogTime(Date logTime) {
+ this.logTime = logTime;
+ }
+
+ @Column(name="LOG_DESC")
+ public String getLogDesc() {
+ return logDesc;
+ }
+
+ public void setLogDesc(String logDesc) {
+ this.logDesc = logDesc;
+ }
+
@Column(name = "DESCRIPTION")
public String getDescription() {
return description;
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
index 6a8e293..92a6b47 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -73,7 +73,7 @@
public int getAlarmNum(String isDevFault) {
String hql = "select count(distinct alarmDevId) from PgAlarm pgAlarm ";
- if(isDevFault!=null) {
+ if(StringUtils.isNotBlank(isDevFault)) {
if (isDevFault.equals("true"))
hql += " where pgAlarm.alarmTypeId.alarmType = '设备运行状态报警'";
else
@@ -140,15 +140,14 @@
String hql="from PgAlarm a where a.active = 1";
- if(isDevFault!=null)
+ if(StringUtils.isNotBlank(isDevFault))
if(isDevFault.equals("true"))
hql+=" and a.alarmTypeId = " + pgAlarmType.getId();
else if(isDevFault.equals("false"))
hql+=" and a.alarmTypeId != " + pgAlarmType.getId();
Query query=this.getSession().createQuery(hql);
- ListpgAlarmList=query.list();
- //List pgAlarmList = (List)criteria.list();
+ ListpgAlarmList=query.list();
List pgAlarmDtoList=new ArrayList<>();
for(PgAlarm pgAlarm : pgAlarmList)
{
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
index 7866ed2..ceceff3 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
@@ -17,10 +17,7 @@
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* Created by yxw on 2017/11/4.
@@ -80,6 +77,8 @@
result = "false";
} else {
pgAlarm.setActive(0);
+ pgAlarm.setLogTime(new Date());
+ pgAlarm.setLogDesc("人工消警");
pgAlarmManager.save(pgAlarm);
msg = "报警信息清除成功";
result = "true";
diff --git a/src/main/java/com/casic/PgInterface/rs/PgOverViewRs.java b/src/main/java/com/casic/PgInterface/rs/PgOverViewRs.java
index 70b3b41..db30814 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgOverViewRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgOverViewRs.java
@@ -278,7 +278,7 @@
String code="0";
List pgAlarmDtoList=new ArrayList<>();
try{
- pgAlarmDtoList=pgAlarmManager.getAlarmList(isDevFault);
+ //pgAlarmDtoList=pgAlarmManager.getAlarmList(isDevFault);
code="200";
msg="信息获取成功";
}
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index bde2282..523e99c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,395 +8,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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-633,7 +261,25 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -643,27 +289,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -684,13 +310,12 @@
-
-
+
@@ -878,18 +503,28 @@
1583376035104
-
+
+
+
+
+ 1583481566842
+
+
+
+ 1583481566842
+
+
-
+
-
+
@@ -900,7 +535,7 @@
-
+
@@ -965,14 +600,15 @@
+
+
+
+
-
-
-
@@ -987,9 +623,6 @@
-
-
-
@@ -997,23 +630,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1021,9 +637,6 @@
-
-
-
@@ -1031,19 +644,12 @@
-
-
-
-
-
-
-
-
+
@@ -1067,24 +673,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1092,9 +684,6 @@
-
-
-
@@ -1102,9 +691,6 @@
-
-
-
@@ -1112,19 +698,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1156,21 +729,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1178,13 +736,6 @@
-
-
-
-
-
-
-
@@ -1220,13 +771,6 @@
-
-
-
-
-
-
-
@@ -1238,9 +782,6 @@
-
-
-
@@ -1255,13 +796,6 @@
-
-
-
-
-
-
-
@@ -1269,13 +803,6 @@
-
-
-
-
-
-
-
@@ -1286,18 +813,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
index ad9d569..d3bc27f 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgAlarm.java
@@ -20,7 +20,9 @@
private Long id;
private String alarmValue;//报警值
private Date alarmDate;//报警时间
+ private Date logTime;//消警时间
private String description;//描述
+ private String logDesc;//消警描述
private PgAlarmType alarmTypeId;//报警类型
private PgDevice alarmDevId;//报警设备
private PgUser userId;//责任人
@@ -55,6 +57,24 @@
this.alarmDate = alarmDate;
}
+ @Column(name="LOG_TIME")
+ public Date getLogTime() {
+ return logTime;
+ }
+
+ public void setLogTime(Date logTime) {
+ this.logTime = logTime;
+ }
+
+ @Column(name="LOG_DESC")
+ public String getLogDesc() {
+ return logDesc;
+ }
+
+ public void setLogDesc(String logDesc) {
+ this.logDesc = logDesc;
+ }
+
@Column(name = "DESCRIPTION")
public String getDescription() {
return description;
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
index 6a8e293..92a6b47 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -73,7 +73,7 @@
public int getAlarmNum(String isDevFault) {
String hql = "select count(distinct alarmDevId) from PgAlarm pgAlarm ";
- if(isDevFault!=null) {
+ if(StringUtils.isNotBlank(isDevFault)) {
if (isDevFault.equals("true"))
hql += " where pgAlarm.alarmTypeId.alarmType = '设备运行状态报警'";
else
@@ -140,15 +140,14 @@
String hql="from PgAlarm a where a.active = 1";
- if(isDevFault!=null)
+ if(StringUtils.isNotBlank(isDevFault))
if(isDevFault.equals("true"))
hql+=" and a.alarmTypeId = " + pgAlarmType.getId();
else if(isDevFault.equals("false"))
hql+=" and a.alarmTypeId != " + pgAlarmType.getId();
Query query=this.getSession().createQuery(hql);
- ListpgAlarmList=query.list();
- //List pgAlarmList = (List)criteria.list();
+ ListpgAlarmList=query.list();
List pgAlarmDtoList=new ArrayList<>();
for(PgAlarm pgAlarm : pgAlarmList)
{
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
index 7866ed2..ceceff3 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmRs.java
@@ -17,10 +17,7 @@
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* Created by yxw on 2017/11/4.
@@ -80,6 +77,8 @@
result = "false";
} else {
pgAlarm.setActive(0);
+ pgAlarm.setLogTime(new Date());
+ pgAlarm.setLogDesc("人工消警");
pgAlarmManager.save(pgAlarm);
msg = "报警信息清除成功";
result = "true";
diff --git a/src/main/java/com/casic/PgInterface/rs/PgOverViewRs.java b/src/main/java/com/casic/PgInterface/rs/PgOverViewRs.java
index 70b3b41..db30814 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgOverViewRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgOverViewRs.java
@@ -278,7 +278,7 @@
String code="0";
List pgAlarmDtoList=new ArrayList<>();
try{
- pgAlarmDtoList=pgAlarmManager.getAlarmList(isDevFault);
+ //pgAlarmDtoList=pgAlarmManager.getAlarmList(isDevFault);
code="200";
msg="信息获取成功";
}
diff --git a/src/main/resources/spring/taskConfig-applicationContext.xml b/src/main/resources/spring/taskConfig-applicationContext.xml
index 69776c5..76b19b4 100644
--- a/src/main/resources/spring/taskConfig-applicationContext.xml
+++ b/src/main/resources/spring/taskConfig-applicationContext.xml
@@ -13,7 +13,7 @@
-
+