瀏覽代碼

建立代码框架

zhuoning 4 年之前
父節點
當前提交
024b9f77ac
共有 66 個文件被更改,包括 3651 次插入0 次删除
  1. 145 0
      huimv/huimv-common/huimv-common.iml
  2. 40 0
      huimv/huimv-common/pom.xml
  3. 7 0
      huimv/huimv-common/src/main/java/com/huimv/common/utils/FarmUtils.java
  4. 3 0
      huimv/huimv-common/target/maven-archiver/pom.properties
  5. 1 0
      huimv/huimv-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  6. 1 0
      huimv/huimv-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  7. 0 0
      huimv/huimv-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
  8. 0 0
      huimv/huimv-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
  9. 145 0
      huimv/huimv-farmcloud/huimv-farmcloud.iml
  10. 15 0
      huimv/huimv-farmcloud/pom.xml
  11. 132 0
      huimv/pom.xml
  12. 224 0
      huimv/product/huimv-piglet/huimv-piglet.iml
  13. 160 0
      huimv/product/huimv-piglet/pom.xml
  14. 36 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/HuimvCloudFarmPigletApplication.java
  15. 15 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/common/Constant.java
  16. 77 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/DeviceStatusInformationController.java
  17. 123 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/FenceOutPredictionController.java
  18. 45 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/HouseController.java
  19. 143 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/ObstetricTableController.java
  20. 65 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/ProductionTraceabilityController.java
  21. 42 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/ProductionWarningController.java
  22. 120 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/PsyAnalysisController.java
  23. 52 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/SowController.java
  24. 23 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/Building.java
  25. 30 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/Device.java
  26. 26 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/FarrowingHouse.java
  27. 111 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/Litter.java
  28. 39 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/ObstetricTable.java
  29. 150 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/Sow.java
  30. 33 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/DeviceStatusInformation.java
  31. 33 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/FenceOutPrediction.java
  32. 32 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/ProductionTraceability.java
  33. 32 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/ProductionWarning.java
  34. 39 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/PsyAnalysis.java
  35. 28 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/PsyAnalysisRecord.java
  36. 13 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/feign/clients/DeviceFeignClient.java
  37. 47 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/feign/clients/PublicFeignClient.java
  38. 34 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/feign/clients/conf/FeignConfiguration.java
  39. 57 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/mq/EarTagListener.java
  40. 68 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/mq/PiggyDataListener.java
  41. 8 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/BuildingRepository.java
  42. 11 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/DeviceRepository.java
  43. 13 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/DeviceStatusInformationRepository.java
  44. 15 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/FarrowingHouseRepository.java
  45. 19 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/FenceOutPredictionRepository.java
  46. 63 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/LitterRepository.java
  47. 28 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/ObstetricTableRepository.java
  48. 15 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/ProductionTraceabilityRepository.java
  49. 17 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/ProductionWarningRepository.java
  50. 15 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/PsyAnalysisRecordRepository.java
  51. 13 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/PsyAnalysisRepository.java
  52. 23 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/SowRepository.java
  53. 27 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/session/AppTokenConfiguration.java
  54. 38 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/session/SessionConfig.java
  55. 13 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/session/SessionInitializer.java
  56. 248 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/task/CullingTask.java
  57. 142 0
      huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/task/PsyTask.java
  58. 20 0
      huimv/product/huimv-piglet/src/test/java/com/huimv/huyang/AppTest.java
  59. 20 0
      huimv/product/pom.xml
  60. 120 0
      huimv/product/product.iml
  61. 143 0
      huimv/project/huimv-huyang/huimv-huyang.iml
  62. 82 0
      huimv/project/huimv-huyang/pom.xml
  63. 13 0
      huimv/project/huimv-huyang/src/main/java/com/huimv/huyang/App.java
  64. 20 0
      huimv/project/huimv-huyang/src/test/java/com/huimv/huyang/AppTest.java
  65. 19 0
      huimv/project/pom.xml
  66. 120 0
      huimv/project/project.iml

+ 145 - 0
huimv/huimv-common/huimv-common.iml

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="jpa" name="JPA">
+      <configuration>
+        <setting name="validation-enabled" value="true" />
+        <setting name="provider-name" value="Hibernate" />
+        <datasource-mapping />
+        <naming-strategy-map />
+      </configuration>
+    </facet>
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/main/resources" />
+        </sourceRoots>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.15.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.23.2-GA" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.15.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-data-redis:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.10.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.62" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:4.7.2" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:2.6.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.71" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.11" level="project" />
+  </component>
+</module>

+ 40 - 0
huimv/huimv-common/pom.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>huimv</artifactId>
+        <groupId>com.huimv</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.huimv</groupId>
+    <artifactId>huimv-common</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <name>huimv-common</name>
+    <description>慧牧公共模块</description>
+    <packaging>jar</packaging>
+    <!--
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    -->
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 7 - 0
huimv/huimv-common/src/main/java/com/huimv/common/utils/FarmUtils.java

@@ -0,0 +1,7 @@
+package com.huimv.common.utils;
+
+public class FarmUtils {
+    public void sayHello(){
+        System.out.println("sayHello");
+    }
+}

+ 3 - 0
huimv/huimv-common/target/maven-archiver/pom.properties

@@ -0,0 +1,3 @@
+version=1.0-SNAPSHOT
+groupId=com.huimv
+artifactId=huimv-common

+ 1 - 0
huimv/huimv-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -0,0 +1 @@
+com\huimv\common\utils\FarmUtils.class

+ 1 - 0
huimv/huimv-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -0,0 +1 @@
+E:\idea\huimv_code\huimv\huimv-common\src\main\java\com\huimv\common\utils\FarmUtils.java

+ 0 - 0
huimv/huimv-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst


+ 0 - 0
huimv/huimv-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst


+ 145 - 0
huimv/huimv-farmcloud/huimv-farmcloud.iml

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="jpa" name="JPA">
+      <configuration>
+        <setting name="validation-enabled" value="true" />
+        <setting name="provider-name" value="Hibernate" />
+        <datasource-mapping />
+        <naming-strategy-map />
+      </configuration>
+    </facet>
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+          <root url="file://$MODULE_DIR$/src/main/resources" />
+        </sourceRoots>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.15.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.23.2-GA" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.15.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-data-redis:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.10.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.62" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:4.7.2" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:2.6.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.71" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.11" level="project" />
+  </component>
+</module>

+ 15 - 0
huimv/huimv-farmcloud/pom.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>huimv</artifactId>
+        <groupId>com.huimv</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>huimv-farmcloud</artifactId>
+
+
+</project>

+ 132 - 0
huimv/pom.xml

@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.huimv</groupId>
+    <artifactId>huimv</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0-SNAPSHOT</version>
+    <modules>
+        <module>huimv-common</module>
+        <module>huimv-farmcloud</module>
+        <module>project</module>
+        <module>product</module>
+    </modules>
+
+    <description>慧牧父模块</description>
+
+    <!--添加parent标签-->
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.1.13.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <spring-boot.version>2.1.13.RELEASE</spring-boot.version>
+        <!-- <wxsdk.version>3.1.0</wxsdk.version> -->
+        <wxsdk.version>3.5.9.B</wxsdk.version>
+        <!-- <alisdk.version>3.4.49.ALL</alisdk.version> -->
+        <alisdk.version>3.7.89.ALL</alisdk.version>
+        <paysdk.version>2.12.5</paysdk.version>
+    </properties>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+
+        <!--redis依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <!--spring session 与redis应用基本环境配置,需要开启redis后才可以使用,不然启动Spring boot会报错 -->
+        <dependency>
+            <groupId>org.springframework.session</groupId>
+            <artifactId>spring-session-data-redis</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.dataformat</groupId>
+            <artifactId>jackson-dataformat-xml</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.62</version>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>4.7.2</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>1.9.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpmime</artifactId>
+        </dependency>
+    </dependencies>
+
+    <!--
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    -->
+</project>

+ 224 - 0
huimv/product/huimv-piglet/huimv-piglet.iml

@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="jpa" name="JPA">
+      <configuration>
+        <setting name="validation-enabled" value="true" />
+        <setting name="provider-name" value="Hibernate" />
+        <datasource-mapping />
+        <naming-strategy-map />
+      </configuration>
+    </facet>
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+        </sourceRoots>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="huimv-common" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.15.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.23.2-GA" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.64" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.13" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.10.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.guava:guava:16.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.inject:guice:4.1.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: aopalliance:aopalliance:1.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.13" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
+    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.11.1" level="project" />
+    <orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.4.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
+    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.19" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.16" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.15.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-data-redis:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.10.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.62" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:4.7.2" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:2.6.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.71" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.11" level="project" />
+  </component>
+</module>

+ 160 - 0
huimv/product/huimv-piglet/pom.xml

@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>product</artifactId>
+        <groupId>com.huimv</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.huimv</groupId>
+    <artifactId>huimv-piglet</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <name>huimv-piglet</name>
+    <description>慧牧猪仔项目</description>
+    <packaging>jar</packaging>
+
+    <!-- FIXME change it to the project's website -->
+    <!--
+    <url>http://www.example.com</url>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+    -->
+    <properties>
+        <java.version>1.8</java.version>
+        <spring-cloud.version>Greenwich.SR5</spring-cloud.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.huimv</groupId>
+            <artifactId>huimv-common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+        </dependency>
+        <!--spring boot2.x下 使用feign-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+    <!--
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.huimv</groupId>
+            <artifactId>huimv-common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>3.1.0</version>
+                </plugin>
+
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.7.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+-->
+</project>

+ 36 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/HuimvCloudFarmPigletApplication.java

@@ -0,0 +1,36 @@
+package com.huimv.farm.piglet;
+
+import com.huimv.exception.RestExceptionHandler;
+import com.huimv.redis.RedisTemplateUtil;
+import com.huimv.tools.MapParamConverter;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.Bean;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+
+@EnableDiscoveryClient
+@EnableFeignClients
+@SpringBootApplication
+public class HuimvCloudFarmPigletApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(HuimvCloudFarmPigletApplication.class, args);
+    }
+
+    @Bean
+    public MapParamConverter mapParamConverter(){
+        return new MapParamConverter();
+    }
+
+    @Bean
+    public RestExceptionHandler restExceptionHandler(){
+        return new RestExceptionHandler();
+    }
+
+    @Bean
+    public RedisTemplateUtil redisTemplateUtil(RedisConnectionFactory factory){
+        return new RedisTemplateUtil(factory);
+    }
+}

+ 15 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/common/Constant.java

@@ -0,0 +1,15 @@
+package com.huimv.farm.piglet.common;
+
+public class Constant {
+    /**
+     * 产床状态
+     */
+    //空床
+    public static final Integer TABLE_STATUS_EMPTY = 1;
+    //进床
+    public static final Integer TABLE_STATUS_ENTRY = 2;
+    //哺乳
+    public static final Integer TABLE_STATUS_FEED = 3;
+    //断奶
+    public static final Integer TABLE_STATUS_WEANING = 4;
+}

+ 77 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/DeviceStatusInformationController.java

