Browse Source

Merge remote-tracking branch 'origin/master'

523096025 2 years ago
parent
commit
184525b7c9
24 changed files with 16032 additions and 427 deletions
  1. 5 2
      huimv-env-platform/.idea/compiler.xml
  2. 1 0
      huimv-env-platform/.idea/encodings.xml
  3. 6 0
      huimv-env-platform/.idea/misc.xml
  4. 428 276
      huimv-env-platform/.idea/workspace.xml
  5. 4319 0
      huimv-env-platform/huimv-env-common/replay_pid17044.log
  6. 3231 0
      huimv-env-platform/huimv-env-common/replay_pid20752.log
  7. 4183 0
      huimv-env-platform/huimv-env-common/replay_pid30172.log
  8. 3675 0
      huimv-env-platform/huimv-env-common/replay_pid37164.log
  9. 6 0
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/dao/repo/EnvElectricityMeterRepo.java
  10. 1 0
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/entity/EnvWaterDay.java
  11. 3 1
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/mapper/EnvWaterDayMapper.java
  12. 3 3
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/mapper/xml/EnvWaterDayMapper.xml
  13. 3 1
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvElectricityDayService.java
  14. 1 1
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvElectricityMonthService.java
  15. 1 1
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvWaterMonthService.java
  16. 16 3
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvElectricityDayServiceImpl.java
  17. 3 3
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvElectricityMonthServiceImpl.java
  18. 10 10
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvWaterDayServiceImpl.java
  19. 8 3
      huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvWaterMonthServiceImpl.java
  20. 90 90
      huimv-env-platform/huimv-env-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  21. 1 1
      huimv-env-platform/huimv-env-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
  22. 7 15
      huimv-env-platform/huimv-env-device/src/main/java/com/huimv/env/device/listener/DeviceListener.java
  23. 23 15
      huimv-env-platform/huimv-env-device/src/main/java/com/huimv/env/device/service/impl/DeviceServiceImpl.java
  24. 8 2
      huimv-env-platform/huimv-env-device/src/main/resources/application-prod.yml

+ 5 - 2
huimv-env-platform/.idea/compiler.xml

@@ -8,10 +8,11 @@
         <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
         <outputRelativeToContentRoot value="true" />
         <module name="huimv-env-lamp" />
-        <module name="huimv-env-input" />
-        <module name="huimv-env-common" />
+        <module name="huimv-env-produce" />
         <module name="huimv-env-manage" />
         <module name="huimv-env-device" />
+        <module name="huimv-env-common" />
+        <module name="huimv-env-input" />
       </profile>
     </annotationProcessing>
   </component>
@@ -22,6 +23,8 @@
       <module name="huimv-env-input" options="-parameters" />
       <module name="huimv-env-lamp" options="-parameters" />
       <module name="huimv-env-manage" options="-parameters" />
+      <module name="huimv-env-platform" options="-parameters" />
+      <module name="huimv-env-produce" options="-parameters" />
     </option>
   </component>
 </project>

+ 1 - 0
huimv-env-platform/.idea/encodings.xml

@@ -6,6 +6,7 @@
     <file url="file://$PROJECT_DIR$/huimv-env-input/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/huimv-env-lamp/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/huimv-env-manage/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/huimv-env-produce/src/main/java" charset="UTF-8" />
     <file url="PROJECT" charset="UTF-8" />
   </component>
 </project>

+ 6 - 0
huimv-env-platform/.idea/misc.xml

@@ -5,6 +5,12 @@
     <option name="originalFiles">
       <list>
         <option value="$PROJECT_DIR$/pom.xml" />
+        <option value="$PROJECT_DIR$/huimv-env-produce/pom.xml" />
+        <option value="$PROJECT_DIR$/huimv-env-common/pom.xml" />
+        <option value="$PROJECT_DIR$/huimv-env-device/pom.xml" />
+        <option value="$PROJECT_DIR$/huimv-env-input/pom.xml" />
+        <option value="$PROJECT_DIR$/huimv-env-lamp/pom.xml" />
+        <option value="$PROJECT_DIR$/huimv-env-manage/pom.xml" />
       </list>
     </option>
   </component>

+ 428 - 276
huimv-env-platform/.idea/workspace.xml

@@ -1,11 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="aea4e25b-646a-4ad1-9dc9-156d47497795" name="Default Changelist" comment="新增:&#10;读取最新ph值接口;">
-      <change afterPath="$PROJECT_DIR$/huimv-env-manage/src/test/java/com/huimv/env/manage/service/StrUtilTest.java" afterDir="false" />
+    <list default="true" id="aea4e25b-646a-4ad1-9dc9-156d47497795" name="Default Changelist" comment="完成存栏变动-数据源切换">
+      <change afterPath="$PROJECT_DIR$/huimv-env-common/replay_pid17044.log" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/huimv-env-common/replay_pid20752.log" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/huimv-env-common/replay_pid30172.log" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/huimv-env-common/replay_pid37164.log" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/huimv-env-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/dao/repo/EnvElectricityMeterRepo.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/dao/repo/EnvElectricityMeterRepo.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/entity/EnvWaterDay.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/entity/EnvWaterDay.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/mapper/EnvWaterDayMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/mapper/EnvWaterDayMapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/mapper/xml/EnvWaterDayMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/mapper/xml/EnvWaterDayMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvElectricityDayService.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvElectricityDayService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvElectricityMonthService.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvElectricityMonthService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvWaterMonthService.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvWaterMonthService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvElectricityDayServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvElectricityDayServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvElectricityMonthServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvElectricityMonthServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvWaterDayServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvWaterDayServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvWaterMonthServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvWaterMonthServiceImpl.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/huimv-env-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-device/src/main/java/com/huimv/env/device/listener/DeviceListener.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-device/src/main/java/com/huimv/env/device/listener/DeviceListener.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-device/src/main/java/com/huimv/env/device/service/impl/DeviceServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-device/src/main/java/com/huimv/env/device/service/impl/DeviceServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/huimv-env-device/src/main/resources/application-prod.yml" beforeDir="false" afterPath="$PROJECT_DIR$/huimv-env-device/src/main/resources/application-prod.yml" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -83,6 +103,11 @@
   </component>
   <component name="PropertiesComponent">
     <property name="DatabaseDriversLRU" value="mysql" />
+    <property name="ExpandSpringBootJavaOptionsPanel" value="true" />
+    <property name="GenerateAntBuildDialog.backupFiles" value="true" />
+    <property name="GenerateAntBuildDialog.enableUiFormCompile" value="true" />
+    <property name="GenerateAntBuildDialog.forceTargetJdk" value="true" />
+    <property name="GenerateAntBuildDialog.outputFileNameProperty" value="huimv-env-platform" />
     <property name="RequestMappingsPanelOrder0" value="0" />
     <property name="RequestMappingsPanelOrder1" value="1" />
     <property name="RequestMappingsPanelWidth0" value="75" />
@@ -90,47 +115,48 @@
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/huimv-env-manage/src/main/java/com/huimv/env/manage/saas/service" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/huimv-env-produce/src/main/resources" />
     <property name="project.structure.last.edited" value="Modules" />
     <property name="project.structure.proportion" value="0.15" />
     <property name="project.structure.side.proportion" value="0.2" />
     <property name="restartRequiresConfirmation" value="false" />
+    <property name="run.code.analysis.last.selected.profile" value="pProject Default" />
     <property name="settings.editor.selected.configurable" value="File.Encoding" />
   </component>
   <component name="ReactorSettings">
     <option name="notificationShown" value="true" />
   </component>
   <component name="RecentsManager">
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-device\src\main\resources\config" />
+    </key>
     <key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
       <recent name="com.huimv.env.device.service" />
       <recent name="com.huimv.env.common.service" />
       <recent name="com.huimv.env.input" />
     </key>
-    <key name="CopyFile.RECENT_KEYS">
-      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-manage\src\main\java\com\huimv\env\manage\saas\service" />
-      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-manage\src\main\java\com\huimv\env\manage\saas\service\impl" />
-      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-manage\src\main\java\com\huimv\env\manage\entity" />
-      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-manage\src\main\java\com\huimv\env\manage\mapper" />
-      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-lamp\src\main\java\com\huimv\env\lamp\mapper" />
-    </key>
     <key name="CopyClassDialog.RECENTS_KEY">
+      <recent name="com.huimv.env.produce" />
       <recent name="com.huimv.env.lamp.service" />
       <recent name="com.huimv.env.lamp.service.impl" />
       <recent name="com.huimv.env.lamp.mapper" />
       <recent name="com.huimv.env.common" />
-      <recent name="com.huimv.env.manage" />
     </key>
-    <key name="MoveFile.RECENT_KEYS">
-      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-device\src\main\resources\config" />
+    <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-produce\src\main\resources" />
+      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-manage\src\main\resources" />
+      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-produce\src\main\java\com\huimv\env\produce\config" />
+      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-manage\src\main\java\com\huimv\env\manage\saas\service" />
+      <recent name="D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-manage\src\main\java\com\huimv\env\manage\saas\service\impl" />
     </key>
   </component>
