523096025 %!s(int64=3) %!d(string=hai) anos
pai
achega
618f25f165
Modificáronse 27 ficheiros con 992 adicións e 802 borrados
  1. 147 271
      huimv-goldpig/app-log/log_error.log
  2. 303 500
      huimv-goldpig/app-log/log_total.log
  3. 5 0
      huimv-goldpig/huimv-goldpig-admin/pom.xml
  4. 1 0
      huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/controller/LoginController.java
  5. 1 0
      huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/entity/SysAccountMultilevel.java
  6. 1 0
      huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/service/impl/SysAccountMultilevelServiceImpl.java
  7. 2 5
      huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/service/impl/UserServiceImpl.java
  8. 9 0
      huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/session/AccessToken.java
  9. 4 5
      huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/common/token/TokenSign.java
  10. 93 0
      huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/common/utils/ChineseCharToEnUtil.java
  11. 1 7
      huimv-goldpig/huimv-goldpig-anquisition/src/main/java/com/huimv/acquisition/entity/vo/EartagDataVo.java
  12. 3 7
      huimv-goldpig/huimv-goldpig-anquisition/src/main/resources/mapper/acquisition/EartagDataDao.xml
  13. 1 1
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/HuimvEartagApplication.java
  14. 34 5
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/controller/BaseFarmInfoController.java
  15. 32 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/controller/EartagDataController.java
  16. 3 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/entity/BaseFarmInfo.java
  17. 141 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/entity/EartagData.java
  18. 2 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/mapper/BaseFarmInfoMapper.java
  19. 25 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/mapper/EartagDataMapper.java
  20. 5 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/IBaseFarmInfoService.java
  21. 20 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/IEartagDataService.java
  22. 76 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/impl/BaseFarmInfoServiceImpl.java
  23. 0 1
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/impl/BaseFloorServiceImpl.java
  24. 44 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/impl/EartagDataServiceImpl.java
  25. 17 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/resources/com/huimv/eartag/mapper/BaseFarmInfo.xml
  26. 16 0
      huimv-goldpig/huimv-goldpig-eartag/src/main/resources/com/huimv/eartag/mapper/EartagDataMapperr.xml
  27. 6 0
      huimv-goldpig/huimv-goldpig-gateway/src/main/resources/application-dev.yml

+ 147 - 271
huimv-goldpig/app-log/log_error.log