@@ -0,0 +1,77 @@
+package com.huimv.farm.piglet.controller;
+
+import com.huimv.AbstractPlatformController;
+import com.huimv.CommonConstant;
+import com.huimv.exception.PlatformException;
+import com.huimv.farm.piglet.domain.count.DeviceStatusInformation;
+import com.huimv.farm.piglet.repo.DeviceStatusInformationRepository;
+import com.huimv.response.OkResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * DeviceStatusInformationController
+ *
+ * @author guojian
+ */
+@RestController
+@RequestMapping(value = "/device-status-information")
+public class DeviceStatusInformationController extends AbstractPlatformController {
+
+    @Autowired
+    private DeviceStatusInformationRepository objectRepository;
+
+    @RequestMapping("/list")
+    public Page<DeviceStatusInformation> list(HttpServletRequest request,
+                                              @RequestParam(name = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) int pageNum,
+                                              @RequestParam(name = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) int pageSize,
+                                              @RequestParam(name = "searchStr", required = false) String searchStr) {
+        Pageable pageable = PageRequest.of(pageNum - 1, pageSize, Sort.Direction.DESC, "id");
+        if (!StringUtils.isEmpty(searchStr)) {
+            return objectRepository.findBySearchStr(searchStr, pageable);
+        }
+        return objectRepository.findAll(pageable);
+    }
+
+    @RequestMapping("/add")
+    public DeviceStatusInformation add(HttpServletRequest request,
+                                       @RequestParam(name = "") String str,
+                                       @RequestParam(name = "") int i) {
+        Integer orgId = this.getCurrOrgId(request);
+        DeviceStatusInformation obj = new DeviceStatusInformation();
+
+        return this.objectRepository.save(obj);
+    }
+
+    @RequestMapping("/update")
+    public DeviceStatusInformation update(HttpServletRequest request,
+                                          @RequestParam(name = "id") int id,
+                                          @RequestParam(name = "") String str,
+                                          @RequestParam(name = "status") int i) {
+        DeviceStatusInformation obj = this.objectRepository.findById(id).orElse(null);
+        if (obj == null) {
+            throw new PlatformException("data_not_exist", "更新数据不存在");
+        }
+        return this.objectRepository.save(obj);
+    }
+
+    @RequestMapping("/delete")
+    public Object delete(HttpServletRequest httpServletRequest,
+                         @RequestParam("id") Integer id) {
+        DeviceStatusInformation obj = this.objectRepository.findById(id).orElse(null);
+        if (obj == null) {
+            throw new PlatformException("data_not_exist", "删除数据不存在");
+        }
+        this.objectRepository.deleteById(id);
+        return new OkResponse("删除成功!");
+    }
+}

+ 123 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/FenceOutPredictionController.java

@@ -0,0 +1,123 @@
+package com.huimv.farm.piglet.controller;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.huimv.AbstractPlatformController;
+import com.huimv.CommonConstant;
+import com.huimv.farm.piglet.domain.count.FenceOutPrediction;
+import com.huimv.farm.piglet.feign.clients.PublicFeignClient;
+import com.huimv.farm.piglet.repo.FenceOutPredictionRepository;
+import com.huimv.tools.DateUtils;
+
+/**
+ * FenceOutPredictionController
+ *
+ * @author some one
+ */
+@RestController
+@RequestMapping(value = "/fence-out-prediction")
+public class FenceOutPredictionController extends AbstractPlatformController {
+
+    @Autowired
+    private FenceOutPredictionRepository objectRepository;
+    @Autowired
+    private PublicFeignClient publicFeignClient;
+
+    private static Map<String, String> monthName;
+    static {
+        monthName = new HashMap<>();
+        monthName.put("01", "一月");
+        monthName.put("02", "二月");
+        monthName.put("03", "三月");
+        monthName.put("04", "四月");
+        monthName.put("05", "五月");
+        monthName.put("06", "六月");
+        monthName.put("07", "七月");
+        monthName.put("08", "八月");
+        monthName.put("09", "九月");
+        monthName.put("10", "十月");
+        monthName.put("11", "十一月");
+        monthName.put("12", "十二月");
+    }
+
+    @RequestMapping("/list")
+    public Page<FenceOutPrediction> list(HttpServletRequest request,
+                                         @RequestParam(name = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) int pageNum,
+                                         @RequestParam(name = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) int pageSize,
+                                         @RequestParam(name = "searchStr", required = false) String searchStr) {
+        Pageable pageable = PageRequest.of(pageNum - 1, pageSize, Sort.Direction.DESC, "id");
+        if (!StringUtils.isEmpty(searchStr)) {
+            return objectRepository.findBySearchStr(searchStr, pageable);
+        }
+        return objectRepository.findAll(pageable);
+    }
+
+    @RequestMapping("/list-area")
+    public List<Map<String, Object>> listArea(HttpServletRequest request,
+                                              @RequestParam(name = "areaId", required = false, defaultValue = "-1") long areaId) {
+
+        Map<String, Integer> monthCountMap = new HashMap<>();
+        List<FenceOutPrediction> fenceOutPredictions;
+        //如果为-1则默认是全牧场(多产床)的预测总和:
+        if(areaId == -1L){
+
+            //TODO: 加让当前orgId判断
+            fenceOutPredictions = objectRepository.findByStatus(0);
+
+        }else {
+
+//            TreeNode treeNode = publicFeignClient.getTreeNode(areaId, false).orElse(null);
+//            if (treeNode == null) {
+//                throw new PlatformException("area_node_not_found", "未找到该区域节点");
+//            }
+
+            fenceOutPredictions = objectRepository.findByStatusAndAreaId(0, areaId);
+        }
+        for (FenceOutPrediction fp : fenceOutPredictions) {
+            Integer count = monthCountMap.get(fp.getMonth());
+            if(count == null){
+                count = 0;
+            }
+            monthCountMap.put(fp.getMonth(), count + fp.getPigCount());
+        }
+
+        List<String> monthKeys = getPreMonthList();
+        List<Map<String, Object>> resultList = new ArrayList<>();
+        for (String monthKey : monthKeys) {
+            Map<String, Object> item = new HashMap<>();
+            item.put("name", monthName.get(monthKey.substring(monthKey.length() - 2)));
+            item.put("value", monthCountMap.get(monthKey) == null ? 0 : monthCountMap.get(monthKey));
+            resultList.add(item);
+        }
+        return resultList;
+    }
+
+    //当前时间后退6个月的数据:预测(表里只存6个月的数据)
+    private List<String> getPreMonthList(){
+        List<String> resultList = new ArrayList<>();
+        Calendar c = Calendar.getInstance();
+        c.setTime(new Date());
+        for (int i = 0; i < 6; i++) {
+            c.add(Calendar.MONTH, 1);
+            resultList.add(DateUtils.formatDate(c.getTime(), DateUtils.DATE_FORMAT_NUMBER_MONTH));
+        }
+        return resultList;
+    }
+}

+ 45 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/HouseController.java

@@ -0,0 +1,45 @@
+package com.huimv.farm.piglet.controller;
+
+import com.huimv.CommonConstant;
+import com.huimv.exception.PlatformException;
+import com.huimv.farm.piglet.domain.FarrowingHouse;
+import com.huimv.farm.piglet.repo.FarrowingHouseRepository;
+import com.huimv.response.OkResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/house")
+public class HouseController {
+
+    @Autowired
+    FarrowingHouseRepository farrowingHouseRepository;
+
+    @PostMapping("/list")
+    public Page<FarrowingHouse> list(@RequestParam(value = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) Integer pageNum,
+                                     @RequestParam(value = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) Integer pageSize,
+                                     String searchStr) {
+        if (StringUtils.isEmpty(searchStr)){
+            return farrowingHouseRepository.findAll(PageRequest.of(pageNum - 1, pageSize));
+        }else {
+            return farrowingHouseRepository.findByNameContaining(searchStr, PageRequest.of(pageNum - 1, pageSize));
+        }
+    }
+
+    @PostMapping("/delete")
+    public OkResponse delete(@RequestParam(value = "id") Integer id){
+        try{
+            farrowingHouseRepository.deleteById(id);
+            return new OkResponse("删除成功");
+        }catch (Exception e){
+            throw new PlatformException("delete failed", "删除失败");
+        }
+    }
+}
+

+ 143 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/ObstetricTableController.java

