diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
index e9eeec4..2c7c6b3 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
@@ -65,4 +65,4 @@
this.userName = userName;
}
-}
+}
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
index e9eeec4..2c7c6b3 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
@@ -65,4 +65,4 @@
this.userName = userName;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
index 21e8bdb..7d0d0f5 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
@@ -28,7 +28,6 @@
formatStr="yyyy-MM-dd";
Criteria criteria = createCriteria(PGInOutRec.class);
-// Disjunction disjunction = Restrictions.disjunction();
if (StringUtils.isNotBlank(timeStart)&&StringUtils.isNotBlank(timeEnd))
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatStr);
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
index e9eeec4..2c7c6b3 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
@@ -65,4 +65,4 @@
this.userName = userName;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
index 21e8bdb..7d0d0f5 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
@@ -28,7 +28,6 @@
formatStr="yyyy-MM-dd";
Criteria criteria = createCriteria(PGInOutRec.class);
-// Disjunction disjunction = Restrictions.disjunction();
if (StringUtils.isNotBlank(timeStart)&&StringUtils.isNotBlank(timeEnd))
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatStr);
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
index d36e76b..9d1aa24 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
@@ -25,7 +25,10 @@
public void getAllMac(){
tagmacRun.getAllMac();
}
- public void getMacPosition() throws ParseException {tagmacRun.getMacPosition();}
+ public void getMacPosition() throws ParseException {
+ tagmacRun.getMacPosition();
+ }
+
public static void main(String[] args) {
}
-}
+}
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
index e9eeec4..2c7c6b3 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
@@ -65,4 +65,4 @@
this.userName = userName;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
index 21e8bdb..7d0d0f5 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
@@ -28,7 +28,6 @@
formatStr="yyyy-MM-dd";
Criteria criteria = createCriteria(PGInOutRec.class);
-// Disjunction disjunction = Restrictions.disjunction();
if (StringUtils.isNotBlank(timeStart)&&StringUtils.isNotBlank(timeEnd))
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatStr);
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
index d36e76b..9d1aa24 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
@@ -25,7 +25,10 @@
public void getAllMac(){
tagmacRun.getAllMac();
}
- public void getMacPosition() throws ParseException {tagmacRun.getMacPosition();}
+ public void getMacPosition() throws ParseException {
+ tagmacRun.getMacPosition();
+ }
+
public static void main(String[] args) {
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
index 7cfb751..e99c1e6 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
@@ -41,15 +41,17 @@
private static final String getAllUrl=configProperty.getString("AllResult");//接口url
private static final Logger logger = LoggerFactory.getLogger(TagmacRun.class);
private static final String nullTimeStr = "0001-01-01T00:00:00+08:00";
+
@Resource
private PGTagMacManager pgTagMacManager;
@Resource
private PGTagPositionManager pgTagPositionManager;
+ //查询所有设备
public void getAllMac()
{
TypeRef> tagMacType = new TypeRef>() {
};
-// String allTagMac="{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"AllResult\":[{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":29189,\"TagMac\":\"B0:8E:1A:41:1B:48\",\"TagName\":\"48\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"研发西北\",\"CoordinatesId\":24,\"X\":54.12,\"Y\":54.62,\"IsLowBattery\":true,\"IsAreaWarning\":false,\"IsDisappeared\":false,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":false,\"HostName\":\"48\",\"HostId\":203,\"HostGroupIds\":[1,15],\"HostStatusId\":0,\"HostExternalId\":\"1\",\"HostExternalInfo\":null,\"postionUpdateTime\":\"2019-05-22T11:44:04.0919002+08:00\"},{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":11003,\"TagMac\":\"B0:8E:1A:50:54:88\",\"TagName\":\"马桶监测505488\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"101洗漱间\",\"CoordinatesId\":38,\"X\":-88.7699966430664,\"Y\":-24.059999465942383,\"IsLowBattery\":false,\"IsAreaWarning\":false,\"IsDisappeared\":true,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":true,\"HostName\":\"马桶监测505488\",\"HostId\":96,\"HostGroupIds\":[1,9],\"HostStatusId\":0,\"HostExternalId\":\"5488\",\"HostExternalInfo\":\"\",\"postionUpdateTime\":\"2019-05-22T11:09:31.9387103+08:00\"}]}";
+
String allTagMac=null;
allTagMac = HttpClientUtils.get(getAllUrl,authorization);
logger.info("allTag:"+allTagMac);
@@ -76,7 +78,9 @@
}
}
}
- public void getMacPosition() throws ParseException {
+
+ public void getMacPosition() throws ParseException
+ {
TypeRef> tagPositionType = new TypeRef>() {
};
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -118,59 +122,6 @@
}
}
- public void postInOut(String strFrom) {
- Calendar calendar = Calendar.getInstance();
- Date dtTo = calendar.getTime();
- calendar.add(Calendar.HOUR,-1);
- Date limitDate = calendar.getTime();
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- JSONObject jsonBody = new JSONObject();
- jsonBody.put("dtFrom", strFrom);
- jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
- logger.info("body:" + jsonBody.toString());
- String allInOut;
- List> listInOut = new ArrayList<>();
- allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
-// logger.info("allInOut:" + allInOut);
- if (StringUtils.isNotBlank(allInOut)) {
- ReadContext readContext = JsonPath.parse(allInOut);
- if ("true".equals(readContext.read("$.Suceess", String.class))) {
- listInOut = readContext.read("$.AreaInOutInfo");
- for (Map map :listInOut)
- {
- Date inTime = null;
- Date outTime = null;
- String sHostId = map.get("hostId").toString();
- String sInTime = map.get("inTime").toString();
- String sOutTime = map.get("outTime").toString();
- if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
- break;
-
- try {
- inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
-// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
- System.out.println("overTime In PG");
- }
- if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
- {
- sOutTime = sOutTime.substring(0,19).replace('T',' ');
- try {
- outTime = simpleDateFormat.parse(sOutTime);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (outTime != null)
- pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
- }
- }
- }
- }
- }
-
public String getViaHostId(String sHostId)
{
TypeRef> tagMacType = new TypeRef>() {
@@ -227,8 +178,6 @@
return pgTagPosition;
}
-
-
public void getMinInTime()
{
logger.info("getInTime:"+pgTagMacManager.getMinInTime());
@@ -237,21 +186,65 @@
postInOut(dtFrom);
}
-
- public void test()
+ public void postInOut(String strFrom)
{
-// logger.info("testProc:"+pgTagMacManager.testProc());
-// logger.info(String.valueOf(pgTagMacManager.inPGalarm("210","2019-05-22 12:00:00")));
-// logger.info(String.valueOf(pgTagMacManager.updateINPGstatus ("187","2019-05-23 07:28:00","2019-05-23 08:18:00")));
+ Calendar calendar = Calendar.getInstance();
+ Date dtTo = calendar.getTime();
+ calendar.add(Calendar.HOUR,-1);
+ Date limitDate = calendar.getTime();
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ JSONObject jsonBody = new JSONObject();
+ jsonBody.put("dtFrom", strFrom);
+ jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
+ logger.info("body:" + jsonBody.toString());
+ String allInOut;
+ List> listInOut = new ArrayList<>();
+ allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
+// logger.info("allInOut:" + allInOut);
+ if (StringUtils.isNotBlank(allInOut)) {
+ ReadContext readContext = JsonPath.parse(allInOut);
+ if ("true".equals(readContext.read("$.Suceess", String.class))) {
+ listInOut = readContext.read("$.AreaInOutInfo");
+ for (Map map :listInOut)
+ {
+ Date inTime = null;
+ Date outTime = null;
+ String sHostId = map.get("hostId").toString();
+ String sInTime = map.get("inTime").toString();
+ String sOutTime = map.get("outTime").toString();
+ if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
+ break;
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
+ try {
+ inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
+// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
+ System.out.println("overTime In PG");
+ }
+ if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
+ {
+ sOutTime = sOutTime.substring(0,19).replace('T',' ');
+ try {
+ outTime = simpleDateFormat.parse(sOutTime);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (outTime != null)
+ pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
+ }
+ }
+ }
+ }
}
- public static void main(String[] args) throws ParseException {
+ public static void main(String[] args) throws ParseException
+ {
TagmacRun tagmacRun = new TagmacRun();
-// tagmacRun.getMacPosition();
+
tagmacRun.getAllMac();
}
-}
+}
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
index e9eeec4..2c7c6b3 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
@@ -65,4 +65,4 @@
this.userName = userName;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
index 21e8bdb..7d0d0f5 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
@@ -28,7 +28,6 @@
formatStr="yyyy-MM-dd";
Criteria criteria = createCriteria(PGInOutRec.class);
-// Disjunction disjunction = Restrictions.disjunction();
if (StringUtils.isNotBlank(timeStart)&&StringUtils.isNotBlank(timeEnd))
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatStr);
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
index d36e76b..9d1aa24 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
@@ -25,7 +25,10 @@
public void getAllMac(){
tagmacRun.getAllMac();
}
- public void getMacPosition() throws ParseException {tagmacRun.getMacPosition();}
+ public void getMacPosition() throws ParseException {
+ tagmacRun.getMacPosition();
+ }
+
public static void main(String[] args) {
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
index 7cfb751..e99c1e6 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
@@ -41,15 +41,17 @@
private static final String getAllUrl=configProperty.getString("AllResult");//接口url
private static final Logger logger = LoggerFactory.getLogger(TagmacRun.class);
private static final String nullTimeStr = "0001-01-01T00:00:00+08:00";
+
@Resource
private PGTagMacManager pgTagMacManager;
@Resource
private PGTagPositionManager pgTagPositionManager;
+ //查询所有设备
public void getAllMac()
{
TypeRef> tagMacType = new TypeRef>() {
};
-// String allTagMac="{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"AllResult\":[{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":29189,\"TagMac\":\"B0:8E:1A:41:1B:48\",\"TagName\":\"48\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"研发西北\",\"CoordinatesId\":24,\"X\":54.12,\"Y\":54.62,\"IsLowBattery\":true,\"IsAreaWarning\":false,\"IsDisappeared\":false,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":false,\"HostName\":\"48\",\"HostId\":203,\"HostGroupIds\":[1,15],\"HostStatusId\":0,\"HostExternalId\":\"1\",\"HostExternalInfo\":null,\"postionUpdateTime\":\"2019-05-22T11:44:04.0919002+08:00\"},{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":11003,\"TagMac\":\"B0:8E:1A:50:54:88\",\"TagName\":\"马桶监测505488\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"101洗漱间\",\"CoordinatesId\":38,\"X\":-88.7699966430664,\"Y\":-24.059999465942383,\"IsLowBattery\":false,\"IsAreaWarning\":false,\"IsDisappeared\":true,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":true,\"HostName\":\"马桶监测505488\",\"HostId\":96,\"HostGroupIds\":[1,9],\"HostStatusId\":0,\"HostExternalId\":\"5488\",\"HostExternalInfo\":\"\",\"postionUpdateTime\":\"2019-05-22T11:09:31.9387103+08:00\"}]}";
+
String allTagMac=null;
allTagMac = HttpClientUtils.get(getAllUrl,authorization);
logger.info("allTag:"+allTagMac);
@@ -76,7 +78,9 @@
}
}
}
- public void getMacPosition() throws ParseException {
+
+ public void getMacPosition() throws ParseException
+ {
TypeRef> tagPositionType = new TypeRef>() {
};
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -118,59 +122,6 @@
}
}
- public void postInOut(String strFrom) {
- Calendar calendar = Calendar.getInstance();
- Date dtTo = calendar.getTime();
- calendar.add(Calendar.HOUR,-1);
- Date limitDate = calendar.getTime();
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- JSONObject jsonBody = new JSONObject();
- jsonBody.put("dtFrom", strFrom);
- jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
- logger.info("body:" + jsonBody.toString());
- String allInOut;
- List> listInOut = new ArrayList<>();
- allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
-// logger.info("allInOut:" + allInOut);
- if (StringUtils.isNotBlank(allInOut)) {
- ReadContext readContext = JsonPath.parse(allInOut);
- if ("true".equals(readContext.read("$.Suceess", String.class))) {
- listInOut = readContext.read("$.AreaInOutInfo");
- for (Map map :listInOut)
- {
- Date inTime = null;
- Date outTime = null;
- String sHostId = map.get("hostId").toString();
- String sInTime = map.get("inTime").toString();
- String sOutTime = map.get("outTime").toString();
- if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
- break;
-
- try {
- inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
-// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
- System.out.println("overTime In PG");
- }
- if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
- {
- sOutTime = sOutTime.substring(0,19).replace('T',' ');
- try {
- outTime = simpleDateFormat.parse(sOutTime);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (outTime != null)
- pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
- }
- }
- }
- }
- }
-
public String getViaHostId(String sHostId)
{
TypeRef> tagMacType = new TypeRef>() {
@@ -227,8 +178,6 @@
return pgTagPosition;
}
-
-
public void getMinInTime()
{
logger.info("getInTime:"+pgTagMacManager.getMinInTime());
@@ -237,21 +186,65 @@
postInOut(dtFrom);
}
-
- public void test()
+ public void postInOut(String strFrom)
{
-// logger.info("testProc:"+pgTagMacManager.testProc());
-// logger.info(String.valueOf(pgTagMacManager.inPGalarm("210","2019-05-22 12:00:00")));
-// logger.info(String.valueOf(pgTagMacManager.updateINPGstatus ("187","2019-05-23 07:28:00","2019-05-23 08:18:00")));
+ Calendar calendar = Calendar.getInstance();
+ Date dtTo = calendar.getTime();
+ calendar.add(Calendar.HOUR,-1);
+ Date limitDate = calendar.getTime();
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ JSONObject jsonBody = new JSONObject();
+ jsonBody.put("dtFrom", strFrom);
+ jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
+ logger.info("body:" + jsonBody.toString());
+ String allInOut;
+ List> listInOut = new ArrayList<>();
+ allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
+// logger.info("allInOut:" + allInOut);
+ if (StringUtils.isNotBlank(allInOut)) {
+ ReadContext readContext = JsonPath.parse(allInOut);
+ if ("true".equals(readContext.read("$.Suceess", String.class))) {
+ listInOut = readContext.read("$.AreaInOutInfo");
+ for (Map map :listInOut)
+ {
+ Date inTime = null;
+ Date outTime = null;
+ String sHostId = map.get("hostId").toString();
+ String sInTime = map.get("inTime").toString();
+ String sOutTime = map.get("outTime").toString();
+ if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
+ break;
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
+ try {
+ inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
+// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
+ System.out.println("overTime In PG");
+ }
+ if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
+ {
+ sOutTime = sOutTime.substring(0,19).replace('T',' ');
+ try {
+ outTime = simpleDateFormat.parse(sOutTime);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (outTime != null)
+ pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
+ }
+ }
+ }
+ }
}
- public static void main(String[] args) throws ParseException {
+ public static void main(String[] args) throws ParseException
+ {
TagmacRun tagmacRun = new TagmacRun();
-// tagmacRun.getMacPosition();
+
tagmacRun.getAllMac();
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c7d7693..6e76215 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -36,15 +36,16 @@
@Resource
private PGInOutRecManager pgInOutRecManager;
@Resource
- private PGTagPositionManager pgTagPositionManager;
- @Resource
- private PgInPgPersonManager pgInPgPersonManager;
- @Resource
private PGTagMacManager pgTagMacManager;
@Resource
+ private TagmacRun tagmacRun;
+ @Resource
+ private PGTagPositionManager pgTagPositionManager;
+
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
@Resource
- private TagmacRun tagmacRun;
+ private PgInPgPersonManager pgInPgPersonManager;
@Resource
private PgDeviceManager pgDeviceManager;
@@ -71,6 +72,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
+ //调用接口返回定位信息
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
index e9eeec4..2c7c6b3 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
@@ -65,4 +65,4 @@
this.userName = userName;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
index 21e8bdb..7d0d0f5 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
@@ -28,7 +28,6 @@
formatStr="yyyy-MM-dd";
Criteria criteria = createCriteria(PGInOutRec.class);
-// Disjunction disjunction = Restrictions.disjunction();
if (StringUtils.isNotBlank(timeStart)&&StringUtils.isNotBlank(timeEnd))
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatStr);
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
index d36e76b..9d1aa24 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
@@ -25,7 +25,10 @@
public void getAllMac(){
tagmacRun.getAllMac();
}
- public void getMacPosition() throws ParseException {tagmacRun.getMacPosition();}
+ public void getMacPosition() throws ParseException {
+ tagmacRun.getMacPosition();
+ }
+
public static void main(String[] args) {
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
index 7cfb751..e99c1e6 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
@@ -41,15 +41,17 @@
private static final String getAllUrl=configProperty.getString("AllResult");//接口url
private static final Logger logger = LoggerFactory.getLogger(TagmacRun.class);
private static final String nullTimeStr = "0001-01-01T00:00:00+08:00";
+
@Resource
private PGTagMacManager pgTagMacManager;
@Resource
private PGTagPositionManager pgTagPositionManager;
+ //查询所有设备
public void getAllMac()
{
TypeRef> tagMacType = new TypeRef>() {
};
-// String allTagMac="{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"AllResult\":[{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":29189,\"TagMac\":\"B0:8E:1A:41:1B:48\",\"TagName\":\"48\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"研发西北\",\"CoordinatesId\":24,\"X\":54.12,\"Y\":54.62,\"IsLowBattery\":true,\"IsAreaWarning\":false,\"IsDisappeared\":false,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":false,\"HostName\":\"48\",\"HostId\":203,\"HostGroupIds\":[1,15],\"HostStatusId\":0,\"HostExternalId\":\"1\",\"HostExternalInfo\":null,\"postionUpdateTime\":\"2019-05-22T11:44:04.0919002+08:00\"},{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":11003,\"TagMac\":\"B0:8E:1A:50:54:88\",\"TagName\":\"马桶监测505488\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"101洗漱间\",\"CoordinatesId\":38,\"X\":-88.7699966430664,\"Y\":-24.059999465942383,\"IsLowBattery\":false,\"IsAreaWarning\":false,\"IsDisappeared\":true,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":true,\"HostName\":\"马桶监测505488\",\"HostId\":96,\"HostGroupIds\":[1,9],\"HostStatusId\":0,\"HostExternalId\":\"5488\",\"HostExternalInfo\":\"\",\"postionUpdateTime\":\"2019-05-22T11:09:31.9387103+08:00\"}]}";
+
String allTagMac=null;
allTagMac = HttpClientUtils.get(getAllUrl,authorization);
logger.info("allTag:"+allTagMac);
@@ -76,7 +78,9 @@
}
}
}
- public void getMacPosition() throws ParseException {
+
+ public void getMacPosition() throws ParseException
+ {
TypeRef> tagPositionType = new TypeRef>() {
};
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -118,59 +122,6 @@
}
}
- public void postInOut(String strFrom) {
- Calendar calendar = Calendar.getInstance();
- Date dtTo = calendar.getTime();
- calendar.add(Calendar.HOUR,-1);
- Date limitDate = calendar.getTime();
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- JSONObject jsonBody = new JSONObject();
- jsonBody.put("dtFrom", strFrom);
- jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
- logger.info("body:" + jsonBody.toString());
- String allInOut;
- List> listInOut = new ArrayList<>();
- allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
-// logger.info("allInOut:" + allInOut);
- if (StringUtils.isNotBlank(allInOut)) {
- ReadContext readContext = JsonPath.parse(allInOut);
- if ("true".equals(readContext.read("$.Suceess", String.class))) {
- listInOut = readContext.read("$.AreaInOutInfo");
- for (Map map :listInOut)
- {
- Date inTime = null;
- Date outTime = null;
- String sHostId = map.get("hostId").toString();
- String sInTime = map.get("inTime").toString();
- String sOutTime = map.get("outTime").toString();
- if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
- break;
-
- try {
- inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
-// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
- System.out.println("overTime In PG");
- }
- if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
- {
- sOutTime = sOutTime.substring(0,19).replace('T',' ');
- try {
- outTime = simpleDateFormat.parse(sOutTime);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (outTime != null)
- pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
- }
- }
- }
- }
- }
-
public String getViaHostId(String sHostId)
{
TypeRef> tagMacType = new TypeRef>() {
@@ -227,8 +178,6 @@
return pgTagPosition;
}
-
-
public void getMinInTime()
{
logger.info("getInTime:"+pgTagMacManager.getMinInTime());
@@ -237,21 +186,65 @@
postInOut(dtFrom);
}
-
- public void test()
+ public void postInOut(String strFrom)
{
-// logger.info("testProc:"+pgTagMacManager.testProc());
-// logger.info(String.valueOf(pgTagMacManager.inPGalarm("210","2019-05-22 12:00:00")));
-// logger.info(String.valueOf(pgTagMacManager.updateINPGstatus ("187","2019-05-23 07:28:00","2019-05-23 08:18:00")));
+ Calendar calendar = Calendar.getInstance();
+ Date dtTo = calendar.getTime();
+ calendar.add(Calendar.HOUR,-1);
+ Date limitDate = calendar.getTime();
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ JSONObject jsonBody = new JSONObject();
+ jsonBody.put("dtFrom", strFrom);
+ jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
+ logger.info("body:" + jsonBody.toString());
+ String allInOut;
+ List> listInOut = new ArrayList<>();
+ allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
+// logger.info("allInOut:" + allInOut);
+ if (StringUtils.isNotBlank(allInOut)) {
+ ReadContext readContext = JsonPath.parse(allInOut);
+ if ("true".equals(readContext.read("$.Suceess", String.class))) {
+ listInOut = readContext.read("$.AreaInOutInfo");
+ for (Map map :listInOut)
+ {
+ Date inTime = null;
+ Date outTime = null;
+ String sHostId = map.get("hostId").toString();
+ String sInTime = map.get("inTime").toString();
+ String sOutTime = map.get("outTime").toString();
+ if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
+ break;
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
+ try {
+ inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
+// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
+ System.out.println("overTime In PG");
+ }
+ if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
+ {
+ sOutTime = sOutTime.substring(0,19).replace('T',' ');
+ try {
+ outTime = simpleDateFormat.parse(sOutTime);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (outTime != null)
+ pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
+ }
+ }
+ }
+ }
}
- public static void main(String[] args) throws ParseException {
+ public static void main(String[] args) throws ParseException
+ {
TagmacRun tagmacRun = new TagmacRun();
-// tagmacRun.getMacPosition();
+
tagmacRun.getAllMac();
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c7d7693..6e76215 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -36,15 +36,16 @@
@Resource
private PGInOutRecManager pgInOutRecManager;
@Resource
- private PGTagPositionManager pgTagPositionManager;
- @Resource
- private PgInPgPersonManager pgInPgPersonManager;
- @Resource
private PGTagMacManager pgTagMacManager;
@Resource
+ private TagmacRun tagmacRun;
+ @Resource
+ private PGTagPositionManager pgTagPositionManager;
+
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
@Resource
- private TagmacRun tagmacRun;
+ private PgInPgPersonManager pgInPgPersonManager;
@Resource
private PgDeviceManager pgDeviceManager;
@@ -71,6 +72,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
+ //调用接口返回定位信息
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index 3eed00a..ea51e30 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -50,7 +50,7 @@
String msg = "";
String code="0";
- PgDeviceDto pgDeviceDto = null;
+ List pgDeviceDtoList = new ArrayList<>();
try {
if(StringUtils.isNotBlank(id)) {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
@@ -61,7 +61,7 @@
if (pgDevice == null)
msg = "不存在报警设备";
else {
- pgDeviceDto = new PgDeviceDto(pgDevice);
+ pgDeviceDtoList = pgDeviceManager.getAlarmLinkDevice(pgDevice,pgAlarm);
msg = "报警关联设备获取成功";
code="200";
}
@@ -75,7 +75,7 @@
}
resultMap.put("code",code);
resultMap.put("msg", msg);
- resultMap.put("result", pgDeviceDto);
+ resultMap.put("result", pgDeviceDtoList);
return resultMap;
}
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
index e9eeec4..2c7c6b3 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
@@ -65,4 +65,4 @@
this.userName = userName;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
index 21e8bdb..7d0d0f5 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
@@ -28,7 +28,6 @@
formatStr="yyyy-MM-dd";
Criteria criteria = createCriteria(PGInOutRec.class);
-// Disjunction disjunction = Restrictions.disjunction();
if (StringUtils.isNotBlank(timeStart)&&StringUtils.isNotBlank(timeEnd))
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatStr);
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
index d36e76b..9d1aa24 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
@@ -25,7 +25,10 @@
public void getAllMac(){
tagmacRun.getAllMac();
}
- public void getMacPosition() throws ParseException {tagmacRun.getMacPosition();}
+ public void getMacPosition() throws ParseException {
+ tagmacRun.getMacPosition();
+ }
+
public static void main(String[] args) {
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
index 7cfb751..e99c1e6 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
@@ -41,15 +41,17 @@
private static final String getAllUrl=configProperty.getString("AllResult");//接口url
private static final Logger logger = LoggerFactory.getLogger(TagmacRun.class);
private static final String nullTimeStr = "0001-01-01T00:00:00+08:00";
+
@Resource
private PGTagMacManager pgTagMacManager;
@Resource
private PGTagPositionManager pgTagPositionManager;
+ //查询所有设备
public void getAllMac()
{
TypeRef> tagMacType = new TypeRef>() {
};
-// String allTagMac="{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"AllResult\":[{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":29189,\"TagMac\":\"B0:8E:1A:41:1B:48\",\"TagName\":\"48\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"研发西北\",\"CoordinatesId\":24,\"X\":54.12,\"Y\":54.62,\"IsLowBattery\":true,\"IsAreaWarning\":false,\"IsDisappeared\":false,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":false,\"HostName\":\"48\",\"HostId\":203,\"HostGroupIds\":[1,15],\"HostStatusId\":0,\"HostExternalId\":\"1\",\"HostExternalInfo\":null,\"postionUpdateTime\":\"2019-05-22T11:44:04.0919002+08:00\"},{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":11003,\"TagMac\":\"B0:8E:1A:50:54:88\",\"TagName\":\"马桶监测505488\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"101洗漱间\",\"CoordinatesId\":38,\"X\":-88.7699966430664,\"Y\":-24.059999465942383,\"IsLowBattery\":false,\"IsAreaWarning\":false,\"IsDisappeared\":true,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":true,\"HostName\":\"马桶监测505488\",\"HostId\":96,\"HostGroupIds\":[1,9],\"HostStatusId\":0,\"HostExternalId\":\"5488\",\"HostExternalInfo\":\"\",\"postionUpdateTime\":\"2019-05-22T11:09:31.9387103+08:00\"}]}";
+
String allTagMac=null;
allTagMac = HttpClientUtils.get(getAllUrl,authorization);
logger.info("allTag:"+allTagMac);
@@ -76,7 +78,9 @@
}
}
}
- public void getMacPosition() throws ParseException {
+
+ public void getMacPosition() throws ParseException
+ {
TypeRef> tagPositionType = new TypeRef>() {
};
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -118,59 +122,6 @@
}
}
- public void postInOut(String strFrom) {
- Calendar calendar = Calendar.getInstance();
- Date dtTo = calendar.getTime();
- calendar.add(Calendar.HOUR,-1);
- Date limitDate = calendar.getTime();
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- JSONObject jsonBody = new JSONObject();
- jsonBody.put("dtFrom", strFrom);
- jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
- logger.info("body:" + jsonBody.toString());
- String allInOut;
- List> listInOut = new ArrayList<>();
- allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
-// logger.info("allInOut:" + allInOut);
- if (StringUtils.isNotBlank(allInOut)) {
- ReadContext readContext = JsonPath.parse(allInOut);
- if ("true".equals(readContext.read("$.Suceess", String.class))) {
- listInOut = readContext.read("$.AreaInOutInfo");
- for (Map map :listInOut)
- {
- Date inTime = null;
- Date outTime = null;
- String sHostId = map.get("hostId").toString();
- String sInTime = map.get("inTime").toString();
- String sOutTime = map.get("outTime").toString();
- if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
- break;
-
- try {
- inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
-// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
- System.out.println("overTime In PG");
- }
- if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
- {
- sOutTime = sOutTime.substring(0,19).replace('T',' ');
- try {
- outTime = simpleDateFormat.parse(sOutTime);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (outTime != null)
- pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
- }
- }
- }
- }
- }
-
public String getViaHostId(String sHostId)
{
TypeRef> tagMacType = new TypeRef>() {
@@ -227,8 +178,6 @@
return pgTagPosition;
}
-
-
public void getMinInTime()
{
logger.info("getInTime:"+pgTagMacManager.getMinInTime());
@@ -237,21 +186,65 @@
postInOut(dtFrom);
}
-
- public void test()
+ public void postInOut(String strFrom)
{
-// logger.info("testProc:"+pgTagMacManager.testProc());
-// logger.info(String.valueOf(pgTagMacManager.inPGalarm("210","2019-05-22 12:00:00")));
-// logger.info(String.valueOf(pgTagMacManager.updateINPGstatus ("187","2019-05-23 07:28:00","2019-05-23 08:18:00")));
+ Calendar calendar = Calendar.getInstance();
+ Date dtTo = calendar.getTime();
+ calendar.add(Calendar.HOUR,-1);
+ Date limitDate = calendar.getTime();
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ JSONObject jsonBody = new JSONObject();
+ jsonBody.put("dtFrom", strFrom);
+ jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
+ logger.info("body:" + jsonBody.toString());
+ String allInOut;
+ List> listInOut = new ArrayList<>();
+ allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
+// logger.info("allInOut:" + allInOut);
+ if (StringUtils.isNotBlank(allInOut)) {
+ ReadContext readContext = JsonPath.parse(allInOut);
+ if ("true".equals(readContext.read("$.Suceess", String.class))) {
+ listInOut = readContext.read("$.AreaInOutInfo");
+ for (Map map :listInOut)
+ {
+ Date inTime = null;
+ Date outTime = null;
+ String sHostId = map.get("hostId").toString();
+ String sInTime = map.get("inTime").toString();
+ String sOutTime = map.get("outTime").toString();
+ if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
+ break;
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
+ try {
+ inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
+// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
+ System.out.println("overTime In PG");
+ }
+ if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
+ {
+ sOutTime = sOutTime.substring(0,19).replace('T',' ');
+ try {
+ outTime = simpleDateFormat.parse(sOutTime);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (outTime != null)
+ pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
+ }
+ }
+ }
+ }
}
- public static void main(String[] args) throws ParseException {
+ public static void main(String[] args) throws ParseException
+ {
TagmacRun tagmacRun = new TagmacRun();
-// tagmacRun.getMacPosition();
+
tagmacRun.getAllMac();
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c7d7693..6e76215 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -36,15 +36,16 @@
@Resource
private PGInOutRecManager pgInOutRecManager;
@Resource
- private PGTagPositionManager pgTagPositionManager;
- @Resource
- private PgInPgPersonManager pgInPgPersonManager;
- @Resource
private PGTagMacManager pgTagMacManager;
@Resource
+ private TagmacRun tagmacRun;
+ @Resource
+ private PGTagPositionManager pgTagPositionManager;
+
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
@Resource
- private TagmacRun tagmacRun;
+ private PgInPgPersonManager pgInPgPersonManager;
@Resource
private PgDeviceManager pgDeviceManager;
@@ -71,6 +72,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
+ //调用接口返回定位信息
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index 3eed00a..ea51e30 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -50,7 +50,7 @@
String msg = "";
String code="0";
- PgDeviceDto pgDeviceDto = null;
+ List pgDeviceDtoList = new ArrayList<>();
try {
if(StringUtils.isNotBlank(id)) {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
@@ -61,7 +61,7 @@
if (pgDevice == null)
msg = "不存在报警设备";
else {
- pgDeviceDto = new PgDeviceDto(pgDevice);
+ pgDeviceDtoList = pgDeviceManager.getAlarmLinkDevice(pgDevice,pgAlarm);
msg = "报警关联设备获取成功";
code="200";
}
@@ -75,7 +75,7 @@
}
resultMap.put("code",code);
resultMap.put("msg", msg);
- resultMap.put("result", pgDeviceDto);
+ resultMap.put("result", pgDeviceDtoList);
return resultMap;
}
diff --git a/src/main/resources/spring/taskConfig-applicationContext.xml b/src/main/resources/spring/taskConfig-applicationContext.xml
index eff64f8..76b19b4 100644
--- a/src/main/resources/spring/taskConfig-applicationContext.xml
+++ b/src/main/resources/spring/taskConfig-applicationContext.xml
@@ -1,23 +1,21 @@
+ http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd"
+ default-lazy-init="true">
-
-
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..fa99c1b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/smartfox_info.xml b/.idea/smartfox_info.xml
new file mode 100644
index 0000000..1c2584f
--- /dev/null
+++ b/.idea/smartfox_info.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 23cc2cc..f8190dd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,14 +7,19 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -42,42 +47,42 @@
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
@@ -85,6 +90,7 @@
+
@@ -100,20 +106,21 @@
-
+
-
+
-
+
-
+
+
@@ -127,7 +134,7 @@
-
+
@@ -135,95 +142,43 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -239,19 +194,6 @@
- getPgInPersonListByDay
- getDayInPgStatistic
- PgConstruction
- getDayAlarmStatistic
- queryConstructDoc
- getMonthAlarmNum
- searchConstruction
- getPersonNumInPgByMonth
- PGCONSTRUCTIONTYPEID
- pgConstructionTypeId
- saveFiles
- getDtoByObject
- getAllPgCsDocument
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
@@ -269,6 +211,19 @@
getPgLineAcuHole
addPipeLine
getPipeLineBylineName
+ alarmGrade
+ invokeMethod
+ getRecentPosition
+ getMacPosition
+ getAllMac
+ overtimeInPG
+ postInOut
+ getMinInTime
+ GetTagStatus
+ PGInOutRecDto
+ PGPositionDto
+ PG_INOUTPG_RECORD
+ linkDevice
@@ -277,15 +232,6 @@
-
-
-
-
-
-
-
-
-
@@ -307,10 +253,8 @@
-
-
@@ -328,6 +272,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -363,7 +318,7 @@
-
+
@@ -372,6 +327,7 @@
+
@@ -445,18 +401,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -468,25 +412,20 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
@@ -705,7 +644,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -833,11 +778,18 @@
1581067837142
-
+
+ 1581404209424
+
+
+
+ 1581404209424
+
+
-
+
@@ -849,9 +801,9 @@
-
+
-
+
@@ -862,7 +814,7 @@
-
+
@@ -887,43 +839,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +872,8 @@
-
+
+
@@ -982,210 +898,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1228,24 +940,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1256,13 +954,6 @@
-
-
-
-
-
-
-
@@ -1270,20 +961,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1291,26 +968,60 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1318,55 +1029,240 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
index 80009bd..bf191ff 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java
@@ -172,4 +172,5 @@
}
+
}
\ No newline at end of file
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 bbad80e..6a8e293 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -184,7 +184,7 @@
if (StringUtils.isNotBlank(endDay)) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(DateUtils.sdf_day.parse(endDay));
- calendar.add(Calendar.DATE, 1);
+ calendar.add(Calendar.DATE, 1);;
criteria.add(Restrictions.le("alarmDate", calendar.getTime()));
}
@@ -197,7 +197,7 @@
else if(isNew.equals("true"))
criteria.add(Restrictions.eq("active", 1));
}
- criteria.addOrder(Order.desc("id"));
+ criteria.addOrder(Order.desc("alarmGrade"));
Page pg = pagedQuery(criteria, page, rows);
List pgAlarmList = (List)pg.getResult();
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
index 654f49e..661de48 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -2,6 +2,7 @@
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
import com.casic.PgInterface.core.util.StringUtils;
+import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.devTable.domain.PgDevice;
import com.casic.PgInterface.devTable.dto.PgDeviceDto;
import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto;
@@ -210,4 +211,27 @@
return pgDeviceDtoList;
}
+ public List getAlarmLinkDevice(PgDevice pgdevice, PgAlarm pgAlarm){
+
+ String devPosition = pgdevice.getPosition().substring(0,3);
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ criteria.add(Restrictions.eq("partition",pgdevice.getPartition()));
+ criteria.add(Restrictions.like("position",devPosition+"%"));
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊运行环境报警")){
+ criteria.add(Restrictions.eq("devType","风机"));
+ }
+ if(pgAlarm.getAlarmTypeId().getAlarmType().equals("管廊安全防范报警")){
+ criteria.add(Restrictions.eq("devType","普通荧光灯"));
+ }
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
index e9eeec4..2c7c6b3 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/domain/PGInOutRec.java
@@ -65,4 +65,4 @@
this.userName = userName;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
index 21e8bdb..7d0d0f5 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/manager/PGInOutRecManager.java
@@ -28,7 +28,6 @@
formatStr="yyyy-MM-dd";
Criteria criteria = createCriteria(PGInOutRec.class);
-// Disjunction disjunction = Restrictions.disjunction();
if (StringUtils.isNotBlank(timeStart)&&StringUtils.isNotBlank(timeEnd))
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatStr);
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
index d36e76b..9d1aa24 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/SyncPGtask.java
@@ -25,7 +25,10 @@
public void getAllMac(){
tagmacRun.getAllMac();
}
- public void getMacPosition() throws ParseException {tagmacRun.getMacPosition();}
+ public void getMacPosition() throws ParseException {
+ tagmacRun.getMacPosition();
+ }
+
public static void main(String[] args) {
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
index 7cfb751..e99c1e6 100644
--- a/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
+++ b/src/main/java/com/casic/PgInterface/overtimeInPG/task/TagmacRun.java
@@ -41,15 +41,17 @@
private static final String getAllUrl=configProperty.getString("AllResult");//接口url
private static final Logger logger = LoggerFactory.getLogger(TagmacRun.class);
private static final String nullTimeStr = "0001-01-01T00:00:00+08:00";
+
@Resource
private PGTagMacManager pgTagMacManager;
@Resource
private PGTagPositionManager pgTagPositionManager;
+ //查询所有设备
public void getAllMac()
{
TypeRef> tagMacType = new TypeRef>() {
};
-// String allTagMac="{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"AllResult\":[{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":29189,\"TagMac\":\"B0:8E:1A:41:1B:48\",\"TagName\":\"48\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"研发西北\",\"CoordinatesId\":24,\"X\":54.12,\"Y\":54.62,\"IsLowBattery\":true,\"IsAreaWarning\":false,\"IsDisappeared\":false,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":false,\"HostName\":\"48\",\"HostId\":203,\"HostGroupIds\":[1,15],\"HostStatusId\":0,\"HostExternalId\":\"1\",\"HostExternalInfo\":null,\"postionUpdateTime\":\"2019-05-22T11:44:04.0919002+08:00\"},{\"Success\":true,\"ErrorCode\":0,\"ErrorText\":\"\",\"TagId\":11003,\"TagMac\":\"B0:8E:1A:50:54:88\",\"TagName\":\"马桶监测505488\",\"SerialNo\":\"\",\"MapId\":2,\"CoordinatesName\":\"101洗漱间\",\"CoordinatesId\":38,\"X\":-88.7699966430664,\"Y\":-24.059999465942383,\"IsLowBattery\":false,\"IsAreaWarning\":false,\"IsDisappeared\":true,\"IsBeltBroken\":false,\"IsReset\":false,\"IsStill2Move\":false,\"IsMove2Still\":false,\"IsButtonPress\":true,\"HostName\":\"马桶监测505488\",\"HostId\":96,\"HostGroupIds\":[1,9],\"HostStatusId\":0,\"HostExternalId\":\"5488\",\"HostExternalInfo\":\"\",\"postionUpdateTime\":\"2019-05-22T11:09:31.9387103+08:00\"}]}";
+
String allTagMac=null;
allTagMac = HttpClientUtils.get(getAllUrl,authorization);
logger.info("allTag:"+allTagMac);
@@ -76,7 +78,9 @@
}
}
}
- public void getMacPosition() throws ParseException {
+
+ public void getMacPosition() throws ParseException
+ {
TypeRef> tagPositionType = new TypeRef>() {
};
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -118,59 +122,6 @@
}
}
- public void postInOut(String strFrom) {
- Calendar calendar = Calendar.getInstance();
- Date dtTo = calendar.getTime();
- calendar.add(Calendar.HOUR,-1);
- Date limitDate = calendar.getTime();
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- JSONObject jsonBody = new JSONObject();
- jsonBody.put("dtFrom", strFrom);
- jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
- logger.info("body:" + jsonBody.toString());
- String allInOut;
- List> listInOut = new ArrayList<>();
- allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
-// logger.info("allInOut:" + allInOut);
- if (StringUtils.isNotBlank(allInOut)) {
- ReadContext readContext = JsonPath.parse(allInOut);
- if ("true".equals(readContext.read("$.Suceess", String.class))) {
- listInOut = readContext.read("$.AreaInOutInfo");
- for (Map map :listInOut)
- {
- Date inTime = null;
- Date outTime = null;
- String sHostId = map.get("hostId").toString();
- String sInTime = map.get("inTime").toString();
- String sOutTime = map.get("outTime").toString();
- if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
- break;
-
- try {
- inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
-// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
- System.out.println("overTime In PG");
- }
- if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
- {
- sOutTime = sOutTime.substring(0,19).replace('T',' ');
- try {
- outTime = simpleDateFormat.parse(sOutTime);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- if (outTime != null)
- pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
- }
- }
- }
- }
- }
-
public String getViaHostId(String sHostId)
{
TypeRef> tagMacType = new TypeRef>() {
@@ -227,8 +178,6 @@
return pgTagPosition;
}
-
-
public void getMinInTime()
{
logger.info("getInTime:"+pgTagMacManager.getMinInTime());
@@ -237,21 +186,65 @@
postInOut(dtFrom);
}
-
- public void test()
+ public void postInOut(String strFrom)
{
-// logger.info("testProc:"+pgTagMacManager.testProc());
-// logger.info(String.valueOf(pgTagMacManager.inPGalarm("210","2019-05-22 12:00:00")));
-// logger.info(String.valueOf(pgTagMacManager.updateINPGstatus ("187","2019-05-23 07:28:00","2019-05-23 08:18:00")));
+ Calendar calendar = Calendar.getInstance();
+ Date dtTo = calendar.getTime();
+ calendar.add(Calendar.HOUR,-1);
+ Date limitDate = calendar.getTime();
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ JSONObject jsonBody = new JSONObject();
+ jsonBody.put("dtFrom", strFrom);
+ jsonBody.put("dtTo", simpleDateFormat.format(dtTo));
+ logger.info("body:" + jsonBody.toString());
+ String allInOut;
+ List> listInOut = new ArrayList<>();
+ allInOut = HttpClientUtils.post(getInOutUrl, jsonBody.toString(), authorization);
+// logger.info("allInOut:" + allInOut);
+ if (StringUtils.isNotBlank(allInOut)) {
+ ReadContext readContext = JsonPath.parse(allInOut);
+ if ("true".equals(readContext.read("$.Suceess", String.class))) {
+ listInOut = readContext.read("$.AreaInOutInfo");
+ for (Map map :listInOut)
+ {
+ Date inTime = null;
+ Date outTime = null;
+ String sHostId = map.get("hostId").toString();
+ String sInTime = map.get("inTime").toString();
+ String sOutTime = map.get("outTime").toString();
+ if (nullTimeStr.equals(sInTime)&&nullTimeStr.equals(sOutTime))
+ break;
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
-// logger.info("query:"+pgInOutRecManager.getInOutRec("2019-01-01","2019-06-02").toString());
+ try {
+ inTime = simpleDateFormat.parse(sInTime.substring(0,19).replace('T',' '));
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (inTime != null && -1 == inTime.compareTo(limitDate) && StringUtils.isBlank(sOutTime)) {
+// pgTagMacManager.inPGalarm(sHostId, sInTime);//remove
+ System.out.println("overTime In PG");
+ }
+ if (!nullTimeStr.equals(sOutTime) && StringUtils.isNotBlank(sOutTime))
+ {
+ sOutTime = sOutTime.substring(0,19).replace('T',' ');
+ try {
+ outTime = simpleDateFormat.parse(sOutTime);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ if (outTime != null)
+ pgTagMacManager.updateINPGstatus(sHostId,sInTime,sOutTime);
+ }
+ }
+ }
+ }
}
- public static void main(String[] args) throws ParseException {
+ public static void main(String[] args) throws ParseException
+ {
TagmacRun tagmacRun = new TagmacRun();
-// tagmacRun.getMacPosition();
+
tagmacRun.getAllMac();
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c7d7693..6e76215 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -36,15 +36,16 @@
@Resource
private PGInOutRecManager pgInOutRecManager;
@Resource
- private PGTagPositionManager pgTagPositionManager;
- @Resource
- private PgInPgPersonManager pgInPgPersonManager;
- @Resource
private PGTagMacManager pgTagMacManager;
@Resource
+ private TagmacRun tagmacRun;
+ @Resource
+ private PGTagPositionManager pgTagPositionManager;
+
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
@Resource
- private TagmacRun tagmacRun;
+ private PgInPgPersonManager pgInPgPersonManager;
@Resource
private PgDeviceManager pgDeviceManager;
@@ -71,6 +72,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
+ //调用接口返回定位信息
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index 3eed00a..ea51e30 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -50,7 +50,7 @@
String msg = "";
String code="0";
- PgDeviceDto pgDeviceDto = null;
+ List pgDeviceDtoList = new ArrayList<>();
try {
if(StringUtils.isNotBlank(id)) {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
@@ -61,7 +61,7 @@
if (pgDevice == null)
msg = "不存在报警设备";
else {
- pgDeviceDto = new PgDeviceDto(pgDevice);
+ pgDeviceDtoList = pgDeviceManager.getAlarmLinkDevice(pgDevice,pgAlarm);
msg = "报警关联设备获取成功";
code="200";
}
@@ -75,7 +75,7 @@
}
resultMap.put("code",code);
resultMap.put("msg", msg);
- resultMap.put("result", pgDeviceDto);
+ resultMap.put("result", pgDeviceDtoList);
return resultMap;
}
diff --git a/src/main/resources/spring/taskConfig-applicationContext.xml b/src/main/resources/spring/taskConfig-applicationContext.xml
index eff64f8..76b19b4 100644
--- a/src/main/resources/spring/taskConfig-applicationContext.xml
+++ b/src/main/resources/spring/taskConfig-applicationContext.xml
@@ -1,23 +1,21 @@
+ http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd"
+ default-lazy-init="true">
-
-
diff --git "a/~$\345\234\250\345\273\212\344\272\272\345\221\230\345\256\232\344\275\21520190916.docx" "b/~$\345\234\250\345\273\212\344\272\272\345\221\230\345\256\232\344\275\21520190916.docx"
new file mode 100644
index 0000000..a51e702
--- /dev/null
+++ "b/~$\345\234\250\345\273\212\344\272\272\345\221\230\345\256\232\344\275\21520190916.docx"
Binary files differ