-  <component name="RunManager" selected="Spring Boot.HuimvEnvManageApplication">
-    <configuration name="CodeGenerator (1)" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.huimv.env.common.CodeGenerator" />
-      <module name="huimv-env-common" />
+  <component name="RunManager" selected="Spring Boot.HuimvEnvProduceApplication">
+    <configuration name="CodeGenerator (2)" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
+      <option name="MAIN_CLASS_NAME" value="com.huimv.env.produce.CodeGenerator" />
+      <module name="huimv-env-produce" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.huimv.env.common.*" />
+          <option name="PATTERN" value="com.huimv.env.produce.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
@@ -138,58 +164,56 @@
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="CodeGenerator" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.huimv.env.manage.CodeGenerator" />
-      <module name="huimv-env-manage" />
+    <configuration name="DateTest.test1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="huimv-env-produce" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.huimv.env.manage.*" />
+          <option name="PATTERN" value="com.huimv.env.produce.util.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
+      <option name="PACKAGE_NAME" value="com.huimv.env.produce.util" />
+      <option name="MAIN_CLASS_NAME" value="com.huimv.env.produce.util.DateTest" />
+      <option name="METHOD_NAME" value="test1" />
+      <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="StrUtilTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
-      <module name="huimv-env-manage" />
+    <configuration name="DateTest.test2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="huimv-env-produce" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.huimv.env.manage.service.*" />
+          <option name="PATTERN" value="com.huimv.env.produce.util.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
-      <option name="PACKAGE_NAME" value="com.huimv.env.manage.service" />
-      <option name="MAIN_CLASS_NAME" value="com.huimv.env.manage.service.StrUtilTest" />
-      <option name="TEST_OBJECT" value="class" />
+      <option name="PACKAGE_NAME" value="com.huimv.env.produce.util" />
+      <option name="MAIN_CLASS_NAME" value="com.huimv.env.produce.util.DateTest" />
+      <option name="METHOD_NAME" value="test2" />
+      <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="StrUtilTest.test1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
-      <module name="huimv-env-manage" />
+    <configuration name="DateTest.test3" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="huimv-env-produce" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.huimv.env.manage.service.*" />
+          <option name="PATTERN" value="com.huimv.env.produce.util.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
-      <option name="PACKAGE_NAME" value="com.huimv.env.manage.service" />
-      <option name="MAIN_CLASS_NAME" value="com.huimv.env.manage.service.StrUtilTest" />
-      <option name="METHOD_NAME" value="test1" />
+      <option name="PACKAGE_NAME" value="com.huimv.env.produce.util" />
+      <option name="MAIN_CLASS_NAME" value="com.huimv.env.produce.util.DateTest" />
+      <option name="METHOD_NAME" value="test3" />
       <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="HuimvDeviceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
+    <configuration name="HuimvDeviceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
       <module name="huimv-env-device" />
-      <extension name="coverage">
-        <pattern>
-          <option name="PATTERN" value="com.huimv.env.device.*" />
-          <option name="ENABLED" value="true" />
-        </pattern>
-      </extension>
       <option name="SPRING_BOOT_MAIN_CLASS" value="com.huimv.env.device.HuimvDeviceApplication" />
       <method v="2">
         <option name="Make" enabled="true" />
@@ -209,6 +233,19 @@
         <option name="Make" enabled="true" />
       </method>
     </configuration>
+    <configuration name="HuimvEnvProduceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
+      <module name="huimv-env-produce" />
+      <extension name="coverage">
+        <pattern>
+          <option name="PATTERN" value="com.huimv.env.produce.*" />
+          <option name="ENABLED" value="true" />
+        </pattern>
+      </extension>
+      <option name="SPRING_BOOT_MAIN_CLASS" value="com.huimv.env.produce.HuimvEnvProduceApplication" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
     <configuration name="HuimvLampInputApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
       <module name="huimv-env-lamp" />
       <option name="SPRING_BOOT_MAIN_CLASS" value="com.huimv.env.lamp.HuimvLampInputApplication" />
@@ -218,11 +255,11 @@
     </configuration>
     <recent_temporary>
       <list>
-        <item itemvalue="Application.CodeGenerator" />
-        <item itemvalue="Application.CodeGenerator (1)" />
-        <item itemvalue="JUnit.StrUtilTest.test1" />
-        <item itemvalue="JUnit.StrUtilTest" />
-        <item itemvalue="Spring Boot.HuimvDeviceApplication" />
+        <item itemvalue="Spring Boot.HuimvEnvProduceApplication" />
+        <item itemvalue="Application.CodeGenerator (2)" />
+        <item itemvalue="JUnit.DateTest.test3" />
+        <item itemvalue="JUnit.DateTest.test2" />
+        <item itemvalue="JUnit.DateTest.test1" />
       </list>
     </recent_temporary>
   </component>
@@ -284,133 +321,47 @@
       <workItem from="1666768855185" duration="16534000" />
       <workItem from="1666831135823" duration="19352000" />
       <workItem from="1666861254073" duration="9493000" />
-      <workItem from="1666917236885" duration="20175000" />
-    </task>
-    <task id="LOCAL-00001" summary="新建环境控制平台">
-      <created>1660656813145</created>
-      <option name="number" value="00001" />
-      <option name="presentableId" value="LOCAL-00001" />
-      <option name="project" value="LOCAL" />
-      <updated>1660656813145</updated>
-    </task>
-    <task id="LOCAL-00002" summary="修改数据库。">
-      <created>1660657120664</created>
-      <option name="number" value="00002" />
-      <option name="presentableId" value="LOCAL-00002" />
-      <option name="project" value="LOCAL" />
-      <updated>1660657120664</updated>
-    </task>
-    <task id="LOCAL-00003" summary="修改manage模块数据库">
-      <created>1660657178619</created>
-      <option name="number" value="00003" />
-      <option name="presentableId" value="LOCAL-00003" />
-      <option name="project" value="LOCAL" />
-      <updated>1660657178619</updated>
-    </task>
-    <task id="LOCAL-00004" summary="新建接收设备请求命令执行器功能">
-      <created>1660714829359</created>
-      <option name="number" value="00004" />
-      <option name="presentableId" value="LOCAL-00004" />
-      <option name="project" value="LOCAL" />
-      <updated>1660714829359</updated>
-    </task>
-    <task id="LOCAL-00005" summary="新建环境控制平台">
-      <created>1660737339002</created>
-      <option name="number" value="00005" />
-      <option name="presentableId" value="LOCAL-00005" />
-      <option name="project" value="LOCAL" />
-      <updated>1660737339002</updated>
-    </task>
-    <task id="LOCAL-00006" summary="新建添加温度数据功能。">
-      <created>1660793602921</created>
-      <option name="number" value="00006" />
-      <option name="presentableId" value="LOCAL-00006" />
-      <option name="project" value="LOCAL" />
-      <updated>1660793602921</updated>
-    </task>
-    <task id="LOCAL-00007" summary="新建传感器注册功能。">
-      <created>1660825387678</created>
-      <option name="number" value="00007" />
-      <option name="presentableId" value="LOCAL-00007" />
-      <option name="project" value="LOCAL" />
-      <updated>1660825387678</updated>
-    </task>
-    <task id="LOCAL-00008" summary="新建上报设备状态和平台推送消息功能。">
-      <created>1660827831751</created>
-      <option name="number" value="00008" />
-      <option name="presentableId" value="LOCAL-00008" />
-      <option name="project" value="LOCAL" />
-      <updated>1660827831751</updated>
-    </task>
-    <task id="LOCAL-00009" summary="平台消息推送功能完成。">
-      <created>1660894096614</created>
-      <option name="number" value="00009" />
-      <option name="presentableId" value="LOCAL-00009" />
-      <option name="project" value="LOCAL" />
-      <updated>1660894096615</updated>
-    </task>
-    <task id="LOCAL-00010" summary="下发喷雾除臭配置。">
-      <created>1660907135514</created>
-      <option name="number" value="00010" />
-      <option name="presentableId" value="LOCAL-00010" />
-      <option name="project" value="LOCAL" />
-      <updated>1660907135551</updated>
-    </task>
-    <task id="LOCAL-00011" summary="修改下发喷雾除臭配置(将开关时长*60秒)。">
-      <created>1660990771376</created>
-      <option name="number" value="00011" />
-      <option name="presentableId" value="LOCAL-00011" />
-      <option name="project" value="LOCAL" />
-      <updated>1660990771376</updated>
-    </task>
-    <task id="LOCAL-00012" summary="修改下发喷雾除臭配置(将开关时长*60秒)。">
-      <created>1661135289704</created>
-      <option name="number" value="00012" />
-      <option name="presentableId" value="LOCAL-00012" />
-      <option name="project" value="LOCAL" />
-      <updated>1661135289704</updated>
-    </task>
-    <task id="LOCAL-00013" summary="修改获取除臭配置问题。">
-      <created>1661147740208</created>
-      <option name="number" value="00013" />
-      <option name="presentableId" value="LOCAL-00013" />
-      <option name="project" value="LOCAL" />
-      <updated>1661147740208</updated>
-    </task>
-    <task id="LOCAL-00014" summary="修改报警使能。">
-      <created>1661169465347</created>
-      <option name="number" value="00014" />
-      <option name="presentableId" value="LOCAL-00014" />
-      <option name="project" value="LOCAL" />
-      <updated>1661169465347</updated>
-    </task>
-    <task id="LOCAL-00015" summary="修改高低温报警。">
-      <created>1661170190884</created>
-      <option name="number" value="00015" />
-      <option name="presentableId" value="LOCAL-00015" />
-      <option name="project" value="LOCAL" />
-      <updated>1661170190884</updated>
-    </task>
-    <task id="LOCAL-00016" summary="修改除臭配置时间">
-      <created>1661303464473</created>
-      <option name="number" value="00016" />
-      <option name="presentableId" value="LOCAL-00016" />
-      <option name="project" value="LOCAL" />
-      <updated>1661303464473</updated>
-    </task>
-    <task id="LOCAL-00017" summary="新增高低温阈值查询功能。">
-      <created>1661321480341</created>
-      <option name="number" value="00017" />
-      <option name="presentableId" value="LOCAL-00017" />
-      <option name="project" value="LOCAL" />
-      <updated>1661321480341</updated>
-    </task>
-    <task id="LOCAL-00018" summary="新增高低温阈值设置2">
-      <created>1661321532199</created>
-      <option name="number" value="00018" />
-      <option name="presentableId" value="LOCAL-00018" />
-      <option name="project" value="LOCAL" />
-      <updated>1661321532199</updated>
+      <workItem from="1666917236885" duration="22328000" />
+      <workItem from="1667027652824" duration="46000" />
+      <workItem from="1667030165321" duration="3439000" />
+      <workItem from="1667117112986" duration="12649000" />
+      <workItem from="1667191353053" duration="7773000" />
+      <workItem from="1667262430064" duration="3407000" />
+      <workItem from="1667269812213" duration="5064000" />
+      <workItem from="1667282439825" duration="26181000" />
+      <workItem from="1667354319553" duration="30223000" />
+      <workItem from="1667435527282" duration="4193000" />
+      <workItem from="1667453667082" duration="4916000" />
+      <workItem from="1667522572119" duration="3982000" />
+      <workItem from="1667626732181" duration="15512000" />
+      <workItem from="1667818867008" duration="850000" />
+      <workItem from="1667899626863" duration="640000" />
+      <workItem from="1667901611292" duration="3246000" />
+      <workItem from="1667972104788" duration="365000" />
+      <workItem from="1667974716541" duration="923000" />
+      <workItem from="1667994682187" duration="2064000" />
+      <workItem from="1668150901156" duration="969000" />
+      <workItem from="1668580673553" duration="42000" />
+      <workItem from="1668672342358" duration="4187000" />
+      <workItem from="1668735081908" duration="4750000" />
+      <workItem from="1669078160174" duration="9944000" />
+      <workItem from="1669107398160" duration="1110000" />
+      <workItem from="1669108522694" duration="7422000" />
+      <workItem from="1669165236147" duration="7662000" />
+      <workItem from="1669622495152" duration="3298000" />
+      <workItem from="1669637607748" duration="892000" />
+      <workItem from="1669887227547" duration="8437000" />
+      <workItem from="1669941438482" duration="15390000" />
+      <workItem from="1670036641372" duration="1239000" />
+      <workItem from="1670046675202" duration="599000" />
+      <workItem from="1670050239913" duration="523000" />
+      <workItem from="1670050802158" duration="13000" />
+      <workItem from="1670051092459" duration="12081000" />
+      <workItem from="1670069637781" duration="1480000" />
+      <workItem from="1670071133436" duration="30000" />
+      <workItem from="1670122595907" duration="1129000" />
+      <workItem from="1670123922203" duration="5257000" />
+      <workItem from="1670133519721" duration="7787000" />
     </task>
     <task id="LOCAL-00019" summary="修复高低温阈值解决小数问题。">
       <created>1661323585514</created>