@@ -0,0 +1,143 @@
+package com.huimv.farm.piglet.controller;
+
+import com.huimv.CommonConstant;
+import com.huimv.exception.PlatformException;
+import com.huimv.farm.piglet.common.Constant;
+import com.huimv.farm.piglet.domain.ObstetricTable;
+import com.huimv.farm.piglet.repo.DeviceRepository;
+import com.huimv.farm.piglet.repo.FarrowingHouseRepository;
+import com.huimv.farm.piglet.repo.LitterRepository;
+import com.huimv.farm.piglet.repo.ObstetricTableRepository;
+import com.huimv.tools.DataUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/table")
+public class ObstetricTableController {
+
+    @Autowired
+    ObstetricTableRepository obstetricTableRepository;
+
+    @Autowired
+    FarrowingHouseRepository farrowingHouseRepository;
+
+    @Autowired
+    LitterRepository litterRepository;
+
+    @Autowired
+    DeviceRepository deviceRepository;
+
+    @PostMapping("/list")
+    public Page<ObstetricTable> list(@RequestParam(value = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) Integer pageNum,
+                                          @RequestParam(value = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) Integer pageSize,
+                                          String searchStr, Integer building, Integer house) {
+        Pageable pageInfo = PageRequest.of(pageNum - 1, pageSize);
+        Page<ObstetricTable> tables;
+        if (StringUtils.isEmpty(searchStr)) {
+            if (house != null) {
+                tables = obstetricTableRepository.findByHouseIdOrderByCode(house, pageInfo);
+            } else if (building != null) {
+                //TODO 重点测试
+                tables = obstetricTableRepository.findByHouseIdInOrderByCode(farrowingHouseRepository.findIdByBuildingId(building), pageInfo);
+            } else {
+                tables = obstetricTableRepository.findByOrderByCode(pageInfo);
+            }
+        } else {
+            tables = obstetricTableRepository.findByCodeContainingOrderByCode(searchStr, pageInfo);
+        }
+
+        return tables;
+    }
+
+    @PostMapping("/one")
+    public ObstetricTable one(@RequestParam(value = "code") String code) {
+        Optional<ObstetricTable> table = obstetricTableRepository.findByCode(code);
+        if (table.isPresent()) {
+            return table.get();
+        } else {
+            throw new PlatformException("Obstetric Table does not exist", "产床不存在");
+        }
+    }
+
+    @PostMapping("/device")
+    public Page<Map<String, Object>> device(@RequestParam(value = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) Integer pageNum,
+                                            @RequestParam(value = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) Integer pageSize,
+                                            Integer building, Integer house, String table, Integer status) {
+        Pageable pageInfo = PageRequest.of(pageNum - 1, pageSize);
+        Page<ObstetricTable> tables;
+        if (status == null) {
+            if (table != null) {
+                Map<String, Object> map = new HashMap<>();
+                Optional<ObstetricTable> obstetricTable = obstetricTableRepository.findByCode(table);
+                if (obstetricTable.isPresent()) {
+                    List<Map<String, Object>> tableList = new ArrayList<>();
+                    Optional<ObstetricTable> record = obstetricTableRepository.findByCode(table);
+                    map.put("table", record);
+                    map.put("device", record.flatMap(value -> deviceRepository.findByCode(value.getDeviceId())).orElse(null));
+                    tableList.add(map);
+                    return DataUtils.listToPage(tableList, PageRequest.of(CommonConstant.PAGE_NUM - 1, pageSize));
+                }else {
+                    return DataUtils.listToPage(new ArrayList<>(), PageRequest.of(CommonConstant.PAGE_NUM - 1, pageSize));
+                }
+            } else {
+                if (house != null) {
+                    tables = obstetricTableRepository.findByHouseIdOrderByCode(house, pageInfo);
+                } else if (building != null) {
+                    tables = obstetricTableRepository.findByHouseIdInOrderByCode(farrowingHouseRepository.findIdByBuildingId(building), pageInfo);
+                } else {
+                    tables = obstetricTableRepository.findByOrderByCode(pageInfo);
+                }
+                return addDeviceInfo(tables, pageInfo);
+            }
+        } else {
+            tables = obstetricTableRepository.findByStatusOrderByCode(status, pageInfo);
+            return addDeviceInfo(tables, pageInfo);
+        }
+    }
+
+    private Page<Map<String, Object>> addDeviceInfo(Page<ObstetricTable> tables, Pageable pageable) {
+        List<ObstetricTable> list = tables.getContent();
+        List<Map<String, Object>> res = new ArrayList<>();
+        for (ObstetricTable obstetricTable : list) {
+            Map<String, Object> oneMap = new HashMap<>();
+            oneMap.put("table", obstetricTable);
+            if (obstetricTable.getDeviceId() != null) {
+                oneMap.put("device", deviceRepository.findByCode(obstetricTable.getDeviceId()));
+            } else {
+                oneMap.put("device", null);
+            }
+            res.add(oneMap);
+        }
+        return DataUtils.listToPage(res, pageable);
+    }
+
+    @RequestMapping("/status")
+    private Map<String, Object> tableByStatus() {
+        Map<String, Object> oneStatus = new HashMap<>();
+        oneStatus.put("empty",obstetricTableRepository.countByStatus(Constant.TABLE_STATUS_EMPTY));
+        oneStatus.put("entry",obstetricTableRepository.countByStatus(Constant.TABLE_STATUS_ENTRY));
+        oneStatus.put("feed",obstetricTableRepository.countByStatus(Constant.TABLE_STATUS_FEED));
+        oneStatus.put("weaning",obstetricTableRepository.countByStatus(Constant.TABLE_STATUS_WEANING));
+
+        Integer allDeliver = litterRepository.sumDeliverNumber();
+        Integer allWeaning = litterRepository.sumWeaningNumber();
+        oneStatus.put("allDeliver", allDeliver);
+        oneStatus.put("allWeaning", allWeaning);
+        oneStatus.put("weaningRate", allWeaning / (float) litterRepository.sumDeliverNumberAndWeaning());
+        oneStatus.put("avgDeliver", (float)(allDeliver / litterRepository.count()));
+        oneStatus.put("avgWeaning", (float)(allWeaning / litterRepository.count()));
+        oneStatus.put("avgWeaningPeriod", (float)(litterRepository.sumWeaningDate() / litterRepository.count()));
+        return oneStatus;
+    }
+}
+

+ 65 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/ProductionTraceabilityController.java

@@ -0,0 +1,65 @@
+package com.huimv.farm.piglet.controller;
+
+import com.huimv.AbstractPlatformController;
+import com.huimv.CommonConstant;
+import com.huimv.farm.piglet.domain.count.ProductionTraceability;
+import com.huimv.farm.piglet.repo.ProductionTraceabilityRepository;
+import com.huimv.tools.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+/**
+ * ProductionTraceabilityController
+ *
+ * @author some one
+ */
+@RestController
+@RequestMapping(value = "/production-traceability")
+public class ProductionTraceabilityController extends AbstractPlatformController {
+
+    @Autowired
+    private ProductionTraceabilityRepository objectRepository;
+
+    @RequestMapping("/list")
+    public Page<ProductionTraceability> list(HttpServletRequest request,
+                                             @RequestParam(name = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) int pageNum,
+                                             @RequestParam(name = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) int pageSize,
+                                             @RequestParam(name = "searchStr", required = false) String searchStr) {
+        Pageable pageable = PageRequest.of(pageNum - 1, pageSize, Sort.Direction.DESC, "id");
+        if (!StringUtils.isEmpty(searchStr)) {
+            return objectRepository.findBySearchStr(searchStr, pageable);
+        }
+        return objectRepository.findAll(pageable);
+    }
+
+    @RequestMapping("/list-week")
+    public List<Map<String, Object>> listWeek(HttpServletRequest request) {
+        //当前时间前推五周:
+        Date currentWeek = DateUtils.getThisWeekMonday(new Date());
+        List<Map<String, Object>> resultList = new ArrayList<>();
+        for (int i = 0; i < 5; i++) {
+            ProductionTraceability pt = objectRepository.findByWeek(DateUtils.formatDate(currentWeek, DateUtils.DATE_FORMAT_NUMBER));
+            if(pt == null){
+                pt = new ProductionTraceability();
+            }
+            Map<String, Object> item = new HashMap<>();
+            item.put("name", (i + 1) + "周");
+            item.put("breedingCount", pt.getBreedingCount());
+            item.put("deliveryCount", pt.getDeliveryCount());
+            item.put("pregnantCount", pt.getPregnantCount());
+            resultList.add(item);
+            currentWeek = DateUtils.geLastWeekMonday(currentWeek);
+        }
+        return resultList;
+    }
+}

+ 42 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/ProductionWarningController.java

@@ -0,0 +1,42 @@
+package com.huimv.farm.piglet.controller;
+
+import com.huimv.AbstractPlatformController;
+import com.huimv.CommonConstant;
+import com.huimv.farm.piglet.domain.count.ProductionWarning;
+import com.huimv.farm.piglet.repo.ProductionWarningRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * ProductionWarningController
+ *
+ * @author some one
+ */
+@RestController
+@RequestMapping(value = "/production-warning")
+public class ProductionWarningController extends AbstractPlatformController {
+
+    @Autowired
+    private ProductionWarningRepository objectRepository;
+
+    @RequestMapping("/list")
+    public Page<ProductionWarning> list(HttpServletRequest request,
+                                        @RequestParam(name = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) int pageNum,
+                                        @RequestParam(name = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) int pageSize,
+                                        @RequestParam(name = "searchStr", required = false) String searchStr) {
+        Pageable pageable = PageRequest.of(pageNum - 1, pageSize, Sort.Direction.DESC, "id");
+        if (!StringUtils.isEmpty(searchStr)) {
+            return objectRepository.findBySearchStr(searchStr, pageable);
+        }
+        return objectRepository.findAllByStatus(0, pageable);
+    }
+}

+ 120 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/PsyAnalysisController.java

@@ -0,0 +1,120 @@
+package com.huimv.farm.piglet.controller;
+
+import com.huimv.AbstractPlatformController;
+import com.huimv.CommonConstant;
+import com.huimv.farm.piglet.domain.count.PsyAnalysis;
+import com.huimv.farm.piglet.domain.count.PsyAnalysisRecord;
+import com.huimv.farm.piglet.repo.PsyAnalysisRecordRepository;
+import com.huimv.farm.piglet.repo.PsyAnalysisRepository;
+import com.huimv.tools.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+/**
+ * PsyAnalysisController
+ *
+ * @author some one
+ */
+@RestController
+@RequestMapping(value = "/psy-analysis")
+public class PsyAnalysisController extends AbstractPlatformController {
+
+    @Autowired
+    private PsyAnalysisRepository objectRepository;
+    @Autowired
+    private PsyAnalysisRecordRepository psyAnalysisRecordRepository;
+
+    private static Map<String, String> monthName;
+    static {
+        monthName = new HashMap<>();
+
+//        monthName.put("01", "Jan");
+//        monthName.put("02", "Feb");
+//        monthName.put("03", "Mar");
+//        monthName.put("04", "Apr");
+//        monthName.put("05", "May");
+//        monthName.put("06", "Jun");
+//        monthName.put("07", "Jul");
+//        monthName.put("08", "Aug");
+//        monthName.put("09", "Sep");
+//        monthName.put("10", "Oct");
+//        monthName.put("11", "Now");
+//        monthName.put("12", "Dec");
+
+        monthName.put("01", "一月");
+        monthName.put("02", "二月");
+        monthName.put("03", "三月");
+        monthName.put("04", "四月");
+        monthName.put("05", "五月");
+        monthName.put("06", "六月");
+        monthName.put("07", "七月");
+        monthName.put("08", "八月");
+        monthName.put("09", "九月");
+        monthName.put("10", "十月");
+        monthName.put("11", "十一月");
+        monthName.put("12", "十二月");
+    }
+
+    @RequestMapping("/list")
+    public Page<PsyAnalysis> list(HttpServletRequest request,
+                                  @RequestParam(name = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) int pageNum,
+                                  @RequestParam(name = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) int pageSize,
+                                  @RequestParam(name = "searchStr", required = false) String searchStr) {
+        Pageable pageable = PageRequest.of(pageNum - 1, pageSize, Sort.Direction.DESC, "id");
+        if (!StringUtils.isEmpty(searchStr)) {
+            return objectRepository.findBySearchStr(searchStr, pageable);
+        }
+        return objectRepository.findAll(pageable);
+    }
+
+    @RequestMapping("/get-data")
+    public Map<String, Object> getData(HttpServletRequest request) {
+        Map<String, Object> resultMap = new HashMap<>();
+        PsyAnalysis psyAnalysis;
+
+        List<PsyAnalysis> psyAnalyses = objectRepository.findAll();
+        if(psyAnalyses.size() > 0){
+            psyAnalysis = psyAnalyses.get(0);
+        }else {
+            psyAnalysis = new PsyAnalysis();
+        }
+
+        List<Map<String, Object>> resultList = new ArrayList<>();
+        List<String> monthList = getPreMonthList();
+        for (String monthKey : monthList) {
+            PsyAnalysisRecord par = psyAnalysisRecordRepository.findByMonth(monthKey);
+            Map<String, Object> item = new HashMap<>();
+            item.put("name", monthName.get(monthKey.substring(monthKey.length() - 2)));
+            item.put("value", par.getPsyValue());
+            resultList.add(item);
+        }
+
+        resultMap.put("headData", psyAnalysis);
+        //倒叙下,方便前端处理:
+        Collections.reverse(resultList);
+        resultMap.put("curveData", resultList);
+        return resultMap;
+    }
+
+    //当前时间后退12个月的数据:PSY曲线
+    private List<String> getPreMonthList(){
+        List<String> resultList = new ArrayList<>();
+        Calendar c = Calendar.getInstance();
+        c.setTime(new Date());
+        for (int i = 0; i < 12; i++) {
+            c.add(Calendar.MONTH, -1);
+            resultList.add(DateUtils.formatDate(c.getTime(), DateUtils.DATE_FORMAT_NUMBER_MONTH));
+        }
+        return resultList;
+    }
+}

+ 52 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/controller/SowController.java

