diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25ded8a..283d7ab 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,20 +7,56 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -51,7 +87,7 @@
-
+
@@ -60,7 +96,7 @@
-
+
@@ -68,32 +104,32 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -106,8 +142,8 @@
-
-
+
+
@@ -122,23 +158,25 @@
+
+
-
+
-
+
-
-
+
+
@@ -147,73 +185,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -225,18 +196,9 @@
- inCriteria
- getPgPlanResulList
- getPileAcuListByPileAcuStr
- distinct
- order
- canPlanLine
- isExistLine
- getPlanResult
pgPipeLine
getPipeLineBylineName
StringU
- getAllAlarm
getAlarmList
getPgInPersonListByDay
getDayInPgStatistic
@@ -254,7 +216,16 @@
getPgContructionByNameOrType
"","",
getPgContructionDtoByNameOrType
+ addConstruction
+ getPgLineAcuHole
+ getPlanResult
getConstruction
+ addPipeLine
+ 未找到入廊数据
+ getCurrentHoleByAcu
+ getAllAlarm
+ getPgDeviceDtoListByPartition
+ getPgDeviceByDevType
@@ -263,57 +234,57 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,7 +330,6 @@
-
@@ -421,53 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -479,29 +402,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -516,6 +416,7 @@
+
@@ -710,7 +611,13 @@
-
+
+
+
+
+
+
+
1564361618083
@@ -817,11 +724,18 @@
1575775489149
-
+
+ 1575791780774
+
+
+
+ 1575791780774
+
+
-
+
@@ -834,9 +748,8 @@
-
-
+
@@ -847,7 +760,7 @@
-
+
@@ -939,7 +852,8 @@
-
+
+
@@ -951,16 +865,10 @@
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgDeviceRs.java
- 69
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+ 40
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgTempHumRs.java
- 96
-
-
+
@@ -970,394 +878,452 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1365,52 +1331,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
index c436c93..e913155 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -132,7 +132,10 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType());
- this.setAlarmValue(pgAlarm.getAlarmValue());
+ if(pgAlarm.getAlarmValue()==null)
+ this.setAlarmValue("");
+ else
+ this.setAlarmValue(pgAlarm.getAlarmValue());
if (pgAlarm.getAlarmDate() != null)
this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate()));
else
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 a43965c..565cb41 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
@@ -159,11 +159,21 @@
}
//获取历史报警消息列表
- public List getAllAlarm(String alarmType,String startDay,String endDay,String isNew,int page,int rows) {
- try {
+ public Map getAllAlarm(String alarmType,String partition,String startDay,String endDay,String isNew,int page,int rows) {
+ Map resultMap = new HashMap<>();
+ String msg="";
+
+ try {
Criteria criteria = createCriteria(PgAlarm.class);
+ if (StringUtils.isNotBlank(partition)) {
+ DetachedCriteria inCriteria = DetachedCriteria.forClass(PgDevice.class);
+ inCriteria.add(Restrictions.eq("partition", partition));
+ inCriteria.setProjection(Property.forName("id"));
+ criteria.add(Property.forName("alarmDevId").in(inCriteria));
+ }
+
if (StringUtils.isNotBlank(alarmType)&&!alarmType.contains("全部")&&pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)!=null)
criteria.add(Restrictions.eq("alarmTypeId", pgAlarmTypeManager.getAlarmTypeByAlarmType(alarmType)));
@@ -190,8 +200,16 @@
for (PgAlarm pgAlarm : pgAlarmList) {
pgAlarmDtoList.add(new PgAlarmDto(pgAlarm));
}
-
- return pgAlarmDtoList;
+ if(pgAlarmDtoList==null||pgAlarmDtoList.size()==0) {
+ resultMap.put("msg", "没有报警信息");
+ resultMap.put("code","0");
+ }else {
+ resultMap.put("code","200");
+ resultMap.put("msg", "报警信息获取成功");
+ }
+ resultMap.put("count",pg.getTotalCount());
+ resultMap.put("result",pgAlarmDtoList);
+ return resultMap;
}
catch(Exception ex){
ex.printStackTrace();
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 7547560..654f49e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -24,11 +24,11 @@
Criteria criteria = createCriteria(PgDevice.class);
- if(road!=null)
+ if(StringUtils.isNotBlank(road))
criteria.add(Restrictions.eq("road",road));
- if(partition!=null)
+ if(StringUtils.isNotBlank(partition))
criteria.add(Restrictions.eq("partition",partition));
- if(devType!=null)
+ if(StringUtils.isNotBlank(devType))
criteria.add(Restrictions.eq("devType",devType));
criteria.add(Restrictions.eq("active", 1));
@@ -43,6 +43,29 @@
return pgDeviceDtoList;
}
+ public List getAllDev(String road,String partition,String devType) {
+
+ Criteria criteria = createCriteria(PgDevice.class);
+
+ if(StringUtils.isNotBlank(road))
+ criteria.add(Restrictions.eq("road",road));
+ if(StringUtils.isNotBlank(partition))
+ criteria.add(Restrictions.eq("partition",partition));
+ if(StringUtils.isNotBlank(devType))
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
+
+ criteria.add(Restrictions.eq("active", 1));
+ criteria.addOrder(Order.desc("id"));
+ List pgDeviceList = criteria.list();
+
+ List pgDeviceDtoList = new ArrayList<>();
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+
+ return pgDeviceDtoList;
+ }
+
//根据名字获取当前设备
public PgDevice getDeviceByAssetCode(String assetCode) {
Criteria criteria=createCriteria(PgDevice.class);
@@ -56,9 +79,9 @@
}
//根据类型获取设备列表
- public List getDeviceByDevTypee(String devType) {
+ public List getDeviceByDevType(String devType) {
Criteria criteria=createCriteria(PgDevice.class);
- criteria.add(Restrictions.eq("devType",devType));
+ criteria.add(Restrictions.like("devType","%"+devType+"%"));
List pgDeviceList=criteria.list();
List pgDeviceDtoList = new ArrayList<>();
@@ -106,7 +129,7 @@
criteria.add(Restrictions.eq("partition",partition));
List pgDeviceList=criteria.list();
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
for (PgDevice pgDevice : pgDeviceList) {
pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
index 3a3bccd..595730e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgPartitionManager.java
@@ -1,10 +1,13 @@
package com.casic.PgInterface.devTable.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgAlarmType;
import com.casic.PgInterface.devTable.domain.PgPartition;
import com.casic.PgInterface.devTable.domain.PgRoad;
import com.casic.PgInterface.devTable.domain.PipeGallery;
import com.casic.PgInterface.devTable.dto.PgPartitionDto;
+import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -12,7 +15,9 @@
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by yxw on 2017/11/4.
@@ -21,7 +26,8 @@
public class PgPartitionManager extends HibernateEntityDao {
@Resource
- PgRoadManager pgRoadManager;
+ private PgRoadManager pgRoadManager;
+
public PgPartition getPartitionByParName(String parName) {
Criteria criteria = getSession().createCriteria(PgPartition.class);
@@ -99,4 +105,5 @@
return pgPartitionDtoList;
}
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
index f216360..a6928f1 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/dto/PgPlanResultRe.java
@@ -5,6 +5,7 @@
public class PgPlanResultRe {
private String taskKey;
+ private List pileAcuList;
private List pgPlanResultList;
public String getTaskKey() {
@@ -15,6 +16,14 @@
this.taskKey = taskKey;
}
+ public List getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(List pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+
public List getPgPlanResultList() {
return pgPlanResultList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
index 71ea765..47eea07 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgLineHoleManager.java
@@ -54,9 +54,7 @@
List pgLineHoleList=criteria.list();
List pgLineHoleDTOList=new ArrayList<>();
- if(pgLineHoleList==null||pgLineHoleList.size()==0)
- return null;
- else
+ if(pgLineHoleList!=null&&pgLineHoleList.size()!=0)
pgLineHoleDTOList=PgLineHoleDTO.ConvertToDTOList(pgLineHoleList,pgPileAcuManager,pgRoadManager);
return pgLineHoleDTOList;
}
diff --git a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
index 0fd9e1f..841a386 100644
--- a/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
+++ b/src/main/java/com/casic/PgInterface/intelPlan/manager/PgPileAcuManager.java
@@ -1,12 +1,15 @@
package com.casic.PgInterface.intelPlan.manager;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+import com.casic.PgInterface.devTable.domain.PgPartition;
+import com.casic.PgInterface.devTable.manager.PgRoadManager;
import com.casic.PgInterface.intelPlan.domain.PgLineHole;
import com.casic.PgInterface.intelPlan.domain.PgPileAcu;
import com.casic.PgInterface.intelPlan.domain.PgSection;
import com.casic.PgInterface.intelPlan.dto.PgPlanResult;
import com.casic.PgInterface.intelPlan.dto.PgPlanResultRe;
import com.casic.PgInterface.intelPlan.dto.PgPlanTask;
+import com.casic.PgInterface.reservePlan.dto.PgAcuTask;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,6 +25,9 @@
@Resource
private PgLineHoleManager pgLineHoleManager;
+ @Resource
+ private PgRoadManager pgRoadManager;
+
public PgPileAcu getPgPileAcuByCode(String acuCode){
List pgPileAcuList=this.findBy("acuCode",acuCode);
@@ -58,7 +64,9 @@
for(PgPlanTask pgPlanTask:pgPlanTaskList){
List pgPlanResultList=getPgPlanResultByPlantask(pgPlanTask);
PgPlanResultRe pgPlanResultRe=new PgPlanResultRe();
+
pgPlanResultRe.setTaskKey(pgPlanTask.getTaskKey());
+ pgPlanResultRe.setPileAcuList(pgPlanTask.getPileAcuList());
pgPlanResultRe.setPgPlanResultList(pgPlanResultList);
pgPlanResultReList.add(pgPlanResultRe);
@@ -142,4 +150,57 @@
return length;
}
+ private PgPileAcu getPgPileAcuByAcuCode(String acuCode){
+ List pgPileAcuList=this.findBy("acuCode",acuCode);
+
+ if(pgPileAcuList==null||pgPileAcuList.size()==0)
+ return null;
+ else
+ return pgPileAcuList.get(0);
+ }
+
+ public List getACUTask(String pileAcuList){
+ String[] acuArray=pileAcuList.split(",");
+ List pgAcuTaskList=new ArrayList<>();
+
+ for(String acu:acuArray){
+ PgPileAcu pgPileAcu=this.getPgPileAcuByCode(acu);
+ String roadName=pgRoadManager.get(pgPileAcu.getRoadId()).getRoadName();
+
+ if(!containRoad(roadName,pgAcuTaskList))
+ {
+ PgAcuTask pgAcuTask=new PgAcuTask();
+ pgAcuTask.setRoadName(roadName);
+ pgAcuTask.setPileAcuList(acu);
+ pgAcuTaskList.add(pgAcuTask);
+ }
+ else{
+ PgAcuTask pgAcuTask=getIndexRoad(roadName,pgAcuTaskList);
+ if(pgAcuTask!=null)
+ pgAcuTask.setPileAcuList(pgAcuTask.getPileAcuList()+","+acu);
+ }
+ }
+
+ return pgAcuTaskList;
+ }
+
+ private boolean containRoad(String roadName,List pgAcuTaskList){
+ if(pgAcuTaskList==null||pgAcuTaskList.size()==0) return false;
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return true;
+ }
+
+ return false;
+ }
+
+ private PgAcuTask getIndexRoad(String roadName, List pgAcuTaskList){
+ for(PgAcuTask pgAcuTask:pgAcuTaskList){
+ if(pgAcuTask.getRoadName().equals(roadName))
+ return pgAcuTask;
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
new file mode 100644
index 0000000..323f7ef
--- /dev/null
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgAcuTask.java
@@ -0,0 +1,25 @@
+package com.casic.PgInterface.reservePlan.dto;
+
+import java.util.List;
+
+public class PgAcuTask {
+
+ private String roadName;//道路
+ private String pileAcuList;//acu分区
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getPileAcuList() {
+ return pileAcuList;
+ }
+
+ public void setPileAcuList(String pileAcuList) {
+ this.pileAcuList = pileAcuList;
+ }
+}
diff --git a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
index c25e926..c7d7693 100644
--- a/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PGInOutRecRs.java
@@ -70,9 +70,7 @@
Map resultMap = new HashMap<>();
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
-// long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
-// PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
+
PGTagPosition pgTagPosition = tagmacRun.GetTagStatus(pgTagMac);
boolean bExist = false;
bExist = pgTagPositionManager.findTagPosition(pgTagPosition.getPositionUpdatetime(),pgTagPosition.getHostId());
@@ -104,8 +102,7 @@
PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(Long.valueOf(inPgPersonId));
PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",pgInPgPerson);
System.out.println("time:"+pgInPgStatus.getInTime());
-// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("pgInPgPersonId",inPgPersonId);
-// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
+
PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("hostName",pgInPgPerson.getAssetCode());
Map