@@ -545,7 +496,217 @@
       <option name="project" value="LOCAL" />
       <updated>1666945487968</updated>
     </task>
-    <option name="localTasksCounter" value="38" />
+    <task id="LOCAL-00038" summary="更新读取24小时环境数据接口,将温度和湿度列表合并。">
+      <created>1667033068503</created>
+      <option name="number" value="00038" />
+      <option name="presentableId" value="LOCAL-00038" />
+      <option name="project" value="LOCAL" />
+      <updated>1667033068503</updated>
+    </task>
+    <task id="LOCAL-00039" summary="构建牧场生产管理子系统">
+      <created>1667132401463</created>
+      <option name="number" value="00039" />
+      <option name="presentableId" value="LOCAL-00039" />
+      <option name="project" value="LOCAL" />
+      <updated>1667132401463</updated>
+    </task>
+    <task id="LOCAL-00040" summary="完成所有大屏查询功能(接口)">
+      <created>1667139579898</created>
+      <option name="number" value="00040" />
+      <option name="presentableId" value="LOCAL-00040" />
+      <option name="project" value="LOCAL" />
+      <updated>1667139579898</updated>
+    </task>
+    <task id="LOCAL-00041" summary="更新produce文件配置项">
+      <created>1667218501369</created>
+      <option name="number" value="00041" />
+      <option name="presentableId" value="LOCAL-00041" />
+      <option name="project" value="LOCAL" />
+      <updated>1667218501369</updated>
+    </task>
+    <task id="LOCAL-00042" summary="更新produce环境配置项">
+      <created>1667218546304</created>
+      <option name="number" value="00042" />
+      <option name="presentableId" value="LOCAL-00042" />
+      <option name="project" value="LOCAL" />
+      <updated>1667218546304</updated>
+    </task>
+    <task id="LOCAL-00043" summary="更新精确计算时divide问题">
+      <created>1667285717365</created>
+      <option name="number" value="00043" />
+      <option name="presentableId" value="LOCAL-00043" />
+      <option name="project" value="LOCAL" />
+      <updated>1667285717365</updated>
+    </task>
+    <task id="LOCAL-00044" summary="完成预警管理(增删改查)">
+      <created>1667286368245</created>
+      <option name="number" value="00044" />
+      <option name="presentableId" value="LOCAL-00044" />
+      <option name="project" value="LOCAL" />
+      <updated>1667286368245</updated>
+    </task>
+    <task id="LOCAL-00045" summary="增加produce子工程">
+      <created>1667290741562</created>
+      <option name="number" value="00045" />
+      <option name="presentableId" value="LOCAL-00045" />
+      <option name="project" value="LOCAL" />
+      <updated>1667290741562</updated>
+    </task>
+    <task id="LOCAL-00046" summary="新增工作看板功能(接口)">
+      <created>1667293589438</created>
+      <option name="number" value="00046" />
+      <option name="presentableId" value="LOCAL-00046" />
+      <option name="project" value="LOCAL" />
+      <updated>1667293589438</updated>
+    </task>
+    <task id="LOCAL-00047" summary="新增成本功能接口(保存和查询)">
+      <created>1667297608341</created>
+      <option name="number" value="00047" />
+      <option name="presentableId" value="LOCAL-00047" />
+      <option name="project" value="LOCAL" />
+      <updated>1667297608341</updated>
+    </task>
+    <task id="LOCAL-00048" summary="新增淘汰功能接口(新增查询、添加、删除淘汰明细)">
+      <created>1667304851064</created>
+      <option name="number" value="00048" />
+      <option name="presentableId" value="LOCAL-00048" />
+      <option name="project" value="LOCAL" />
+      <updated>1667304851064</updated>
+    </task>
+    <task id="LOCAL-00049" summary="新增销售分析功能接口(查询,新增、删除)">
+      <created>1667308239898</created>
+      <option name="number" value="00049" />
+      <option name="presentableId" value="LOCAL-00049" />
+      <option name="project" value="LOCAL" />
+      <updated>1667308239898</updated>
+    </task>
+    <task id="LOCAL-00050" summary="完成存栏功能接口(查询、新增、删除)">
+      <created>1667311065301</created>
+      <option name="number" value="00050" />
+      <option name="presentableId" value="LOCAL-00050" />
+      <option name="project" value="LOCAL" />
+      <updated>1667311065302</updated>
+    </task>
+    <task id="LOCAL-00051" summary="数据源切换功能">
+      <created>1667311912799</created>
+      <option name="number" value="00051" />
+      <option name="presentableId" value="LOCAL-00051" />
+      <option name="project" value="LOCAL" />
+      <updated>1667311912799</updated>
+    </task>
+    <task id="LOCAL-00052" summary="完成提醒功能。">
+      <created>1667369571936</created>
+      <option name="number" value="00052" />
+      <option name="presentableId" value="LOCAL-00052" />
+      <option name="project" value="LOCAL" />
+      <updated>1667369571937</updated>
+    </task>
+    <task id="LOCAL-00053" summary="对部分逻辑增加事务控制。">
+      <created>1667373902227</created>
+      <option name="number" value="00053" />
+      <option name="presentableId" value="LOCAL-00053" />
+      <option name="project" value="LOCAL" />
+      <updated>1667373902227</updated>
+    </task>
+    <task id="LOCAL-00054" summary="新增RestTemplate访问">
+      <created>1667380135521</created>
+      <option name="number" value="00054" />
+      <option name="presentableId" value="LOCAL-00054" />
+      <option name="project" value="LOCAL" />
+      <updated>1667380135521</updated>
+    </task>
+    <task id="LOCAL-00055" summary="完成存栏变动-数据源切换">
+      <created>1667387330565</created>
+      <option name="number" value="00055" />
+      <option name="presentableId" value="LOCAL-00055" />
+      <option name="project" value="LOCAL" />
+      <updated>1667387330565</updated>
+    </task>
+    <task id="LOCAL-00056" summary="完成数据源切换">
+      <created>1667392729083</created>
+      <option name="number" value="00056" />
+      <option name="presentableId" value="LOCAL-00056" />
+      <option name="project" value="LOCAL" />
+      <updated>1667392729083</updated>
+    </task>
+    <task id="LOCAL-00057" summary="完成存栏变动-数据源切换2:&#10;1、销售历史记录曲线">
+      <created>1667439873878</created>
+      <option name="number" value="00057" />
+      <option name="presentableId" value="LOCAL-00057" />
+      <option name="project" value="LOCAL" />
+      <updated>1667439873878</updated>
+    </task>
+    <task id="LOCAL-00058" summary="新建饲料每天和每月代码框架">
+      <created>1667453920855</created>
+      <option name="number" value="00058" />
+      <option name="presentableId" value="LOCAL-00058" />
+      <option name="project" value="LOCAL" />
+      <updated>1667453920856</updated>
+    </task>
+    <task id="LOCAL-00059" summary="填充部分饲料消耗计算代码">
+      <created>1667455816623</created>
+      <option name="number" value="00059" />
+      <option name="presentableId" value="LOCAL-00059" />
+      <option name="project" value="LOCAL" />
+      <updated>1667455816623</updated>
+    </task>
+    <task id="LOCAL-00060" summary="DateUtil更新">
+      <created>1667466337653</created>
+      <option name="number" value="00060" />
+      <option name="presentableId" value="LOCAL-00060" />
+      <option name="project" value="LOCAL" />
+      <updated>1667466337653</updated>
+    </task>
+    <task id="LOCAL-00061" summary="饲料部分-解决divide问题">
+      <created>1667629678524</created>
+      <option name="number" value="00061" />
+      <option name="presentableId" value="LOCAL-00061" />
+      <option name="project" value="LOCAL" />
+      <updated>1667629678525</updated>
+    </task>
+    <task id="LOCAL-00062" summary="对饲料接口和部分代码进行优化">
+      <created>1667640154880</created>
+      <option name="number" value="00062" />
+      <option name="presentableId" value="LOCAL-00062" />
+      <option name="project" value="LOCAL" />
+      <updated>1667640154880</updated>
+    </task>
+    <task id="LOCAL-00063" summary="修改饲料返回字段">
+      <created>1667643445989</created>
+      <option name="number" value="00063" />
+      <option name="presentableId" value="LOCAL-00063" />
+      <option name="project" value="LOCAL" />
+      <updated>1667643445989</updated>
+    </task>
+    <task id="LOCAL-00064" summary="将每月饲料返回字段进行优化">
+      <created>1667645050365</created>
+      <option name="number" value="00064" />
+      <option name="presentableId" value="LOCAL-00064" />
+      <option name="project" value="LOCAL" />
+      <updated>1667645050365</updated>
+    </task>
+    <task id="LOCAL-00065" summary="增加对青山牧场配置">
+      <created>1669113504605</created>
+      <option name="number" value="00065" />
+      <option name="presentableId" value="LOCAL-00065" />
+      <option name="project" value="LOCAL" />
+      <updated>1669113504605</updated>
+    </task>
+    <task id="LOCAL-00066" summary="增加青山的填报配置">
+      <created>1669281569480</created>
+      <option name="number" value="00066" />
+      <option name="presentableId" value="LOCAL-00066" />
+      <option name="project" value="LOCAL" />
+      <updated>1669281569481</updated>
+    </task>
+    <task id="LOCAL-00067" summary="修改水量计算">
+      <created>1670071079473</created>
+      <option name="number" value="00067" />
+      <option name="presentableId" value="LOCAL-00067" />
+      <option name="project" value="LOCAL" />
+      <updated>1670071079473</updated>
+    </task>
+    <option name="localTasksCounter" value="68" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -562,114 +723,107 @@
     </option>
   </component>
   <component name="VcsManagerConfiguration">