@@ -0,0 +1,52 @@
+package com.huimv.farm.piglet.controller;
+
+import com.huimv.CommonConstant;
+import com.huimv.exception.PlatformException;
+import com.huimv.farm.domain.constant.PigStatusEnum;
+import com.huimv.farm.piglet.domain.Sow;
+import com.huimv.farm.piglet.repo.SowRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Optional;
+
+import org.springframework.web.bind.annotation.RequestParam;
+
+@RestController
+@RequestMapping("/sow")
+public class SowController {
+
+    @Autowired
+    private SowRepository sowRepository;
+
+    @RequestMapping("/get")
+    public Object get(
+            @RequestParam(name = "sowId") Integer sowId) {
+        Sow sow = this.sowRepository.findById(sowId).orElse(null);
+        if (sow == null)
+            throw new PlatformException("sow_id_not_exist", "母猪ID不存在");
+        return sow;
+    }
+
+    @PostMapping("/one")
+    public Sow one(String earTag) {
+        Optional<Sow> sow = sowRepository.findByEarTagNoAndIsEnable(earTag, true);
+        if (sow.isPresent()) {
+            return sow.get();
+        } else {
+            throw new PlatformException("sow does not exist", "母猪不存在");
+        }
+    }
+
+    @PostMapping("/list")
+    public Page<Sow> list(@RequestParam(name = "pageNum", defaultValue = CommonConstant.PAGE_NUM_STR) int pageNum,
+                    @RequestParam(name = "pageSize", defaultValue = CommonConstant.PAGE_SIZE_STR) int pageSize) {
+        return sowRepository.findByStatusLessThan(PigStatusEnum.STATUS_ELIMINATION.getCode(), PageRequest.of(pageNum - 1, pageSize));
+    }
+}
+

+ 23 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/Building.java

@@ -0,0 +1,23 @@
+package com.huimv.farm.piglet.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.util.Date;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Entity(name="building")
+public class Building {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+    //栋舍名
+    private String name;
+    @Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", updatable = false)
+    private Date created;
+}

+ 30 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/Device.java

@@ -0,0 +1,30 @@
+package com.huimv.farm.piglet.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.util.Date;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Entity(name="device")
+public class Device{
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+    //设备编码,产床编号,设备名称,栋舍,安装时间,状态
+    private Integer code;
+    private String tableCode;
+    private String name;
+    @OneToOne
+    @JoinColumn(name = "house_id", referencedColumnName="id")
+    private FarrowingHouse house;
+    private Date installTime;
+    private Integer status;
+    @Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", updatable = false)
+    private Date created;
+}

+ 26 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/FarrowingHouse.java

@@ -0,0 +1,26 @@
+package com.huimv.farm.piglet.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.util.Date;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Entity(name="farrowing_house")
+public class FarrowingHouse {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+    @OneToOne
+    @JoinColumn(name = "building_id", referencedColumnName="id")
+    private Building building;
+    private String name;
+    private Integer fieldNumbers;
+    @Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", updatable = false)
+    private Date created;
+}

+ 111 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/Litter.java

@@ -0,0 +1,111 @@
+package com.huimv.farm.piglet.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.util.Date;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Entity(name="litter")
+public class Litter {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+    //母羊ID,母羊耳标,绑定时间,预产期,分娩时间,日龄,生产数量,断奶时间,断奶存活数量
+    @OneToOne
+    @JoinColumn(name = "mother_id", referencedColumnName="id")
+    private Sow mother;
+    private Date bindTime;
+    private Date dueDate;
+    private Date deliverTime;
+    @Transient
+    private Integer dayOfAge;
+    private Integer deliverNumber;
+    private Date weaningTime;
+    private Integer weaningNumber;
+    @Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", updatable = false)
+    private Date created;
+
+    public Sow getMother() {
+        return mother;
+    }
+
+    public void setMother(Sow mother) {
+        this.mother = mother;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Date getBindTime() {
+        return bindTime;
+    }
+
+    public void setBindTime(Date bindTime) {
+        this.bindTime = bindTime;
+    }
+
+    public Date getDueDate() {
+        return dueDate;
+    }
+
+    public void setDueDate(Date dueDate) {
+        this.dueDate = dueDate;
+    }
+
+    public Date getDeliverTime() {
+        return deliverTime;
+    }
+
+    public void setDeliverTime(Date deliverTime) {
+        this.deliverTime = deliverTime;
+    }
+
+    public Integer getDayOfAge() {
+        if (this.deliverTime != null){
+            return ((Long)((new Date().getTime() - this.deliverTime.getTime()) / (24 * 60 * 60 * 1000))).intValue();
+        }else {
+            return null;
+        }
+    }
+
+    public Integer getDeliverNumber() {
+        return deliverNumber;
+    }
+
+    public void setDeliverNumber(Integer deliverNumber) {
+        this.deliverNumber = deliverNumber;
+    }
+
+    public Date getWeaningTime() {
+        return weaningTime;
+    }
+
+    public void setWeaningTime(Date weaningTime) {
+        this.weaningTime = weaningTime;
+    }
+
+    public Integer getWeaningNumber() {
+        return weaningNumber;
+    }
+
+    public void setWeaningNumber(Integer weaningNumber) {
+        this.weaningNumber = weaningNumber;
+    }
+
+    public Date getCreated() {
+        return created;
+    }
+
+    public void setCreated(Date created) {
+        this.created = created;
+    }
+}

+ 39 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/ObstetricTable.java

@@ -0,0 +1,39 @@
+package com.huimv.farm.piglet.domain;
+
+import com.huimv.converter.KeyValueStringConverter;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.util.Date;
+import java.util.Map;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Entity(name="obstetric_table")
+public class ObstetricTable {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+    //产床编码,产床状态,窝编号,产房ID,设备ID,设备通道,其他信息
+    private String code;
+    private Integer status;
+    @OneToOne
+    @JoinColumn(name = "litter_id", referencedColumnName="id")
+    private Litter litter;
+    @OneToOne
+    @JoinColumn(name = "house_id", referencedColumnName="id")
+    private FarrowingHouse house;
+    private Integer deviceId;
+    private Integer deviceCh;
+    private String feeder;
+    //数据字段
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = KeyValueStringConverter.class)
+    private Map<String, Object> data;
+    @Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", updatable = false)
+    private Date created;
+}

+ 150 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/Sow.java

@@ -0,0 +1,150 @@
+package com.huimv.farm.piglet.domain;
+
+import java.util.Date;
+import java.util.Map;
+import javax.persistence.*;
+import com.huimv.converter.KeyValueStringConverter;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author yejijie
+ * @created 2020年8月25日 上午8:50:42
+ */
+@AllArgsConstructor
+@NoArgsConstructor
+@Entity(name = "sow")
+public class Sow {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer id;
+    //耳标ID,耳标编码,批次,类别,状态,生日,日龄,别名,是否可用,其他信息
+    private Integer earTagId;
+    private String earTagNo;
+    private String batch;
+    private String category;
+    private Integer status;
+    private Date birthday;
+    @Transient
+    private Integer dayOfAge;
+    /**
+     * 用于显示什么猪等按需要来
+     */
+    private String mark;
+    private Boolean isEnable;
+
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = KeyValueStringConverter.class)
+    private  Map<String, Object> data;
+
+    @Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", updatable = false)
+    private Date created;
+
+    @Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
+    private Date updated;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getEarTagId() {
+        return earTagId;
+    }
+
+    public void setEarTagId(Integer earTagId) {
+        this.earTagId = earTagId;
+    }
+
+    public String getEarTagNo() {
+        return earTagNo;
+    }
+
+    public void setEarTagNo(String earTagNo) {
+        this.earTagNo = earTagNo;
+    }
+
+    public String getBatch() {
+        return batch;
+    }
+
+    public void setBatch(String batch) {
+        this.batch = batch;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        status = status;
+    }
+
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+
+    public Integer getDayOfAge() {
+        if (this.birthday != null) {
+            return ((Long) ((new Date().getTime() - this.birthday.getTime()) / (24 * 60 * 60 * 1000))).intValue();
+        } else {
+            return null;
+        }
+    }
+
+    public String getMark() {
+        return mark;
+    }
+
+    public void setMark(String mark) {
+        this.mark = mark;
+    }
+
+    public Boolean getEnable() {
+        return isEnable;
+    }
+
+    public void setEnable(Boolean enable) {
+        isEnable = enable;
+    }
+
+    public Map<String, Object> getData() {
+        return data;
+    }
+
+    public void setData(Map<String, Object> data) {
+        this.data = data;
+    }
+
+    public Date getCreated() {
+        return created;
+    }
+
+    public void setCreated(Date created) {
+        this.created = created;
+    }
+
+    public Date getUpdated() {
+        return updated;
+    }
+
+    public void setUpdated(Date updated) {
+        this.updated = updated;
+    }
+}

+ 33 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/DeviceStatusInformation.java

@@ -0,0 +1,33 @@
+package com.huimv.farm.piglet.domain.count;
+
+import lombok.Data;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import java.util.Date;
+
+/**
+ * 设备状态信息
+ * @author some one
+ */
+@Data
+@DynamicInsert()
+@DynamicUpdate()
+@Entity(name="device_status_information")
+public class DeviceStatusInformation {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+
+    private Date installDate;
+    private String deviceName;
+    private Integer deviceId;
+    private Integer deviceStatus;
+    private String address;
+    private Integer orgId;
+}

+ 33 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/FenceOutPrediction.java

@@ -0,0 +1,33 @@
+package com.huimv.farm.piglet.domain.count;
+
+import com.huimv.EntityBase;
+import lombok.Data;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+/**
+ * 出栏预测
+ * @author some one
+ */
+@Data
+@DynamicInsert()
+@DynamicUpdate()
+@Entity(name="fence_out_prediction")
+public class FenceOutPrediction extends EntityBase {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+
+    private Integer pigCount;
+    private String month;
+    private Long areaId;
+    private Integer orgId;
+    //0 有效,1 无效
+    private Integer status;
+}

+ 32 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/ProductionTraceability.java

@@ -0,0 +1,32 @@
+package com.huimv.farm.piglet.domain.count;
+
+import com.huimv.EntityBase;
+import lombok.Data;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+/**
+ * 生产追溯
+ * @author some one
+ */
+@Data
+@DynamicInsert()
+@DynamicUpdate()
+@Entity(name="production_traceability")
+public class ProductionTraceability extends EntityBase {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+
+    //周标识,配种、分娩、怀孕
+    private String week;
+    private Integer breedingCount = 0;
+    private Integer deliveryCount = 0;
+    private Integer pregnantCount = 0;
+}

+ 32 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/ProductionWarning.java

@@ -0,0 +1,32 @@
+package com.huimv.farm.piglet.domain.count;
+
+import com.huimv.EntityBase;
+import lombok.Data;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import java.util.Date;
+
+/**
+ * 生产预警
+ * @author some one
+ */
+@Data
+@DynamicInsert()
+@DynamicUpdate()
+@Entity(name="production_warning")
+public class ProductionWarning extends EntityBase {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+
+    //0 待确认,1 已确认
+    private Integer status;
+    private String message;
+    private Date warningTime;
+}

+ 39 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/PsyAnalysis.java

@@ -0,0 +1,39 @@
+package com.huimv.farm.piglet.domain.count;
+
+import com.huimv.EntityBase;
+import lombok.Data;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+/**
+ * PSY 统计分析
+ * @author some one
+ */
+@Data
+@DynamicInsert()
+@DynamicUpdate()
+@Entity(name="psy_analysis")
+public class PsyAnalysis extends EntityBase {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+
+    private Double psyValue = 0d;
+    private Double psyAnnualRatio = 0d;
+    private Double psyMonthlyRatio = 0d;
+
+    private Double lsyValue = 0d;
+    private Double lsyAnnualRatio = 0d;
+    private Double lsyMonthlyRatio = 0d;
+
+    private Double fetusValue = 0d;
+    private Double fetusAnnualRatio = 0d;
+    private Double fetusMonthlyRatio = 0d;
+}
+

+ 28 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/domain/count/PsyAnalysisRecord.java

@@ -0,0 +1,28 @@
+package com.huimv.farm.piglet.domain.count;
+
+import com.huimv.EntityBase;
+import lombok.Data;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.*;
+import java.util.Date;
+
+/**
+ * PSY 统计分析(曲线记录)
+ * @author some one
+ */
+@Data
+@DynamicInsert()
+@DynamicUpdate()
+@Entity(name="psy_analysis_record")
+public class PsyAnalysisRecord extends EntityBase {
+
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Integer id;
+
+    private Double psyValue;
+    private String month;
+}
+

+ 13 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/feign/clients/DeviceFeignClient.java

@@ -0,0 +1,13 @@
+package com.huimv.farm.piglet.feign.clients;
+
+import com.huimv.farm.piglet.feign.clients.conf.FeignConfiguration;
+import org.springframework.cloud.openfeign.FeignClient;
+
+/**
+ * @author yejijie
+ * @created 2020年7月15日 下午1:35:12
+ */
+@FeignClient(name = "device",configuration = FeignConfiguration.class)
+public interface DeviceFeignClient {
+
+}

+ 47 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/feign/clients/PublicFeignClient.java

@@ -0,0 +1,47 @@
+package com.huimv.farm.piglet.feign.clients;
+
+
+import com.huimv.farm.piglet.feign.clients.conf.FeignConfiguration;
+import com.huimv.publics.domain.SystemConfigData;
+import com.huimv.publics.domain.TreeNode;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.Optional;
+
+/**
+ * @author yejijie
+ * @created 2020年7月15日 下午1:35:12
+ */
+@FeignClient(name = "publics", configuration = FeignConfiguration.class)
+public interface PublicFeignClient {
+
+    @PostMapping(value = "/treenode/getTreeByCode")
+    Optional<TreeNode> getTreeByCode(@RequestParam(value = "code") String code, @RequestParam(value = "hasSub") Boolean hasSub);
+
+    @PostMapping(value = "/treenode/feign/getTreeByCode")
+    Optional<TreeNode> getTreeByOrgIdAndCode(@RequestParam(value = "orgId") Integer orgId, @RequestParam(value = "code") String code, @RequestParam(value = "hasSub") Boolean hasSub);
+
+    @PostMapping(value = "/treenode/getNode")
+    Optional<TreeNode> getTreeNode(@RequestParam(value = "id") Long id, @RequestParam(value = "hasSub") boolean hasSub);
+
+    @PostMapping(value = "/treenode/listNodeByParent")
+    Optional<TreeNode> listNodeByParent(@RequestParam(value = "parentId") String id, @RequestParam(value = "hasSub") boolean hasSub);
+
+    @PostMapping(value = "/treenode/addNode")
+    Optional<TreeNode> addNode(@RequestParam(name = "code", required = false) String code, @RequestParam(name = "nodeName") String nodeName,
+                               @RequestParam(name = "parentId", defaultValue = "-1", required = false) Long parentId,
+                               @RequestParam(name = "meta") Map<String, Object> meta, HttpServletRequest req);
+
+    //不需要token获取配置
+    @RequestMapping("/sysconf/feign/get")
+    SystemConfigData get(@RequestParam(name = "orgId", required = false) Integer orgId,
+                         @RequestParam(name = "id", required = false) Integer id,
+                         @RequestParam(name = "code", required = false) String code);
+
+
+}

+ 34 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/feign/clients/conf/FeignConfiguration.java

@@ -0,0 +1,34 @@
+package com.huimv.farm.piglet.feign.clients.conf;
+
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Enumeration;
+
+/**
+ * @author yejijie
+ * @created 2020年7月15日 下午1:37:09
+*/
+@Configuration
+public class FeignConfiguration implements RequestInterceptor {
+
+	@Override
+	public void apply(RequestTemplate template) {
+		ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+		if(attrs == null) return;//可能会没有哦
+		HttpServletRequest req = attrs.getRequest();
+		Enumeration<String> headerNames =  req.getHeaderNames();
+		if(headerNames != null) {
+			while(headerNames.hasMoreElements()) {
+				String name = headerNames.nextElement();
+                String values = req.getHeader(name);
+                template.header(name, values);
+			}
+		}
+	}
+
+}

+ 57 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/mq/EarTagListener.java

@@ -0,0 +1,57 @@
+package com.huimv.farm.piglet.mq;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.springframework.amqp.core.ExchangeTypes;
+import org.springframework.amqp.rabbit.annotation.Exchange;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.QueueBinding;
+import org.springframework.amqp.rabbit.annotation.RabbitHandler;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.huimv.analyse.domain.ear_tag.EarTagReport;
+import com.huimv.farm.piglet.domain.Sow;
+import com.huimv.farm.piglet.repo.SowRepository;
+import com.huimv.mq.MqConstant;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * @author yejijie
+ * @created 2020年8月25日 上午9:02:31
+*/
+@Slf4j
+@Component
+public class EarTagListener {
+
+	@Autowired
+	private SowRepository sowRepository;
+	
+    @RabbitListener(
+    		bindings = @QueueBinding(
+    				value = @Queue(value = MqConstant.QUEUE_EAR_TAG_PIGLET,autoDelete = "true",declare = "true"),
+    				exchange = @Exchange(name=MqConstant.EXCHANGE_EAR_TAG_TOPIC,type = ExchangeTypes.TOPIC),
+    				key = MqConstant.KEY_EAR_TAG_REPORT_FANOUT))
+    @RabbitHandler
+    private void recvErTagData(EarTagReport rep) {
+    	log.info("device->eartag->"+rep.toString());
+    	if(rep.getDeviceId() != null) {//理论上不可能出现
+        	Sow sow = this.sowRepository.findByEarTagIdAndIsEnable(rep.getDeviceId(),true).orElse(null);
+        	if(sow != null) {
+        		Map<String,Object> data = sow.getData();
+        		if(data == null) {
+        			data = new HashMap<>();
+        			sow.setData(data);
+        		}
+        		data.put("addr", rep.getAddr());
+        		data.put("animalTemp", rep.getAnimalTemp());
+        		data.put("envTemp", rep.getEnvTemp());
+        		data.put("battery", rep.getBattery());
+        		this.sowRepository.save(sow);
+        	}
+    	}
+    }
+}

+ 68 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/mq/PiggyDataListener.java

@@ -0,0 +1,68 @@
+package com.huimv.farm.piglet.mq;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.springframework.amqp.core.ExchangeTypes;
+import org.springframework.amqp.rabbit.annotation.Exchange;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.QueueBinding;
+import org.springframework.amqp.rabbit.annotation.RabbitHandler;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.huimv.analyse.domain.piggy.PiggyData;
+import com.huimv.farm.piglet.domain.ObstetricTable;
+import com.huimv.farm.piglet.repo.LitterRepository;
+import com.huimv.farm.piglet.repo.ObstetricTableRepository;
+import com.huimv.mq.MqConstant;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * @author yejijie
+ * @created 2020年8月22日 下午5:12:40
+*/
+@Slf4j
+@Component
+public class PiggyDataListener {
+
+	@Autowired
+	private ObstetricTableRepository obstetricTableRepository;
+	@Autowired
+	private LitterRepository litterRepository;
+	
+	@RabbitListener(
+	    		bindings = @QueueBinding(
+	    				value = @Queue(value = MqConstant.QUEUE_PIGGY_DATA_PIGLET,autoDelete = "true",declare = "true"),
+					exchange = @Exchange(name=MqConstant.EXCHANGE_PIGGY_TOPIC,type = ExchangeTypes.TOPIC),
+					key = MqConstant.PIGGY_DATA_FANOUT_ROUTING_KEY))
+	@RabbitHandler
+	private void recvPiggyData(PiggyData pd) {
+		if(pd.getId()>0) {
+			log.info("收到小猪设备信息->"+pd.getSn());
+			ObstetricTable table = this.obstetricTableRepository.findByDeviceIdAndDeviceCh(pd.getDeviceId(), pd.getCh()).orElse(null);
+			if(table != null) {
+
+				Map<String,Object> data = new HashMap<>();
+				//int ch = pd.getCh();//这是通道,代表床编号,应用层会保存通道号在产床配置里
+				data.put("file1", pd.getFile1());
+				data.put("file2", pd.getFile2());
+				data.put("piggy_num", pd.getPiggyNum());
+				data.put("piggy_list", pd.getPiggyList());
+				data.put("temp", pd.getTemp());
+				
+				if(table.getData() == null) 
+					table.setData(data);
+				else
+					table.getData().putAll(data);
+				this.obstetricTableRepository.save(table);
+				if(table.getLitter()!=null) {
+					table.getLitter().setDeliverNumber(pd.getPiggyNum());
+					this.litterRepository.save(table.getLitter());
+				}
+			}
+		}
+	}
+}

+ 8 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/BuildingRepository.java

@@ -0,0 +1,8 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.Building;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface BuildingRepository extends JpaRepository<Building, Integer> {
+
+}

+ 11 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/DeviceRepository.java

@@ -0,0 +1,11 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.Device;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.Optional;
+
+public interface DeviceRepository extends JpaRepository<Device, Integer> {
+
+    Optional<Device> findByCode(Integer code);
+}

+ 13 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/DeviceStatusInformationRepository.java

@@ -0,0 +1,13 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.count.DeviceStatusInformation;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+public interface DeviceStatusInformationRepository extends JpaRepository<DeviceStatusInformation, Integer> {
+
+    @Query(nativeQuery = true , value = "SELECT * FROM device_status_information WHERE instr(id, ?1) > 0 OR instr(device_id, ?1) > 0 OR instr(device_name, ?1) > 0 order by ?#{#pageable}")
+    Page<DeviceStatusInformation> findBySearchStr(String s, Pageable pageable);
+}

+ 15 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/FarrowingHouseRepository.java

@@ -0,0 +1,15 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.FarrowingHouse;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+public interface FarrowingHouseRepository extends JpaRepository<FarrowingHouse, Integer> {
+
+    List<Integer> findIdByBuildingId(Integer building);
+
+    Page<FarrowingHouse> findByNameContaining(String name, Pageable pageable);
+}

+ 19 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/FenceOutPredictionRepository.java