@@ -1,272 +1,148 @@
-2022-01-10 14:56:03.149 ERROR 1992 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 
-
-***************************
-APPLICATION FAILED TO START
-***************************
-
-Description:
-
-An attempt was made to call a method that does not exist. The attempt was made from the following location:
-
-    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.themeResolver(WebMvcAutoConfiguration.java:476)
-
-The following method did not exist:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.themeResolver()Lorg/springframework/web/servlet/ThemeResolver;
-
-The calling method's class, org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, was loaded from the following location:
-
-    jar:file:/E:/maven/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar!/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class
-
-The called method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:
-
-    jar:file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class
-
-The called method's class hierarchy was loaded from the following locations:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-
-
-Action:
-
-Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration and org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
-
-2022-01-10 14:57:08.783 ERROR 18380 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 
-
-***************************
-APPLICATION FAILED TO START
-***************************
-
-Description:
-
-An attempt was made to call a method that does not exist. The attempt was made from the following location:
-
-    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.themeResolver(WebMvcAutoConfiguration.java:476)
-
-The following method did not exist:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.themeResolver()Lorg/springframework/web/servlet/ThemeResolver;
-
-The calling method's class, org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, was loaded from the following location:
-
-    jar:file:/E:/maven/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar!/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class
-
-The called method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:
-
-    jar:file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class
-
-The called method's class hierarchy was loaded from the following locations:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-
-
-Action:
-
-Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration and org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
-
-2022-01-10 14:59:13.904 ERROR 15304 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 
-
-***************************
-APPLICATION FAILED TO START
-***************************
-
-Description:
-
-An attempt was made to call a method that does not exist. The attempt was made from the following location:
-
-    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.themeResolver(WebMvcAutoConfiguration.java:476)
-
-The following method did not exist:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.themeResolver()Lorg/springframework/web/servlet/ThemeResolver;
-
-The calling method's class, org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, was loaded from the following location:
-
-    jar:file:/E:/maven/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar!/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class
-
-The called method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:
-
-    jar:file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class
-
-The called method's class hierarchy was loaded from the following locations:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-
-
-Action:
-
-Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration and org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
-
-2022-01-10 15:02:33.064 ERROR 2204 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 
-
-***************************
-APPLICATION FAILED TO START
-***************************
-
-Description:
-
-An attempt was made to call a method that does not exist. The attempt was made from the following location:
-
-    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.themeResolver(WebMvcAutoConfiguration.java:476)
-
-The following method did not exist:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.themeResolver()Lorg/springframework/web/servlet/ThemeResolver;
-
-The calling method's class, org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, was loaded from the following location:
-
-    jar:file:/E:/maven/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar!/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class
-
-The called method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:
-
-    jar:file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class
-
-The called method's class hierarchy was loaded from the following locations:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-
-
-Action:
-
-Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration and org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
-
-2022-01-10 15:04:27.658 ERROR 19060 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 
-
-***************************
-APPLICATION FAILED TO START
-***************************
-
-Description:
-
-An attempt was made to call a method that does not exist. The attempt was made from the following location:
-
-    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.themeResolver(WebMvcAutoConfiguration.java:476)
-
-The following method did not exist:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.themeResolver()Lorg/springframework/web/servlet/ThemeResolver;
-
-The calling method's class, org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, was loaded from the following location:
-
-    jar:file:/E:/maven/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar!/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class
-
-The called method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:
-
-    jar:file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class
-
-The called method's class hierarchy was loaded from the following locations:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-
-
-Action:
-
-Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration and org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
-
-2022-01-10 15:07:26.970 ERROR 1304 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 
-
-***************************
-APPLICATION FAILED TO START
-***************************
-
-Description:
-
-An attempt was made to call a method that does not exist. The attempt was made from the following location:
-
-    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.themeResolver(WebMvcAutoConfiguration.java:476)
-
-The following method did not exist:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.themeResolver()Lorg/springframework/web/servlet/ThemeResolver;
-
-The calling method's class, org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, was loaded from the following location:
-
-    jar:file:/E:/maven/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar!/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class
-
-The called method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:
-
-    jar:file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class
-
-The called method's class hierarchy was loaded from the following locations:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-
-
-Action:
-
-Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration and org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
-
-2022-01-10 15:08:47.694 ERROR 4184 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 
-
-***************************
-APPLICATION FAILED TO START
-***************************
-
-Description:
-
-An attempt was made to call a method that does not exist. The attempt was made from the following location:
-
-    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.themeResolver(WebMvcAutoConfiguration.java:476)
-
-The following method did not exist:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.themeResolver()Lorg/springframework/web/servlet/ThemeResolver;
-
-The calling method's class, org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, was loaded from the following location:
-
-    jar:file:/E:/maven/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar!/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class
-
-The called method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:
-
-    jar:file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class
-
-The called method's class hierarchy was loaded from the following locations:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-
-
-Action:
-
-Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration and org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
-
-2022-01-10 15:10:09.006 ERROR 17544 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 
-
-***************************
-APPLICATION FAILED TO START
-***************************
-
-Description:
-
-An attempt was made to call a method that does not exist. The attempt was made from the following location:
-
-    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.themeResolver(WebMvcAutoConfiguration.java:476)
-
-The following method did not exist:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.themeResolver()Lorg/springframework/web/servlet/ThemeResolver;
-
-The calling method's class, org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, was loaded from the following location:
-
-    jar:file:/E:/maven/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar!/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class
-
-The called method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:
-
-    jar:file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class
-
-The called method's class hierarchy was loaded from the following locations:
-
-    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport: file:/E:/maven/org/springframework/spring-webmvc/5.2.5.RELEASE/spring-webmvc-5.2.5.RELEASE.jar
-
-
-Action:
-
-Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration and org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
+2022-01-17 17:28:29.030 ERROR 6196 --- [http-nio-9501-exec-17] c.h.a.result.RRExceptionHandler          : JSON parse error: Cannot deserialize value of type `java.util.Date` from String "2022-01-12T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2022-01-12T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"
+ at [Source: (PushbackInputStream); line: 1, column: 36] (through reference chain: com.huimv.acquisition.entity.vo.EartagParamVo["starTime"])
+
+org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.util.Date` from String "2022-01-12T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2022-01-12T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"
+ at [Source: (PushbackInputStream); line: 1, column: 36] (through reference chain: com.huimv.acquisition.entity.vo.EartagParamVo["starTime"])
+	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:389)
+	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.read(AbstractJackson2HttpMessageConverter.java:342)
+	at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:185)
+	at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters(RequestResponseBodyMethodProcessor.java:160)
+	at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:133)
+	at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)
+	at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:179)
+	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:146)
+	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
+	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
+	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
+	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
+	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
+	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
+	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
+	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
+	at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
+	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
+	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
+	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
+	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
+	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
+	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
+	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
+	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
+	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
+	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
+	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
+	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
+	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
+	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
+	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1732)
+	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
+	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
+	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
+	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
+	at java.lang.Thread.run(Thread.java:748)
+Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2022-01-12T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"
+ at [Source: (PushbackInputStream); line: 1, column: 36] (through reference chain: com.huimv.acquisition.entity.vo.EartagParamVo["starTime"])
+	at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67)
+	at com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:1991)
+	at com.fasterxml.jackson.databind.DeserializationContext.handleWeirdStringValue(DeserializationContext.java:1219)
+	at com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateBasedDeserializer._parseDate(DateDeserializers.java:195)
+	at com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateDeserializer.deserialize(DateDeserializers.java:303)
+	at com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateDeserializer.deserialize(DateDeserializers.java:281)
+	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
+	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:391)
+	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:184)
+	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322)
+	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
+	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3682)
+	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:378)
+	... 51 common frames omitted
+
+2022-01-17 17:30:06.076 ERROR 6196 --- [http-nio-9501-exec-12] c.h.a.result.RRExceptionHandler          : JSON parse error: Cannot deserialize value of type `java.util.Date` from String "2022-01-03T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2022-01-03T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"
+ at [Source: (PushbackInputStream); line: 1, column: 36] (through reference chain: com.huimv.acquisition.entity.vo.EartagParamVo["starTime"])
+
+org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.util.Date` from String "2022-01-03T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2022-01-03T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"
+ at [Source: (PushbackInputStream); line: 1, column: 36] (through reference chain: com.huimv.acquisition.entity.vo.EartagParamVo["starTime"])
+	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:389)
+	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.read(AbstractJackson2HttpMessageConverter.java:342)
+	at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:185)
+	at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters(RequestResponseBodyMethodProcessor.java:160)
+	at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:133)
+	at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)
+	at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:179)
+	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:146)
+	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
+	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
+	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
+	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
+	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
+	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
+	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
+	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
+	at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
+	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
+	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
+	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
+	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
+	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
+	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
+	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
+	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
+	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
+	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
+	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
+	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
+	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
+	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
+	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
+	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1732)
+	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
+	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
+	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
+	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
+	at java.lang.Thread.run(Thread.java:748)
+Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2022-01-03T16:00:00.000Z": expected format "yyyy-MM-dd HH:mm:ss"
+ at [Source: (PushbackInputStream); line: 1, column: 36] (through reference chain: com.huimv.acquisition.entity.vo.EartagParamVo["starTime"])
+	at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67)
+	at com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:1991)
+	at com.fasterxml.jackson.databind.DeserializationContext.handleWeirdStringValue(DeserializationContext.java:1219)
+	at com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateBasedDeserializer._parseDate(DateDeserializers.java:195)
+	at com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateDeserializer.deserialize(DateDeserializers.java:303)
+	at com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateDeserializer.deserialize(DateDeserializers.java:281)
+	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
+	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:391)
+	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:184)
+	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322)
+	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
+	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3682)
+	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:378)
+	... 51 common frames omitted
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 303 - 500
huimv-goldpig/app-log/log_total.log