-    <MESSAGE value="修改高低温报警。" />
-    <MESSAGE value="修改下发喷雾除臭配置(将开关时长*60秒)。" />
-    <MESSAGE value="修改除臭配置时间" />
-    <MESSAGE value="新增高低温阈值查询功能。" />
-    <MESSAGE value="新增高低温阈值设置2" />
-    <MESSAGE value="修复高低温阈值解决小数问题。" />
-    <MESSAGE value="修改设备状态" />
-    <MESSAGE value="修改推送故障类型" />
-    <MESSAGE value="删除show文件" />
-    <MESSAGE value="修改平台推送问题。" />
-    <MESSAGE value="修改端口号" />
-    <MESSAGE value="新增:生成水表每天和每月数据。" />
-    <MESSAGE value="新增:&#10;1、生成水表每天和每月数据。&#10;2、生成电表每天和每月数据。" />
-    <MESSAGE value="新增:&#10;1、读取每天用水数据;&#10;2、读取历史用水数据;&#10;3、读取每天用电数据;&#10;4、读取历史用电数据;" />
-    <MESSAGE value="新增:&#10;读取最新ph值接口;" />
-    <MESSAGE value="更改启动类上的注解,解决404问题。" />
-    <MESSAGE value="更改manage工程启动类上注解,解决404问题。" />
-    <MESSAGE value="新增读取当前最新温度、湿度、历史温度和历史湿度数据功能。" />
-    <MESSAGE value="新增读取每天温度历史数据功能" />
-    <MESSAGE value="新增:最新的温度和湿度,24小时温度列表,24小时湿度列表" />
-    <MESSAGE value="更改最新温度和湿度、温度列表,湿度列表的返回字段。" />
-    <MESSAGE value="完成猪仔保温(接口)功能。" />
-    <MESSAGE value="新增接口:&#10;1、读取样板间所有绑定设备;&#10;2、设定样板间设备状态;" />
-    <MESSAGE value="新增:用电统计(每天用电量、环比,每月用电量、环比)" />
-    <MESSAGE value="新增12月或30天的用电量历史列表数据" />
-    <option name="LAST_COMMIT_MESSAGE" value="新增12月或30天的用电量历史列表数据" />
+    <MESSAGE value="更新精确计算时divide问题" />
+    <MESSAGE value="完成预警管理(增删改查)" />
+    <MESSAGE value="增加produce子工程" />
+    <MESSAGE value="新增工作看板功能(接口)" />
+    <MESSAGE value="新增成本功能接口(保存和查询)" />
+    <MESSAGE value="新增淘汰功能接口(新增查询、添加、删除淘汰明细)" />
+    <MESSAGE value="新增销售分析功能接口(查询,新增、删除)" />
+    <MESSAGE value="完成存栏功能接口(查询、新增、删除)" />
+    <MESSAGE value="数据源切换功能" />
+    <MESSAGE value="完成提醒功能。" />
+    <MESSAGE value="对部分逻辑增加事务控制。" />
+    <MESSAGE value="新增RestTemplate访问" />
+    <MESSAGE value="完成存栏变动-数据源切换" />
+    <MESSAGE value="完成数据源切换" />
+    <MESSAGE value="完成存栏变动-数据源切换2:&#10;1、销售历史记录曲线" />
+    <MESSAGE value="新建饲料每天和每月代码框架" />
+    <MESSAGE value="填充部分饲料消耗计算代码" />
+    <MESSAGE value="DateUtil更新" />
+    <MESSAGE value="饲料部分-解决divide问题" />
+    <MESSAGE value="对饲料接口和部分代码进行优化" />
+    <MESSAGE value="修改饲料返回字段" />
+    <MESSAGE value="将每月饲料返回字段进行优化" />
+    <MESSAGE value="增加对青山牧场配置" />
+    <MESSAGE value="增加青山的填报配置" />
+    <MESSAGE value="修改水量计算" />
+    <option name="LAST_COMMIT_MESSAGE" value="修改水量计算" />
   </component>
   <component name="WindowStateProjectService">
-    <state x="552" y="181" key="#Assign_Data_Sources" timestamp="1661413248338">
-      <screen x="0" y="0" width="1920" height="1040" />
-    </state>
-    <state x="552" y="181" key="#Assign_Data_Sources/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1661413248338" />
     <state x="552" y="181" key="#Project_Structure" timestamp="1666854340233">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
     <state x="552" y="181" key="#Project_Structure/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666854340233" />
-    <state x="552" y="181" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1660731614165">
+    <state x="552" y="181" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1669108369462">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="552" y="181" key="#com.intellij.execution.impl.EditConfigurationsDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1660731614165" />
+    <state x="552" y="181" key="#com.intellij.execution.impl.EditConfigurationsDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1669108369462" />
     <state x="624" y="328" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1666697339264">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
     <state x="624" y="328" key="#com.intellij.fileTypes.FileTypeChooser/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666697339264" />
-    <state x="765" y="228" key="#com.intellij.ide.util.MemberChooser" timestamp="1666942407442">
+    <state x="765" y="228" key="#com.intellij.ide.util.MemberChooser" timestamp="1670141417109">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="765" y="228" key="#com.intellij.ide.util.MemberChooser/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666942407442" />
-    <state x="726" y="386" width="663" height="273" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes" timestamp="1660877046428">
+    <state x="765" y="228" key="#com.intellij.ide.util.MemberChooser/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670141417109" />
+    <state x="690" y="269" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1667134204794">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="726" y="386" width="663" height="273" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1660877046428" />
-    <state x="690" y="269" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1666867650822">
+    <state x="690" y="269" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667134204794" />
+    <state x="713" y="368" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1" timestamp="1667634499404">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="690" y="269" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666867650822" />
-    <state x="461" y="216" key="CommitChangelistDialog2" timestamp="1666946270047">
+    <state x="713" y="368" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667634499404" />
+    <state x="461" y="216" key="CommitChangelistDialog2" timestamp="1670071100807">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="461" y="216" key="CommitChangelistDialog2/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666946270047" />
-    <state x="92" y="92" width="1736" height="856" key="DiffContextDialog" timestamp="1661170245929">
+    <state x="-1459" y="216" key="CommitChangelistDialog2/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1668580698035" />
+    <state x="461" y="216" key="CommitChangelistDialog2/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670071100807" />
+    <state x="373" y="349" key="FileChooserDialogImpl" timestamp="1669167592297">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="92" y="92" width="1736" height="856" key="DiffContextDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1661170245929" />
-    <state x="740" y="278" key="FileChooserDialogImpl" timestamp="1666854909333">
+    <state x="373" y="349" key="FileChooserDialogImpl/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1669167592297" />
+    <state width="1877" height="246" key="GridCell.Tab.0.bottom" timestamp="1670141791740">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="740" y="278" key="FileChooserDialogImpl/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666854909333" />
-    <state width="1877" height="217" key="GridCell.Tab.0.bottom" timestamp="1666945307871">
+    <state width="1877" height="337" key="GridCell.Tab.0.bottom/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669637103738" />
+    <state width="1877" height="246" key="GridCell.Tab.0.bottom/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670141791740" />
+    <state width="1877" height="246" key="GridCell.Tab.0.center" timestamp="1670141791739">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state width="1877" height="315" key="GridCell.Tab.0.bottom/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594951986" />
-    <state width="1877" height="217" key="GridCell.Tab.0.bottom/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945307871" />
-    <state width="1877" height="217" key="GridCell.Tab.0.center" timestamp="1666945307871">
+    <state width="1877" height="337" key="GridCell.Tab.0.center/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669637103738" />
+    <state width="1877" height="246" key="GridCell.Tab.0.center/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670141791739" />
+    <state width="1877" height="246" key="GridCell.Tab.0.left" timestamp="1670141791739">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state width="1877" height="315" key="GridCell.Tab.0.center/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594951985" />
-    <state width="1877" height="217" key="GridCell.Tab.0.center/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945307871" />
-    <state width="1877" height="217" key="GridCell.Tab.0.left" timestamp="1666945307871">
+    <state width="1877" height="337" key="GridCell.Tab.0.left/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669637103737" />
+    <state width="1877" height="246" key="GridCell.Tab.0.left/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670141791739" />
+    <state width="1877" height="246" key="GridCell.Tab.0.right" timestamp="1670141791740">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state width="1877" height="315" key="GridCell.Tab.0.left/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594951985" />
-    <state width="1877" height="217" key="GridCell.Tab.0.left/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945307871" />
-    <state width="1877" height="217" key="GridCell.Tab.0.right" timestamp="1666945307871">
+    <state width="1877" height="337" key="GridCell.Tab.0.right/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669637103738" />
+    <state width="1877" height="246" key="GridCell.Tab.0.right/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670141791740" />
+    <state width="1877" height="246" key="GridCell.Tab.1.bottom" timestamp="1670135922793">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state width="1877" height="315" key="GridCell.Tab.0.right/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594951985" />
-    <state width="1877" height="217" key="GridCell.Tab.0.right/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945307871" />
-    <state width="1877" height="217" key="GridCell.Tab.1.bottom" timestamp="1666945307871">
+    <state width="1877" height="456" key="GridCell.Tab.1.bottom/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669107831280" />
+    <state width="1877" height="246" key="GridCell.Tab.1.bottom/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670135922793" />
+    <state width="1877" height="246" key="GridCell.Tab.1.center" timestamp="1670135922793">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state width="1877" height="315" key="GridCell.Tab.1.bottom/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594951987" />
-    <state width="1877" height="217" key="GridCell.Tab.1.bottom/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945307871" />
-    <state width="1877" height="217" key="GridCell.Tab.1.center" timestamp="1666945307871">
+    <state width="1877" height="456" key="GridCell.Tab.1.center/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669107831280" />
+    <state width="1877" height="246" key="GridCell.Tab.1.center/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670135922793" />
+    <state width="1877" height="246" key="GridCell.Tab.1.left" timestamp="1670135922793">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state width="1877" height="315" key="GridCell.Tab.1.center/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594951987" />
-    <state width="1877" height="217" key="GridCell.Tab.1.center/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945307871" />
-    <state width="1877" height="217" key="GridCell.Tab.1.left" timestamp="1666945307871">
+    <state width="1877" height="456" key="GridCell.Tab.1.left/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669107831280" />
+    <state width="1877" height="246" key="GridCell.Tab.1.left/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670135922793" />
+    <state width="1877" height="246" key="GridCell.Tab.1.right" timestamp="1670135922793">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state width="1877" height="315" key="GridCell.Tab.1.left/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594951987" />
-    <state width="1877" height="217" key="GridCell.Tab.1.left/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945307871" />
-    <state width="1877" height="217" key="GridCell.Tab.1.right" timestamp="1666945307871">
-      <screen x="0" y="0" width="1920" height="1040" />
-    </state>
-    <state width="1877" height="315" key="GridCell.Tab.1.right/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594951987" />
-    <state width="1877" height="217" key="GridCell.Tab.1.right/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945307871" />
+    <state width="1877" height="456" key="GridCell.Tab.1.right/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669107831280" />
+    <state width="1877" height="246" key="GridCell.Tab.1.right/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670135922793" />
     <state width="1877" height="338" key="GridCell.Tab.2.bottom" timestamp="1666788213803">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
@@ -686,58 +840,56 @@
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
     <state width="1877" height="338" key="GridCell.Tab.2.right/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666788213802" />
-    <state x="574" y="255" key="JpaSupport:com.ifengxue.plugin.gui.AutoGeneratorSettingsDialog" timestamp="1660903124149">
-      <screen x="0" y="0" width="1920" height="1040" />
-    </state>
-    <state x="574" y="255" key="JpaSupport:com.ifengxue.plugin.gui.AutoGeneratorSettingsDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1660903124149" />
-    <state x="686" y="235" key="JpaSupport:com.ifengxue.plugin.gui.SelectTablesDialog" timestamp="1660903125751">
+    <state x="669" y="236" key="MultipleFileMergeDialog" timestamp="1667380075100">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="686" y="235" key="JpaSupport:com.ifengxue.plugin.gui.SelectTablesDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1660903125751" />
-    <state x="490" y="178" key="Maven.ArtifactSearchDialog" timestamp="1661145710163">
-      <screen x="0" y="0" width="1920" height="1040" />
-    </state>
-    <state x="490" y="178" key="Maven.ArtifactSearchDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1661145710163" />
-    <state x="669" y="236" key="MultipleFileMergeDialog" timestamp="1666699821559">
-      <screen x="0" y="0" width="1920" height="1040" />
-    </state>
-    <state x="669" y="236" key="MultipleFileMergeDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666699821559" />
+    <state x="669" y="236" key="MultipleFileMergeDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667380075100" />
     <state x="463" y="165" key="SettingsEditor" timestamp="1666767867830">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
     <state x="463" y="165" key="SettingsEditor/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666767867830" />
-    <state x="552" y="256" key="Vcs.Push.Dialog.v2" timestamp="1666945489303">
+    <state x="552" y="256" key="Vcs.Push.Dialog.v2" timestamp="1670071148040">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="552" y="256" key="Vcs.Push.Dialog.v2/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666945489303" />
-    <state x="754" y="438" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1666946538072">
+    <state x="-1368" y="256" key="Vcs.Push.Dialog.v2/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1667645054378" />
+    <state x="552" y="256" key="Vcs.Push.Dialog.v2/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670071148040" />
+    <state x="754" y="438" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1670071011687">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="-1166" y="438" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1661594947139" />
-    <state x="754" y="438" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666946538072" />
-    <state x="-1779" y="0" width="1323" height="999" key="dock-window-1" timestamp="1666320788567">
+    <state x="-1166" y="438" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1668580679904" />
+    <state x="754" y="438" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670071011687" />
+    <state x="-1355" y="6" width="1193" height="647" maximized="true" key="dock-window-1" timestamp="1667632785343">
+      <screen x="-1920" y="0" width="1920" height="1040" />
+    </state>
+    <state x="-1355" y="6" width="1193" height="647" maximized="true" key="dock-window-1/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667632785343" />
+    <state x="-1748" y="0" width="1562" height="647" key="dock-window-2" timestamp="1667636427751">
+      <screen x="-1920" y="0" width="1920" height="1040" />
+    </state>
+    <state x="-1748" y="0" width="1562" height="647" key="dock-window-2/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667636427751" />
+    <state x="-1386" y="0" width="1104" height="665" key="dock-window-3" timestamp="1667310300620">
       <screen x="-1920" y="0" width="1920" height="1040" />
     </state>
-    <state x="-1779" y="0" width="1323" height="999" key="dock-window-1/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666320788567" />
-    <state x="580" y="246" width="759" height="548" key="find.popup" timestamp="1666928202476">
+    <state x="-1386" y="0" width="1104" height="665" key="dock-window-3/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667310300620" />
+    <state x="580" y="246" width="759" height="548" key="find.popup" timestamp="1669623953846">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="580" y="246" width="759" height="548" key="find.popup/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666928202476" />
-    <state x="334" y="46" key="new project wizard" timestamp="1660737465619">
+    <state x="-1349" y="246" width="759" height="548" key="find.popup/-1920.0.1920.1040/0.0.1920.1040@-1920.0.1920.1040" timestamp="1669081661531" />
+    <state x="580" y="246" width="759" height="548" key="find.popup/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1669623953846" />
+    <state x="334" y="46" key="new project wizard" timestamp="1667124252127">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="334" y="46" key="new project wizard/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1660737465619" />
-    <state x="663" y="152" key="refactoring.ChangeSignatureDialog" timestamp="1666938490953">
+    <state x="334" y="46" key="new project wizard/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667124252127" />
+    <state x="663" y="152" key="refactoring.ChangeSignatureDialog" timestamp="1670141543847">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="663" y="152" key="refactoring.ChangeSignatureDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666938490953" />
-    <state x="616" y="240" key="run.anything.popup" timestamp="1666693152040">
+    <state x="663" y="152" key="refactoring.ChangeSignatureDialog/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1670141543847" />
+    <state x="616" y="240" key="run.anything.popup" timestamp="1667296080770">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="616" y="240" key="run.anything.popup/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666693152040" />
-    <state x="623" y="225" width="672" height="678" key="search.everywhere.popup" timestamp="1666863597140">
+    <state x="616" y="240" key="run.anything.popup/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667296080770" />
+    <state x="623" y="225" width="672" height="678" key="search.everywhere.popup" timestamp="1667638774620">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="623" y="225" width="672" height="678" key="search.everywhere.popup/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1666863597140" />
+    <state x="623" y="225" width="672" height="678" key="search.everywhere.popup/-1920.0.1920.1040/0.0.1920.1040@0.0.1920.1040" timestamp="1667638774620" />
   </component>
 </project>

File diff suppressed because it is too large
+ 4319 - 0
huimv-env-platform/huimv-env-common/replay_pid17044.log


File diff suppressed because it is too large
+ 3231 - 0
huimv-env-platform/huimv-env-common/replay_pid20752.log


File diff suppressed because it is too large
+ 4183 - 0
huimv-env-platform/huimv-env-common/replay_pid30172.log


File diff suppressed because it is too large
+ 3675 - 0
huimv-env-platform/huimv-env-common/replay_pid37164.log


+ 6 - 0
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/dao/repo/EnvElectricityMeterRepo.java

@@ -5,8 +5,14 @@ import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Query;
 
+import java.sql.Date;
+import java.util.List;
+
 public interface EnvElectricityMeterRepo extends JpaRepository<EnvElectricityMeter, Integer>, JpaSpecificationExecutor<EnvElectricityMeter> {
 
     @Query(nativeQuery = true,value = "SELECT *  FROM env_electricity_meter WHERE device_code=?1  ORDER BY id DESC LIMIT 1")
     EnvElectricityMeter getOneByMaxId(String deviceCode);
+
+    @Query(nativeQuery = true,value = "SELECT SUM(electricity_meter) total FROM `env_water_meter` WHERE farm_code=?1 AND device_code=?2 AND add_date=?3")
+    List<Object[]> getSumElectricityMeter(String farmCode, String deviceCode, Date todayDate);
 }

+ 1 - 0
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/entity/EnvWaterDay.java

@@ -33,6 +33,7 @@ public class EnvWaterDay implements Serializable {
     private Integer sensorSn;
 
     private BigDecimal dayWater;
+
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date addDate;
 

+ 3 - 1
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/mapper/EnvWaterDayMapper.java

@@ -6,6 +6,7 @@ import com.huimv.env.common.entity.EnvWaterDay;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.huimv.env.common.entity.EnvWaterMonth;
 import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 
 import java.sql.Date;
 import java.util.Map;
@@ -22,5 +23,6 @@ public interface EnvWaterDayMapper extends BaseMapper<EnvWaterDay> {
 
     Map<String, String> getSumDayWaterMeter(@Param(Constants.WRAPPER) QueryWrapper<EnvWaterMonth> queryWrapper);
 
-    Map<String, String> sumDayWaterMeter(@Param("farmCode") String farmCode, @Param("deviceCode") String deviceCode,@Param("startDate") Date startDate,@Param("endDate") Date endDate);
+    @Select("SELECT SUM(day_water) AS total FROM `env_water_day` WHERE farm_code=${farmCode} AND device_code=${deviceCode} AND add_date BETWEEN ${startDate} AND ${endDate}")
+    String sumDayWaterMeter(@Param("farmCode") String farmCode, @Param("deviceCode") String deviceCode,@Param("startDate") Date startDate,@Param("endDate") Date endDate);
 }

+ 3 - 3
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/mapper/xml/EnvWaterDayMapper.xml

@@ -27,7 +27,7 @@
     <select id="getSumDayWaterMeter" resultType="java.util.Map">
 	    SELECT SUM(day_water) AS total FROM `env_water_day` ${ew.customSqlSegment}
     </select>
-    <select id="sumDayWaterMeter" resultType="java.util.Map">
-        SELECT SUM(day_water) AS total FROM `env_water_day` WHERE farm_code=${farmCode} AND device_code=${deviceCode} AND add_date BETWEEN ${startDate} AND ${endDate}
-    </select>
+<!--    <select id="sumDayWaterMeter" resultType="java.util.Map">-->
+<!--        SELECT SUM(day_water) AS total FROM `env_water_day` WHERE farm_code=${farmCode} AND device_code=${deviceCode} AND add_date BETWEEN ${startDate} AND ${endDate}-->
+<!--    </select>-->
 </mapper>

+ 3 - 1
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvElectricityDayService.java

@@ -25,9 +25,11 @@ public interface EnvElectricityDayService extends IService<EnvElectricityDay> {
 
     void saveDayElectricity(JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, Date todayDate, String farmCode);
 
-    void updateDayElectricity(EnvElectricityDay envElectricityDay, JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, Date todayDate, String farmCode);
+    void updateDayElectricity(float sumElectricityMeter, EnvElectricityDay envElectricityDay, JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, Date todayDate, String farmCode);
 
     Result getTodayElectricity(Map<String, String> paramsMap) throws ParseException;
 
     Result getElectricityCount(Map<String, String> paramsMap) throws ParseException;
+
+    float getSumElectricityMeter(String farmCode, String deviceCode, Date date, Date date1);
 }

+ 1 - 1
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvElectricityMonthService.java

@@ -24,7 +24,7 @@ public interface EnvElectricityMonthService extends IService<EnvElectricityMonth
 
     void saveMonthElectricity(JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, String year, String month, String farmCode);
 
-    void updateMonthElectricity(EnvElectricityMonth envElectricityMonth, JSONObject dataJo, Timestamp nowTimestamp);
+    void updateMonthElectricity(float sumDayElectricityMeter, EnvElectricityMonth envElectricityMonth, JSONObject dataJo, Timestamp nowTimestamp);
 
     Result getDayAndMonthElectricityList(Map<String, String> paramsMap) throws ParseException;
 }

+ 1 - 1
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/EnvWaterMonthService.java

@@ -24,7 +24,7 @@ public interface EnvWaterMonthService extends IService<EnvWaterMonth> {
 
     void saveMonthWater(JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, String year, String month, String farmCode);
 
-    void updateMonthWater(EnvWaterMonth envWaterMonth, JSONObject dataJo, Timestamp nowTimestamp, String year, String month, String farmCode);
+    void updateMonthWater(float sumDayWaterMeter, EnvWaterMonth envWaterMonth, JSONObject dataJo, Timestamp nowTimestamp, String year, String month, String farmCode);
 
     EnvWaterMonth getMonthWaterConsumption(String farmCode, String deviceCode, String sensorSn, String year, String month);
 

+ 16 - 3
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvElectricityDayServiceImpl.java

@@ -7,7 +7,6 @@ import com.huimv.common.utils.ResultCode;
 import com.huimv.env.common.dao.entity.EnvDeviceRegisterEntity;
 import com.huimv.env.common.entity.EnvElectricityDay;
 import com.huimv.env.common.entity.EnvElectricityMonth;
-import com.huimv.env.common.entity.EnvWaterDay;
 import com.huimv.env.common.mapper.EnvElectricityDayMapper;
 import com.huimv.env.common.mapper.EnvElectricityMonthMapper;
 import com.huimv.env.common.service.EnvElectricityDayService;
@@ -93,6 +92,19 @@ public class EnvElectricityDayServiceImpl extends ServiceImpl<EnvElectricityDayM
         return new Result(ResultCode.SUCCESS,resultJo);
     }
 
+    @Override
+    public float getSumElectricityMeter(String farmCode, String deviceCode, Date startDate , Date endDate ) {
+        DateUtil dateUtil = new DateUtil();
+        QueryWrapper<EnvElectricityDay> queryWrapper = new QueryWrapper();
+        queryWrapper.select("IFNULL(sum(day_electricity),0) as total");
+        queryWrapper.eq("farm_code", farmCode);
+        queryWrapper.eq("device_code",deviceCode);
+        queryWrapper.between("add_date",startDate,endDate);
+        Map<String, Object> map = this.getMap(queryWrapper);
+        BigDecimal sumBd = (BigDecimal) map.get("total");
+        return sumBd.floatValue();
+    }
+
     //本月用电
     private EnvElectricityMonth _getMonthElectricityCount(Map<String, String> paramsMap) throws ParseException {
         DateUtil dateUtil = new DateUtil();
@@ -141,9 +153,10 @@ public class EnvElectricityDayServiceImpl extends ServiceImpl<EnvElectricityDayM
     }
 
     @Override
-    public void updateDayElectricity(EnvElectricityDay envElectricityDay, JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, Date todayDate, String farmCode) {
+    public void updateDayElectricity(float sumElectricityMeter, EnvElectricityDay envElectricityDay, JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, Date todayDate, String farmCode) {
         BigDecimal endElectricityBd = new BigDecimal(dataJo.getString("value"));
-        BigDecimal newDayElectricityBd = (endElectricityBd.subtract(envElectricityDay.getStartElectricity())).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
+//        BigDecimal newDayElectricityBd = (endElectricityBd.subtract(envElectricityDay.getStartElectricity())).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
+        BigDecimal newDayElectricityBd = new BigDecimal(sumElectricityMeter);
         String deviceCode = dataJo.getString("deviceCode");
         String sensorSn = dataJo.getString("sensorSn");
         BigDecimal linkRelativeRatioBd = _getLinkRelativeRatio( newDayElectricityBd,  deviceCode,  sensorSn,  todayDate,  farmCode);

+ 3 - 3
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvElectricityMonthServiceImpl.java

@@ -7,7 +7,6 @@ import com.huimv.common.utils.ResultCode;
 import com.huimv.env.common.dao.entity.EnvDeviceRegisterEntity;
 import com.huimv.env.common.entity.EnvElectricityDay;
 import com.huimv.env.common.entity.EnvElectricityMonth;
-import com.huimv.env.common.entity.EnvWaterMonth;
 import com.huimv.env.common.mapper.EnvElectricityDayMapper;
 import com.huimv.env.common.mapper.EnvElectricityMonthMapper;
 import com.huimv.env.common.service.EnvElectricityMonthService;
@@ -75,9 +74,10 @@ public class EnvElectricityMonthServiceImpl extends ServiceImpl<EnvElectricityMo
     }
 
     @Override
-    public void updateMonthElectricity(EnvElectricityMonth envElectricityMonth, JSONObject dataJo, Timestamp nowTimestamp) {
+    public void updateMonthElectricity(float sumDayElectricityMeter, EnvElectricityMonth envElectricityMonth, JSONObject dataJo, Timestamp nowTimestamp) {
         BigDecimal endElectricityBd = new BigDecimal(dataJo.getString("value"));
-        BigDecimal newMonthElectricityBd = (endElectricityBd.subtract(envElectricityMonth.getStartElectricity())).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
+        //BigDecimal newMonthElectricityBd = (endElectricityBd.subtract(envElectricityMonth.getStartElectricity())).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
+        BigDecimal newMonthElectricityBd = new BigDecimal(sumDayElectricityMeter);
         BigDecimal linkRelativeRatioBd = new BigDecimal(0);
         try {
             linkRelativeRatioBd= newMonthElectricityBd.divide(envElectricityMonth.getStartElectricity(), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));

+ 10 - 10
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvWaterDayServiceImpl.java

@@ -94,17 +94,14 @@ public class EnvWaterDayServiceImpl extends ServiceImpl<EnvWaterDayMapper, EnvWa
     @Override
     public float getSumWaterMeter(String farmCode, String deviceCode, Date startDate, Date endDate) {
         DateUtil dateUtil = new DateUtil();
-        QueryWrapper<EnvWaterMonth> queryWrapper = new QueryWrapper();
+        QueryWrapper<EnvWaterDay> queryWrapper = new QueryWrapper();
+        queryWrapper.select("IFNULL(sum(day_water),0) as total");
         queryWrapper.eq("farm_code", farmCode);
         queryWrapper.eq("device_code",deviceCode);
         queryWrapper.between("add_date",startDate,endDate);
-//        queryWrapper.orderByDesc("year").orderByDesc("month");
-//        queryWrapper.last("LIMIT 1");
-//        Map<String,String> sumMap = envWaterDayMapper.getSumDayWaterMeter(queryWrapper);
-//        Map<String,String> sumMap = envWaterDayMapper.sumDayWaterMeter(farmCode,deviceCode,startDate,endDate);
-//        System.out.println("sumMap 累加计算本月用水量 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+sumMap.toString());
-
-        return 0;
+        Map<String, Object> map = this.getMap(queryWrapper);
+        BigDecimal sumBd = (BigDecimal) map.get("total");
+        return sumBd.floatValue();
     }
 
     //获取本月用水统计
@@ -166,7 +163,6 @@ public class EnvWaterDayServiceImpl extends ServiceImpl<EnvWaterDayMapper, EnvWa
         String sensorSn = dataJo.getString("sensorSn");
         //计算累加结果
         BigDecimal newDayWaterBd = new BigDecimal(sumWaterMeter);
-        System.out.println("newDayWaterBd 2 >>>>>>>>> "+newDayWaterBd.toString());
         //获取环比
         BigDecimal linkRelativeRatioBd = _getLinkRelativeRatio(newDayWaterBd, deviceCode,  sensorSn,  todayDate,  farmCode);
         envWaterDay.setEndTime(nowTimestamp);
@@ -190,7 +186,11 @@ public class EnvWaterDayServiceImpl extends ServiceImpl<EnvWaterDayMapper, EnvWa
         if(lastEnvWaterDay == null){
             return new BigDecimal(0);
         }else{
-            return (newWaterBd.subtract(lastEnvWaterDay.getDayWater())).divide(lastEnvWaterDay.getDayWater(),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+            if(lastEnvWaterDay.getDayWater().toString().equalsIgnoreCase("0.00")){
+                return new BigDecimal(0);
+            }else{
+                return (newWaterBd.subtract(lastEnvWaterDay.getDayWater())).divide(lastEnvWaterDay.getDayWater(),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+            }
         }
     }
 }

+ 8 - 3
huimv-env-platform/huimv-env-common/src/main/java/com/huimv/env/common/service/impl/EnvWaterMonthServiceImpl.java

@@ -149,14 +149,19 @@ public class EnvWaterMonthServiceImpl extends ServiceImpl<EnvWaterMonthMapper, E
         if(lastEnvWaterMonth == null){
             return new BigDecimal(0);
         }else{
-            return (newWaterBd.subtract(lastEnvWaterMonth.getMonthWater())).divide(lastEnvWaterMonth.getMonthWater(), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+            if(lastEnvWaterMonth.getMonthWater().toString().equalsIgnoreCase("0.00")){
+                return new BigDecimal(0);
+            }else{
+                return (newWaterBd.subtract(lastEnvWaterMonth.getMonthWater())).divide(lastEnvWaterMonth.getMonthWater(), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+            }
         }
     }
 
     @Override
-    public void updateMonthWater(EnvWaterMonth envWaterMonth, JSONObject dataJo, Timestamp nowTimestamp, String year, String month, String farmCode) {
+    public void updateMonthWater(float sumDayWaterMeter, EnvWaterMonth envWaterMonth, JSONObject dataJo, Timestamp nowTimestamp, String year, String month, String farmCode) {
         BigDecimal endWaterBd = new BigDecimal(dataJo.getString("value"));
-        BigDecimal newMonthWaterBd = (endWaterBd.subtract(envWaterMonth.getStartWater())).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
+//        BigDecimal newMonthWaterBd = (endWaterBd.subtract(envWaterMonth.getStartWater())).divide(new BigDecimal("100"), 2, BigDecimal.ROUND_HALF_UP);
+        BigDecimal newMonthWaterBd = new BigDecimal(sumDayWaterMeter);
         String deviceCode = dataJo.getString("deviceCode");
         String sensorSn = dataJo.getString("sensorSn");
         BigDecimal linkRelativeRatioBd = _getLinkRelativeRatio(newMonthWaterBd,deviceCode,sensorSn,year,month,farmCode);

+ 90 - 90
huimv-env-platform/huimv-env-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -1,90 +1,90 @@
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvAlarmTypeEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\PigpenServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\LampConfigEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvElectricityDayMapper.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ISensorRegisterService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvPushMessageEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvHumiEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvPushMessageServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvWaterDay.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvAmmoniaEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\LampTempServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\RegexUtil.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvWaterMonth.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\BasePigpenEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvSprayStatusEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ISprayConfigService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvWaterGegeEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\BaseDeviceCofig.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvTempThresholdEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IEnvPushMessageService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ILampTempService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvTempEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IBaseThresholdService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvWaterDayServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvDeviceRegisterEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvSensorRegisterEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\LampTemp.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\BaseThresholdServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\LampTempMapper.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\MathUtil2.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ISprayTimeService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvElectricityMeter.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvSprayTimeEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\EnvElectricityDayService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\SprayStatusServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvWaterMonthServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\DateUtil.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\SprayTimeServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\TempThresholdServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IPushMessageService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\MathUtil.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvElectricityMeterRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ITempThresholdService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvAlarmTypeEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvPh.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\SMSManager.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IDeviceRegisterService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvSprayTimeEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvDeviceRegisterEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvPhEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvElectricityMonthMapper.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvPushMessage.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\SensorRegisterServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvElectricityDay.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\BaseThresholdMapper.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvElectricityMonthServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvWaterMeterRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\LampTempEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvWaterDayMapper.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvWaterGege.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\PushMessageServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\LampConfig.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\SprayConfigServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\EnvWaterDayService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ISprayStatusService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvSprayStatusEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvWaterMeter.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvSprayConfigEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\BaseThreshold.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\DeviceRegisterServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\BasePigpenEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvAmmoniaEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvDeviceEquipment.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvSprayConfigEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvWaterMonthMapper.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvPushMessageMapper.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IPigpenService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvSensorRegisterEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvElectricityMonth.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\LampTempEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvTempEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\EnvWaterMonthService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\LampConfigEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvTempThresholdEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvPushMessageEntityRepo.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvElectricityDayServiceImpl.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\Const.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\EnvElectricityMonthService.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvHumiEntity.java
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvDeviceEqipmentRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvElectricityMonthMapper.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvPushMessageEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\LampTempMapper.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvAlarmTypeEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvElectricityDay.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvPushMessageEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\BasePigpenEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvDeviceEquipment.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvWaterMeter.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvSprayStatusEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ISprayTimeService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\EnvElectricityMonthService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvElectricityMeterRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\Const.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvWaterGege.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvPushMessage.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvSprayTimeEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IEnvPushMessageService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\DeviceRegisterServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\SprayStatusServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvPushMessageServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvAlarmTypeEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\EnvElectricityDayService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\PigpenServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvSensorRegisterEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\LampTempEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvPhEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\EnvWaterDayService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ISprayStatusService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\LampConfigEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvTempThresholdEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\PushMessageServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvSprayConfigEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\EnvWaterMonthService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\LampTempServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\SprayConfigServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvDeviceEqipmentRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\BaseThreshold.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvWaterMonthServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvWaterMeterRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\MathUtil.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvSensorRegisterEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvWaterMonthMapper.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvElectricityDayMapper.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvPushMessageMapper.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\TempThresholdServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvDeviceRegisterEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ILampTempService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvElectricityMonth.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\BasePigpenEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvTempEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvDeviceRegisterEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ITempThresholdService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\LampConfigEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvWaterDayServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvSprayConfigEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvSprayTimeEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvTempThresholdEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\BaseThresholdMapper.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\DateUtil.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvSprayStatusEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvElectricityMeter.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvElectricityMonthServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\EnvElectricityDayServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\LampConfig.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IPushMessageService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\mapper\EnvWaterDayMapper.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\RegexUtil.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\SMSManager.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\SensorRegisterServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvWaterMonth.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\BaseDeviceCofig.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\BaseThresholdServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\impl\SprayTimeServiceImpl.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ISensorRegisterService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvPh.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvTempEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvAmmoniaEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvWaterGegeEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IDeviceRegisterService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\ISprayConfigService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvAmmoniaEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\LampTempEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\LampTemp.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IPigpenService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\service\IBaseThresholdService.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\entity\EnvWaterDay.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\entity\EnvHumiEntity.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\dao\repo\EnvHumiEntityRepo.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\main\java\com\huimv\env\common\utils\MathUtil2.java

+ 1 - 1
huimv-env-platform/huimv-env-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst

@@ -1 +1 @@
-G:\idea\huimv.env.platform\huimv-env-platform\huimv-env-common\src\test\java\com\huimv\env\common\CodeGenerator.java
+D:\idea6\huimv.env.platform\huimv-env-platform\huimv-env-common\src\test\java\com\huimv\env\common\CodeGenerator.java

+ 7 - 15
huimv-env-platform/huimv-env-device/src/main/java/com/huimv/env/device/listener/DeviceListener.java

@@ -68,7 +68,7 @@ public class DeviceListener {
     @RabbitListener(queues = Const.QUEUE_ELECTRICITY_METER)
     @RabbitHandler
     public void processElectricityMeter(Map RawMap)   {
-        System.out.println(">>>>>>>>>>>>>>接收电表数据 RawMap>>" + RawMap.toString());
+        System.out.println(">>>>>>>>>>>>>> 222222222222222222 接收电表数据 RawMap>>" + RawMap.toString());
         String askText = RawMap.get("askText").toString();
         JSONObject dataJo = deviceService.handleAskText(askText);
         dataJo.put("dataUnit", "");
@@ -103,7 +103,7 @@ public class DeviceListener {
     @RabbitListener(queues = Const.QUEUE_WATER_METER)
     @RabbitHandler
     public void processWaterMeterGege(Map RawMap) throws ParseException {
-        System.out.println("111111111111111111111111111111111111111111111111 接收水表数据 RawMap>>" + RawMap.toString());
+        System.out.println(" 接收水表数据 RawMap>>" + RawMap.toString());
         String askText = RawMap.get("askText").toString();
         JSONObject dataJo = deviceService.handleAskText(askText);
         dataJo.put("dataUnit", "");
@@ -118,30 +118,22 @@ public class DeviceListener {
             return;
         }
         DateUtil dateUtil = new DateUtil();
-        int waterValue = dataJo.getInteger("value");
-        System.out.println(dateUtil.getTodayMissionText()+" 当前用水量数据 waterValue = "+waterValue);
-//        if(dataJo.getInteger("value") ==0 ){
-//            System.out.println(dateUtil.getTodayMissionText()+" return;");
-//            return;
-//        }
         String farmCode = envDeviceRegisterEntity.getFarmCode();
         String waterMeter =  new BigDecimal(mathUtil.countMeter(dataJo.getIntValue("value"))).setScale(1, RoundingMode.UP)+dataJo.getString("dataUnit");;
         int sensorSort = 1;
          //
-        System.out.println(dateUtil.getTodayMissionText()+" 开始保存水量流水数据 dataJo>> "+dataJo);
         //保存水表流水数据
         deviceService.saveWaterMeter(dataJo, envDeviceRegisterEntity, nowTimestamp, todayDate, farmCode);
-        System.out.println(dateUtil.getTodayMissionText()+" 开始保存每天用水量");
+
         //保存每天用水量数据
         deviceService.saveDayWaterConsumption(dataJo,envDeviceRegisterEntity, nowTimestamp, todayDate, farmCode);
+
         //保存每月用水量数据
-//        deviceService.saveMonthWaterConsumption(dataJo,envDeviceRegisterEntity, nowTimestamp, todayDate, farmCode);
+        deviceService.saveMonthWaterConsumption(dataJo,envDeviceRegisterEntity, nowTimestamp, todayDate, farmCode);
 
         //更新传感器数据
-////        deviceService.updateSensorRegister(deviceCode, dataJo.getInteger("sensorSn"), nowTimestamp, todayDate, temp, farmCode,sensorSort);
-//        System.out.println("开始发送消息给传感器队列");
-//        deviceService.sendSensorToMQ(deviceCode, dataJo.getInteger("sensorSn"), nowTimestamp, todayDate, waterMeter, farmCode,sensorSort);
-//        System.out.println("结束发送消息给传感器队列");
+//        deviceService.updateSensorRegister(deviceCode, dataJo.getInteger("sensorSn"), nowTimestamp, todayDate, temp, farmCode,sensorSort);
+        deviceService.sendSensorToMQ(deviceCode, dataJo.getInteger("sensorSn"), nowTimestamp, todayDate, waterMeter, farmCode,sensorSort);
 
     }
     

+ 23 - 15
huimv-env-platform/huimv-env-device/src/main/java/com/huimv/env/device/service/impl/DeviceServiceImpl.java

@@ -84,9 +84,6 @@ public class DeviceServiceImpl implements IDeviceService {
         if(envWaterDay == null){
             envWaterDayService.saveDayWater(dataJo,envDeviceRegisterEntity,nowTimestamp,todayDate,farmCode);
         }else{
-            System.out.println(dateUtil.getTodayMissionText()+"+ 计算当天的总用水量 farmCode >>"+farmCode);
-            System.out.println(dateUtil.getTodayMissionText()+"+ 计算当天的总用水量 deviceCode >>"+deviceCode);
-            System.out.println(dateUtil.getTodayMissionText()+"+ 计算当天的总用水量 todayDate >>"+todayDate);
             //读取当天的累加次数
             float sumWaterMeter = getSumTodayWaterMeter(farmCode,deviceCode,todayDate);
             System.out.println(dateUtil.getTodayMissionText()+" sumWaterMeter 每天的用水量累加 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "+sumWaterMeter);
@@ -120,8 +117,8 @@ public class DeviceServiceImpl implements IDeviceService {
             envWaterMonthService.saveMonthWater(dataJo,envDeviceRegisterEntity,nowTimestamp,year,month,farmCode);
         }else{
             //计算本月的每天用水量累加
-            float sumWaterMeter = sumDayWaterMeterForMonth(farmCode,deviceCode,todayDate);
-            envWaterMonthService.updateMonthWater(envWaterMonth,dataJo,nowTimestamp,year,month,farmCode);
+            float sumDayWaterMeter = sumDayWaterMeterForMonth(farmCode,deviceCode,todayDate);
+            envWaterMonthService.updateMonthWater(sumDayWaterMeter,envWaterMonth,dataJo,nowTimestamp,year,month,farmCode);
         }
     }
 
@@ -144,10 +141,19 @@ public class DeviceServiceImpl implements IDeviceService {
         if(envElectricityDay == null){
             envElectricityDayService.saveDayElectricity(dataJo,envDeviceRegisterEntity,nowTimestamp,todayDate,farmCode);
         }else{
-            envElectricityDayService.updateDayElectricity(envElectricityDay,dataJo,envDeviceRegisterEntity,nowTimestamp,todayDate,farmCode);
+            //读取当天的累加次数
+            float sumElectricityMeter = getSumTodayElectricityMeter(farmCode,deviceCode,todayDate);
+            envElectricityDayService.updateDayElectricity(sumElectricityMeter,envElectricityDay,dataJo,envDeviceRegisterEntity,nowTimestamp,todayDate,farmCode);
         }
     }
 
+    //累计当天所有电量
+    private float getSumTodayElectricityMeter(String farmCode, String deviceCode, Date todayDate) {
+        List<Object[]> sumList =  envElectricityMeterRepo.getSumElectricityMeter(farmCode,deviceCode,todayDate);
+        Object[] sumObj = (Object[]) sumList.get(0);
+        return Float.parseFloat(sumObj[0].toString());
+    }
+
     @Override
     public void saveMonthElectricityConsumption(JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, Date todayDate, String farmCode) {
         System.out.println("保存每月用水数据 dataJo>>>>>>>>>>>>>>>>>>"+dataJo);
@@ -161,10 +167,20 @@ public class DeviceServiceImpl implements IDeviceService {
         if(envElectricityMonth == null){
             envElectricityMonthService.saveMonthElectricity(dataJo,envDeviceRegisterEntity,nowTimestamp,year,month,farmCode);
         }else{
-            envElectricityMonthService.updateMonthElectricity(envElectricityMonth,dataJo,nowTimestamp);
+            //计算本月的每天用电量量累加
+            float sumDayElectricityMeter = sumDayElectricityMeterForMonth(farmCode,deviceCode,todayDate);
+            envElectricityMonthService.updateMonthElectricity(sumDayElectricityMeter,envElectricityMonth,dataJo,nowTimestamp);
         }
     }
 
+    //计算本月的每天用电量量累加
+    private float sumDayElectricityMeterForMonth(String farmCode, String deviceCode, Date todayDate) {
+        DateUtil dateUtil = new DateUtil();
+        java.util.Date startDate = dateUtil.getFirstDayInThisMonth();
+        java.util.Date endDate = dateUtil.getEndDayInThisMonth();
+        return envElectricityDayService.getSumElectricityMeter(farmCode,deviceCode,new java.sql.Date(startDate.getTime()),new java.sql.Date(endDate.getTime()));
+    }
+
     @Override
     public void sendSensorToMQ(String deviceCode, Integer sensorSn, Timestamp nowTimestamp, Date todayDate, String value, String farmCode, int sensorSort) {
         JSONObject sensorJo = new JSONObject();
@@ -311,34 +327,26 @@ public class DeviceServiceImpl implements IDeviceService {
     //保存电表
     @Override
     public void saveElectricityMeter(JSONObject dataJo, EnvDeviceRegisterEntity envDeviceRegisterEntity, Timestamp nowTimestamp, Date todayDate, String farmCode) {
-
-
         int valueData = dataJo.getIntValue("value");
         String deviceCode = dataJo.getString("deviceCode");
         EnvElectricityMeter envElectricityMeterData = envElectricityMeterRepo.getOneByMaxId(deviceCode);
         Integer electricityMeterData ;
         Integer value = 0;
-
         if (ObjectUtil.isEmpty(envElectricityMeterData)|| envElectricityMeterData.getElectricityMeterData() ==null){
             electricityMeterData = 0;
         }else {
             electricityMeterData =  envElectricityMeterData.getElectricityMeterData();
         }
-
         if (valueData >= electricityMeterData){
             value = valueData-electricityMeterData;
         }else {
             value = valueData;
         }
-
-
         EnvElectricityMeter envElectricityMeter = new EnvElectricityMeter();
         envElectricityMeter.setDeviceCode(dataJo.getString("deviceCode"));
         envElectricityMeter.setSensorSn(dataJo.getInteger("sensorSn"));
         envElectricityMeter.setElectricityMeter(new BigDecimal(mathUtil.countMeter(value)));
-
         envElectricityMeter.setElectricityMeterData(valueData);
-
         envElectricityMeter.setAskTime(dateUtil.handleAskTime(dataJo.getString("askTime")));
         envElectricityMeter.setAddTime(nowTimestamp);
         envElectricityMeter.setAddDate(todayDate);

+ 8 - 2
huimv-env-platform/huimv-env-device/src/main/resources/application-prod.yml

@@ -33,9 +33,10 @@ spring:
     password: admin
     #虚拟host 可以不设置,使用server默认host
     virtual-host: /env
-
+    listener:
+      simple:
+        acknowledge-mode: none  #消费端不需要确认
     #确认消息已发送到交换机(Exchange)
-#    publisher-confirms: true #(过时、弃用)
     publisher-confirm-type: correlated
     #确认消息已发送到队列(Queue)
     publisher-returns: true
@@ -102,3 +103,8 @@ management:
       exposure:
         include: "*"   # * 在yaml 文件属于关键字,所以需要加引号
 
+mybatis-plus:
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  # mapper.xml文件所存放的位置
+  mapper-locations: classpath*:com/huimv/env/common/mapper/xml/*.xml  # 不加这一行出错:“org.apache.ibatis.binding.BindingException:  Invalid bound statement (not found)”