diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..a4ec716
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..a4ec716
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620181227.docx" "b/~$\350\257\264\346\230\21620181227.docx"
new file mode 100644
index 0000000..44e5569
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620181227.docx"
Binary files differ
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..a4ec716
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620181227.docx" "b/~$\350\257\264\346\230\21620181227.docx"
new file mode 100644
index 0000000..44e5569
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620181227.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620190527.docx" "b/~$\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..c68c40b
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..a4ec716
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620181227.docx" "b/~$\350\257\264\346\230\21620181227.docx"
new file mode 100644
index 0000000..44e5569
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620181227.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620190527.docx" "b/~$\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..c68c40b
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git a/~WRL0009.tmp b/~WRL0009.tmp
deleted file mode 100644
index e3653c8..0000000
--- a/~WRL0009.tmp
+++ /dev/null
Binary files differ
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..a4ec716
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620181227.docx" "b/~$\350\257\264\346\230\21620181227.docx"
new file mode 100644
index 0000000..44e5569
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620181227.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620190527.docx" "b/~$\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..c68c40b
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git a/~WRL0009.tmp b/~WRL0009.tmp
deleted file mode 100644
index e3653c8..0000000
--- a/~WRL0009.tmp
+++ /dev/null
Binary files differ
diff --git a/~WRL2471.tmp b/~WRL2471.tmp
deleted file mode 100644
index c307c0b..0000000
--- a/~WRL2471.tmp
+++ /dev/null
Binary files differ
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..a4ec716
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620181227.docx" "b/~$\350\257\264\346\230\21620181227.docx"
new file mode 100644
index 0000000..44e5569
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620181227.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620190527.docx" "b/~$\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..c68c40b
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git a/~WRL0009.tmp b/~WRL0009.tmp
deleted file mode 100644
index e3653c8..0000000
--- a/~WRL0009.tmp
+++ /dev/null
Binary files differ
diff --git a/~WRL2471.tmp b/~WRL2471.tmp
deleted file mode 100644
index c307c0b..0000000
--- a/~WRL2471.tmp
+++ /dev/null
Binary files differ
diff --git "a/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx" "b/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..833b97a
--- /dev/null
+++ "b/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..a4ec716
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620181227.docx" "b/~$\350\257\264\346\230\21620181227.docx"
new file mode 100644
index 0000000..44e5569
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620181227.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620190527.docx" "b/~$\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..c68c40b
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git a/~WRL0009.tmp b/~WRL0009.tmp
deleted file mode 100644
index e3653c8..0000000
--- a/~WRL0009.tmp
+++ /dev/null
Binary files differ
diff --git a/~WRL2471.tmp b/~WRL2471.tmp
deleted file mode 100644
index c307c0b..0000000
--- a/~WRL2471.tmp
+++ /dev/null
Binary files differ
diff --git "a/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx" "b/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..833b97a
--- /dev/null
+++ "b/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git "a/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620181120.docx" "b/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620181120.docx"
deleted file mode 100644
index 70b12e0..0000000
--- "a/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620181120.docx"
+++ /dev/null
Binary files differ
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index ba1d483..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-PgInterface
\ No newline at end of file
diff --git a/.idea/artifacts/PgInterface.xml b/.idea/artifacts/PgInterface.xml
index 11b1eed..22f4898 100644
--- a/.idea/artifacts/PgInterface.xml
+++ b/.idea/artifacts/PgInterface.xml
@@ -74,7 +74,6 @@
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 280beb9..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index b3295c5..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 72213bf..342c1fa 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,16 +1,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 74c0d0a..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,7 +1,6 @@
-
+
-
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 691ca64..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b47332..45e847a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,25 +3,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
index c0fedb3..af04d64 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,5 +5,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index c80f219..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4128e12..5ad35cc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+<<<<<<< HEAD
@@ -37,115 +38,71 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,12 +152,10 @@
-
-
-
+<<<<<<< HEAD
@@ -235,10 +190,22 @@
+=======
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -260,44 +227,75 @@
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
+=======
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
getConstructionByType
getConstructionByTimeAndStatus
resources
@@ -328,24 +326,29 @@
PropertiesAutoLoad
convertto
commons-configuration
+=======
+ getEquipmentDtiList
+ getPgDevice
+ pgDevice
+ getEquipmentStatistic
+ getPgDeviceDtoListByPartition
+ getDeviceByPartition
+ getPgCameraListByPartition
+ getPgConstructionList
+ statisticType
+ reoair
+ downloadFile
+ queryConstructDoc
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -353,26 +356,34 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+<<<<<<< HEAD
@@ -397,6 +408,9 @@
+=======
+
+>>>>>>> refs/remotes/origin/develop
@@ -409,32 +423,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+<<<<<<< HEAD
@@ -460,14 +459,21 @@
+=======
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
-
+
@@ -507,6 +513,7 @@
+<<<<<<< HEAD
@@ -565,6 +572,11 @@
+=======
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -573,33 +585,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -637,6 +625,16 @@
+=======
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -650,6 +648,7 @@
+<<<<<<< HEAD
@@ -800,6 +799,10 @@
+=======
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -810,7 +813,8 @@
-
+
+
@@ -818,9 +822,7 @@
-
-
-
+
@@ -868,11 +870,13 @@
+
+<<<<<<< HEAD
@@ -980,16 +984,19 @@
+=======
+>>>>>>> refs/remotes/origin/develop
-
- 1510216318970
+
+ 1545183946622
+<<<<<<< HEAD
1510216318970
@@ -1578,137 +1585,110 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+=======
+ 1545183946622
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558940248477
+
+
+
+ 1558940248477
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java
- 47
+ file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PgAlarmManager.java
+ 59
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
- 97
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
- 32
-
-
+
-
-
-
-
-
-
-
-
-
+<<<<<<< HEAD
@@ -1878,11 +1858,172 @@
+=======
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+
+
+
+
+
+<<<<<<< HEAD
@@ -2047,10 +2188,169 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
+<<<<<<< HEAD
@@ -2088,6 +2388,63 @@
+=======
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> refs/remotes/origin/develop
@@ -2102,7 +2459,7 @@
-
+
@@ -2115,7 +2472,7 @@
-
+
@@ -2123,11 +2480,10 @@
- Python 2.7.13rc1 (C:\Python27\python.exe) interpreter library
-
+
@@ -2139,7 +2495,7 @@
-
+
@@ -2151,7 +2507,7 @@
-
+
@@ -2159,7 +2515,7 @@
- 1.7
+ 1.8
@@ -2175,7 +2531,7 @@
-
+
@@ -2183,7 +2539,4 @@
-
-
-
\ No newline at end of file
diff --git a/PgInterface.iml b/PgInterface.iml
index 4f7bbb3..061ff19 100644
--- a/PgInterface.iml
+++ b/PgInterface.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 9caadb7..e018708 100644
--- a/pom.xml
+++ b/pom.xml
@@ -709,43 +709,6 @@
PgInterface
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
index a928236..78fd2ac 100644
--- a/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
+++ b/src/main/java/com/casic/PgInterface/construction/domain/PgConstruction.java
@@ -26,7 +26,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private PgPartition pgPartitionId;//施工区域
+// private PgPartition pgPartitionId;//施工区域
+ private String pgName;//所属仓
private PgConstructionType pgConstructionTypeId;//项目状态
private List pgCsDocumentList;//施工文档
private int active;//状态位
@@ -72,17 +73,27 @@
public void setCs_type(String cs_type){ this.cs_type = cs_type; }
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PAPARTITION_ID")
- public PgPartition getPgPartitionId() {
- return pgPartitionId;
+
+ @Column(name = "PGNAME")
+ public String getPgName() {
+ return pgName;
}
- public void setPgPartitionId(PgPartition pgPartitionId) {
- this.pgPartitionId = pgPartitionId;
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
}
+// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
+// @NotFound(action = NotFoundAction.IGNORE)
+// @JoinColumn(name = "PAPARTITION_ID")
+// public PgPartition getPgPartitionId() {
+// return pgPartitionId;
+// }
+//
+// public void setPgPartitionId(PgPartition pgPartitionId) {
+// this.pgPartitionId = pgPartitionId;
+// }
+
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgConstructionId")
public List getPgCsDocumentList() {
return pgCsDocumentList;
diff --git a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
index 2e23fca..ff5ff18 100644
--- a/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
+++ b/src/main/java/com/casic/PgInterface/construction/dto/PgConstructionDto.java
@@ -16,8 +16,8 @@
private String cs_charge;//施工负责人
private String cs_phone;//联系方式
private String cs_type;//工程类别
- private String parName;//施工区域
private String ConstructionType;//项目状态
+ private String pgName;//所属仓
private String active;//状态位
private String doc_name;//施工文档
@@ -85,14 +85,6 @@
this.cs_type = cs_type;
}
- public String getParName() {
- return parName;
- }
-
- public void setParName(String parName) {
- this.parName = parName;
- }
-
public String getActive(){ return active; }
public void setActive(String active){ this.active = active; }
@@ -113,6 +105,14 @@
this.doc_name = doc_name;
}
+ public String getPgName() {
+ return pgName;
+ }
+
+ public void setPgName(String pgName) {
+ this.pgName = pgName;
+ }
+
public PgConstructionDto(PgConstruction pgConstruction) {
if (pgConstruction == null) {
@@ -134,15 +134,13 @@
this.setCs_charge(pgConstruction.getCs_charge());
this.setCs_phone(pgConstruction.getCs_phone());
this.setCs_type(pgConstruction.getCs_type());
- if(pgConstruction.getPgPartitionId()==null)
- this.setParName("");
- else
- this.setParName(pgConstruction.getPgPartitionId().getParName());
+
if(pgConstruction.getPgConstructionTypeId()==null)
this.setConstructionType("");
else
this.setConstructionType(pgConstruction.getPgConstructionTypeId().getTypeName());
this.setActive(String.valueOf(pgConstruction.getActive()));
+ this.setPgName(pgConstruction.getPgName());
}
}
}
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
index 0bb6158..0d96c76 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java
@@ -42,13 +42,14 @@
return pgConstructionList.get(0);
}
- public List getPgContructionByNameOrType(String cs_name, String cs_type, PgPartition pgPartition, String startTime, String endTime) {
+ public List getPgContructionByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
try {
Criteria criteria = createCriteria(PgConstruction.class);
criteria.addOrder(Order.desc("id"));
- if (pgPartition != null)
- criteria.add(Restrictions.eq("pgPartitionId", pgPartition));
+ if (StringUtils.isNotBlank(pgName))
+ criteria.add(Restrictions.eq("pgName", pgName));
if (StringUtils.isNotBlank(cs_name))
criteria.add(Restrictions.eq("cs_name", cs_name));
if (StringUtils.isNotBlank(cs_type))
@@ -71,13 +72,12 @@
}
}
- public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String parName, String startTime, String endTime) {
+ public List getPgContructionDtoByNameOrType(String cs_name, String cs_type, String pgName,
+ String startTime, String endTime) {
- PgPartition pgPartition=null;
- if(parName!="")
- pgPartition = pgPartitionManager.getPartitionByParName(parName);
+ PgPartition pgPartition=null;;
- List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgPartition, startTime, endTime);
+ List pgConstructionList = getPgContructionByNameOrType(cs_name, cs_type, pgName, startTime, endTime);
List pgConstructionDtoList = new ArrayList();
for (PgConstruction pgConstruction : pgConstructionList) {
@@ -114,9 +114,9 @@
}
sql = "select to_char(t.CS_BEGINTIME, '" + dateType + "'),count(*) from PG_CONSTRUCTION t where 1=1 ";
- if(!startTime.equals(""))
+ if(StringUtils.isNotBlank(startTime))
sql+=" and t.CS_BEGINTIME >= to_date('" + startTime + "', 'yyyy-mm-dd')";
- if(!endTime.equals(""))
+ if(StringUtils.isNotBlank(endTime))
sql+=" and t.CS_BEGINTIME <= to_date('" + endTime + "', 'yyyy-mm-dd')";
sql+="group by to_char(t.CS_BEGINTIME, '" + dateType + "')";
@@ -134,13 +134,13 @@
return pgConstructionStiatisticList;
}
- public List getStatisticByPar(String statisticType){
+ public List getStatisticByPar(){
List pgConstructionStiatisticList = new ArrayList();
String str="PAPARTITION_ID";
try {
- String hql="select (select p.PARNAME from pg_partition p where p.id=t.PAPARTITION_ID) as parName," +
- "count(*) as count from pg_construction t group by t.PAPARTITION_ID";
+ String hql="select pgName as pgName," +
+ "count(*) as count from pg_construction t group by t.pgName";
List objects=this.getSession().createSQLQuery(hql).list();
PgConstructionParStatisticDto pgConstructionParStatisticDto=null;
@@ -158,7 +158,7 @@
}
}
- public List getStatisticByType(String statisticType) {
+ public List getStatisticByType() {
List pgConstructionStiatisticList = new ArrayList();
String str="CS_TYPE";
@@ -218,7 +218,7 @@
public List getPgConstructionList() {
String sql = "SELECT t.ID,t.CS_NAME,t.CS_DETAIL,t.CS_BEGINTIME,t.CS_ENDTIME,t.CS_CHARGE,t.CS_PHONE,t.CS_TYPE,t.ACTIVE, " +
- "(SELECT m.PARNAME FROM PG_PARTITION m WHERE m.ID = t.PAPARTITION_ID) AS PARNAME, " +
+ "t.PGNAME, " +
"(SELECT n.TYPENAME FROM PG_CONSTRUCTION_TYPE n WHERE n.ID = t.PGCONSTRUCTIONTYPE_ID) AS TYPENAME" +
" FROM PG_CONSTRUCTION t WHERE ACTIVE = 1";
@@ -237,8 +237,8 @@
pgConstructionDto.setCs_phone(String.valueOf(objects.get(i)[6]));
pgConstructionDto.setCs_type(String.valueOf(objects.get(i)[7]));
pgConstructionDto.setActive(String.valueOf(objects.get(i)[8]));
- pgConstructionDto.setParName(String.valueOf(objects.get(i)[9]));
- pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setPgName(String.valueOf(objects.get(i)[9]));
+ pgConstructionDto.setConstructionType(String.valueOf(objects.get(i)[10]));
pgConstructionDtoList.add(pgConstructionDto);
}
return pgConstructionDtoList;
diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
index 737836b..67be508 100644
--- a/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
+++ b/src/main/java/com/casic/PgInterface/construction/manager/PgCsDocumentManager.java
@@ -4,13 +4,16 @@
import com.casic.PgInterface.construction.domain.PgCsDocument;
import com.casic.PgInterface.construction.dto.PgCsDocumentDto;
import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
+
+import org.apache.commons.codec.binary.Base64;
+import org.hibernate.Criteria;
+import org.hibernate.criterion.Restrictions;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +45,8 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+// byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -70,7 +74,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
/*MediaType mediaType = new MediaType("text", "html", Charset.forName("UTF-8"));*/
headers.add("Content-Disposition",file.getName());
@@ -88,6 +94,17 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
/*查询*/
public List getAllDocData(String cs_name ,String cs_type,String startTime,String endTime) {
@@ -95,8 +112,11 @@
try {
List pgConstructionList = pgConstructionManager.getPgContructionByNameOrType(cs_name,
cs_type, null,startTime, endTime);
- if(pgConstructionList==null||pgConstructionList.size()==0)
- return null;
+ if(pgConstructionList==null||pgConstructionList.size()==0) {
+
+ pgCsDocumentDtoList=getAllPgCsDocument();
+ return pgCsDocumentDtoList;
+ }
else
{
for(PgConstruction pgConstruction : pgConstructionList)
@@ -116,8 +136,7 @@
}
}
- private PgCsDocumentDto getDtoByObject(Object[] objectArray)
- {
+ private PgCsDocumentDto getDtoByObject(Object[] objectArray){
PgCsDocumentDto pgCsDocumentDto=new PgCsDocumentDto();
pgCsDocumentDto.setId(String.valueOf(objectArray[0]));
@@ -129,4 +148,16 @@
return pgCsDocumentDto;
}
+ public List getAllPgCsDocument() {
+ Criteria criteria=createCriteria(PgCsDocument.class);
+ criteria.add(Restrictions.eq("active",1));
+
+ List pgCsDocumentList=criteria.list();
+ List pgCsDocumentDtoList = new ArrayList();
+ for (PgCsDocument pgCsDocument : pgCsDocumentList) {
+ pgCsDocumentDtoList.add(new PgCsDocumentDto(pgCsDocument));
+ }
+ return pgCsDocumentDtoList;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
index 955d4d5..eafd0c8 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgPartition.java
@@ -19,7 +19,6 @@
private long id;
private String parName;//分区名称
-// private String road;//所属道路
private String pgPosition;//仓段位置
private String pgNum;//仓位数量
private String pgType;//仓位类型
@@ -29,7 +28,7 @@
private int active;//状态位
private long pgRoadId;//所属道路
private List pipeGalleryList;//管廊仓
- private List pgConstructionList;//施工
+// private List pgConstructionList;//施工
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_PARTITION_ID")
@@ -141,12 +140,12 @@
this.pipeGalleryList = pipeGalleryList;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
- public List getPgConstructionList() {
- return pgConstructionList;
- }
-
- public void setPgConstructionList(List pgConstructionList) {
- this.pgConstructionList = pgConstructionList;
- }
+// @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgPartitionId")
+// public List getPgConstructionList() {
+// return pgConstructionList;
+// }
+//
+// public void setPgConstructionList(List pgConstructionList) {
+// this.pgConstructionList = pgConstructionList;
+// }
}
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 57fd50d..1de1c9e 100644
--- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
+++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java
@@ -16,6 +16,7 @@
private String description;//描述
private String alarmDevName;//报警设备
private String alarmLocation;//报警位置
+ private String assetCode;//资产编号
private String userName;//责任人
private String phoneNumber;//联系电话
private String active;//状态
@@ -109,7 +110,16 @@
this.devType = devType;
}
+ public String getAssetCode() {
+ return assetCode;
+ }
+
+ public void setAssetCode(String assetCode) {
+ this.assetCode = assetCode;
+ }
+
public PgAlarmDto(PgAlarm pgAlarm) {
+ if(pgAlarm==null) return;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setId(String.valueOf(pgAlarm.getId()));
@@ -123,12 +133,31 @@
else
this.setAlarmDate("");
this.setDescription(pgAlarm.getDescription());
- this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
- this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
- this.setUserName(pgAlarm.getUserId().getUserName());
- this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ if(pgAlarm.getAlarmDevId()==null)
+ {
+ this.setAlarmDevName("");
+ this.setAlarmLocation("");
+ this.setAssetCode("");
+ this.setDevType("");
+ }
+ else
+ {
+ this.setAlarmDevName(pgAlarm.getAlarmDevId().getAssetName());
+ this.setAlarmLocation(pgAlarm.getAlarmDevId().getPosition());
+ this.setAssetCode(pgAlarm.getAlarmDevId().getAssetCode());
+ this.setDevType(pgAlarm.getAlarmDevId().getDevType());
+ }
+ if(pgAlarm.getUserId()==null)
+ {
+ this.setUserName("");
+ this.setPhoneNumber("");
+ }
+ else {
+ this.setUserName(pgAlarm.getUserId().getUserName());
+ this.setPhoneNumber(pgAlarm.getUserId().getPhoneNumber());
+ }
+
this.setActive(String.valueOf(pgAlarm.getActive()));
- this.setDevType(pgAlarm.getAlarmDevId().getDevType());
}
}
\ No newline at end of file
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 6a33267..569c9c3 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java
@@ -113,6 +113,38 @@
return pgDeviceDtoList;
}
+ //根据分区获取摄像机列表
+ public List getPgCameraListByPartition(String partition) {
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.eq("partition",partition));
+ criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
+ //根据设备位置(仓位)获取摄像机列表
+ public List getPgCameraListByPosition(String position){
+ Criteria criteria=createCriteria(PgDevice.class);
+ criteria.add(Restrictions.like("position",position+"%"));
+// criteria.add(Restrictions.eq("devType","球机"));
+ criteria.add(Restrictions.or(Restrictions.eq("devType","球机"),Restrictions.eq("devType","枪机")));
+
+ List pgDeviceList=criteria.list();
+ List pgDeviceDtoList = new ArrayList<>();
+
+ for (PgDevice pgDevice : pgDeviceList) {
+ pgDeviceDtoList.add(new PgDeviceDto(pgDevice));
+ }
+ return pgDeviceDtoList;
+ }
+
public List getDeviceByOldDAssetCodeCode(String assetCode) {
String[] stringList=assetCode.split("\\.");
diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
index ab0908b..8ebf74d 100644
--- a/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
+++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgEquipmentManager.java
@@ -31,13 +31,16 @@
return null;
}
- public List getEquipmentDtiList()
+ public List getEquipmentDtiList(String eqName,String eqCode, String eqType)
{
Criteria criteria=createCriteria(PgEquipment.class);
+ criteria.add(Restrictions.eq("eqName",eqName));
+ criteria.add(Restrictions.eq("eqCode",eqCode));
+ criteria.add(Restrictions.eq("eqType",eqType));
criteria.add(Restrictions.eq("active",1));
List pgEquipmentList=criteria.list();
- List pgEquipmentDtoList = new ArrayList();
+ List pgEquipmentDtoList = new ArrayList<>();
for(PgEquipment pgEquipment:pgEquipmentList)
{
pgEquipmentDtoList.add(new PgEquipmentDto(pgEquipment));
@@ -46,15 +49,23 @@
return pgEquipmentDtoList;
}
-
//统计工器具耗材数量
public List getDeviceStatisticByDevType(String eqType){
//String eqType1=eqType.equals("0")?"工器具":"耗材";
- String hql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+ String sql="select equipment.EQ_NAME,count(*) from PG_EQUIPMENT equipment where equipment.EQ_TYPE = '"
+eqType+"' group by equipment.EQ_NAME";
- List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list();
+ List objects=this.getSession().createSQLQuery(sql).list();
+ List pgDeviceTypeStatisticDtoList=new ArrayList<>();
+
+ for(Object[] objects1:objects){
+ PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto();
+ pgDeviceTypeStatisticDto.setDevType(objects1[0].toString());
+ pgDeviceTypeStatisticDto.setNum(objects1[1].toString());
+
+ pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto);
+ }
return pgDeviceTypeStatisticDtoList;
}
diff --git a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
index 89a5df9..5346b57 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/domain/PgMaintanceRecordHead.java
@@ -13,7 +13,7 @@
private String planKeyId;//维修保养计划ID
private String planName;//维修保养名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -66,15 +66,16 @@
this.recordNo = recordNo;
}
- @Column(name="REOAIRMAN")
- public String getReoairMan() {
- return reoairMan;
+ @Column(name="REPAIRMAN")
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
@Column(name="MAINTENANCE_DATE")
public String getMaintenanceDate() {
return maintenanceDate;
diff --git a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
index 2922121..17c180a 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/dto/PgMaintanceRecordHeadDto.java
@@ -9,7 +9,7 @@
private Long id;
private String planName;//维修柏安阳名称
private String recordNo;//维修保养单号
- private String reoairMan;//维修人
+ private String repairMan;//维修人
private String maintenanceDate;//维修保养日期
private String buildCabin;//舱室
private String project;//所属项目
@@ -40,14 +40,15 @@
this.recordNo = recordNo;
}
- public String getReoairMan() {
- return reoairMan;
+ public String getRepairMan() {
+ return repairMan;
}
- public void setReoairMan(String reoairMan) {
- this.reoairMan = reoairMan;
+ public void setRepairMan(String repairMan) {
+ this.repairMan = repairMan;
}
+
public String getMaintenanceDate() {
return maintenanceDate;
}
@@ -95,7 +96,7 @@
pgMaintanceRecordHeadDto.setId(pgMaintanceRecordHead.getId());
pgMaintanceRecordHeadDto.setPlanName(pgMaintanceRecordHead.getPlanName());
pgMaintanceRecordHeadDto.setRecordNo(pgMaintanceRecordHead.getRecordNo());
- pgMaintanceRecordHeadDto.setReoairMan(pgMaintanceRecordHead.getReoairMan());
+ pgMaintanceRecordHeadDto.setRepairMan(pgMaintanceRecordHead.getRepairMan());
pgMaintanceRecordHeadDto.setMaintenanceDate(pgMaintanceRecordHead.getMaintenanceDate());
pgMaintanceRecordHeadDto.setBuildCabin(pgMaintanceRecordHead.getBuildCabin());
pgMaintanceRecordHeadDto.setProject(pgMaintanceRecordHead.getProject());
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
index 5463995..c41ca7d 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgAssetInSpectionRecordManager.java
@@ -12,15 +12,14 @@
@Service
public class PgAssetInSpectionRecordManager extends HibernateEntityDao {
- public List getPgAssetInSpectionRecordLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgAssetInSpectionRecordLsit(String patrolMan, String startTime,String endTime){
try {
String sql="select ID,KEY_ID,PLAN_ID,CREATE_DATE,STATE,CREATOR,PLAN_NAME,RECORD_NO,PLAN_NO," +
"RESPONSIBIE_DEPT,INSPECTION_PERSON,PATROL_MAN,OPERATE_DATE,REMARK,BUILD_CABIN,PROJECT," +
"START_PILE_NO,END_PILE_NO,INSPECTION_PRACE,OTHER_PATROL_MAN from PG_ASSET_INSPECTION_RECORD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+
+ if(patrolMan!=null)
+ sql+=" and PATROL_MAN like '%"+patrolMan+"%'";
if(startTime!=null)
sql+=" and to_date(create_date,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
diff --git a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
index 4786bca..0903f22 100644
--- a/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
+++ b/src/main/java/com/casic/PgInterface/maintenance/manager/PgMaintanceRecordHeadManager.java
@@ -13,14 +13,12 @@
public class PgMaintanceRecordHeadManager extends HibernateEntityDao {
- public List getPgMaintanceRecordHeadLsit(String recordNo, String planName,String startTime,String endTime){
+ public List getPgMaintanceRecordHeadLsit(String repairMan,String startTime,String endTime){
try {
- String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REOAIRMAN,MAINTENANCE_DATE," +
+ String sql="select ID,KEY_ID,PLAN_KEY_ID,PLAN_NAME,RECORD_NO,REPAIRMAN,MAINTENANCE_DATE," +
"BUILD_CABIN,PROJECT,CREATEDATE,CREATOR from PG_MAINTANCERECORD_HEAD where 1=1";
- if(recordNo!=null)
- sql+=" and RECORD_NO like '%"+recordNo+"%'";
- if(planName!=null)
- sql+=" and PLAN_NAME like '%"+planName+"%'";
+ if(repairMan!=null)
+ sql+=" and REPAIRMAN like '%"+repairMan+"%'";
if(startTime!=null)
sql+=" and to_date(CREATEDATE,'yyyy-MM-dd')>to_date('"+startTime+"','yyyy-MM-dd')";
if(endTime!=null)
@@ -38,7 +36,7 @@
pgMaintanceRecordHead.setPlanKeyId(String.valueOf(objects1[2]));
pgMaintanceRecordHead.setPlanName(String.valueOf(objects1[3]));
pgMaintanceRecordHead.setRecordNo(String.valueOf(objects1[4]));
- pgMaintanceRecordHead.setReoairMan(String.valueOf(objects1[5]));
+ pgMaintanceRecordHead.setRepairMan(String.valueOf(objects1[5]));
pgMaintanceRecordHead.setMaintenanceDate(String.valueOf(objects1[6]));
pgMaintanceRecordHead.setBuildCabin(String.valueOf(objects1[7]));
pgMaintanceRecordHead.setProject(String.valueOf(objects1[8]));
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
index 3323ba4..da3cacb 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgAlarmRule.java
@@ -1,6 +1,7 @@
package com.casic.PgInterface.patroler.domain;
import com.casic.PgInterface.devTable.domain.PgAlarmType;
+import com.casic.PgInterface.devTable.domain.PgDevice;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
@@ -22,6 +23,7 @@
private String unit;//单位
private String devType;//设备类型
private PgAlarmType alarmTypeId;//报警类型
+ private Long pgDeviceId;//设备编号
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_ALARM_RULE_ID")
@@ -69,6 +71,15 @@
this.devType = devType;
}
+ @Column(name = "PGDEVICEID")
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
@ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "ALARMTYPEID")
@@ -79,4 +90,5 @@
public void setAlarmTypeId(PgAlarmType alarmTypeId) {
this.alarmTypeId = alarmTypeId;
}
-}
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
index fcffe3f..9cc2881 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgAlarmRuleDto.java
@@ -13,6 +13,7 @@
private String devType;//设备类型
private String unit;//单位
private String alarmType;//报警类型
+ private Long pgDeviceId;//设备编号
public Long getId() {
return id;
@@ -62,6 +63,14 @@
this.alarmType = alarmType;
}
+ public Long getPgDeviceId() {
+ return pgDeviceId;
+ }
+
+ public void setPgDeviceId(Long pgDeviceId) {
+ this.pgDeviceId = pgDeviceId;
+ }
+
public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
this.setId(pgAlarmRule.getId());
this.setHighValue(pgAlarmRule.getHighValue());
@@ -72,6 +81,7 @@
this.setAlarmType("");
else
this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
+ this.setPgDeviceId(pgAlarmRule.getPgDeviceId());
}
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
index 64c1467..d97e316 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/dto/PgReservePlanDto.java
@@ -72,6 +72,7 @@
}
public PgReservePlanDto(PgReservePlan pgReservePlan) {
+ this.setId(String.valueOf(pgReservePlan.getId()));
this.setPlanName(pgReservePlan.getPlanName());
this.setPlanType(pgReservePlan.getPlanType());
if (pgReservePlan.getPgAlarmTypeId() == null)
diff --git a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
index 64056b7..4384fb6 100644
--- a/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
+++ b/src/main/java/com/casic/PgInterface/reservePlan/manager/PgReservePlanManager.java
@@ -4,6 +4,7 @@
import com.casic.PgInterface.devTable.domain.PgAlarm;
import com.casic.PgInterface.reservePlan.domain.PgReservePlan;
import com.casic.PgInterface.reservePlan.dto.PgReservePlanDto;
+import org.apache.commons.codec.binary.Base64;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
@@ -13,7 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
-import sun.misc.BASE64Decoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
@@ -27,8 +28,9 @@
@Service
public class PgReservePlanManager extends HibernateEntityDao {
- public List getpgReservePlanDto() {
+ public List getPgReservePlanDto() {
Criteria criteria=createCriteria(PgReservePlan.class);
+ criteria.add(Restrictions.eq("active",1));
List pgReservePlanList=criteria.list();
List pgReservePlanDtoList = new ArrayList();
@@ -48,7 +50,9 @@
String image_toDir = strDirPath + "\\"+fileType;//存储路径
String imageName = "";
imageName += fileType+"/"+fileName;
- byte[] buffer = new BASE64Decoder().decodeBuffer(fileBuffer);//对android传过来的图片字符串进行解码
+
+ byte[] buffer = Base64.decodeBase64(fileBuffer.getBytes());
+
File destDir = new File(image_toDir);
if (!destDir.exists())
destDir.mkdirs();
@@ -88,8 +92,7 @@
}
}
- public boolean getPgReservePlanByFileName(String planName)
- {
+ public boolean getPgReservePlanByFileName(String planName){
String sql="select count(*) from PG_RESERVE_PLAN where PLAN_NAME = '" +planName+"'";
Object object=this.getSession().createSQLQuery(sql).uniqueResult();
@@ -101,7 +104,7 @@
}
/*下载文件*/
- public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
+ public ResponseEntity downloadFile(PgReservePlan pgReservePlan) throws Exception {
try {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String path = request.getSession().getServletContext().getRealPath("");
@@ -110,7 +113,9 @@
byte[] body = null;
InputStream inputStream = new FileInputStream(file);
body = new byte[inputStream.available()];
+// body=readInputStream(inputStream);
inputStream.read(body);
+
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition",file.getName());
HttpStatus status = HttpStatus.OK;
@@ -124,4 +129,15 @@
}
}
+ public byte[] readInputStream(InputStream inStream) throws Exception{
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = 0;
+ while( (len=inStream.read(buffer)) != -1 ){
+ outStream.write(buffer, 0, len);;
+ }
+// inStream.close();
+ return outStream.toByteArray();
+ }
+
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
index e8e8f67..b8d52c7 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAlarmLinkRs.java
@@ -45,7 +45,7 @@
@Path("linkDevice")
@Produces(MediaType.APPLICATION_JSON)
public Map linkDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
PgDeviceDto pgDeviceDto = null;
@@ -66,20 +66,20 @@
}
/*
- * 获取报警设备所在区域的所有设备信息
+ * 获取报警设备所在仓位的所有摄像机
*/
@POST
- @Path("linkPartitionDevice")
+ @Path("linkPartitionCamera")
@Produces(MediaType.APPLICATION_JSON)
- public Map linkPartitionDevice(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ public Map linkPartitionCamera(@FormParam("id") String id) throws Exception {
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgDeviceDtoList = new ArrayList();
+ List pgDeviceDtoList = new ArrayList<>();
try {
PgAlarm pgAlarm = pgAlarmManager.get(Long.valueOf(id));
PgDevice pgDevice = pgAlarm.getAlarmDevId();
- pgDeviceDtoList = pgDeviceManager.getPgDeviceDtoListByPartition(pgDevice.getPartition());
+ pgDeviceDtoList = pgDeviceManager.getPgCameraListByPosition(pgDevice.getPosition());
msg = "关联设备获取成功";
} catch (Exception e) {
@@ -98,10 +98,10 @@
@Path("linkReservePlan")
@Produces(MediaType.APPLICATION_JSON)
public Map linkReservePlan(@FormParam("id") String id) throws Exception {
- Map resultMap = new HashMap();
+ Map resultMap = new HashMap<>();
String msg = "";
- List pgReservePlanDtoList=new ArrayList();
+ List pgReservePlanDtoList=new ArrayList<>();
try{
PgAlarm pgAlarm=pgAlarmManager.get(Long.valueOf(id));
pgReservePlanDtoList=pgReservePlanManager.getReservePlanDtoByAlarmType(pgAlarm);
diff --git a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
index e336309..66f4d09 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgAssetRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgAssetRecordList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgAssetRecordList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgAssetRecordList(@FormParam("patrolMan") String patrolMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgAssetInSpectionRecordDtoList=new ArrayList<>();
try{
- pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(recordNo,planName,startTime,endTime);
+ pgAssetInSpectionRecordDtoList=pgAssetInSpectionRecordManager.getPgAssetInSpectionRecordLsit(patrolMan,startTime,endTime);
if(pgAssetInSpectionRecordDtoList!=null&&pgAssetInSpectionRecordDtoList.size()!=0)
msg="巡检信息获取成功";
else
@@ -49,7 +48,7 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgAssetInSpectionRecordDtoList);
+ resultMap.put("result",pgAssetInSpectionRecordDtoList);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
index a417e84..e7447d2 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgConstructionRs.java
@@ -58,7 +58,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception {
Map resultMap = new HashMap();
String result = "";
@@ -67,14 +67,10 @@
try {
PgConstructionType pgConstructionType = pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition = pgPartitionManager.getPartitionByParName(parName);
if (pgConstructionType==null) {
result = "false";
msg = "保存失败,不存在项目状态:"+"constructionType";
- } else if (pgPartition==null) {
- result = "false";
- msg = "保存失败,不存在施工区域:"+parName;
- } else {
+ } else {
PgConstruction pgConstruction = new PgConstruction();
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -84,11 +80,9 @@
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
-
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
-
+ pgConstruction.setPgName(pgName);
logger.info("保存成功");
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -119,7 +113,7 @@
@FormParam("cs_charge")String cs_charge,
@FormParam("cs_phone")String cs_phone,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName)
+ @FormParam("pgName") String pgName)
throws Exception{
Map resultMap = new HashMap();
@@ -136,8 +130,6 @@
}else {
PgConstructionType pgConstructionType=pgConstructionTypeManager.getConstructionTypeByType(constructionType);
- PgPartition pgPartition=pgPartitionManager.getPartitionByParName(parName);
-
PgConstruction pgConstruction = pgConstructionManager.get(Long.valueOf(id));
pgConstruction.setCs_name(cs_name);
pgConstruction.setCs_detail(cs_detail);
@@ -146,9 +138,9 @@
pgConstruction.setCs_charge(cs_charge);
pgConstruction.setCs_phone(cs_phone);
pgConstruction.setCs_type(cs_type);
- pgConstruction.setPgPartitionId(pgPartition);
pgConstruction.setPgConstructionTypeId(pgConstructionType);
pgConstruction.setActive(1);
+ pgConstruction.setPgName(pgName);
pgConstructionManager.save(pgConstruction);
result = "true";
@@ -209,14 +201,14 @@
@Produces(MediaType.APPLICATION_JSON)
public Map searchConstruction(@FormParam("cs_name")String cs_name,
@FormParam("cs_type")String cs_type,
- @FormParam("parName")String parName,
+ @FormParam("pgName")String pgName,
@FormParam("startTime")String startTime,
@FormParam("endTime")String endTime)throws Exception{
Map resultMap=new HashMap();
String msg="";
List pgConstructionDtoList=new ArrayList();
try{
- pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,parName,startTime,endTime);
+ pgConstructionDtoList=pgConstructionManager.getPgContructionDtoByNameOrType(cs_name,cs_type,pgName,startTime,endTime);
msg="信息获取成功";
}
catch(Exception e)
@@ -270,8 +262,8 @@
List pgConstructionStiatisticList=new ArrayList();
try{
- pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType(statisticType):
- pgConstructionManager.getStatisticByPar(statisticType);
+ pgConstructionStiatisticList=statisticType.equals("0")?pgConstructionManager.getStatisticByType():
+ pgConstructionManager.getStatisticByPar();
msg="统计信息获取成功";
}
catch(Exception e)
@@ -325,7 +317,7 @@
PgConstruction pgConstruction=pgConstructionManager.get(Long.valueOf(id));
- pgDeviceDtoList=pgDeviceManager.getPgDeviceDtoListByPartition(pgConstruction.getPgPartitionId().getParName());
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(pgConstruction.getPgName());
if(pgDeviceDtoList==null)
msg="信息获取失败";
@@ -344,7 +336,7 @@
}
/*
- * 获取维护信息
+ * 获取施工信息
*/
@POST
@Path("getConstruction")
@@ -375,4 +367,4 @@
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
index b1fe121..455e9af 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgCsDocumentRs.java
@@ -220,7 +220,7 @@
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
index 6b48f0e..1c8130c 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgEquipmentRs.java
@@ -131,13 +131,15 @@
@POST
@Path("getEquipment")
@Produces(MediaType.APPLICATION_JSON)
- public Map getEquipment() throws Exception {
+ public Map getEquipment(@FormParam("eqName") String eqName,
+ @FormParam("eqCode") String eqCode,
+ @FormParam("eqType") String eqType) throws Exception {
Map resultMap = new HashMap();
String msg = "";
List pgEquipmentDtoList=new ArrayList();
try{
- pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList();
+ pgEquipmentDtoList=pgEquipmentManager.getEquipmentDtiList(eqName,eqCode,eqType);
if(pgEquipmentDtoList==null||pgEquipmentDtoList.size()==0)
msg="不存在工器具记录";
else
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index bf9fb9d..b506338 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -1,5 +1,7 @@
package com.casic.PgInterface.rs;
+import com.casic.PgInterface.devTable.dto.PgDeviceDto;
+import com.casic.PgInterface.devTable.manager.PgDeviceManager;
import com.casic.PgInterface.patroler.domain.PgInPgPerson;
import com.casic.PgInterface.patroler.domain.PgInPgStatus;
import com.casic.PgInterface.patroler.dto.PgInPgInfoDto;
@@ -30,6 +32,9 @@
@Resource
private PgInPgStatusManager pgInPgStatusManager;
+ @Resource
+ private PgDeviceManager pgDeviceManager;
+
/**
* 派发工作证(新增入廊记录)
*/
@@ -256,4 +261,35 @@
return resultMap;
}
+ @POST
+ @Path("getDevListByAp")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map getDevListByAp(@FormParam("apCode")String apCode) throws Exception{
+
+ Map resultMap=new HashMap<>();
+ String msg="";
+ List pgDeviceDtoList=new ArrayList<>();
+
+ try {
+ if (apCode != "") {
+ String apCodeStr=apCode.substring(0,3);
+ pgDeviceDtoList=pgDeviceManager.getPgCameraListByPosition(apCodeStr);
+ if(pgDeviceDtoList==null)
+ msg="不存在关联摄像机";
+ else
+ msg="关联摄像机获取成功";
+ } else {
+ msg="请输入Ap编号";
+ }
+ }
+ catch(Exception ex){
+ ex.printStackTrace();
+ msg="关联摄像机获取成功";
+ }
+
+ resultMap.put("msg",msg);
+ resultMap.put("result",pgDeviceDtoList);
+ return resultMap;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
index d741777..d735cc9 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgMaintanceRecordRs.java
@@ -28,8 +28,7 @@
@POST
@Path("getPgMaintanceList")
@Produces(MediaType.APPLICATION_JSON)
- public Map getPgMaintanceList(@FormParam("recordNo") String recordNo,
- @FormParam("planName") String planName,
+ public Map getPgMaintanceList(@FormParam("repairMan") String repairMan,
@FormParam("startTime") String startTime,
@FormParam("endTime") String endTime){
Map resultMap=new HashMap<>();
@@ -37,7 +36,7 @@
List pgMaintanceRecordHeadDtoList=new ArrayList<>();
try{
- pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(recordNo,planName,startTime,endTime);
+ pgMaintanceRecordHeadDtoList=pgMaintanceRecordHeadManager.getPgMaintanceRecordHeadLsit(repairMan,startTime,endTime);
if(pgMaintanceRecordHeadDtoList!=null&&pgMaintanceRecordHeadDtoList.size()!=0)
msg="维护信息获取成功";
else
@@ -49,9 +48,9 @@
}
resultMap.put("msg",msg);
- resultMap.put("resutl",pgMaintanceRecordHeadDtoList);
+ resultMap.put("result",pgMaintanceRecordHeadDtoList);
return resultMap;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
index 8f2cc69..672b376 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgReservePlanRs.java
@@ -8,6 +8,7 @@
import com.casic.PgInterface.reservePlan.manager.PgReservePlanManager;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import javax.ws.rs.FormParam;
@@ -34,7 +35,7 @@
private PgAlarmTypeManager pgAlarmTypeManager;
/*
- * 获取角色信息
+ * 获取预案信息
*/
@POST
@Path("getReservePlan")
@@ -44,7 +45,7 @@
String msg = "";
List pgReservePlanDtoList = new ArrayList();
try {
- pgReservePlanDtoList = pgReservePlanManager.getpgReservePlanDto();
+ pgReservePlanDtoList = pgReservePlanManager.getPgReservePlanDto();
if (pgReservePlanDtoList == null)
msg = "不存在预案信息";
else
@@ -69,17 +70,17 @@
try {
PgReservePlan pgReservePlan = pgReservePlanManager.get(Long.valueOf(id));
path = pgReservePlanManager.downloadFile(pgReservePlan);
+
if (path == null)
msg = "不存在该文档";
else
msg = "下载成功";
-
} catch (Exception e) {
e.printStackTrace();
msg = "下载失败";
}
- resultMap.put("result", path);
+ resultMap.put("result", path.getBody());
resultMap.put("msg", msg);
return resultMap;
}
@@ -210,7 +211,7 @@
msg="不存在该预案信息";
}
else{
- pgReservePlan.setActive(0);
+ pgReservePlan.setActive(0);;
pgReservePlanManager.save(pgReservePlan);
result="true";
msg="删除成功";
diff --git "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
deleted file mode 100644
index f64ac25..0000000
--- "a/~$\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ /dev/null
Binary files differ
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..a4ec716
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620181227.docx" "b/~$\350\257\264\346\230\21620181227.docx"
new file mode 100644
index 0000000..44e5569
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620181227.docx"
Binary files differ
diff --git "a/~$\350\257\264\346\230\21620190527.docx" "b/~$\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..c68c40b
--- /dev/null
+++ "b/~$\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git a/~WRL0009.tmp b/~WRL0009.tmp
deleted file mode 100644
index e3653c8..0000000
--- a/~WRL0009.tmp
+++ /dev/null
Binary files differ
diff --git a/~WRL2471.tmp b/~WRL2471.tmp
deleted file mode 100644
index c307c0b..0000000
--- a/~WRL2471.tmp
+++ /dev/null
Binary files differ
diff --git "a/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx" "b/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx"
new file mode 100644
index 0000000..833b97a
--- /dev/null
+++ "b/\346\216\245\345\217\243\350\257\264\346\230\21620190527.docx"
Binary files differ
diff --git "a/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620181120.docx" "b/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620181120.docx"
deleted file mode 100644
index 70b12e0..0000000
--- "a/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620181120.docx"
+++ /dev/null
Binary files differ
diff --git "a/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx" "b/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
new file mode 100644
index 0000000..ff3fe91
--- /dev/null
+++ "b/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\21620190522.docx"
Binary files differ