+ 5 - 0
huimv-goldpig/huimv-goldpig-admin/pom.xml

@@ -18,6 +18,11 @@
             <version>3.3.0</version>
         </dependency>
         <dependency>
+            <groupId>com.belerweb</groupId>
+            <artifactId>pinyin4j</artifactId>
+            <version>2.5.1</version>
+        </dependency>
+        <dependency>
             <groupId>io.jsonwebtoken</groupId>
             <artifactId>jjwt</artifactId>
             <version>0.9.1</version>

+ 1 - 0
huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/controller/LoginController.java

@@ -95,6 +95,7 @@ public class LoginController {
 
             accessToken.setId(id);
             accessToken.setLoginIp(remoteHost);
+            accessToken.setType(accountEntity.getType());
             return new Result(ResultCode.SUCCESS,accessToken);
         }
         return  result;

+ 1 - 0
huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/entity/SysAccountMultilevel.java

@@ -44,5 +44,6 @@ public class SysAccountMultilevel extends Model {
     private Integer lastFarmId;
 
     private String userName;
+    private Integer type;
 
 }

+ 1 - 0
huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/service/impl/SysAccountMultilevelServiceImpl.java

@@ -53,6 +53,7 @@ public class SysAccountMultilevelServiceImpl extends ServiceImpl<SysAccountMulti
 
         sysAccountMultilevel.setPid(userId);
         sysAccountMultilevel.setPids(byId.getPids()+","+userId);
+        sysAccountMultilevel.setType(byId.getType());
         accountMultilevelMapper.insert(sysAccountMultilevel);
         return  new Result( 10000,"添加成功",true);
     }

+ 2 - 5
huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/service/impl/UserServiceImpl.java

@@ -7,12 +7,9 @@ import com.huimv.admin.entity.User;
 import com.huimv.admin.entity.dto.UserAccountDto;
 import com.huimv.admin.mapper.UserMapper;
 import com.huimv.admin.service.IUserService;