@@ -0,0 +1,19 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.count.FenceOutPrediction;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.List;
+
+public interface FenceOutPredictionRepository extends JpaRepository<FenceOutPrediction, Integer> {
+
+    @Query(nativeQuery = true , value = "SELECT * FROM fence_out_prediction WHERE instr(id, ?1) > 0 OR instr(month, ?1) > 0 order by ?#{#pageable}")
+    Page<FenceOutPrediction> findBySearchStr(String s, Pageable pageable);
+
+    List<FenceOutPrediction> findByStatus(int status);
+
+    List<FenceOutPrediction> findByStatusAndAreaId(int status, long areaId);
+}

+ 63 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/LitterRepository.java

@@ -0,0 +1,63 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.Litter;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.Date;
+import java.util.List;
+
+public interface LitterRepository extends JpaRepository<Litter, Integer> {
+
+    @Query(nativeQuery = true, value = "SELECT SUM(deliver_number) FROM litter")
+    Integer sumDeliverNumber();
+
+    @Query(nativeQuery = true, value = "SELECT SUM(deliver_number) FROM litter WHERE weaning_ IS NOT NULL ")
+    Integer sumDeliverNumberAndWeaning();
+
+    @Query(nativeQuery = true, value = "SELECT SUM(weaning_number) FROM litter")
+    Integer sumWeaningNumber();
+
+    @Query(nativeQuery = true, value = "SELECT SUM(DATEDIFF(weaning_time, deliver_time)) FROM litter ")
+    Integer sumWeaningDate();
+
+    @Query(nativeQuery = true, value = "SELECT mother_id FROM litter WHERE weaning_time IS NOT NULL GROUP BY mother_id HAVING COUNT(id) > :parity")
+    List<Integer> cullingParity(Integer parity);
+
+    @Query(nativeQuery = true, value = "SELECT mother_id FROM litter WHERE deliver_number < :num AND weaning_time IS NOT NULL GROUP BY mother_id HAVING COUNT(id) > :parity")
+    List<Integer> cullingDeliverNumTotal(Integer num,Integer parity);
+
+    //正在哺乳的猪
+    @Query(nativeQuery = true, value = "SELECT mother_id FROM litter WHERE deliver_time IS NOT NULL AND weaning_time IS NULL")
+    List<Integer> findMotherIdByDeliverTimeIsNotNullAndWeaningTimeIsNull();
+
+    @Query(nativeQuery = true, value = "SELECT distinct(mother_id) FROM litter WHERE weaning_time IS NOT NULL AND mother_id NOT IN :exclude")
+    List<Integer> notInWeaning(List<Integer> exclude);
+
+    @Query(nativeQuery = true, value = "SELECT * FROM litter WHERE mother_id=:mother ORDER BY deliver_time DESC limit 2")
+    List<Litter> lastTwoRecord(Integer mother);
+
+    @Query(nativeQuery = true, value = "SELECT mother_id FROM litter WHERE (weaning_number/deliver_number)*100 < :rate AND weaning_time IS NOT NULL GROUP BY mother_id HAVING COUNT(id) > :parity")
+    List<Integer> cullingDeliverSurviveTotal(Integer rate,Integer parity);
+
+    @Query(nativeQuery = true, value = "SELECT * FROM litter WHERE deliver_time IS NULL AND DATEDIFF(due_date,now()) = :period")
+    List<Litter> periodToDue(Integer period);
+
+    @Query(nativeQuery = true, value = "SELECT * FROM litter WHERE weaning_time IS NULL AND DATEDIFF(now(), deliver_time) = :period")
+    List<Litter> periodAfterDeliver(Integer period);
+
+    @Query(nativeQuery = true, value = "SELECT * FROM litter WHERE DATEDIFF(now(), weaning_time) = :period")
+    List<Litter> periodAfterWeaning(Integer period);
+
+    @Query(nativeQuery = true, value = "SELECT SUM(deliver_number) FROM litter WHERE deliver_time > :startTime AND deliver_time < :endTime")
+    Integer sumDeliverNumberInPeriod(Date startTime, Date endTime);
+
+    @Query(nativeQuery = true, value = "SELECT COUNT(deliver_number) FROM litter WHERE deliver_time > :startTime AND deliver_time < :endTime")
+    Integer countDeliverNumberInPeriod(Date startTime, Date endTime);
+
+    @Query(nativeQuery = true, value = "SELECT distinct(mother_id) FROM litter WHERE deliver_time BETWEEN :startTime AND :endTime HAVING COUNT(id) > 1")
+    List<Integer> findByDeliverTimeBetween(Date startTime, Date endTime);
+
+    @Query(nativeQuery = true, value = "SELECT * FROM litter WHERE mother_id = :motherId AND deliver_time BETWEEN :startTime AND :endTime ORDER BY deliver_time DESC")
+    List<Litter> findByDeliverInPeriod(Integer motherId, Date startTime, Date endTime);
+}

+ 28 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/ObstetricTableRepository.java

@@ -0,0 +1,28 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.ObstetricTable;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+import java.util.Optional;
+
+public interface ObstetricTableRepository extends JpaRepository<ObstetricTable, Integer> {
+
+    Page<ObstetricTable> findByCodeContainingOrderByCode(String code, Pageable pageable);
+
+    Page<ObstetricTable> findByHouseIdOrderByCode(Integer house, Pageable pageable);
+
+    Page<ObstetricTable> findByHouseIdInOrderByCode(List<Integer> ids, Pageable pageable);
+
+    Page<ObstetricTable> findByOrderByCode(Pageable pageable);
+
+    Optional<ObstetricTable> findByCode(String code);
+
+    Page<ObstetricTable> findByStatusOrderByCode(Integer status,Pageable pageable);
+
+    Integer countByStatus(Integer status);
+    
+    Optional<ObstetricTable> findByDeviceIdAndDeviceCh(Integer deviceId,Integer deviceCh);
+}

+ 15 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/ProductionTraceabilityRepository.java

@@ -0,0 +1,15 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.count.ProductionTraceability;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+public interface ProductionTraceabilityRepository extends JpaRepository<ProductionTraceability, Integer> {
+
+    @Query(nativeQuery = true , value = "SELECT * FROM production_traceability WHERE instr(id, ?1) > 0 OR instr(week, ?1) > 0 order by ?#{#pageable}")
+    Page<ProductionTraceability> findBySearchStr(String s, Pageable pageable);
+
+    ProductionTraceability findByWeek(String week);
+}

+ 17 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/ProductionWarningRepository.java

@@ -0,0 +1,17 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.count.ProductionWarning;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+public interface ProductionWarningRepository extends JpaRepository<ProductionWarning, Integer> {
+
+    @Query(nativeQuery = true , value = "SELECT * FROM production_warning WHERE instr(id, ?1) > 0 OR instr(message, ?1) > 0 AND status = 0 order by ?#{#pageable}")
+    Page<ProductionWarning> findBySearchStr(String s, Pageable pageable);
+
+    //查询状态数据:
+    @Query(nativeQuery = true, value = "SELECT * FROM production_warning WHERE status = ?1 ORDER BY ?#{#pageable}")
+    Page<ProductionWarning> findAllByStatus(int status, Pageable pageable);
+}

+ 15 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/PsyAnalysisRecordRepository.java

@@ -0,0 +1,15 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.count.PsyAnalysisRecord;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+public interface PsyAnalysisRecordRepository extends JpaRepository<PsyAnalysisRecord, Integer> {
+
+    @Query(nativeQuery = true , value = "SELECT * FROM psy_analysis_record WHERE instr(id, ?1) > 0 OR instr(psy_value, ?1) > 0 order by ?#{#pageable}")
+    Page<PsyAnalysisRecord> findBySearchStr(String s, Pageable pageable);
+
+    PsyAnalysisRecord findByMonth(String month);
+}

+ 13 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/PsyAnalysisRepository.java

@@ -0,0 +1,13 @@
+package com.huimv.farm.piglet.repo;
+
+import com.huimv.farm.piglet.domain.count.PsyAnalysis;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+public interface PsyAnalysisRepository extends JpaRepository<PsyAnalysis, Integer> {
+
+    @Query(nativeQuery = true , value = "SELECT * FROM psy_analysis WHERE instr(id, ?1) > 0 OR instr(psy_value, ?1) > 0 order by ?#{#pageable}")
+    Page<PsyAnalysis> findBySearchStr(String s, Pageable pageable);
+}

+ 23 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/repo/SowRepository.java

@@ -0,0 +1,23 @@
+package com.huimv.farm.piglet.repo;
+
+import java.util.List;
+import java.util.Optional;
+
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import com.huimv.farm.piglet.domain.Sow;
+import org.springframework.data.jpa.repository.Query;
+
+public interface SowRepository extends JpaRepository<Sow, Integer> {
+
+	Optional<Sow> findByEarTagIdAndIsEnable(Integer earTagId,Boolean isEnable);
+
+	Optional<Sow> findByEarTagNoAndIsEnable(String earTagNo,Boolean isEnable);
+
+	Page<Sow> findByStatusLessThan(Integer status, Pageable pageable);
+
+	@Query(nativeQuery = true, value = "SELECT ear_tag_no FROM sow WHERE DATEDIFF(now(), birthday) > :overAge")
+	List<String> overAge(Integer overAge);
+}

+ 27 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/session/AppTokenConfiguration.java

@@ -0,0 +1,27 @@
+package com.huimv.farm.piglet.session;
+
+import com.huimv.session.WebApiInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class AppTokenConfiguration implements WebMvcConfigurer {
+
+    @Bean
+    public WebApiInterceptor webApiInterceptor() {
+        return new WebApiInterceptor();
+    }
+
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        //多个拦截器组成一个拦截器链
+        //addPathPattern 用于添加拦截规则 路径,是带api接口的
+        //用于定义、排除用户的拦截
+        registry.addInterceptor(webApiInterceptor())
+                .addPathPatterns("/**")
+                .excludePathPatterns("/auth/login");
+    }
+
+}

+ 38 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/session/SessionConfig.java

@@ -0,0 +1,38 @@
+package com.huimv.farm.piglet.session;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.session.data.redis.config.ConfigureRedisAction;
+import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
+import org.springframework.session.web.http.HeaderHttpSessionIdResolver;
+
+/**
+ * 这个类用配置redis服务器的连接
+ * @author guojian
+ */
+//maxInactiveIntervalInSeconds为SpringSession的过期时间(单位:秒)
+@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 7200)
+public class SessionConfig {
+
+    //这里有个小坑,如果服务器用的是云服务器,不加这个会报错
+    @Bean
+    public static ConfigureRedisAction configureRedisAction() {
+        return ConfigureRedisAction.NO_OP;
+    }
+
+    //session策略,这里配置的是Header方式(有提供Header,Cookie等方式),可自定义
+    @Bean
+    public HeaderHttpSessionIdResolver httpSessionStrategy() {
+        return new HeaderHttpSessionIdResolver("x-auth-token");
+    }
+
+    /**
+     * 更换序列化器
+     * @return
+     */
+    @Bean("springSessionDefaultRedisSerializer")
+    public RedisSerializer setSerializer(){
+        return new GenericJackson2JsonRedisSerializer();
+    }
+}

+ 13 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/session/SessionInitializer.java

@@ -0,0 +1,13 @@
+package com.huimv.farm.piglet.session;
+
+import org.springframework.session.web.context.AbstractHttpSessionApplicationInitializer;
+
+/**
+ * 初始化Session配置
+ * @author guojian
+ */
+public class SessionInitializer extends AbstractHttpSessionApplicationInitializer {
+    public SessionInitializer() {
+        super(SessionConfig.class);
+    }
+}

+ 248 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/task/CullingTask.java

@@ -0,0 +1,248 @@
+package com.huimv.farm.piglet.task;
+
+import com.huimv.exception.PlatformException;
+import com.huimv.farm.domain.constant.PigStatusEnum;
+import com.huimv.farm.piglet.domain.Litter;
+import com.huimv.farm.piglet.domain.Sow;
+import com.huimv.farm.piglet.domain.count.ProductionWarning;
+import com.huimv.farm.piglet.feign.clients.PublicFeignClient;
+import com.huimv.farm.piglet.repo.LitterRepository;
+import com.huimv.farm.piglet.repo.ProductionWarningRepository;
+import com.huimv.farm.piglet.repo.SowRepository;
+import com.huimv.publics.domain.SystemConfigData;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.*;
+
+/**
+ * 配置和提醒
+ */
+@Component
+@SuppressWarnings("unused")
+@Slf4j
+public class CullingTask {
+
+    @Autowired
+    SowRepository sowRepository;
+
+    @Autowired
+    ProductionWarningRepository productionWarningRepository;
+
+    @Autowired
+    PublicFeignClient publicFeignClient;
+
+    @Autowired
+    LitterRepository litterRepository;
+
+    //淘汰母猪条件设置
+    //日龄
+    private static final String OVER_AGE_KEY = "a";
+    //胎次
+    private static final String PARITY_KEY = "b";
+    //分娩头数
+    private static final String DELIVER_NUM_CONTINUOUS_KEY = "c1";
+    private static final String DELIVER_NUM_TOTAL_KEY = "c2";
+    private static final String DELIVER_NUM_THRESHOLD_KEY = "c3";
+    //分娩存活率
+    private static final String DELIVER_SURVIVE_CONTINUOUS_KEY = "d1";
+    private static final String DELIVER_SURVIVE_TOTAL_KEY = "d2";
+    private static final String DELIVER_SURVIVE_THRESHOLD_KEY = "d3";
+    //断奶存活率
+    private static final String WEANING_SURVIVE_CONTINUOUS_KEY = "e1";
+    private static final String WEANING_SURVIVE_TOTAL_KEY = "e2";
+    private static final String WEANING_SURVIVE_THRESHOLD_KEY = "e3";
+
+    //生产条件设置
+    //预产期
+    private static final String DUE_KEY = "f";
+    //分娩
+    private static final String DELIVER_KEY = "g";
+    //断奶
+    private static final String WEANING_KEY = "h";
+    //温度
+    private static final String TEMPERATURE_KEY = "i";
+
+    @Scheduled(cron = "0 0 2 * * ?")
+    private void culling(){
+        Integer overAge = getConf(OVER_AGE_KEY);
+        if (null == overAge){
+            log.info("淘汰母猪条件设置,按照日龄淘汰参数未设置");
+            return;
+        }
+        List<String> needCulling = sowRepository.overAge(overAge);
+        for (String no : needCulling){
+            ProductionWarning one = new ProductionWarning();
+            one.setMessage("【通知】母猪" + no + "日龄已超过" + overAge + "天,可淘汰");
+            one.setStatus(0);
+            one.setWarningTime(new Date());
+            productionWarningRepository.save(one);
+        }
+    }
+
+    @Scheduled(cron = "0 5 2 * * ?")
+    private void parity(){
+        Integer parity = getConf(PARITY_KEY);
+        if (null == parity){
+            log.info("淘汰母猪条件设置,按照分娩胎次淘汰参数未设置");
+            return;
+        }
+        List<Integer> allSowId = litterRepository.cullingParity(parity);
+        for (Integer sowId : allSowId){
+            Optional<Sow> sow = sowRepository.findById(sowId);
+            if (sow.isPresent() && sow.get().getStatus() != PigStatusEnum.STATUS_ELIMINATION.getCode()){
+                saveWarning("【通知】母猪" + sow.get().getEarTagNo() + "分娩胎次超过" + parity + "次,可淘汰");
+            }
+        }
+    }
+
+    @Scheduled(cron = "0 10 2 * * ?")
+    private void deliverNum(){
+        Integer continuous = getConf(DELIVER_NUM_CONTINUOUS_KEY);
+        Integer total = getConf(DELIVER_NUM_TOTAL_KEY);
+        Integer threshold = getConf(DELIVER_NUM_THRESHOLD_KEY);
+        if (null == continuous || null == total || null == threshold){
+            log.info("淘汰母猪条件设置,按照分娩数量淘汰参数未设置");
+            return;
+        }
+        //根据每胎数量淘汰
+        //正在哺乳的不提示,两个条件不重复提示
+        List<Integer> feeding = litterRepository.findMotherIdByDeliverTimeIsNotNullAndWeaningTimeIsNull();
+        List<Integer> totalSow = litterRepository.cullingDeliverNumTotal(threshold, total);
+
+        for (Integer sowId : totalSow){
+            Optional<Sow> sow = sowRepository.findById(sowId);
+            if (sow.isPresent() && sow.get().getStatus() != PigStatusEnum.STATUS_ELIMINATION.getCode()){
+                saveWarning("【通知】母猪" + sow.get().getEarTagNo() + "累计" + total + "胎以上分娩仔猪在" + threshold + "头以下,可淘汰");
+            }
+        }
+
+        List<Integer> exclude = new ArrayList<>();
+        exclude.addAll(feeding);
+        exclude.addAll(totalSow);
+
+        List<Integer> toSearch = litterRepository.notInWeaning(exclude);
+        for (Integer id : toSearch){
+            List<Litter> lastTwo = litterRepository.lastTwoRecord(id);
+            if (lastTwo.size() == 2 && lastTwo.get(0).getMother().getStatus() != PigStatusEnum.STATUS_ELIMINATION.getCode() && lastTwo.get(0).getDeliverNumber() < 9 && lastTwo.get(1).getDeliverNumber() < 9){
+                saveWarning("【通知】母猪" + lastTwo.get(0).getMother().getEarTagNo() + "连续" + continuous + "胎分娩仔猪在" + threshold + "头以下,可淘汰");
+            }
+        }
+    }
+
+    @Scheduled(cron = "0 15 2 * * ?")
+    private void deliverSurvive(){
+        Integer continuous = getConf(WEANING_SURVIVE_CONTINUOUS_KEY);
+        Integer total = getConf(WEANING_SURVIVE_TOTAL_KEY);
+        Integer threshold = getConf(WEANING_SURVIVE_THRESHOLD_KEY);
+        if (null == continuous || null == total || null == threshold){
+            log.info("淘汰母猪条件设置,按照断奶存活率淘汰参数未设置");
+            return;
+        }
+        //根据每胎数量淘汰
+        //正在哺乳的不提示,两个条件不重复提示
+        List<Integer> feeding = litterRepository.findMotherIdByDeliverTimeIsNotNullAndWeaningTimeIsNull();
+        List<Integer> totalSow = litterRepository.cullingDeliverSurviveTotal(threshold, total);
+
+        for (Integer sowId : totalSow){
+            Optional<Sow> sow = sowRepository.findById(sowId);
+            if (sow.isPresent() && sow.get().getStatus() != PigStatusEnum.STATUS_ELIMINATION.getCode()){
+                saveWarning("【通知】母猪" + sow.get().getEarTagNo() + "累计" + total + "胎以上断奶存活率低于" + threshold + "以下,可淘汰");
+            }
+        }
+
+        List<Integer> exclude = new ArrayList<>();
+        exclude.addAll(feeding);
+        exclude.addAll(totalSow);
+
+        List<Integer> toSearch = litterRepository.notInWeaning(exclude);
+        for (Integer id : toSearch){
+            List<Litter> lastTwo = litterRepository.lastTwoRecord(id);
+            if (lastTwo.size() == 2 && lastTwo.get(0).getMother().getStatus() != PigStatusEnum.STATUS_ELIMINATION.getCode()
+                    && (lastTwo.get(0).getWeaningNumber() / (float)lastTwo.get(0).getWeaningNumber() * 100) < threshold
+                    && (lastTwo.get(1).getWeaningNumber() / (float)lastTwo.get(1).getWeaningNumber() * 100) < threshold){
+                saveWarning("【通知】母猪" + lastTwo.get(0).getMother().getEarTagNo() + "连续" + continuous + "胎断奶存活率低于" + threshold + "以下,可淘汰");
+            }
+        }
+    }
+
+    @Scheduled(cron = "0 20 2 * * ?")
+    private void dayToDue(){
+        Integer due = getConf(DUE_KEY);
+        if (null == due){
+            log.info("生产条件设置,预产期前提醒关注参数未设置");
+            return;
+        }
+
+        List<Litter> toDue = litterRepository.periodToDue(due);
+        for (Litter goingToDeliver : toDue){
+            ProductionWarning one = new ProductionWarning();
+            one.setMessage("【通知】母猪" + goingToDeliver.getMother().getEarTagNo() + "还有" + due + "天到达预产期");
+            one.setStatus(0);
+            one.setWarningTime(new Date());
+            productionWarningRepository.save(one);
+        }
+    }
+
+    @Scheduled(cron = "0 25 2 * * ?")
+    private void dayAfterDeliver(){
+        Integer deliver = getConf(DELIVER_KEY);
+        if (null == deliver){
+            log.info("生产条件设置,分娩后提醒断奶参数未设置");
+            return;
+        }
+
+        List<Litter> afterDeliver = litterRepository.periodAfterDeliver(deliver);
+        for (Litter goingToDeliver : afterDeliver){
+            ProductionWarning one = new ProductionWarning();
+            one.setMessage("【通知】母猪" + goingToDeliver.getMother().getEarTagNo() + "分娩已达" + deliver + "天,可断奶");
+            one.setStatus(0);
+            one.setWarningTime(new Date());
+            productionWarningRepository.save(one);
+        }
+    }
+
+    @Scheduled(cron = "0 30 2 * * ?")
+    @Scheduled(cron = "*/5 * * * * ?")
+    private void dayAfterWeaning(){
+        Integer weaning = getConf(WEANING_KEY);
+        if (null == weaning){
+            log.info("生产条件设置,断奶后提醒转舍参数未设置");
+            return;
+        }
+
+        List<Litter> afterWeaning = litterRepository.periodAfterWeaning(weaning);
+        for (Litter oneWeaning : afterWeaning){
+            ProductionWarning one = new ProductionWarning();
+            one.setMessage("【通知】母猪" + oneWeaning.getMother().getEarTagNo() + "断奶已达" + weaning + "天,可转舍");
+            one.setStatus(0);
+            one.setWarningTime(new Date());
+            productionWarningRepository.save(one);
+        }
+    }
+
+    private Integer getConf(String key){
+        SystemConfigData overAgeConf = publicFeignClient.get(null, 30009, null);
+        if (null == overAgeConf){
+            throw new PlatformException("can't find sow culling config", "找不到母猪淘汰条件设置");
+        }
+
+        Object str = overAgeConf.getConf().get("data");
+        ArrayList array = (ArrayList)str;
+        for (Object oneKey : array)
+            if (key.equals(((HashMap)oneKey).get("key").toString())){
+                return Integer.parseInt(String.valueOf(((HashMap)oneKey).get("val")));
+            }
+        return null;
+    }
+
+    private void saveWarning(String content){
+        ProductionWarning one = new ProductionWarning();
+        one.setMessage(content);
+        one.setStatus(0);
+        one.setWarningTime(new Date());
+        productionWarningRepository.save(one);
+    }
+}

+ 142 - 0
huimv/product/huimv-piglet/src/main/java/com.huimv.farm/piglet/task/PsyTask.java

@@ -0,0 +1,142 @@
+package com.huimv.farm.piglet.task;
+
+import com.huimv.exception.PlatformException;
+import com.huimv.farm.piglet.domain.Litter;
+import com.huimv.farm.piglet.domain.count.PsyAnalysis;
+import com.huimv.farm.piglet.domain.count.PsyAnalysisRecord;
+import com.huimv.farm.piglet.repo.LitterRepository;
+import com.huimv.farm.piglet.repo.PsyAnalysisRecordRepository;
+import com.huimv.farm.piglet.repo.PsyAnalysisRepository;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+@Component
+@SuppressWarnings("unused")
+@Slf4j
+public class PsyTask {
+
+    @Autowired
+    PsyAnalysisRecordRepository psyAnalysisRecordRepository;
+
+    @Autowired
+    LitterRepository litterRepository;
+
+    @Autowired
+    PsyAnalysisRepository psyAnalysisRepository;
+
+    //每月一次计算PSY
+    //@Scheduled(cron = "0 30 1 1 * ?")
+    @Scheduled(cron = "* */1 * * * ?")
+    private void monthPsy() {
+//        System.out.println("开始");
+        SimpleDateFormat dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        SimpleDateFormat month = new SimpleDateFormat("yyyyMM");
+        Calendar today = Calendar.getInstance();
+        String monthStart = today.get(Calendar.YEAR) + "-" + (today.get(Calendar.MONTH) + 1) + "-01 00:00:00";
+        today.add(Calendar.MONTH, -1);
+        String lastMonthStart = today.get(Calendar.YEAR) + "-" + (today.get(Calendar.MONTH) + 1) + "-01 00:00:00";
+
+        int monthDeliver;
+        Date monthStartDate;
+        Date monthEndDate;
+        try {
+            monthStartDate = dateTime.parse(lastMonthStart);
+            monthEndDate = dateTime.parse(monthStart);
+        } catch (Exception e) {
+            throw new PlatformException("method monthPsy() time format failed", "方法monthPsy()时间转换错误");
+        }
+
+        monthDeliver = litterRepository.sumDeliverNumberInPeriod(monthStartDate, monthEndDate);
+        //PSY分析-PSY
+        Double psy = (monthDeliver * 12) / Double.valueOf(litterRepository.countDeliverNumberInPeriod(monthStartDate, monthEndDate));
+
+        PsyAnalysisRecord psyAnalysisRecord = new PsyAnalysisRecord();
+        psyAnalysisRecord.setMonth(month.format(monthEndDate));
+        psyAnalysisRecord.setPsyValue(psy);
+        psyAnalysisRecordRepository.save(psyAnalysisRecord);
+
+        //月环比
+        today.add(Calendar.MONTH, -1);
+        int tempMonth = today.get(Calendar.MONTH) + 1;
+        String lastTwoMonth = today.get(Calendar.YEAR) + tempMonth < 10 ? "0" + tempMonth : tempMonth + "";
+        //年同比
+        today.add(Calendar.MONTH, 1);
+        today.add(Calendar.YEAR, -1);
+        int tempMonth2 = today.get(Calendar.MONTH) + 1;
+        String lastYear = today.get(Calendar.YEAR) + tempMonth2 < 10 ? "0" + tempMonth2 : tempMonth2 + "";
+
+        //PSY分析-PSY年同比
+        PsyAnalysisRecord psyYear = psyAnalysisRecordRepository.findByMonth(lastYear);
+        //PSY分析-PSY月环比
+        PsyAnalysisRecord psyTwoMonth = psyAnalysisRecordRepository.findByMonth(lastTwoMonth);
+
+        Date lastYearStartDate;
+        Date thisYearStartDate;
+        Date nextYearStartDate;
+        try {
+            String lastYearStart = today.get(Calendar.YEAR) + "-01-01 00:00:00";
+            lastYearStartDate = dateTime.parse(lastYearStart);
+            today.add(Calendar.YEAR, 1);
+            String thisYearStart = today.get(Calendar.YEAR) + "-01-01 00:00:00";
+            thisYearStartDate = dateTime.parse(thisYearStart);
+            today.add(Calendar.YEAR, 1);
+            String nextYearStart = today.get(Calendar.YEAR) + "-01-01 00:00:00";
+            nextYearStartDate = dateTime.parse(nextYearStart);
+        } catch (Exception e) {
+            throw new PlatformException("method monthPsy() time format failed", "方法monthPsy()时间转换错误");
+        }
+
+        Double lastAvgDeliver = getAvgDeliver(lastYearStartDate, thisYearStartDate);
+        Double thisAvgDeliver = getAvgDeliver(thisYearStartDate, nextYearStartDate);
+        //PSY分析-非生产天数
+        double thisNoDeliverPeriod = thisAvgDeliver - 114;
+        //PSY分析-年同比
+        double noDeliverRate =  lastAvgDeliver == 0 ? 0 : (thisAvgDeliver - lastAvgDeliver) / lastAvgDeliver;
+        //PSY分析-平均胎次
+        double avgParity = lastAvgDeliver == 0 ? 0 : (thisAvgDeliver - lastAvgDeliver) * 365 / (lastAvgDeliver * lastAvgDeliver * thisAvgDeliver) ;
+        //PSY分析-平均胎次年同比
+        double avgParityRate = 365 / thisAvgDeliver ;
+
+        List<PsyAnalysis> list = psyAnalysisRepository.findAll();
+        if (list.size() > 0) {
+            PsyAnalysis psyAnalysis = list.get(0);
+            psyAnalysis.setPsyValue(psy);
+            psyAnalysis.setPsyAnnualRatio(psyYear == null ? 0 : psyYear.getPsyValue());
+            psyAnalysis.setPsyMonthlyRatio(psyTwoMonth == null ? 0 : psyTwoMonth.getPsyValue());
+            psyAnalysis.setLsyValue(new BigDecimal(thisNoDeliverPeriod).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
+            psyAnalysis.setLsyAnnualRatio(new BigDecimal(noDeliverRate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
+            psyAnalysis.setFetusValue(new BigDecimal(avgParity).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
+            psyAnalysis.setFetusAnnualRatio(new BigDecimal(avgParityRate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
+            psyAnalysisRepository.save(psyAnalysis);
+        }
+//        System.out.println("结束");
+    }
+
+    private Double getAvgDeliver(Date lastYearStartDate, Date thisYearStartDate){
+        List<Integer> thisYearDeliver = litterRepository.findByDeliverTimeBetween(lastYearStartDate, thisYearStartDate);
+        List<Integer> twoDeliverDays = new ArrayList<>();
+
+        for (Integer motherId : thisYearDeliver) {
+            List<Litter> deliverInPeriod = litterRepository.findByDeliverInPeriod(motherId, lastYearStartDate, thisYearStartDate);
+            for (int i = 0; i < deliverInPeriod.size() - 1; i++) {
+                Long days = (deliverInPeriod.get(0).getDeliverTime().getTime() - deliverInPeriod.get(1).getDeliverTime().getTime()) / (20 * 60 * 60 * 1000);
+                twoDeliverDays.add(days.intValue());
+            }
+        }
+
+        int allDeliver = 0;
+        for (Integer oneRecord : twoDeliverDays){
+            allDeliver += oneRecord;
+        }
+        return twoDeliverDays.size() == 0 ? 0 : allDeliver / (double)twoDeliverDays.size();
+    }
+}

+ 20 - 0
huimv/product/huimv-piglet/src/test/java/com/huimv/huyang/AppTest.java

@@ -0,0 +1,20 @@
+package com.huimv.huyang;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest 
+{
+    /**
+     * Rigorous Test :-)
+     */
+    @Test
+    public void shouldAnswerWithTrue()
+    {
+        assertTrue( true );
+    }
+}

+ 20 - 0
huimv/product/pom.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>huimv</artifactId>
+        <groupId>com.huimv</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>product</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>huimv-piglet</module>
+    </modules>
+
+
+
+</project>

+ 120 - 0
huimv/product/product.iml

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.15.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.23.2-GA" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.15.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-data-redis:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.10.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.62" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:4.7.2" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:2.6.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.71" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.11" level="project" />
+  </component>
+</module>

+ 143 - 0
huimv/project/huimv-huyang/huimv-huyang.iml

@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="jpa" name="JPA">
+      <configuration>
+        <setting name="validation-enabled" value="true" />
+        <setting name="provider-name" value="Hibernate" />
+        <datasource-mapping />
+        <naming-strategy-map />
+      </configuration>
+    </facet>
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+        <sourceRoots>
+          <root url="file://$MODULE_DIR$/src/main/java" />
+        </sourceRoots>
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.15.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.23.2-GA" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.15.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-data-redis:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.10.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.62" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:4.7.2" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:2.6.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.71" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.11" level="project" />
+  </component>
+</module>

+ 82 - 0
huimv/project/huimv-huyang/pom.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>project</artifactId>
+        <groupId>com.huimv</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.huimv</groupId>
+    <artifactId>huimv-huyang</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <name>huimv-huyang</name>
+    <description>慧牧湖羊项目</description>
+    <packaging>jar</packaging>
+
+    <!-- FIXME change it to the project's website -->
+    <url>http://www.example.com</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.7</maven.compiler.source>
+        <maven.compiler.target>1.7</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+            <plugins>
+                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <version>3.1.0</version>
+                </plugin>
+                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+                <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-install-plugin</artifactId>
+                    <version>2.5.2</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>2.8.2</version>
+                </plugin>
+                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.7.1</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-project-info-reports-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>

+ 13 - 0
huimv/project/huimv-huyang/src/main/java/com/huimv/huyang/App.java

@@ -0,0 +1,13 @@
+package com.huimv.huyang;
+
+/**
+ * Hello world!
+ *
+ */
+public class App 
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+    }
+}

+ 20 - 0
huimv/project/huimv-huyang/src/test/java/com/huimv/huyang/AppTest.java

@@ -0,0 +1,20 @@
+package com.huimv.huyang;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest 
+{
+    /**
+     * Rigorous Test :-)
+     */
+    @Test
+    public void shouldAnswerWithTrue()
+    {
+        assertTrue( true );
+    }
+}

+ 19 - 0
huimv/project/pom.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>huimv</artifactId>
+        <groupId>com.huimv</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>project</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>huimv-huyang</module>
+    </modules>
+
+
+</project>

+ 120 - 0
huimv/project/project.iml

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.15.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.23.2-GA" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.13.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.16.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.15.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-data-redis:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.1.10.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.14.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.10.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.62" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:4.7.2" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:2.6.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.3.70" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.71" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.11" level="project" />
+  </component>
+</module>