-import com.huimv.common.utils.Result;
-import com.huimv.common.utils.ResultCode;
-import com.huimv.common.utils.SnowflakeSequence;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.util.StringUtils;
 
 import java.util.List;
 
@@ -33,7 +30,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
     public JSONObject findUserAccount(String searchStr, int pageNum, int pageSize) {
         int start = (pageNum-1)*pageSize;
 
-        if (!StringUtils.isEmpty(searchStr) ) {
+        if (StringUtils.isNotBlank(searchStr)) {
             List<UserAccountDto> userAccountList = userMapper.findUserAndAccountByUserName(searchStr, start,pageSize);
             QueryWrapper<User> userQueryWrapper = new QueryWrapper<>();
             userQueryWrapper.eq("user_name",searchStr);

+ 9 - 0
huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/admin/session/AccessToken.java

@@ -13,6 +13,7 @@ public class AccessToken {
     private String accountName;
     private Integer code;
     private Integer id;
+    private Integer type;
 
     public Integer getId() {
         return id;
@@ -72,6 +73,14 @@ public class AccessToken {
 		this.loginIp = loginIp;
 	}
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
     @Override
     public String toString() {
         return "AccessToken{" +

+ 4 - 5
huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/common/token/TokenSign.java

@@ -1,8 +1,7 @@
 package com.huimv.common.token;
 
 import io.jsonwebtoken.*;
-import org.springframework.util.StringUtils;
-
+import org.apache.commons.lang.StringUtils;
 import javax.servlet.http.HttpServletRequest;
 import java.util.Date;
 
@@ -54,7 +53,7 @@ public class TokenSign {
 
     public static boolean verify(String token){
 
-        if (StringUtils.isEmpty(token)) {
+        if (StringUtils.isBlank(token)) {
             return false;
         }
         try {
@@ -76,7 +75,7 @@ public class TokenSign {
      */
     public static Integer getMemberIdByJwtToken(HttpServletRequest request) {
         String jwtToken = request.getHeader("accessToken");
-        if (StringUtils.isEmpty(jwtToken)) {
+        if (StringUtils.isBlank(jwtToken)) {
             return null;
         }
         Claims claims = getClaims(jwtToken);
@@ -85,7 +84,7 @@ public class TokenSign {
 
     public static String getFarmIds(HttpServletRequest request) {
         String jwtToken = request.getHeader("accessToken");
-        if (StringUtils.isEmpty(jwtToken)) {
+        if (StringUtils.isBlank(jwtToken)) {
             return null;
         }
         Claims claims = getClaims(jwtToken);

+ 93 - 0
huimv-goldpig/huimv-goldpig-admin/src/main/java/com/huimv/common/utils/ChineseCharToEnUtil.java

@@ -0,0 +1,93 @@
+package com.huimv.common.utils;
+
+import net.sourceforge.pinyin4j.PinyinHelper;
+import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
+import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
+import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
+import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
+import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
+
+public class ChineseCharToEnUtil {
+    /**
+     * 将字符串中的中文转化为拼音,其他字符不变
+     *
+     * @param inputString
+     * @return
+     */
+    public static String getPingYin(String inputString) {
+        HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
+        format.setCaseType(HanyuPinyinCaseType.LOWERCASE);
+        format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
+        format.setVCharType(HanyuPinyinVCharType.WITH_V);
+ 
+        char[] input = inputString.trim().toCharArray();
+        String output = "";
+ 
+        try {
+            for (int i = 0; i < input.length; i++) {
+                if (Character.toString(input[i]).matches("[\\u4E00-\\u9FA5]+")) {
+                    String[] temp = PinyinHelper.toHanyuPinyinStringArray(input[i], format);
+                    output += temp[0];
+                } else
+                    output += Character.toString(input[i]);
+            }
+        } catch (BadHanyuPinyinOutputFormatCombination e) {
+            e.printStackTrace();
+        }
+        return output;
+    }
+    /**
+     * 获取汉字串拼音首字母,英文字符不变
+     * @param chinese 汉字串
+     * @return 汉语拼音首字母
+     */
+    public static String getFirstSpell(String chinese) {
+        StringBuffer pybf = new StringBuffer();
+        char[] arr = chinese.toCharArray();
+        HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat();
+        defaultFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE);
+        defaultFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
+        for (int i = 0; i < arr.length; i++) {
+            if (arr[i] > 128) {
+                try {
+                    String[] temp = PinyinHelper.toHanyuPinyinStringArray(arr[i], defaultFormat);
+                    if (temp != null && temp.length > 0){
+                        pybf.append(temp[0].charAt(0));
+                    }
+                } catch (BadHanyuPinyinOutputFormatCombination e) {
+                    e.printStackTrace();
+                }
+            } else {
+                pybf.append(arr[i]);
+            }
+        }
+        return pybf.toString().replaceAll("\\W", "").trim();
+    }
+    /**
+     * 获取汉字串拼音,英文字符不变
+     * @param chinese 汉字串
+     * @return 汉语拼音
+     */
+    public static String getFullSpell(String chinese) {
+        StringBuffer pybf = new StringBuffer();
+        char[] arr = chinese.toCharArray();
+        HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat();
+        defaultFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE);
+        defaultFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
+        for (int i = 0; i < arr.length; i++) {
+            if (arr[i] > 128) {
+                try {
+                    pybf.append(PinyinHelper.toHanyuPinyinStringArray(arr[i], defaultFormat)[0]);
+                } catch (BadHanyuPinyinOutputFormatCombination e) {
+                    e.printStackTrace();
+                }
+            } else {
+                pybf.append(arr[i]);
+            }
+        }
+        return pybf.toString();
+    }
+
+
+ 
+}

+ 1 - 7
huimv-goldpig/huimv-goldpig-anquisition/src/main/java/com/huimv/acquisition/entity/vo/EartagDataVo.java

@@ -27,7 +27,7 @@ public class EartagDataVo {
     /**
      * 耳标号
      */
-    private String orgName;
+ //   private String orgId;
     /**
      * 设备编码
      */
@@ -57,12 +57,6 @@ public class EartagDataVo {
      */
     private String penName;
 
-    
-    /**
-     * 运动量
-     */
-    private  Integer  exercise;
-
     //单元名称
 
     private String unitName;

+ 3 - 7
huimv-goldpig/huimv-goldpig-anquisition/src/main/resources/mapper/acquisition/EartagDataDao.xml

@@ -50,9 +50,6 @@
         <result property="unitName" column="unit_name"/>
         <result property="stage" column="stage"/>
         <result property="registeCode" column="registe_code"/>
-        <result property="orgName" column="org_name"/>
-        <result property="exercise" column="exercise"/>
-
     </resultMap>
 
 
@@ -60,12 +57,10 @@
     <select id="pageIndex"
             resultMap="eartagDataIndex"
             parameterType="com.huimv.acquisition.entity.vo.EartagParamVo" >
-    SELECT   ed1.id ,  ed1.eartag_no  ,ed1.device_code ,ed1.time, ed1.ear_temp   ,ed1.bat  ,ed1.exercise ,
+    SELECT   ed1.id ,  ed1.eartag_no  ,ed1.device_code ,ed1.time, ed1.ear_temp   ,ed1.bat ,
 
              ed1.env_temp   ,ed1.rssi  ,co.pen_name  ,co.unit_name   ,co.stage   ,co.registe_code
 
-        ,co.org_name
-
      FROM   eartag_data ed1    JOIN (
 
      SELECT MAX(id) id  FROM   eartag_data ed2
@@ -80,6 +75,7 @@
             AND  ed2.eartag_no = #{eartagParamVo.eartagNo}
         </if>
 
+
         /*电量进行判断*/
         <if test="eartagParamVo.bat != null">
             AND  ed2.bat  <![CDATA[ <= ]]>  #{eartagParamVo.bat}
@@ -99,7 +95,7 @@
 
        /* 下面的参数只能传或者不传  不存在传空  穿空会有问题*/
 
-        /* 阶段进行判断--其实时间是必传字段的  stage OK 了-*/
+        /* 时间范围进行判断--其实时间是必传字段的  stage OK 了-*/
         <if test="eartagParamVo.stage != null">
             AND co.stage = #{eartagParamVo.stage}
         </if>

+ 1 - 1
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/HuimvEartagApplication.java

@@ -13,7 +13,7 @@ import org.springframework.context.annotation.Import;
  * @Create : 2020-12-25
  **/
 @SpringBootApplication
-@MapperScan("com.huimv.eartag.mapper")
+@MapperScan("com.huimv.*.mapper")
 public class HuimvEartagApplication {
     public static void main(String[] args) {
         SpringApplication.run(HuimvEartagApplication.class, args);

+ 34 - 5
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/controller/BaseFarmInfoController.java

@@ -2,12 +2,15 @@ package com.huimv.eartag.controller;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.huimv.admin.entity.SysAccountMultilevel;
+import com.huimv.admin.service.ISysAccountMultilevelService;
 import com.huimv.common.token.TokenSign;
 import com.huimv.common.utils.Result;
 import com.huimv.common.utils.ResultCode;
 import com.huimv.eartag.entity.BaseFarmInfo;
 import com.huimv.eartag.service.IBaseFarmInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
@@ -31,14 +34,32 @@ public class BaseFarmInfoController {
     @Autowired
     private IBaseFarmInfoService baseFarmInfoService;
 
+
+//    @PostMapping("/add")
+//    public Result add(@RequestBody BaseFarmInfo baseFarmInfo, HttpServletRequest request){
+//        Integer userId = TokenSign.getMemberIdByJwtToken(request);
+//
+//        baseFarmInfo.setCreateTime(new Date());
+//        baseFarmInfo.setCreateUser(userId);
+//        baseFarmInfoService.save(baseFarmInfo);
+//        return new Result(10000,"添加成功",true);
+//
+//    }
+
     @PostMapping("/add")
-    public Result add(@RequestBody BaseFarmInfo baseFarmInfo, HttpServletRequest request){
+    public Result saveFarmAndAccount(@RequestBody BaseFarmInfo baseFarmInfo, HttpServletRequest request){
         Integer userId = TokenSign.getMemberIdByJwtToken(request);
 
         baseFarmInfo.setCreateTime(new Date());
         baseFarmInfo.setCreateUser(userId);
-        baseFarmInfoService.save(baseFarmInfo);
-        return new Result(10000,"添加成功",true);
+
+        String farmName = baseFarmInfo.getFarmName();
+        int count = baseFarmInfoService.count(new QueryWrapper<BaseFarmInfo>().eq("farm_name", farmName));
+        if (count>0){
+            return new Result(10001,"牧场已经存在",false);
+        }
+        return baseFarmInfoService.saveFarmAndAccount(baseFarmInfo);
+
     }
 
     @PostMapping("/update")
@@ -50,8 +71,8 @@ public class BaseFarmInfoController {
 
     @GetMapping("/remove")
     public Result remove(@RequestParam(name = "ids") List<Integer> ids){
-        baseFarmInfoService.removeByIds(ids);
-        return new Result(10000,"删除成功",true);
+
+        return baseFarmInfoService.removeByIdsAndAccount(ids);
     }
 
 
@@ -74,4 +95,12 @@ public class BaseFarmInfoController {
 
 
     }
+
+    @GetMapping("/listByType")
+    public Result list(@RequestParam(name = "type")Integer type){
+
+
+
+        return new Result(ResultCode.SUCCESS,  baseFarmInfoService.list(new QueryWrapper<BaseFarmInfo>().eq("type",type)));
+    }
 }

+ 32 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/controller/EartagDataController.java

@@ -0,0 +1,32 @@
+package com.huimv.eartag.controller;
+
+
+import com.huimv.common.utils.Result;
+import com.huimv.eartag.service.IEartagDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2022-01-13
+ */
+@RestController
+@RequestMapping("/eartagData")
+public class EartagDataController {
+    @Autowired
+    private IEartagDataService eartagDataService;
+
+    @PostMapping("/getTemp")
+    public Result getTemp(@RequestBody Map<String,String> map){
+        return eartagDataService.getTemp(map);
+    }
+}

+ 3 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/entity/BaseFarmInfo.java

@@ -37,4 +37,7 @@ public class BaseFarmInfo extends Model {
     private Integer type;
 
 
+    private  String firstAccount;
+
+
 }

+ 141 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/entity/EartagData.java

@@ -0,0 +1,141 @@
+package com.huimv.eartag.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2022-01-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+public class EartagData extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 记录id(主键)
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 组织id
+     */
+    private Long orgId;
+
+    /**
+     * 采集器编码
+     */
+    private String deviceCode;
+
+    /**
+     * 耳标号
+     */
+    private String eartagNo;
+
+    /**
+     * 采集时间
+     */
+    private LocalDateTime time;
+
+    /**
+     * 耳根温度
+     */
+    private Double earTemp;
+
+    /**
+     * 运动量
+     */
+    private Integer exercise;
+
+    /**
+     * 栋舍
+     */
+    private String pigpen;
+
+    /**
+     * 单元ID
+     */
+    private Integer unitId;
+
+    /**
+     * 环境温度
+     */
+    private Double envTemp;
+
+    /**
+     * 电池电量
+     */
+    private Integer bat;
+
+    /**
+     * 信号强度
+     */
+    private Integer rssi;
+
+    /**
+     * 命令头
+     */
+    private String head;
+
+    /**
+     * 指令
+     */
+    private String command;
+
+    /**
+     * 版本号
+     */
+    private String version;
+
+    /**
+     * 耳标帧序号
+     */
+    private Integer frameSerialNo;
+
+    /**
+     * 重启次数
+     */
+    private Integer rebootTimes;
+
+    /**
+     * 预留字段
+     */
+    private String prepareField;
+
+    /**
+     * 校验码
+     */
+    private String chk;
+
+    /**
+     * 命令尾
+     */
+    private String tail;
+
+    /**
+     * 牧场编码
+     */
+    private String farmCode;
+
+    /**
+     * 阶段
+     */
+    private Integer stage;
+
+    private Integer sportGap;
+
+
+}

+ 2 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/mapper/BaseFarmInfoMapper.java

@@ -15,4 +15,6 @@ import org.springframework.stereotype.Repository;
 @Repository
 public interface BaseFarmInfoMapper extends BaseMapper<BaseFarmInfo> {
 
+    int save(BaseFarmInfo baseFarmInfo);
+
 }

+ 25 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/mapper/EartagDataMapper.java

@@ -0,0 +1,25 @@
+package com.huimv.eartag.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.huimv.eartag.entity.EartagData;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2022-01-13
+ */
+@Repository
+public interface EartagDataMapper extends BaseMapper<EartagData> {
+
+    List<EartagData> getTemp(@Param("page")Page<EartagData> iPage,  @Param(Constants.WRAPPER)QueryWrapper<EartagData> wrapper);
+}

+ 5 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/IBaseFarmInfoService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.huimv.common.utils.Result;
 import com.huimv.eartag.entity.BaseFarmInfo;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -17,4 +18,8 @@ import java.util.Map;
 public interface IBaseFarmInfoService extends IService<BaseFarmInfo> {
 
     Result pageAll(Map map);
+
+    Result saveFarmAndAccount(BaseFarmInfo baseFarmInfo);
+
+    Result removeByIdsAndAccount(List<Integer> ids);
 }

+ 20 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/IEartagDataService.java

@@ -0,0 +1,20 @@
+package com.huimv.eartag.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.huimv.common.utils.Result;
+import com.huimv.eartag.entity.EartagData;
+
+import java.util.Map;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2022-01-13
+ */
+public interface IEartagDataService extends IService<EartagData> {
+
+    Result getTemp(Map<String,String> map);
+}

+ 76 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/impl/BaseFarmInfoServiceImpl.java

@@ -1,17 +1,25 @@
 package com.huimv.eartag.service.impl;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.extension.api.R;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.huimv.admin.entity.SysAccountMultilevel;
+import com.huimv.admin.mapper.SysAccountMultilevelMapper;
+import com.huimv.common.utils.ChineseCharToEnUtil;
 import com.huimv.common.utils.Result;
 import com.huimv.common.utils.ResultCode;
 import com.huimv.eartag.entity.BaseFarmInfo;
 import com.huimv.eartag.entity.BaseFarmInfo;
 import com.huimv.eartag.mapper.BaseFarmInfoMapper;
 import com.huimv.eartag.service.IBaseFarmInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -24,6 +32,11 @@ import java.util.Map;
  */
 @Service
 public class BaseFarmInfoServiceImpl extends ServiceImpl<BaseFarmInfoMapper, BaseFarmInfo> implements IBaseFarmInfoService {
+    @Autowired
+    private SysAccountMultilevelMapper accountMultilevelMapper;
+
+    @Autowired
+    private BaseFarmInfoMapper baseFarmInfoMapper;
 
     @Override
     public Result pageAll(Map map) {
@@ -42,4 +55,67 @@ public class BaseFarmInfoServiceImpl extends ServiceImpl<BaseFarmInfoMapper, Bas
 
         return new Result(ResultCode.SUCCESS,page);
     }
+
+    @Override
+    @Transactional
+    public Result saveFarmAndAccount(BaseFarmInfo baseFarmInfo) {
+
+        //创建人
+        SysAccountMultilevel accountMultilevel = accountMultilevelMapper.selectById(baseFarmInfo.getCreateUser());
+
+        SysAccountMultilevel account = new SysAccountMultilevel();
+        account.setPassword("123456");
+
+        //设置账号
+        String farmName = baseFarmInfo.getFarmName();
+
+        String firstSpell = ChineseCharToEnUtil.getFirstSpell(farmName);
+        List<SysAccountMultilevel> sysAccountMultilevels = accountMultilevelMapper.selectList(new QueryWrapper<SysAccountMultilevel>().like("account", firstSpell));
+        if (ObjectUtil.isEmpty(sysAccountMultilevels)){
+            account.setAccount(firstSpell+"01");
+        }else {
+            Integer number = 0;
+            for (SysAccountMultilevel sysAccountMultilevel : sysAccountMultilevels) {
+                String oldName = sysAccountMultilevel.getAccount();
+                int oldNumber = Integer.parseInt(oldName.substring(oldName.length() - 2));
+                if (oldNumber>number){
+                    number = oldNumber;
+                }
+            }
+            number++;
+           if (number < 10){
+               account.setAccount(firstSpell+"0"+number);
+           }else if ( number<100){
+               account.setAccount(firstSpell+number);
+           }else {
+               return new Result(10001,"该牧场账号已达到上限",false);
+           }
+        }
+
+        account.setPid(accountMultilevel.getId());
+        account.setPids(accountMultilevel.getPids()+","+accountMultilevel.getId());
+        account.setUserName(baseFarmInfo.getFarmName());
+        account.setType(baseFarmInfo.getType());
+
+        baseFarmInfo.setFirstAccount(account.getAccount());
+        int insert = baseFarmInfoMapper.insert(baseFarmInfo);
+        if (insert> 0){
+            account.setFarmIds(baseFarmInfo.getId()+"");
+        }
+
+        accountMultilevelMapper.insert(account);
+        return new Result(10000,"添加成功",true);
+    }
+
+    @Override
+    @Transactional
+    public Result removeByIdsAndAccount(List<Integer> ids) {
+        List<BaseFarmInfo> baseFarmInfos = this.listByIds(ids);
+        for (BaseFarmInfo baseFarmInfo : baseFarmInfos) {
+
+            accountMultilevelMapper.delete(new QueryWrapper<SysAccountMultilevel>().eq("account", baseFarmInfo.getFirstAccount()));
+        }
+        this.removeByIds(ids);
+        return new Result(10000,"删除成功",true);
+    }
 }

+ 0 - 1
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/impl/BaseFloorServiceImpl.java

@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.huimv.common.utils.Result;
 import com.huimv.common.utils.ResultCode;
 import com.huimv.eartag.entity.BaseFloor;
-import com.huimv.eartag.entity.BaseFloor;
 import com.huimv.eartag.mapper.BaseFloorMapper;
 import com.huimv.eartag.service.IBaseFloorService;
 import org.springframework.stereotype.Service;

+ 44 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/java/com/huimv/eartag/service/impl/EartagDataServiceImpl.java

@@ -0,0 +1,44 @@
+package com.huimv.eartag.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.huimv.common.utils.Result;
+import com.huimv.common.utils.ResultCode;
+import com.huimv.eartag.entity.EartagData;
+import com.huimv.eartag.mapper.EartagDataMapper;
+import com.huimv.eartag.service.IEartagDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author astupidcoder
+ * @since 2022-01-13
+ */
+@Service
+public class EartagDataServiceImpl extends ServiceImpl<EartagDataMapper, EartagData> implements IEartagDataService {
+
+    @Autowired
+    private EartagDataMapper eartagDataMapper;
+
+    @Override
+    public Result getTemp(Map<String,String> map) {
+
+        Integer current = Integer.parseInt(map.get("current"));
+        Integer size =Integer.parseInt(map.get("size"));
+        Page<EartagData> iPage = new Page<>(current,size);
+        //条件
+        QueryWrapper<EartagData> wrapper = new QueryWrapper<>();
+
+
+        List<EartagData> list = eartagDataMapper.getTemp(iPage,wrapper);
+        return new Result(ResultCode.SUCCESS,list);
+    }
+}

+ 17 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/resources/com/huimv/eartag/mapper/BaseFarmInfo.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.huimv.eartag.mapper.BaseFarmInfoMapper">
+
+
+    <insert id="save" parameterType="com.huimv.eartag.entity.BaseFarmInfo" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
+       <!-- <selectKey resultType="int" keyProperty="id" keyColumn="id" order="AFTER">
+            select  last_insert_id()
+        </selectKey>-->
+
+        insert into
+        `base_farm_info`( `farm_name`,`location`,`front_location`,`type`,`create_time`,`create_user`,`first_account`)
+                 values (#{farmName},#{location},#{frontLocation},#{type},#{createTime},#{createUser},#{firstAccount})
+
+
+    </insert>
+</mapper>

+ 16 - 0
huimv-goldpig/huimv-goldpig-eartag/src/main/resources/com/huimv/eartag/mapper/EartagDataMapperr.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.huimv.eartag.mapper.EartagDataMapper">
+
+
+    <select id="getTemp" resultType="com.huimv.eartag.entity.EartagData">
+
+  SELECT ROUND(AVG(a.ear_temp),2)  avgtemp , a.ear_temp temp ,a.`time`
+  FROM (
+    SELECT ed.ear_temp , DATE_FORMAT( CONCAT(DATE(ed.`time` ),' ',HOUR(ed.`time` ),':',FLOOR( MINUTE(ed.`time`)/10 )*10) ,'%Y-%m-%d %H:%i')  AS `time`
+     FROM `eartag_data`  ed
+      ${ew.customSqlSegment}
+    ) a
+        GROUP BY DATE_FORMAT( a.`time`  ,'%Y-%m-%d %H:%i');
+    </select>
+</mapper>

+ 6 - 0
huimv-goldpig/huimv-goldpig-gateway/src/main/resources/application-dev.yml

@@ -20,6 +20,12 @@ spring:
             - Path=/eartag/**
           filters:
             - StripPrefix=1
+        - id: anquisition
+          uri: http://127.0.0.1:9501
+          predicates:
+            - Path=/anquisition/**
+          filters:
+            - StripPrefix=1
 
 logging:
   level: