zyg 1 рік тому
батько
коміт
0887c596a4
100 змінених файлів з 6900 додано та 2 видалено
  1. BIN
      .DS_Store
  2. 56 0
      .drone.yml
  3. 44 0
      .gitignore
  4. 3 0
      .vscode/settings.json
  5. 18 0
      Dockerfile
  6. 18 0
      DockerfileTest
  7. 20 0
      LICENSE
  8. 76 2
      README.md
  9. 20 0
      bin/build.sh
  10. 12 0
      bin/clean.bat
  11. 12 0
      bin/package.bat
  12. 14 0
      bin/run.bat
  13. BIN
      doc/ArmsAgent.tar
  14. BIN
      doc/环境使用手册.docx
  15. BIN
      hz-admin/.DS_Store
  16. 109 0
      hz-admin/pom.xml
  17. 21 0
      hz-admin/src/main/java/com/hz/HzApplication.java
  18. 18 0
      hz-admin/src/main/java/com/hz/HzServletInitializer.java
  19. 85 0
      hz-admin/src/main/java/com/hz/web/controller/common/CaptchaController.java
  20. 120 0
      hz-admin/src/main/java/com/hz/web/controller/common/CommonController.java
  21. 53 0
      hz-admin/src/main/java/com/hz/web/controller/monitor/CacheController.java
  22. 27 0
      hz-admin/src/main/java/com/hz/web/controller/monitor/ServerController.java
  23. 63 0
      hz-admin/src/main/java/com/hz/web/controller/monitor/SysLogininforController.java
  24. 74 0
      hz-admin/src/main/java/com/hz/web/controller/monitor/SysOperlogController.java
  25. 81 0
      hz-admin/src/main/java/com/hz/web/controller/monitor/SysUserOnlineController.java
  26. 115 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysConfigController.java
  27. 131 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysDeptController.java
  28. 107 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysDictDataController.java
  29. 114 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysDictTypeController.java
  30. 30 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysIndexController.java
  31. 146 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysLoginController.java
  32. 115 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysMenuController.java
  33. 93 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysNoticeController.java
  34. 121 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysPostController.java
  35. 125 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysProfileController.java
  36. 38 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysRegisterController.java
  37. 212 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysRoleController.java
  38. 228 0
      hz-admin/src/main/java/com/hz/web/controller/system/SysUserController.java
  39. 20 0
      hz-admin/src/main/java/com/hz/web/controller/tool/SwaggerController.java
  40. 167 0
      hz-admin/src/main/java/com/hz/web/controller/tool/TestController.java
  41. 170 0
      hz-admin/src/main/java/com/hz/web/core/config/Knife4jConfig.java
  42. 140 0
      hz-admin/src/main/java/com/hz/web/core/config/SwaggerConfig.java
  43. 1 0
      hz-admin/src/main/resources/META-INF/spring-devtools.properties
  44. 232 0
      hz-admin/src/main/resources/application-dev.yml
  45. 213 0
      hz-admin/src/main/resources/application-perf.yml
  46. 247 0
      hz-admin/src/main/resources/application-prod.yml
  47. 263 0
      hz-admin/src/main/resources/application-test.yml
  48. 303 0
      hz-admin/src/main/resources/application.yml
  49. 28 0
      hz-admin/src/main/resources/banner.txt
  50. 37 0
      hz-admin/src/main/resources/i18n/messages.properties
  51. 93 0
      hz-admin/src/main/resources/logback.xml
  52. 15 0
      hz-admin/src/main/resources/mybatis/mybatis-config.xml
  53. 21 0
      hz-admin/src/main/resources/templates/excelTemplate.html
  54. 23 0
      hz-admin/src/main/resources/templates/mailTemplate.html
  55. 23 0
      hz-admin/src/main/resources/templates/reportEmailTemplate.html
  56. 23 0
      hz-admin/src/main/resources/templates/reportTemplate.html
  57. 118 0
      hz-business/pom.xml
  58. 18 0
      hz-business/src/main/java/com/hz/business/BusinessApplication.java
  59. 43 0
      hz-business/src/main/java/com/hz/business/base/BaseAlarmWindowVo.java
  60. 24 0
      hz-business/src/main/java/com/hz/business/base/BaseCycleChartFloatVo.java
  61. 24 0
      hz-business/src/main/java/com/hz/business/base/BaseCycleChartVo.java
  62. 31 0
      hz-business/src/main/java/com/hz/business/base/BaseExportExcelStringVo.java
  63. 32 0
      hz-business/src/main/java/com/hz/business/base/BaseExportExcelVo.java
  64. 22 0
      hz-business/src/main/java/com/hz/business/base/BaseKilometreLineChartVo.java
  65. 24 0
      hz-business/src/main/java/com/hz/business/base/BaseLineChartOdoVo.java
  66. 26 0
      hz-business/src/main/java/com/hz/business/base/BaseLineChartVo.java
  67. 24 0
      hz-business/src/main/java/com/hz/business/base/BaseLineFloatChartVo.java
  68. 28 0
      hz-business/src/main/java/com/hz/business/base/BaseObjectLineChartVo.java
  69. 27 0
      hz-business/src/main/java/com/hz/business/base/BasePieChartVo.java
  70. 22 0
      hz-business/src/main/java/com/hz/business/base/BaseProjectExportExcelVo.java
  71. 31 0
      hz-business/src/main/java/com/hz/business/base/BaseWindowDataVo.java
  72. 23 0
      hz-business/src/main/java/com/hz/business/base/BehaviorValueVo.java
  73. 22 0
      hz-business/src/main/java/com/hz/business/base/DateValueVo.java
  74. 29 0
      hz-business/src/main/java/com/hz/business/base/FaultDetailVo.java
  75. 30 0
      hz-business/src/main/java/com/hz/business/base/IdParam.java
  76. 21 0
      hz-business/src/main/java/com/hz/business/base/KeyValueVo.java
  77. 22 0
      hz-business/src/main/java/com/hz/business/base/KilometreCountVo.java
  78. 20 0
      hz-business/src/main/java/com/hz/business/base/KindFloatValueListVo.java
  79. 19 0
      hz-business/src/main/java/com/hz/business/base/KindObjectListVo.java
  80. 32 0
      hz-business/src/main/java/com/hz/business/base/KindValueListVo.java
  81. 20 0
      hz-business/src/main/java/com/hz/business/base/KindValueVo.java
  82. 32 0
      hz-business/src/main/java/com/hz/business/base/ModelIdParam.java
  83. 20 0
      hz-business/src/main/java/com/hz/business/base/NameValueVo.java
  84. 30 0
      hz-business/src/main/java/com/hz/business/base/PageParam.java
  85. 55 0
      hz-business/src/main/java/com/hz/business/base/ResultVO.java
  86. 117 0
      hz-business/src/main/java/com/hz/business/controller/AiModelController.java
  87. 185 0
      hz-business/src/main/java/com/hz/business/controller/AlarmMsgController.java
  88. 16 0
      hz-business/src/main/java/com/hz/business/controller/AlgoPackParamController.java
  89. 129 0
      hz-business/src/main/java/com/hz/business/controller/AnalysisReportController.java
  90. 37 0
      hz-business/src/main/java/com/hz/business/controller/AreasController.java
  91. 306 0
      hz-business/src/main/java/com/hz/business/controller/BatteryController.java
  92. 55 0
      hz-business/src/main/java/com/hz/business/controller/BatteryCoreController.java
  93. 140 0
      hz-business/src/main/java/com/hz/business/controller/BatteryModelController.java
  94. 42 0
      hz-business/src/main/java/com/hz/business/controller/ChargePresetController.java
  95. 46 0
      hz-business/src/main/java/com/hz/business/controller/ChartController.java
  96. 40 0
      hz-business/src/main/java/com/hz/business/controller/CityController.java
  97. 99 0
      hz-business/src/main/java/com/hz/business/controller/DataScreenController.java
  98. 137 0
      hz-business/src/main/java/com/hz/business/controller/DataSetController.java
  99. 99 0
      hz-business/src/main/java/com/hz/business/controller/DbcFileController.java
  100. 45 0
      hz-business/src/main/java/com/hz/business/controller/DealAlarmLogController.java

+ 56 - 0
.drone.yml

@@ -0,0 +1,56 @@
+kind: pipeline
+name: default
+
+steps:
+  - name: restore-cache
+    image: drillster/drone-volume-cache
+    volumes:
+      - name: cache
+        path: /cache
+    settings:
+      restore: true
+      mount:
+        - .m2
+
+  - name: build
+    image: jaikuai/npm-mvn
+    pull: true
+    commands:
+      - mvn clean install -Dmaven.test.skip=true -Dmaven.repo.local=/drone/src/.m2/repository -Dmaven.compile.fork=true package
+
+  - name: rebuild-cache
+    image: drillster/drone-volume-cache
+    volumes:
+      - name: cache
+        path: /cache
+    settings:
+      rebuild: true
+      mount:
+        - .m2
+
+  - name: docker-hz-admin-server
+    image: plugins/docker
+    settings:
+      tags:
+        - latest
+        - 1.0.${DRONE_BUILD_NUMBER}
+      registry: nas.fast-fun.cn:5000
+      insecure: true
+      repo: nas.fast-fun.cn:5000/hz/hz-admin-server
+
+  - name: deploy-hz-admin
+    image: appleboy/drone-ssh
+    settings:
+      host: 116.62.135.225
+      username: root
+      password:
+        from_secret: password
+      script:
+        - docker pull nas.fast-fun.cn:5000/hz/hz-admin-server:1.0.${DRONE_BUILD_NUMBER}
+        - docker rm -f hz-admin-server
+        - docker run -d --name hz-admin-server -p 8082:8082 --restart=always nas.fast-fun.cn:5000/hz/hz-admin-server:1.0.${DRONE_BUILD_NUMBER}
+
+volumes:
+  - name: cache
+    host:
+      path: /home/drone/cache

+ 44 - 0
.gitignore

@@ -0,0 +1,44 @@
+######################################################################
+# Build Tools
+.m2
+.gradle
+/build/
+!gradle/wrapper/gradle-wrapper.jar
+
+target/
+!.mvn/wrapper/maven-wrapper.jar
+
+######################################################################
+# IDE
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

+ 3 - 0
.vscode/settings.json

@@ -0,0 +1,3 @@
+{
+    "java.configuration.updateBuildConfiguration": "automatic"
+}

+ 18 - 0
Dockerfile

@@ -0,0 +1,18 @@
+FROM docker-registry-registry.cn-shanghai.cr.aliyuncs.com/hozon-dev/java:8-jre-alpine
+
+ENV PRO_NAME=hz-admin PRO_ENV=dev TZ="Asia/Shanghai" PRO_APM_KEY="gnujin0rhs@4ab4cae1af883da"
+
+WORKDIR /home
+
+# 华东2 上海arms
+ADD ./doc/ArmsAgent.tar /home/agent/
+
+ADD ./hz-admin/target/hz-admin.jar /home/App.jar
+
+RUN mkdir -p /home/uploadPath/upload
+
+CMD ["/bin/sh","-c","/usr/bin/java -server -jar /home/App.jar \
+    --spring.application.name=${PRO_NAME} \
+    --spring.profiles.active=${PRO_ENV}  \
+    -Darms.licenseKey=${PRO_APM_KEY} -Darms.appName=${PRO_NAME} \
+    -javaagent:/home/agent/arms-bootstrap-1.7.0-SNAPSHOT.jar"]

+ 18 - 0
DockerfileTest

@@ -0,0 +1,18 @@
+FROM nas.fast-fun.cn:5000/java:8-jre-alpine
+
+ENV PRO_NAME=hz-admin PRO_ENV=dev TZ="Asia/Shanghai" PRO_APM_KEY="gnujin0rhs@4ab4cae1af883da"
+
+WORKDIR /home
+
+# 华东2 上海arms
+ADD ./doc/ArmsAgent.tar /home/agent/
+
+ADD ./hz-admin/target/hz-admin.jar /home/App.jar
+
+RUN mkdir -p /home/uploadPath/upload
+
+CMD ["/bin/sh","-c","/usr/bin/java -server -jar /home/App.jar \
+    --spring.application.name=${PRO_NAME} \
+    --spring.profiles.active=${PRO_ENV}  \
+    -Darms.licenseKey=${PRO_APM_KEY} -Darms.appName=${PRO_NAME} \
+    -javaagent:/home/agent/arms-bootstrap-1.7.0-SNAPSHOT.jar"]

+ 20 - 0
LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2022 hz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 76 - 2
README.md

@@ -1,3 +1,77 @@
-# hz-yanshi
+#### 一、本系统仅供合众系统使用。
 
-电池大会--合众项目演示
+#### 二、登录流程
+
+1.定时任务获取系统用户到本地数据库 2.合众saas系统登录后选择本系统,携带token,解析后获取数据库中用户信息,调用本系统登录接口,直接登录到本系统。 3.目前所有用户登录都需要特殊账号admin登录后赋值权限给用户。
+4.用户登录后就会有自己的权限了。
+
+#### 三、系统发布
+
+1.使用docker swarm,提交代码后脚本会自动校验并拉取代码,而后生成镜像文件。 2.测试线和正式线,在修改脚本中的版本后,自动从镜像库中拉取镜像,自动更新到指定版本。
+
+注意: 启动前配置application.yml中配置使用的配置文件
+
+#### 四、系统部署
+
+1. 服务器环境
+
+- docker安装
+
+  ```
+   curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
+  ```
+
+- docker配置
+
+ ```
+ sudo mkdir -p /etc/docker/ && sudo vi  /etc/docker/daemon.json
+
+ {
+  "registry-mirrors": ["https://1u6db9h5.mirror.aliyuncs.com"],
+  "insecure-registries": ["0.0.0.0/0"],
+  "features": { "buildkit": true },
+  "log-driver":"json-file",
+  "log-opts": {"max-size":"1024m", "max-file":"3"}
+}
+ ```
+
+- docker 启动
+
+```
+sudo  systemctl enable docker && sudo systemctl restart docker
+```
+
+2. swarm-yaml
+sudo vi hz-admin.yml
+```yaml
+version: "3.7"
+services:
+  api-server:
+    image: nas.fast-fun.cn:5000/hz/hz-admin-server:1.0.173
+    environment:
+      - PRO_ENV=test
+    networks:
+      - hz-admin
+    deploy:
+      mode: replicated
+      replicas: 1
+  hz-admin-ui:
+    image: nas.fast-fun.cn:5000/hz/hz-admin-ui:1.0.133
+    restart: always
+    ports:
+      - 80:80
+    networks:
+      - hz-admin
+    depends_on:
+      - api-server
+    deploy:
+      mode: replicated
+      replicas: 1
+networks:
+  hz-admin:
+
+```
+3. deploy
+```ssh
+sudo docker stack deploy -c hz-admin.yml hz-admin
+```

+ 20 - 0
bin/build.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+
+registry="172.16.61.95:5000"
+
+if [ ! -f ver ]; then
+  echo 1 > ./ver
+fi
+
+ver=$(cat ./ver)
+ver=$((10#${ver}+1))
+echo $ver > ./ver
+
+cd  .. && git pull # update code
+
+docker run --rm -v $(pwd):/home jaikuai/npm-mvn:v3 mvn clean install -Dmaven.test.skip=true -Dmaven.compile.fork=true package
+
+docker build -t $registry/hz/hz-admin-server:1.1.$ver .
+docker push $registry/hz/hz-admin-server:1.1.$ver
+
+echo $registry/hz/hz-admin-server:1.1.$ver

+ 12 - 0
bin/clean.bat

@@ -0,0 +1,12 @@
+@echo off
+echo.
+echo [信息] 清理工程target生成路径。
+echo.
+
+%~d0
+cd %~dp0
+
+cd ..
+call mvn clean
+
+pause

+ 12 - 0
bin/package.bat

@@ -0,0 +1,12 @@
+@echo off
+echo.
+echo [信息] 打包Web工程,生成war/jar包文件。
+echo.
+
+%~d0
+cd %~dp0
+
+cd ..
+call mvn clean package -Dmaven.test.skip=true
+
+pause

+ 14 - 0
bin/run.bat

@@ -0,0 +1,14 @@
+@echo off
+echo.
+echo [信息] 使用Jar命令运行Web工程。
+echo.
+
+cd %~dp0
+cd ../ruoyi-admin/target
+
+set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
+
+java -jar %JAVA_OPTS% ruoyi-admin.jar
+
+cd bin
+pause

BIN
doc/ArmsAgent.tar


BIN
doc/环境使用手册.docx


BIN
hz-admin/.DS_Store


+ 109 - 0
hz-admin/pom.xml

@@ -0,0 +1,109 @@
+<?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>hz</artifactId>
+        <groupId>com.hz</groupId>
+        <version>3.6.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <artifactId>hz-admin</artifactId>
+
+    <description>
+        web服务入口
+    </description>
+
+    <dependencies>
+
+        <!-- spring-boot-devtools -->
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-devtools</artifactId>-->
+<!--            <optional>true</optional> &lt;!&ndash; 表示依赖不会传递 &ndash;&gt;-->
+<!--        </dependency>-->
+
+        <!-- swagger3-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+            <version>3.0.0</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>com.github.xiaoymin</groupId>-->
+<!--            <artifactId>knife4j-spring-boot-starter</artifactId>-->
+<!--            <version>3.0.3</version>-->
+<!--        </dependency>-->
+
+        <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+
+         <!-- Mysql驱动包 -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+
+        <!-- 核心模块-->
+        <dependency>
+            <groupId>com.hz</groupId>
+            <artifactId>hz-framework</artifactId>
+        </dependency>
+
+        <!-- 定时任务-->
+        <dependency>
+            <groupId>com.hz</groupId>
+            <artifactId>hz-quartz</artifactId>
+        </dependency>
+
+        <!-- 代码生成-->
+        <dependency>
+            <groupId>com.hz</groupId>
+            <artifactId>hz-generator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.hz</groupId>
+            <artifactId>business</artifactId>
+            <version>3.6.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.1.1.RELEASE</version>
+                <configuration>
+                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>   
+                <groupId>org.apache.maven.plugins</groupId>   
+                <artifactId>maven-war-plugin</artifactId>   
+                <version>3.1.0</version>   
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                    <warName>${project.artifactId}</warName>
+                </configuration>   
+           </plugin>   
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+
+</project>

+ 21 - 0
hz-admin/src/main/java/com/hz/HzApplication.java

@@ -0,0 +1,21 @@
+package com.hz;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.scheduling.annotation.EnableAsync;
+
+/**
+ * 启动程序
+ * 
+ * @author user
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+@EnableAsync
+public class HzApplication{
+    public static void main(String[] args)    {
+        // System.setProperty("spring.devtools.restart.enabled", "false");
+        SpringApplication.run(HzApplication.class, args);
+        System.out.println("启动成功");
+    }
+}

+ 18 - 0
hz-admin/src/main/java/com/hz/HzServletInitializer.java

@@ -0,0 +1,18 @@
+package com.hz;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+/**
+ * web容器中进行部署
+ * 
+ * @author user
+ */
+public class HzServletInitializer extends SpringBootServletInitializer
+{
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
+    {
+        return application.sources(HzApplication.class);
+    }
+}

+ 85 - 0
hz-admin/src/main/java/com/hz/web/controller/common/CaptchaController.java

@@ -0,0 +1,85 @@
+package com.hz.web.controller.common;
+
+import javax.annotation.Resource;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.RestController;
+import com.google.code.kaptcha.Producer;
+import com.hz.common.core.redis.RedisCache;
+import com.hz.system.service.ISysConfigService;
+
+/**
+ * 验证码操作处理
+ *
+ * @author user
+ */
+@RestController
+public class CaptchaController
+{
+    @Resource(name = "captchaProducer")
+    private Producer captchaProducer;
+
+    @Resource(name = "captchaProducerMath")
+    private Producer captchaProducerMath;
+
+    @Autowired
+    private RedisCache redisCache;
+
+    // 验证码类型
+    @Value("${hz.captchaType}")
+    private String captchaType;
+
+    @Autowired
+    private ISysConfigService configService;
+    /**
+     * 生成验证码
+     */
+//    @GetMapping("/captchaImage")
+//    public AjaxResult getCode(HttpServletResponse response) throws IOException
+//    {
+//        AjaxResult ajax = AjaxResult.success();
+//        boolean captchaOnOff = configService.selectCaptchaOnOff();
+//        ajax.put("captchaOnOff", captchaOnOff);
+//        if (!captchaOnOff)
+//        {
+//            return ajax;
+//        }
+//
+//        // 保存验证码信息
+//        String uuid = IdUtils.simpleUUID();
+//        String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
+//
+//        String capStr = null, code = null;
+//        BufferedImage image = null;
+//
+//        // 生成验证码
+//        if ("math".equals(captchaType))
+//        {
+//            String capText = captchaProducerMath.createText();
+//            capStr = capText.substring(0, capText.lastIndexOf("@"));
+//            code = capText.substring(capText.lastIndexOf("@") + 1);
+//            image = captchaProducerMath.createImage(capStr);
+//        }
+//        else if ("char".equals(captchaType))
+//        {
+//            capStr = code = captchaProducer.createText();
+//            image = captchaProducer.createImage(capStr);
+//        }
+//
+//        redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
+//        // 转换流信息写出
+//        FastByteArrayOutputStream os = new FastByteArrayOutputStream();
+//        try
+//        {
+//            ImageIO.write(image, "jpg", os);
+//        }
+//        catch (IOException e)
+//        {
+//            return AjaxResult.error(e.getMessage());
+//        }
+//
+//        ajax.put("uuid", uuid);
+//        ajax.put("img", Base64.encode(os.toByteArray()));
+//        return ajax;
+//    }
+}

+ 120 - 0
hz-admin/src/main/java/com/hz/web/controller/common/CommonController.java

@@ -0,0 +1,120 @@
+package com.hz.web.controller.common;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.multipart.MultipartFile;
+import com.hz.common.config.HzConfig;
+import com.hz.common.constant.Constants;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.utils.StringUtils;
+import com.hz.common.utils.file.FileUploadUtils;
+import com.hz.common.utils.file.FileUtils;
+import com.hz.framework.config.ServerConfig;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 通用请求处理
+ *
+ * @author user
+ */
+@RestController
+public class CommonController {
+    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+
+    @Autowired
+    private ServerConfig serverConfig;
+
+
+    @GetMapping("common/testDbc")
+    public String test(){
+        Map<String,Object> m = new HashMap();
+        m.put("fileName","EP30_DBC_R4_011_20191202_V02.dbc");
+        m.put("filePath", "https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/dbc/2022-05/2094c1d5e6ce4904b1f282b86715e3f7-9be0128f-1c21-4e28-b342-d643e148ff68.dbc");
+        m.put("id",28);
+        RestTemplate restTemplate = new RestTemplate();
+        String url = "http://172.16.61.95:8088/parse_dbc";
+        String s = restTemplate.postForObject(url, m, String.class);
+        return s;
+    }
+
+    /**
+     * 通用下载请求
+     *
+     * @param fileName 文件名称
+     * @param delete   是否删除
+     */
+    @GetMapping("common/download")
+    public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) {
+        try {
+            if (!FileUtils.checkAllowDownload(fileName)) {
+                throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
+            }
+            String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
+            String filePath = HzConfig.getDownloadPath() + fileName;
+
+            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+            FileUtils.setAttachmentResponseHeader(response, realFileName);
+            FileUtils.writeBytes(filePath, response.getOutputStream());
+            if (delete) {
+                FileUtils.deleteFile(filePath);
+            }
+        } catch (Exception e) {
+            log.error("下载文件失败", e);
+        }
+    }
+
+    /**
+     * 通用上传请求
+     */
+    @PostMapping("/common/upload")
+    public AjaxResult uploadFile(MultipartFile file) throws Exception {
+        try {
+            // 上传文件路径
+            String filePath = HzConfig.getUploadPath();
+            // 上传并返回新文件名称
+            String fileName = FileUploadUtils.upload(filePath, file);
+            String url = serverConfig.getUrl() + fileName;
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("fileName", fileName);
+            ajax.put("url", url);
+            return ajax;
+        } catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 本地资源通用下载
+     */
+    @GetMapping("/common/download/resource")
+    public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
+            throws Exception {
+        try {
+            if (!FileUtils.checkAllowDownload(resource)) {
+                throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
+            }
+            // 本地资源路径
+            String localPath = HzConfig.getProfile();
+            // 数据库资源地址
+            String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
+            // 下载名称
+            String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
+            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+            FileUtils.setAttachmentResponseHeader(response, downloadName);
+            FileUtils.writeBytes(downloadPath, response.getOutputStream());
+        } catch (Exception e) {
+            log.error("下载文件失败", e);
+        }
+    }
+}

+ 53 - 0
hz-admin/src/main/java/com/hz/web/controller/monitor/CacheController.java

@@ -0,0 +1,53 @@
+package com.hz.web.controller.monitor;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.utils.StringUtils;
+
+/**
+ * 缓存监控
+ * 
+ * @author user
+ */
+@RestController
+@RequestMapping("/monitor/cache")
+public class CacheController
+{
+    @Autowired
+    private RedisTemplate<String, String> redisTemplate;
+
+    //@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+    @GetMapping()
+    public AjaxResult getInfo() throws Exception
+    {
+        Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info());
+        Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
+        Object dbSize = redisTemplate.execute((RedisCallback<Object>) connection -> connection.dbSize());
+
+        Map<String, Object> result = new HashMap<>(3);
+        result.put("info", info);
+        result.put("dbSize", dbSize);
+
+        List<Map<String, String>> pieList = new ArrayList<>();
+        commandStats.stringPropertyNames().forEach(key -> {
+            Map<String, String> data = new HashMap<>(2);
+            String property = commandStats.getProperty(key);
+            data.put("name", StringUtils.removeStart(key, "cmdstat_"));
+            data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
+            pieList.add(data);
+        });
+        result.put("commandStats", pieList);
+        return AjaxResult.success(result);
+    }
+}

+ 27 - 0
hz-admin/src/main/java/com/hz/web/controller/monitor/ServerController.java

@@ -0,0 +1,27 @@
+package com.hz.web.controller.monitor;
+
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.framework.web.domain.Server;
+
+/**
+ * 服务器监控
+ * 
+ * @author user
+ */
+@RestController
+@RequestMapping("/monitor/server")
+public class ServerController
+{
+    //@PreAuthorize("@ss.hasPermi('monitor:server:list')")
+    @GetMapping()
+    public AjaxResult getInfo() throws Exception
+    {
+        Server server = new Server();
+        server.copyTo();
+        return AjaxResult.success(server);
+    }
+}

+ 63 - 0
hz-admin/src/main/java/com/hz/web/controller/monitor/SysLogininforController.java

@@ -0,0 +1,63 @@
+package com.hz.web.controller.monitor;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.poi.ExcelUtil;
+import com.hz.system.domain.SysLogininfor;
+import com.hz.system.service.ISysLogininforService;
+
+/**
+ * 系统访问记录
+ *
+ * @author user
+ */
+@RestController
+@RequestMapping("/monitor/logininfor")
+public class SysLogininforController extends BaseController {
+    @Autowired
+    private ISysLogininforService logininforService;
+
+    //@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysLogininfor logininfor) {
+        startPage();
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        return getDataTable(list);
+    }
+
+    @Log(title = "登录日志", businessType = BusinessType.EXPORT)
+    //@PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
+    @GetMapping("/export")
+    public AjaxResult export(SysLogininfor logininfor) {
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
+        return util.exportExcel(list, "登录日志");
+    }
+
+    //@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
+    @Log(title = "登录日志", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{infoIds}")
+    public AjaxResult remove(@PathVariable Long[] infoIds) {
+        return toAjax(logininforService.deleteLogininforByIds(infoIds));
+    }
+
+    //@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
+    @Log(title = "登录日志", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/clean")
+    public AjaxResult clean() {
+        logininforService.cleanLogininfor();
+        return AjaxResult.success();
+    }
+}

+ 74 - 0
hz-admin/src/main/java/com/hz/web/controller/monitor/SysOperlogController.java

@@ -0,0 +1,74 @@
+package com.hz.web.controller.monitor;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.poi.ExcelUtil;
+import com.hz.system.domain.SysOperLog;
+import com.hz.system.service.ISysOperLogService;
+
+/**
+ * 操作日志记录
+ * 
+ * @author user
+ */
+@Api(tags = "操作日志记录")
+@RestController
+@RequestMapping("/monitor/operlog")
+public class SysOperlogController extends BaseController
+{
+    @Autowired
+    private ISysOperLogService operLogService;
+
+    @ApiOperation("操作日志列表")
+    //@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysOperLog operLog)
+    {
+        startPage();
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        return getDataTable(list);
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.EXPORT)
+    //@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
+    @GetMapping("/export")
+    public AjaxResult export(SysOperLog operLog)
+    {
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
+        return util.exportExcel(list, "操作日志");
+    }
+
+    @ApiOperation("操作日志删除")
+    @Log(title = "操作日志", businessType = BusinessType.DELETE)
+    //@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
+    @DeleteMapping("/{operIds}")
+    public AjaxResult remove(@PathVariable Long[] operIds)
+    {
+        return toAjax(operLogService.deleteOperLogByIds(operIds));
+    }
+
+    @ApiOperation("操作日志清空")
+    @Log(title = "操作日志", businessType = BusinessType.CLEAN)
+    //@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
+    @DeleteMapping("/clean")
+    public AjaxResult clean()
+    {
+        operLogService.cleanOperLog();
+        return AjaxResult.success();
+    }
+}

+ 81 - 0
hz-admin/src/main/java/com/hz/web/controller/monitor/SysUserOnlineController.java

@@ -0,0 +1,81 @@
+package com.hz.web.controller.monitor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.Constants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.model.LoginUser;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.core.redis.RedisCache;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.StringUtils;
+import com.hz.system.domain.SysUserOnline;
+import com.hz.system.service.ISysUserOnlineService;
+
+/**
+ * 在线用户监控
+ *
+ * @author user
+ */
+@Api(tags = "在线用户监控")
+@RestController
+@RequestMapping("/monitor/online")
+public class SysUserOnlineController extends BaseController {
+    @Autowired
+    private ISysUserOnlineService userOnlineService;
+
+    @Autowired
+    private RedisCache redisCache;
+
+    @ApiOperation("在线用户列表")
+    //@PreAuthorize("@ss.hasPermi('monitor:online:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(String ipaddr, String userName) {
+        Collection<String> keys = redisCache.keys(Constants.LOGIN_TOKEN_KEY + "*");
+        List<SysUserOnline> userOnlineList = new ArrayList<SysUserOnline>();
+        for (String key : keys) {
+            LoginUser user = redisCache.getCacheObject(key);
+            if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName)) {
+                if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername())) {
+                    userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user));
+                }
+            } else if (StringUtils.isNotEmpty(ipaddr)) {
+                if (StringUtils.equals(ipaddr, user.getIpaddr())) {
+                    userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user));
+                }
+            } else if (StringUtils.isNotEmpty(userName) && StringUtils.isNotNull(user.getUser())) {
+                if (StringUtils.equals(userName, user.getUsername())) {
+                    userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user));
+                }
+            } else {
+                userOnlineList.add(userOnlineService.loginUserToUserOnline(user));
+            }
+        }
+        Collections.reverse(userOnlineList);
+        userOnlineList.removeAll(Collections.singleton(null));
+        return getDataTable(userOnlineList);
+    }
+
+    @ApiOperation(value = "强退用户")
+    //@PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')")
+    @Log(title = "在线用户监控", businessType = BusinessType.FORCE)
+    @DeleteMapping("/{tokenId}")
+    public AjaxResult forceLogout(@PathVariable String tokenId) {
+        redisCache.deleteObject(Constants.LOGIN_TOKEN_KEY + tokenId);
+        return AjaxResult.success();
+    }
+}

+ 115 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysConfigController.java

@@ -0,0 +1,115 @@
+package com.hz.web.controller.system;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.annotation.RepeatSubmit;
+import com.hz.common.constant.UserConstants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.poi.ExcelUtil;
+import com.hz.system.domain.SysConfig;
+import com.hz.system.service.ISysConfigService;
+
+/**
+ * 参数配置 信息操作处理
+ *
+ * @author user
+ */
+@Api(tags = "信息操作处理")
+@RestController
+@RequestMapping("/system/config")
+public class SysConfigController extends BaseController {
+    @Autowired
+    private ISysConfigService configService;
+
+    @ApiOperation("获取参数配置列表")
+    //@PreAuthorize("@ss.hasPermi('system:config:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysConfig config) {
+        startPage();
+        List<SysConfig> list = configService.selectConfigList(config);
+        return getDataTable(list);
+    }
+
+    @ApiOperation("参数管理")
+    @Log(title = "参数管理", businessType = BusinessType.EXPORT)
+    //@PreAuthorize("@ss.hasPermi('system:config:export')")
+    @GetMapping("/export")
+    public AjaxResult export(SysConfig config) {
+        List<SysConfig> list = configService.selectConfigList(config);
+        ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
+        return util.exportExcel(list, "参数数据");
+    }
+
+    @ApiOperation("根据参数编号获取详细信息")
+    //@PreAuthorize("@ss.hasPermi('system:config:query')")
+    @GetMapping(value = "/{configId}")
+    public AjaxResult getInfo(@PathVariable Long configId) {
+        return AjaxResult.success(configService.selectConfigById(configId));
+    }
+
+    @ApiOperation("根据参数键名查询参数值")
+    @GetMapping(value = "/configKey/{configKey}")
+    public AjaxResult getConfigKey(@PathVariable String configKey) {
+        return AjaxResult.success(configService.selectConfigByKey(configKey));
+    }
+
+    @ApiOperation("新增参数配置")
+    //@PreAuthorize("@ss.hasPermi('system:config:add')")
+    @Log(title = "参数管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    @RepeatSubmit
+    public AjaxResult add(@Validated @RequestBody SysConfig config) {
+        if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) {
+            return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
+        }
+        config.setCreateBy(getUsername());
+        return toAjax(configService.insertConfig(config));
+    }
+
+    @ApiOperation("修改参数配置")
+    //@PreAuthorize("@ss.hasPermi('system:config:edit')")
+    @Log(title = "参数管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysConfig config) {
+        if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) {
+            return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
+        }
+        config.setUpdateBy(getUsername());
+        return toAjax(configService.updateConfig(config));
+    }
+
+    @ApiOperation("删除参数配置")
+    //@PreAuthorize("@ss.hasPermi('system:config:remove')")
+    @Log(title = "参数管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{configIds}")
+    public AjaxResult remove(@PathVariable Long[] configIds) {
+        configService.deleteConfigByIds(configIds);
+        return success();
+    }
+
+    @ApiOperation("刷新参数缓存")
+    //@PreAuthorize("@ss.hasPermi('system:config:remove')")
+    @Log(title = "参数管理", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/refreshCache")
+    public AjaxResult refreshCache() {
+        configService.resetConfigCache();
+        return AjaxResult.success();
+    }
+}

+ 131 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysDeptController.java

@@ -0,0 +1,131 @@
+package com.hz.web.controller.system;
+
+import java.util.Iterator;
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.UserConstants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.entity.SysDept;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.StringUtils;
+import com.hz.system.service.ISysDeptService;
+
+/**
+ * 部门信息
+ *
+ * @author user
+ */
+@Api(tags = "部门信息")
+@RestController
+@RequestMapping("/system/dept")
+public class SysDeptController extends BaseController {
+    @Autowired
+    private ISysDeptService deptService;
+
+    @ApiOperation("获取部门列表")
+    //@PreAuthorize("@ss.hasPermi('system:dept:list')")
+    @GetMapping("/list")
+    public AjaxResult list(SysDept dept) {
+        List<SysDept> depts = deptService.selectDeptList(dept);
+        return AjaxResult.success(depts);
+    }
+
+    @ApiOperation("查询部门列表(排除节点)")
+    //@PreAuthorize("@ss.hasPermi('system:dept:list')")
+    @GetMapping("/list/exclude/{deptId}")
+    public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
+        List<SysDept> depts = deptService.selectDeptList(new SysDept());
+        Iterator<SysDept> it = depts.iterator();
+        while (it.hasNext()) {
+            SysDept d = (SysDept) it.next();
+            if (d.getDeptId().intValue() == deptId
+                    || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + "")) {
+                it.remove();
+            }
+        }
+        return AjaxResult.success(depts);
+    }
+
+    @ApiOperation("根据部门编号获取详细信息")
+    //@PreAuthorize("@ss.hasPermi('system:dept:query')")
+    @GetMapping(value = "/{deptId}")
+    public AjaxResult getInfo(@PathVariable Long deptId) {
+        return AjaxResult.success(deptService.selectDeptById(deptId));
+    }
+
+    @ApiOperation("获取部门下拉树列表")
+    @GetMapping("/treeselect")
+    public AjaxResult treeselect(SysDept dept) {
+        List<SysDept> depts = deptService.selectDeptList(dept);
+        return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
+    }
+
+    @ApiOperation("加载对应角色部门列表树")
+    @GetMapping(value = "/roleDeptTreeselect/{roleId}")
+    public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId) {
+        List<SysDept> depts = deptService.selectDeptList(new SysDept());
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
+        ajax.put("depts", deptService.buildDeptTreeSelect(depts));
+        return ajax;
+    }
+
+    @ApiOperation("新增部门")
+    //@PreAuthorize("@ss.hasPermi('system:dept:add')")
+    @Log(title = "部门管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysDept dept) {
+        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) {
+            return AjaxResult.error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
+        }
+        dept.setCreateBy(getUsername());
+        return toAjax(deptService.insertDept(dept));
+    }
+
+    @ApiOperation("修改部门")
+    //@PreAuthorize("@ss.hasPermi('system:dept:edit')")
+    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysDept dept) {
+        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) {
+            return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
+        } else if (dept.getParentId().equals(dept.getDeptId())) {
+            return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
+        } else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
+                && deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0) {
+            return AjaxResult.error("该部门包含未停用的子部门!");
+        }
+        dept.setUpdateBy(getUsername());
+        return toAjax(deptService.updateDept(dept));
+    }
+
+    @ApiOperation("删除部门")
+    //@PreAuthorize("@ss.hasPermi('system:dept:remove')")
+    @Log(title = "部门管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{deptId}")
+    public AjaxResult remove(@PathVariable Long deptId) {
+        if (deptService.hasChildByDeptId(deptId)) {
+            return AjaxResult.error("存在下级部门,不允许删除");
+        }
+        if (deptService.checkDeptExistUser(deptId)) {
+            return AjaxResult.error("部门存在用户,不允许删除");
+        }
+        return toAjax(deptService.deleteDeptById(deptId));
+    }
+}

+ 107 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysDictDataController.java

@@ -0,0 +1,107 @@
+package com.hz.web.controller.system;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.entity.SysDictData;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.StringUtils;
+import com.hz.common.utils.poi.ExcelUtil;
+import com.hz.system.service.ISysDictDataService;
+import com.hz.system.service.ISysDictTypeService;
+
+/**
+ * 数据字典信息
+ *
+ * @author user
+ */
+@Api(tags = "数据字典信息")
+@RestController
+@RequestMapping("/system/dict/data")
+public class SysDictDataController extends BaseController {
+    @Autowired
+    private ISysDictDataService dictDataService;
+
+    @Autowired
+    private ISysDictTypeService dictTypeService;
+
+    @ApiOperation("字典列表")
+    //@PreAuthorize("@ss.hasPermi('system:dict:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysDictData dictData) {
+        startPage();
+        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
+        return getDataTable(list);
+    }
+
+    @ApiOperation("字典数据导出")
+    @Log(title = "字典数据", businessType = BusinessType.EXPORT)
+    //@PreAuthorize("@ss.hasPermi('system:dict:export')")
+    @GetMapping("/export")
+    public AjaxResult export(SysDictData dictData) {
+        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
+        ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
+        return util.exportExcel(list, "字典数据");
+    }
+
+    @ApiOperation("查询字典数据详细")
+    //@PreAuthorize("@ss.hasPermi('system:dict:query')")
+    @GetMapping(value = "/{dictCode}")
+    public AjaxResult getInfo(@PathVariable Long dictCode) {
+        return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
+    }
+
+    @ApiOperation("根据字典类型查询字典数据信息")
+    @GetMapping(value = "/type/{dictType}")
+    public AjaxResult dictType(@PathVariable String dictType) {
+        List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
+        if (StringUtils.isNull(data)) {
+            data = new ArrayList<SysDictData>();
+        }
+        return AjaxResult.success(data);
+    }
+
+    @ApiOperation("新增字典类型")
+    //@PreAuthorize("@ss.hasPermi('system:dict:add')")
+    @Log(title = "字典数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysDictData dict) {
+        dict.setCreateBy(getUsername());
+        return toAjax(dictDataService.insertDictData(dict));
+    }
+
+    @ApiOperation("修改保存字典类型")
+    //@PreAuthorize("@ss.hasPermi('system:dict:edit')")
+    @Log(title = "字典数据", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysDictData dict) {
+        dict.setUpdateBy(getUsername());
+        return toAjax(dictDataService.updateDictData(dict));
+    }
+
+    @ApiOperation("删除字典类型")
+    //@PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{dictCodes}")
+    public AjaxResult remove(@PathVariable Long[] dictCodes) {
+        dictDataService.deleteDictDataByIds(dictCodes);
+        return success();
+    }
+}

+ 114 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysDictTypeController.java

@@ -0,0 +1,114 @@
+package com.hz.web.controller.system;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.UserConstants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.entity.SysDictType;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.poi.ExcelUtil;
+import com.hz.system.service.ISysDictTypeService;
+
+/**
+ * 数据字典信息
+ *
+ * @author user
+ */
+@Api(tags = "数据字典类型信息")
+@RestController
+@RequestMapping("/system/dict/type")
+public class SysDictTypeController extends BaseController {
+    @Autowired
+    private ISysDictTypeService dictTypeService;
+
+    @ApiOperation("字典类型列表")
+    //@PreAuthorize("@ss.hasPermi('system:dict:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysDictType dictType) {
+        startPage();
+        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
+        return getDataTable(list);
+    }
+
+    @ApiOperation("字典类型导出")
+    @Log(title = "字典类型", businessType = BusinessType.EXPORT)
+    //@PreAuthorize("@ss.hasPermi('system:dict:export')")
+    @GetMapping("/export")
+    public AjaxResult export(SysDictType dictType) {
+        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
+        ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
+        return util.exportExcel(list, "字典类型");
+    }
+
+    @ApiOperation("查询字典类型详细")
+    //@PreAuthorize("@ss.hasPermi('system:dict:query')")
+    @GetMapping(value = "/{dictId}")
+    public AjaxResult getInfo(@PathVariable Long dictId) {
+        return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
+    }
+
+    @ApiOperation("新增字典类型")
+    //@PreAuthorize("@ss.hasPermi('system:dict:add')")
+    @Log(title = "字典类型", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysDictType dict) {
+        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
+            return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
+        }
+        dict.setCreateBy(getUsername());
+        return toAjax(dictTypeService.insertDictType(dict));
+    }
+
+    @ApiOperation("修改字典类型")
+    //@PreAuthorize("@ss.hasPermi('system:dict:edit')")
+    @Log(title = "字典类型", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysDictType dict) {
+        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
+            return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
+        }
+        dict.setUpdateBy(getUsername());
+        return toAjax(dictTypeService.updateDictType(dict));
+    }
+
+    @ApiOperation("删除字典类型")
+    //@PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{dictIds}")
+    public AjaxResult remove(@PathVariable Long[] dictIds) {
+        dictTypeService.deleteDictTypeByIds(dictIds);
+        return success();
+    }
+
+    @ApiOperation("刷新字典缓存")
+    //@PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/refreshCache")
+    public AjaxResult refreshCache() {
+        dictTypeService.resetDictCache();
+        return AjaxResult.success();
+    }
+
+    @ApiOperation("获取字典选择框列表")
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect() {
+        List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
+        return AjaxResult.success(dictTypes);
+    }
+}

+ 30 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysIndexController.java

@@ -0,0 +1,30 @@
+package com.hz.web.controller.system;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.config.HzConfig;
+import com.hz.common.utils.StringUtils;
+
+/**
+ * 首页
+ *
+ * @author user
+ */
+@RestController
+public class SysIndexController {
+    /**
+     * 系统基础配置
+     */
+    @Autowired
+    private HzConfig hzConfig;
+
+    /**
+     * 访问首页,提示语
+     */
+    @RequestMapping(value = "/", method = {RequestMethod.GET})
+    public String index() {
+        return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", hzConfig.getName(), hzConfig.getVersion());
+    }
+}

+ 146 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysLoginController.java

@@ -0,0 +1,146 @@
+package com.hz.web.controller.system;
+
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.hz.common.core.redis.RedisCache;
+import com.hz.common.core.text.Convert;
+import com.hz.common.utils.StringUtils;
+import com.hz.common.utils.http.HttpUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.constant.Constants;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.entity.SysMenu;
+import com.hz.common.core.domain.entity.SysUser;
+import com.hz.common.core.domain.model.LoginBody;
+import com.hz.common.core.domain.model.LoginUser;
+import com.hz.common.utils.SecurityUtils;
+import com.hz.common.utils.ServletUtils;
+import com.hz.framework.web.service.SysLoginService;
+import com.hz.framework.web.service.SysPermissionService;
+import com.hz.framework.web.service.TokenService;
+import com.hz.system.service.ISysMenuService;
+import org.springframework.web.client.RestTemplate;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * 登录验证
+ *
+ * @author user
+ */
+@Slf4j
+@Api(tags = "登录验证")
+@RestController
+public class SysLoginController {
+
+    // 字节私有云地址
+    final static String PRE_URL = "https://ve-portal.chehezhi.cn";
+
+    @Resource
+    private SysLoginService loginService;
+
+    @Resource
+    private ISysMenuService menuService;
+
+    @Resource
+    private SysPermissionService permissionService;
+
+    @Resource
+    private TokenService tokenService;
+
+
+    @Value("${qyapi.corpid}")
+    private String corpId;
+    @Value("${qyapi.corpsecret}")
+    private String corpSecret;
+
+    @Resource
+    private RedisCache redisCache;
+
+
+    /**
+     * 登录方法
+     *
+     * @param loginBody 登录信息
+     * @return 结果
+     */
+    @ApiOperation("登录方法")
+    @PostMapping("/login")
+    public AjaxResult login(@RequestBody LoginBody loginBody) throws Exception {
+        AjaxResult ajax = AjaxResult.success();
+
+        String token = loginService.login(loginBody);
+        ajax.put(Constants.TOKEN, token);
+//        ajax.put("jwtToken", loginJwtToken());
+        return ajax;
+    }
+
+    /**
+     * 企业微信登录
+     *
+     * @param
+     * @return java.lang.String
+     */
+    public String updateAccessToken() {
+        String accessTokenValue = Convert.toStr(redisCache.getCacheObject("qywx-token"));
+        String param = "corpid=" + corpId + "&corpsecret=" + corpSecret;
+        String response = HttpUtils.sendGet("TOKEN_URL", param, "UTF-8");
+        com.hz.common.core.domain.QyResponse qyResponse = JSON.parseObject(response, com.hz.common.core.domain.QyResponse.class);
+        if (StringUtils.isEmpty(accessTokenValue) || !qyResponse.getAccessToken().equals(accessTokenValue)) {
+            if (qyResponse.getErrCode() != null && qyResponse.getErrCode() == 0) {
+                //token 一个小时过期
+                redisCache.setCacheObject("qywx-token", qyResponse.getAccessToken());
+                redisCache.expire("qywx-token", 1, TimeUnit.HOURS);
+                return qyResponse.getAccessToken();
+            }
+        }
+        return accessTokenValue;
+    }
+
+
+    /**
+     * 获取用户信息
+     *
+     * @return 用户信息
+     */
+    @ApiOperation("获取用户信息")
+    @GetMapping("getInfo")
+    public AjaxResult getInfo() {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        SysUser user = loginUser.getUser();
+        // 角色集合
+        Set<String> roles = permissionService.getRolePermission(user);
+        // 权限集合
+        Set<String> permissions = permissionService.getMenuPermission(user);
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("user", user);
+        ajax.put("roles", roles);
+        ajax.put("permissions", permissions);
+        return ajax;
+    }
+
+
+    /**
+     * 获取路由信息
+     *
+     * @return 路由信息
+     */
+    @ApiOperation("获取路由信息")
+    @GetMapping("getRouters")
+    public AjaxResult getRouters() {
+        Long userId = SecurityUtils.getUserId();
+        List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
+        return AjaxResult.success(menuService.buildMenus(menus));
+    }
+}

+ 115 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysMenuController.java

@@ -0,0 +1,115 @@
+package com.hz.web.controller.system;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.UserConstants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.entity.SysMenu;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.StringUtils;
+import com.hz.system.service.ISysMenuService;
+
+/**
+ * 菜单信息
+ *
+ * @author user
+ */
+@Api(tags = "菜单信息")
+@RestController
+@RequestMapping("/system/menu")
+public class SysMenuController extends BaseController {
+    @Autowired
+    private ISysMenuService menuService;
+
+    @ApiOperation("获取菜单列表")
+    //@PreAuthorize("@ss.hasPermi('system:menu:list')")
+    @GetMapping("/list")
+    public AjaxResult list(SysMenu menu) {
+        List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
+        return AjaxResult.success(menus);
+    }
+
+    @ApiOperation("根据菜单编号获取详细信息")
+    //@PreAuthorize("@ss.hasPermi('system:menu:query')")
+    @GetMapping(value = "/{menuId}")
+    public AjaxResult getInfo(@PathVariable Long menuId) {
+        return AjaxResult.success(menuService.selectMenuById(menuId));
+    }
+
+    @ApiOperation("获取菜单下拉树列表")
+    @GetMapping("/treeselect")
+    public AjaxResult treeselect(SysMenu menu) {
+        List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
+        return AjaxResult.success(menuService.buildMenuTreeSelect(menus));
+    }
+
+    @ApiOperation("加载对应角色菜单列表树")
+    @GetMapping(value = "/roleMenuTreeselect/{parentId}/{roleId}")
+    public AjaxResult roleMenuTreeselect(@PathVariable("parentId") Long parentId,@PathVariable("roleId") Long roleId) {
+        List<SysMenu> menus = menuService.selectMenuList(getUserId());
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("showKeys",menuService.selectMenuListByRoleId(parentId));
+        ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
+        ajax.put("menus", menuService.buildMenuTreeSelect(menus));
+        return ajax;
+    }
+
+    @ApiOperation("新增菜单")
+    //@PreAuthorize("@ss.hasPermi('system:menu:add')")
+    @Log(title = "菜单管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysMenu menu) {
+        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) {
+            return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
+        } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) {
+            return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
+        }
+        menu.setCreateBy(getUsername());
+        return toAjax(menuService.insertMenu(menu));
+    }
+
+    @ApiOperation("修改菜单")
+    //@PreAuthorize("@ss.hasPermi('system:menu:edit')")
+    @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysMenu menu) {
+        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) {
+            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
+        } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) {
+            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
+        } else if (menu.getId().equals(menu.getParentId())) {
+            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
+        }
+        menu.setUpdateBy(getUsername());
+        return toAjax(menuService.updateMenu(menu));
+    }
+
+    @ApiOperation("删除菜单")
+    //@PreAuthorize("@ss.hasPermi('system:menu:remove')")
+    @Log(title = "菜单管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{menuId}")
+    public AjaxResult remove(@PathVariable("menuId") Long menuId) {
+        if (menuService.hasChildByMenuId(menuId)) {
+            return AjaxResult.error("存在子菜单,不允许删除");
+        }
+        if (menuService.checkMenuExistRole(menuId)) {
+            return AjaxResult.error("菜单已分配,不允许删除");
+        }
+        return toAjax(menuService.deleteMenuById(menuId));
+    }
+}

+ 93 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysNoticeController.java

@@ -0,0 +1,93 @@
+package com.hz.web.controller.system;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.system.domain.SysNotice;
+import com.hz.system.service.ISysNoticeService;
+
+/**
+ * 公告 信息操作处理
+ * 
+ * @author user
+ */
+@Api(tags = "公告管理")
+@RestController
+@RequestMapping("/system/notice")
+public class SysNoticeController extends BaseController
+{
+    @Autowired
+    private ISysNoticeService noticeService;
+
+    /**
+     * 获取通知公告列表
+     */
+    //@PreAuthorize("@ss.hasPermi('system:notice:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysNotice notice)
+    {
+        startPage();
+        List<SysNotice> list = noticeService.selectNoticeList(notice);
+        return getDataTable(list);
+    }
+
+    /**
+     * 根据通知公告编号获取详细信息
+     */
+    //@PreAuthorize("@ss.hasPermi('system:notice:query')")
+    @GetMapping(value = "/{noticeId}")
+    public AjaxResult getInfo(@PathVariable Long noticeId)
+    {
+        return AjaxResult.success(noticeService.selectNoticeById(noticeId));
+    }
+
+    /**
+     * 新增通知公告
+     */
+    //@PreAuthorize("@ss.hasPermi('system:notice:add')")
+    @Log(title = "公告管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysNotice notice)
+    {
+        notice.setCreateBy(getUsername());
+        return toAjax(noticeService.insertNotice(notice));
+    }
+
+    /**
+     * 修改通知公告
+     */
+    //@PreAuthorize("@ss.hasPermi('system:notice:edit')")
+    @Log(title = "公告管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysNotice notice)
+    {
+        notice.setUpdateBy(getUsername());
+        return toAjax(noticeService.updateNotice(notice));
+    }
+
+    /**
+     * 删除通知公告
+     */
+    //@PreAuthorize("@ss.hasPermi('system:notice:remove')")
+    @Log(title = "公告管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{noticeIds}")
+    public AjaxResult remove(@PathVariable Long[] noticeIds)
+    {
+        return toAjax(noticeService.deleteNoticeByIds(noticeIds));
+    }
+}

+ 121 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysPostController.java

@@ -0,0 +1,121 @@
+package com.hz.web.controller.system;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.UserConstants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.poi.ExcelUtil;
+import com.hz.system.domain.SysPost;
+import com.hz.system.service.ISysPostService;
+
+/**
+ * 岗位信息操作处理
+ * 
+ * @author user
+ */
+@Api(tags = "岗位信息操作处理")
+@RestController
+@RequestMapping("/system/post")
+public class SysPostController extends BaseController
+{
+    @Autowired
+    private ISysPostService postService;
+
+    @ApiOperation("获取岗位列表")
+    //@PreAuthorize("@ss.hasPermi('system:post:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysPost post)
+    {
+        startPage();
+        List<SysPost> list = postService.selectPostList(post);
+        return getDataTable(list);
+    }
+    
+    @Log(title = "岗位管理", businessType = BusinessType.EXPORT)
+    //@PreAuthorize("@ss.hasPermi('system:post:export')")
+    @GetMapping("/export")
+    public AjaxResult export(SysPost post)
+    {
+        List<SysPost> list = postService.selectPostList(post);
+        ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
+        return util.exportExcel(list, "岗位数据");
+    }
+
+    @ApiOperation("根据岗位编号获取详细信息")
+    //@PreAuthorize("@ss.hasPermi('system:post:query')")
+    @GetMapping(value = "/{postId}")
+    public AjaxResult getInfo(@PathVariable Long postId)
+    {
+        return AjaxResult.success(postService.selectPostById(postId));
+    }
+
+            @ApiOperation("新增岗位")
+    //@PreAuthorize("@ss.hasPermi('system:post:add')")
+    @Log(title = "岗位管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysPost post)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
+        {
+            return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
+        }
+        else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
+        {
+            return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
+        }
+        post.setCreateBy(getUsername());
+        return toAjax(postService.insertPost(post));
+    }
+
+            @ApiOperation("修改岗位")
+    //@PreAuthorize("@ss.hasPermi('system:post:edit')")
+    @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysPost post)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
+        {
+            return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
+        }
+        else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
+        {
+            return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
+        }
+        post.setUpdateBy(getUsername());
+        return toAjax(postService.updatePost(post));
+    }
+
+            @ApiOperation("删除岗位")
+    //@PreAuthorize("@ss.hasPermi('system:post:remove')")
+    @Log(title = "岗位管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{postIds}")
+    public AjaxResult remove(@PathVariable Long[] postIds)
+    {
+        return toAjax(postService.deletePostByIds(postIds));
+    }
+
+@ApiOperation("获取岗位选择框列表")
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect()
+    {
+        List<SysPost> posts = postService.selectPostAll();
+        return AjaxResult.success(posts);
+    }
+}

+ 125 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysProfileController.java

@@ -0,0 +1,125 @@
+package com.hz.web.controller.system;
+
+import java.io.IOException;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+import com.hz.common.annotation.Log;
+import com.hz.common.config.HzConfig;
+import com.hz.common.constant.UserConstants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.entity.SysUser;
+import com.hz.common.core.domain.model.LoginUser;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.SecurityUtils;
+import com.hz.common.utils.ServletUtils;
+import com.hz.common.utils.StringUtils;
+import com.hz.common.utils.file.FileUploadUtils;
+import com.hz.framework.web.service.TokenService;
+import com.hz.system.service.ISysUserService;
+
+/**
+ * 个人信息 业务处理
+ *
+ * @author user
+ */
+@Api(tags = "个人信息")
+@RestController
+@RequestMapping("/system/user/profile")
+public class SysProfileController extends BaseController {
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    @ApiOperation("个人信息")
+    @GetMapping
+    public AjaxResult profile() {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        SysUser user = loginUser.getUser();
+        AjaxResult ajax = AjaxResult.success(user);
+        ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername()));
+        ajax.put("postGroup", userService.selectUserPostGroup(loginUser.getUsername()));
+        return ajax;
+    }
+
+    @ApiOperation("修改用户")
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult updateProfile(@RequestBody SysUser user) {
+        if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
+            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
+        }
+        if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
+            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+        }
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        SysUser sysUser = loginUser.getUser();
+        user.setId(sysUser.getId());
+        user.setPassword(null);
+        if (userService.updateUserProfile(user) > 0) {
+            // 更新缓存用户信息
+            loginUser.getUser().setNickName(user.getNickName());
+            loginUser.getUser().setPhonenumber(user.getPhonenumber());
+            loginUser.getUser().setEmail(user.getEmail());
+            loginUser.getUser().setSex(user.getSex());
+            tokenService.setLoginUser(loginUser);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("修改个人信息异常,请联系管理员");
+    }
+
+    @ApiOperation("重置密码")
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @PutMapping("/updatePwd")
+    public AjaxResult updatePwd(String oldPassword, String newPassword) {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        String userName = loginUser.getUsername();
+        String password = loginUser.getPassword();
+        if (!SecurityUtils.matchesPassword(oldPassword, password)) {
+            return AjaxResult.error("修改密码失败,旧密码错误");
+        }
+        if (SecurityUtils.matchesPassword(newPassword, password)) {
+            return AjaxResult.error("新密码不能与旧密码相同");
+        }
+        if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0) {
+            // 更新缓存用户密码
+            loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
+            tokenService.setLoginUser(loginUser);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("修改密码异常,请联系管理员");
+    }
+
+    @ApiOperation("头像上传")
+    @Log(title = "用户头像", businessType = BusinessType.UPDATE)
+    @PostMapping("/avatar")
+    public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws IOException {
+        if (!file.isEmpty()) {
+            LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+            String avatar = FileUploadUtils.upload(HzConfig.getAvatarPath(), file);
+            if (userService.updateUserAvatar(loginUser.getUsername(), avatar)) {
+                AjaxResult ajax = AjaxResult.success();
+                ajax.put("imgUrl", avatar);
+                // 更新缓存用户头像
+                loginUser.getUser().setAvatar(avatar);
+                tokenService.setLoginUser(loginUser);
+                return ajax;
+            }
+        }
+        return AjaxResult.error("上传图片异常,请联系管理员");
+    }
+}

+ 38 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysRegisterController.java

@@ -0,0 +1,38 @@
+package com.hz.web.controller.system;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.model.RegisterBody;
+import com.hz.framework.web.service.SysRegisterService;
+import com.hz.system.service.ISysConfigService;
+
+/**
+ * 注册验证
+ * 
+ * @author user
+ */
+@RestController
+public class SysRegisterController extends BaseController
+{
+    @Autowired
+    private SysRegisterService registerService;
+
+    @Autowired
+    private ISysConfigService configService;
+
+    @PostMapping("/register")
+    public AjaxResult register(@RequestBody RegisterBody user)
+    {
+        if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
+        {
+            return error("当前系统没有开启注册功能!");
+        }
+        String msg = registerService.register(user);
+        return StringUtils.isEmpty(msg) ? success() : error(msg);
+    }
+}

+ 212 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysRoleController.java

@@ -0,0 +1,212 @@
+package com.hz.web.controller.system;
+
+import java.util.List;
+
+import com.github.pagehelper.PageInfo;
+import com.hz.system.SysRoleParam;
+import com.hz.system.domain.vo.SysRoleVo;
+import com.hz.system.mapper.SysRoleMapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.UserConstants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.entity.SysRole;
+import com.hz.common.core.domain.entity.SysUser;
+import com.hz.common.core.domain.model.LoginUser;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.ServletUtils;
+import com.hz.common.utils.StringUtils;
+import com.hz.common.utils.poi.ExcelUtil;
+import com.hz.framework.web.service.SysPermissionService;
+import com.hz.framework.web.service.TokenService;
+import com.hz.system.domain.SysUserRole;
+import com.hz.system.service.ISysRoleService;
+import com.hz.system.service.ISysUserService;
+
+import javax.annotation.Resource;
+
+/**
+ * 角色信息
+ *
+ * @author user
+ */
+@Api(tags = "角色管理")
+@RestController
+@RequestMapping("/system/role")
+public class SysRoleController extends BaseController {
+    @Autowired
+    private ISysRoleService roleService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    @Autowired
+    private SysPermissionService permissionService;
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Resource
+    private SysRoleMapper sysRoleMapper;
+
+    @ApiOperation("角色列表")
+    @PostMapping("/list")
+    public AjaxResult list(@RequestBody SysRoleParam param) {
+        PageInfo<SysRole> result = roleService.selectRoleList(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("角色列表--不分页")
+    @GetMapping("/listAll")
+    public AjaxResult list() {
+        List<SysRoleVo> list = roleService.selectRoleVoList();
+        return AjaxResult.success(list);
+    }
+
+    //@Log(title = "角色管理", businessType = BusinessType.EXPORT)
+    //////@PreAuthorize("@ss.hasPermi('system:role:export')")
+    //@GetMapping("/export")
+    //public AjaxResult export(SysRole role) {
+    //    List<SysRole> list = roleService.selectRoleList(role);
+    //    ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
+    //    return util.exportExcel(list, "角色数据");
+    //}
+
+    @ApiOperation("根据角色编号获取详细信息")
+    ////@PreAuthorize("@ss.hasPermi('system:role:query')")
+    @GetMapping(value = "/{roleId}")
+    public AjaxResult getInfo(@PathVariable Long roleId) {
+        return AjaxResult.success(roleService.selectRoleById(roleId));
+    }
+
+    @ApiOperation("新增角色")
+    ////@PreAuthorize("@ss.hasPermi('system:role:add')")
+    @Log(title = "角色管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysRole role) {
+        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) {
+            return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
+        } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) {
+            return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
+        }
+        role.setCreateBy(getUsername());
+        return toAjax(roleService.insertRole(role));
+
+    }
+
+    @ApiOperation("修改保存角色")
+    ////@PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysRole role) {
+        roleService.checkRoleAllowed(role);
+        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) {
+            return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
+        } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) {
+            return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
+        }
+        role.setUpdateBy(getUsername());
+
+        if (roleService.updateRole(role) > 0) {
+            // 更新缓存用户权限
+            LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+            if (StringUtils.isNotNull(loginUser.getUser()) && sysRoleMapper.userIsAdmin(loginUser.getUser().getId())>0) {
+                loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
+                loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getNickName(),loginUser.getUser().getHzUserId()));
+                tokenService.setLoginUser(loginUser);
+            }
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
+    }
+
+    @ApiOperation("修改保存数据权限")
+    ////@PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/dataScope")
+    public AjaxResult dataScope(@RequestBody SysRole role) {
+        roleService.checkRoleAllowed(role);
+        return toAjax(roleService.authDataScope(role));
+    }
+
+    @ApiOperation("状态修改")
+    ////@PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStatus")
+    public AjaxResult changeStatus(@RequestBody SysRole role) {
+        roleService.checkRoleAllowed(role);
+        role.setUpdateBy(getUsername());
+        return toAjax(roleService.updateRoleStatus(role));
+    }
+
+    @ApiOperation("删除角色")
+    ////@PreAuthorize("@ss.hasPermi('system:role:remove')")
+    @Log(title = "角色管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{roleIds}")
+    public AjaxResult remove(@PathVariable Long[] roleIds) {
+        return toAjax(roleService.deleteRoleByIds(roleIds));
+    }
+
+    @ApiOperation("获取角色选择框列表")
+    ////@PreAuthorize("@ss.hasPermi('system:role:query')")
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect() {
+        return AjaxResult.success(roleService.selectRoleAll());
+    }
+
+    @ApiOperation("查询已分配用户角色列表")
+    ////@PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/authUser/allocatedList")
+    public TableDataInfo allocatedList(SysUser user) {
+        startPage();
+        List<SysUser> list = userService.selectAllocatedList(user);
+        return getDataTable(list);
+    }
+
+    @ApiOperation("查询未分配用户角色列表")
+    ////@PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/authUser/unallocatedList")
+    public TableDataInfo unallocatedList(SysUser user) {
+        startPage();
+        List<SysUser> list = userService.selectUnallocatedList(user);
+        return getDataTable(list);
+    }
+
+    @ApiOperation("取消授权用户")
+    ////@PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authUser/cancel")
+    public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole) {
+        return toAjax(roleService.deleteAuthUser(userRole));
+    }
+
+    @ApiOperation("批量取消授权用户")
+    ////@PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authUser/cancelAll")
+    public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds) {
+        return toAjax(roleService.deleteAuthUsers(roleId, userIds));
+    }
+
+    @ApiOperation("批量选择用户授权")
+    ////@PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authUser/selectAll")
+    public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds) {
+        return toAjax(roleService.insertAuthUsers(roleId, userIds));
+    }
+}

+ 228 - 0
hz-admin/src/main/java/com/hz/web/controller/system/SysUserController.java

@@ -0,0 +1,228 @@
+package com.hz.web.controller.system;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.github.pagehelper.PageInfo;
+import com.hz.common.core.domain.model.SysUserParam;
+import com.hz.common.core.domain.model.SysUserVo;
+import com.hz.system.domain.vo.UserVo;
+import com.hz.system.mapper.SysRoleMapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.UserConstants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.core.domain.entity.SysRole;
+import com.hz.common.core.domain.entity.SysUser;
+import com.hz.common.core.domain.model.LoginUser;
+import com.hz.common.core.page.TableDataInfo;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.SecurityUtils;
+import com.hz.common.utils.ServletUtils;
+import com.hz.common.utils.StringUtils;
+import com.hz.common.utils.poi.ExcelUtil;
+import com.hz.framework.web.service.TokenService;
+import com.hz.system.service.ISysPostService;
+import com.hz.system.service.ISysRoleService;
+import com.hz.system.service.ISysUserService;
+
+import javax.annotation.Resource;
+
+/**
+ * 用户信息
+ *
+ * @author user
+ */
+@Api(tags = "用户信息")
+@RestController
+@RequestMapping("/system/user")
+public class SysUserController extends BaseController {
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysRoleService roleService;
+
+    @Autowired
+    private ISysPostService postService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    @Resource
+    private SysRoleMapper roleMapper;
+
+    @ApiOperation("获取用户列表")
+    ////@PreAuthorize("@ss.hasPermi('system:user:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysUser user) {
+        startPage();
+        List<SysUser> list = userService.selectUserList(user);
+        return getDataTable(list);
+    }
+
+    @ApiOperation("分页获取用户列表")
+    @PostMapping("/page")
+    public AjaxResult list(@RequestBody SysUserParam param) {
+        PageInfo<SysUserVo> result = userService.getUserPageInfo(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取用户列表-不分页")
+    @PostMapping("/allList")
+    public AjaxResult getAllUserList() {
+        List<UserVo> list = userService.getAllUserList();
+        return AjaxResult.success(list);
+    }
+
+    @Log(title = "用户管理", businessType = BusinessType.EXPORT)
+    ////@PreAuthorize("@ss.hasPermi('system:user:export')")
+    @GetMapping("/export")
+    public AjaxResult export(SysUser user) {
+        List<SysUser> list = userService.selectUserList(user);
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        return util.exportExcel(list, "用户数据");
+    }
+
+    @Log(title = "用户管理", businessType = BusinessType.IMPORT)
+    ////@PreAuthorize("@ss.hasPermi('system:user:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        List<SysUser> userList = util.importExcel(file.getInputStream());
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        String operName = loginUser.getUsername();
+        String message = userService.importUser(userList, updateSupport, operName);
+        return AjaxResult.success(message);
+    }
+
+    @GetMapping("/importTemplate")
+    public AjaxResult importTemplate() {
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        return util.importTemplateExcel("用户数据");
+    }
+
+    @ApiOperation("根据用户编号获取详细信息")
+    ////@PreAuthorize("@ss.hasPermi('system:user:query')")
+    @GetMapping(value = {"/", "/{userId}"})
+    public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) {
+        AjaxResult ajax = AjaxResult.success();
+        List<SysRole> roles = roleService.selectRoleAll();
+        ajax.put("roles", roleMapper.userIsAdmin(userId) > 0 ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
+        ajax.put("posts", postService.selectPostAll());
+        if (StringUtils.isNotNull(userId)) {
+            ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId));
+            ajax.put("postIds", postService.selectPostListByUserId(userId));
+            ajax.put("roleIds", roleService.selectRoleListByUserId(userId));
+        }
+        return ajax;
+    }
+
+    @ApiOperation("新增用户")
+    ////@PreAuthorize("@ss.hasPermi('system:user:add')")
+    @Log(title = "用户管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysUser user) {
+        if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName()))) {
+            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
+        } else if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
+            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
+        } else if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
+            return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+        }
+        user.setCreateBy(getUsername());
+        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
+        return toAjax(userService.insertUser(user));
+    }
+
+    @ApiOperation("修改用户")
+    ////@PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysUser user) {
+        userService.checkUserAllowed(user);
+        if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
+            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
+        } else if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
+            return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+        }
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.updateUser(user));
+    }
+
+    @ApiOperation("删除用户")
+    ////@PreAuthorize("@ss.hasPermi('system:user:remove')")
+    @Log(title = "用户管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{userIds}")
+    public AjaxResult remove(@PathVariable Long[] userIds) {
+        if (ArrayUtils.contains(userIds, getUserId())) {
+            return error("当前用户不能删除");
+        }
+        for (Long userId : userIds) {
+            tokenService.delParentToken(userId);
+        }
+        return toAjax(userService.deleteUserByIds(userIds));
+    }
+
+    @ApiOperation("重置密码")
+    ////@PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/resetPwd")
+    public AjaxResult resetPwd(@RequestBody SysUser user) {
+        userService.checkUserAllowed(user);
+        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.resetPwd(user));
+    }
+
+    @ApiOperation("状态修改")
+    ////@PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStatus")
+    public AjaxResult changeStatus(@RequestBody SysUser user) {
+        userService.checkUserAllowed(user);
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.updateUserStatus(user));
+    }
+
+    @ApiOperation("根据用户编号获取授权角色")
+    ////@PreAuthorize("@ss.hasPermi('system:user:query')")
+    @GetMapping("/authRole/{userId}")
+    public AjaxResult authRole(@PathVariable("userId") Long userId) {
+        AjaxResult ajax = AjaxResult.success();
+        SysUser user = userService.selectUserById(userId);
+        List<SysRole> roles = roleService.selectRolesByUserId(userId);
+        ajax.put("user", user);
+        //ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
+        ajax.put("roles", roles.stream().collect(Collectors.toList()));
+        return ajax;
+    }
+
+    @ApiOperation("用户授权角色")
+    ////@PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authRole")
+    public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
+        userService.insertUserAuth(userId, roleIds);
+        return success();
+    }
+}

+ 20 - 0
hz-admin/src/main/java/com/hz/web/controller/tool/SwaggerController.java

@@ -0,0 +1,20 @@
+package com.hz.web.controller.tool;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.hz.common.core.controller.BaseController;
+
+/**
+ * swagger 接口
+ *
+ * @author user
+ */
+@Controller
+@RequestMapping("/tool/swagger")
+public class SwaggerController extends BaseController {
+    @GetMapping()
+    public String index() {
+        return redirect("/swagger-ui.html");
+    }
+}

+ 167 - 0
hz-admin/src/main/java/com/hz/web/controller/tool/TestController.java

@@ -0,0 +1,167 @@
+package com.hz.web.controller.tool;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.utils.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * swagger 用户测试方法
+ *
+ * @author user
+ */
+@RestController
+@RequestMapping("/test/user")
+public class TestController extends BaseController {
+    private final static Map<Integer, UserEntity> USERS = new LinkedHashMap<Integer, UserEntity>();
+
+    {
+        USERS.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
+        USERS.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
+    }
+
+    /**
+     * 获取用户列表
+     */
+    @GetMapping("/list")
+    public AjaxResult userList() {
+
+        List<UserEntity> userList = new ArrayList<UserEntity>(USERS.values());
+        return AjaxResult.success(userList);
+    }
+
+    /**
+     * 获取用户详细
+     */
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
+    @GetMapping("/{userId}")
+    public AjaxResult getUser(@PathVariable Integer userId) {
+        if (!USERS.isEmpty() && USERS.containsKey(userId)) {
+            return AjaxResult.success(USERS.get(userId));
+        } else {
+            return error("用户不存在");
+        }
+    }
+
+    /**
+     * 新增用户
+     */
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer"),
+            @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String"),
+            @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String"),
+            @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String")
+    })
+    @PostMapping("/save")
+    public AjaxResult save(UserEntity user) {
+        if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) {
+            return error("用户ID不能为空");
+        }
+        return AjaxResult.success(USERS.put(user.getUserId(), user));
+    }
+
+    /**
+     * 更新用户
+     */
+    @PutMapping("/update")
+    public AjaxResult update(@RequestBody UserEntity user) {
+        if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) {
+            return error("用户ID不能为空");
+        }
+        if (USERS.isEmpty() || !USERS.containsKey(user.getUserId())) {
+            return error("用户不存在");
+        }
+        USERS.remove(user.getUserId());
+        return AjaxResult.success(USERS.put(user.getUserId(), user));
+    }
+
+    /**
+     * 删除用户信息
+     */
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
+    @DeleteMapping("/{userId}")
+    public AjaxResult delete(@PathVariable Integer userId) {
+        if (!USERS.isEmpty() && USERS.containsKey(userId)) {
+            USERS.remove(userId);
+            return success();
+        } else {
+            return error("用户不存在");
+        }
+    }
+}
+
+@ApiModel(value = "UserEntity", description = "用户实体")
+class UserEntity {
+    @ApiModelProperty("用户ID")
+    private Integer userId;
+
+    @ApiModelProperty("用户名称")
+    private String username;
+
+    @ApiModelProperty("用户密码")
+    private String password;
+
+    @ApiModelProperty("用户手机")
+    private String mobile;
+
+    public UserEntity() {
+
+    }
+
+    public UserEntity(Integer userId, String username, String password, String mobile) {
+        this.userId = userId;
+        this.username = username;
+        this.password = password;
+        this.mobile = mobile;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+}

+ 170 - 0
hz-admin/src/main/java/com/hz/web/core/config/Knife4jConfig.java

@@ -0,0 +1,170 @@
+//package com.hz.web.core.config;
+//
+//import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
+//import com.hz.common.config.HzConfig;
+//import io.swagger.annotations.ApiOperation;
+//import io.swagger.models.auth.In;
+//import org.springframework.beans.BeansException;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.beans.factory.config.BeanPostProcessor;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.Import;
+//import org.springframework.util.ReflectionUtils;
+//import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
+//import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
+//import springfox.documentation.builders.ApiInfoBuilder;
+//import springfox.documentation.builders.PathSelectors;
+//import springfox.documentation.builders.RequestHandlerSelectors;
+//import springfox.documentation.service.*;
+//import springfox.documentation.spi.DocumentationType;
+//import springfox.documentation.spi.service.contexts.SecurityContext;
+//import springfox.documentation.spring.web.plugins.Docket;
+//import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
+//import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
+//import springfox.documentation.swagger2.annotations.EnableSwagger2;
+//
+//import java.lang.reflect.Field;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.stream.Collectors;
+//
+///**
+// * @author zyg
+// * @className Knife4jConfig
+// * @date 2022年06月12日 17:20
+// */
+////@Configuration
+////@EnableSwagger2
+////@EnableKnife4j
+////@Import(BeanValidatorPluginsConfiguration.class)
+//public class Knife4jConfig {
+//
+//    /**
+//     * 系统基础配置
+//     */
+//    @Autowired
+//    private HzConfig hzConfig;
+//
+//    /**
+//     * 是否开启swagger
+//     */
+//    @Value("${swagger.enabled}")
+//    private boolean enabled;
+//
+//    /**
+//     * 设置请求的统一前缀
+//     */
+//    @Value("${swagger.pathMapping}")
+//    private String pathMapping;
+//
+//    /**
+//     * 创建API
+//     */
+//    @Bean
+//    public Docket createRestApi() {
+//        return new Docket(DocumentationType.OAS_30)
+//                // 是否启用Swagger
+//                .enable(enabled)
+//                // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
+//                .apiInfo(apiInfo())
+//                // 设置哪些接口暴露给Swagger展示
+//                .select()
+//                // 扫描所有有注解的api,用这种方式更灵活
+//                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+//                // 扫描指定包中的swagger注解
+//                //.apis(RequestHandlerSelectors.basePackage("com.hz.business.controller"))
+//                // 扫描所有 .apis(RequestHandlerSelectors.any())
+//                .paths(PathSelectors.any())
+//                .build()
+//                /* 设置安全模式,swagger可以设置访问token */
+//                .securitySchemes(securitySchemes())
+//                .securityContexts(securityContexts())
+//                .pathMapping(pathMapping);
+//    }
+//
+//    /**
+//     * 安全模式,这里指定token通过Authorization头请求头传递
+//     */
+//    private List<SecurityScheme> securitySchemes() {
+//        List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
+//        apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
+//        return apiKeyList;
+//    }
+//
+//    /**
+//     * 安全上下文
+//     */
+//    private List<SecurityContext> securityContexts() {
+//        List<SecurityContext> securityContexts = new ArrayList<>();
+//        securityContexts.add(
+//                SecurityContext.builder()
+//                        .securityReferences(defaultAuth())
+//                        .operationSelector(o -> o.requestMappingPattern().matches("/.*"))
+//                        .build());
+//        return securityContexts;
+//    }
+//
+//    /**
+//     * 默认的安全上引用
+//     */
+//    private List<SecurityReference> defaultAuth() {
+//        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
+//        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+//        authorizationScopes[0] = authorizationScope;
+//        List<SecurityReference> securityReferences = new ArrayList<>();
+//        securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
+//        return securityReferences;
+//    }
+//
+//    /**
+//     * 添加摘要信息
+//     */
+//    private ApiInfo apiInfo() {
+//        // 用ApiInfoBuilder进行定制
+//        return new ApiInfoBuilder()
+//                // 设置标题
+//                .title("标题:整车监控预警与性能分析平台_接口文档")
+//                // 描述
+//                .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
+//                // 作者信息
+//                .contact(new Contact(hzConfig.getName(), null, null))
+//                // 版本
+//                .version("版本号:" + hzConfig.getVersion())
+//                .build();
+//    }
+//
+//    //@Bean
+//    public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
+//        return new BeanPostProcessor() {
+//
+//            @Override
+//            public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
+//                if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
+//                    customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
+//                }
+//                return bean;
+//            }
+//
+//            private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {
+//                List<T> copy = mappings.stream()
+//                        .filter(mapping -> mapping.getPatternParser() == null)
+//                        .collect(Collectors.toList());
+//                mappings.clear();
+//                mappings.addAll(copy);
+//            }
+//
+//            @SuppressWarnings("unchecked")
+//            private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) {
+//                try {
+//                    Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings");
+//                    field.setAccessible(true);
+//                    return (List<RequestMappingInfoHandlerMapping>) field.get(bean);
+//                } catch (IllegalArgumentException | IllegalAccessException e) {
+//                    throw new IllegalStateException(e);
+//                }
+//            }
+//        };
+//    }
+//}

+ 140 - 0
hz-admin/src/main/java/com/hz/web/core/config/SwaggerConfig.java

@@ -0,0 +1,140 @@
+package com.hz.web.core.config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import com.hz.common.config.HzConfig;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.ApiKey;
+import springfox.documentation.service.AuthorizationScope;
+import springfox.documentation.service.Contact;
+import springfox.documentation.service.SecurityReference;
+import springfox.documentation.service.SecurityScheme;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.contexts.SecurityContext;
+import springfox.documentation.spring.web.plugins.Docket;
+
+/**
+ * Swagger2的接口配置
+ *
+ * @author user
+ */
+@Configuration
+public class SwaggerConfig extends WebMvcConfigurationSupport {
+    /**
+     * 系统基础配置
+     */
+    @Autowired
+    private HzConfig hzConfig;
+
+    /**
+     * 是否开启swagger
+     */
+    @Value("${swagger.enabled}")
+    private boolean enabled;
+
+    /**
+     * 设置请求的统一前缀
+     */
+    @Value("${swagger.pathMapping}")
+    private String pathMapping;
+
+    /**
+     * 创建API
+     */
+    @Bean
+    public Docket createRestApi() {
+        return new Docket(DocumentationType.OAS_30)
+                // 是否启用Swagger
+                .enable(enabled)
+                // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
+                .apiInfo(apiInfo())
+                // 设置哪些接口暴露给Swagger展示
+                .select()
+                // 扫描所有有注解的api,用这种方式更灵活
+                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+                // 扫描指定包中的swagger注解
+                //.apis(RequestHandlerSelectors.basePackage("com.hz.business.controller"))
+                // 扫描所有 .apis(RequestHandlerSelectors.any())
+                .paths(PathSelectors.any())
+                .build()
+                /* 设置安全模式,swagger可以设置访问token */
+                .securitySchemes(securitySchemes())
+                .securityContexts(securityContexts())
+                .pathMapping(pathMapping);
+    }
+
+    /**
+     * 安全模式,这里指定token通过Authorization头请求头传递
+     */
+    private List<SecurityScheme> securitySchemes() {
+        List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
+        apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
+        return apiKeyList;
+    }
+
+    /**
+     * 安全上下文
+     */
+    private List<SecurityContext> securityContexts() {
+        List<SecurityContext> securityContexts = new ArrayList<>();
+        securityContexts.add(
+                SecurityContext.builder()
+                        .securityReferences(defaultAuth())
+                        .operationSelector(o -> o.requestMappingPattern().matches("/.*"))
+                        .build());
+        return securityContexts;
+    }
+
+    /**
+     * 默认的安全上引用
+     */
+    private List<SecurityReference> defaultAuth() {
+        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
+        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+        authorizationScopes[0] = authorizationScope;
+        List<SecurityReference> securityReferences = new ArrayList<>();
+        securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
+        return securityReferences;
+    }
+
+    /**
+     * 添加摘要信息
+     */
+    private ApiInfo apiInfo() {
+        // 用ApiInfoBuilder进行定制
+        return new ApiInfoBuilder()
+                // 设置标题
+                .title("标题:整车监控预警与性能分析平台_接口文档")
+                // 描述
+                .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
+                // 作者信息
+                .contact(new Contact(hzConfig.getName(), null, null))
+                // 版本
+                .version("版本号:" + hzConfig.getVersion())
+                .build();
+    }
+
+    /**
+     * 重点
+     * @param registry
+     * @return void
+     */
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("/swagger-ui/**")
+                .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
+                .resourceChain(false);
+    }
+}

+ 1 - 0
hz-admin/src/main/resources/META-INF/spring-devtools.properties

@@ -0,0 +1 @@
+restart.include.json=/com.alibaba.fastjson.*.jar

+ 232 - 0
hz-admin/src/main/resources/application-dev.yml

@@ -0,0 +1,232 @@
+# 项目相关配置
+hz:
+  # 名称
+  name: hz
+  # 版本
+  version: 3.6.0
+  # 版权年份
+  copyrightYear: 2022
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/hz/uploadPath,Linux配置 /home/hz/uploadPath)
+  profile: D:/hz/uploadPath
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+
+  checkToken: https://backend-api-uat.chehezhi.cn/pivot/tenant-mgr/1.0/checkToken
+  refreshToken: https://backend-api-uat.chehezhi.cn/pivot/auth-mgr/1.0/refreshToken
+  getUsers: https://third-party-api-uat.chehezhi.cn/pivot/tenant-mgr/1.0/getUsers
+  appId: HOZON-B-enBtoI7E
+  appKey: ec0828775828db4de85f6c50097ddf04f40d52a7996479417bfaf6b3f9cebef5
+  appSecret: 5d2b73261097bda4bc9b235e0781343529fd42afdd5fb8bbb07d6798e62d8992
+  url: /pivot/tenant-mgr/1.0/getUsers
+
+  mail:
+    defaultSender: zsoneyearhfj@163.com
+    #    defaultSender: bigdata-analysis-report@hozonauto.com
+    linkUrl: http://fast-fun.cn/
+    title: 这个是邮件标题
+  voice:
+    #语音模板 需要阿里云上配置
+    accessKeyId: LTAI5tD1tgcm8HPGEmnFmQ1u
+    accessKeySecret: ch4SOvccw47hz4Pvjk7jOsXxbF1cpW
+    tts: TTS_237560732
+  sms:
+    accessKeyId: LTAI5tGVTxDCb2LSkKBAL5W3
+    accessKeySecret: 1mJYXI0AyIsdaVrRy34pA8kzT3nQT6
+    endpoint: dysmsapi.aliyuncs.com
+    signName: 合众汽车
+    templateCode: SMS_237570527
+
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8080
+  port: 8082
+  servlet:
+    # 应用的访问路径
+    context-path: /hz
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # tomcat最大线程数,默认为200
+    max-threads: 800
+    # Tomcat启动初始化的线程数,默认值25
+    min-spare-threads: 30
+
+# 日志配置
+logging:
+  level:
+    com.hz: debug
+    org.springframework: warn
+
+# Spring配置
+spring:
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://192.168.0.40/hz_ys?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&tinyInt1isBit=false
+    username: root
+    password: Qx123456
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  # 文件上传
+  servlet:
+    multipart:
+      # 单个文件大小
+      max-file-size:  200MB
+      # 设置总上传的文件大小
+      max-request-size:  200MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: false
+  # redis 配置
+  redis:
+    # 地址
+    host: 192.168.0.43
+    #    host: r-uf64s8vthelp3a9fhi.redis.rds.aliyuncs.com
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码 123456
+    password:
+    #    password: QkNtEheRF*RqJvM
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms
+
+  mail:
+    default-encoding: UTF-8
+    host: smtp.163.com
+    #    host: smtp.hozonauto.com
+    password: OQQFMTHNYBBUVCOG
+    #    password: eJnjcpVv1cZw5RNf
+    protocol: smtp
+    test-connection: true
+    username: zsoneyearhfj@163.com
+    #    username: bigdata-analysis-report@hozonauto.com
+    port: 465
+    properties:
+      mail:
+        smtp:
+          port: 465
+          auth: true
+          ssl:
+            enable: true
+  thymeleaf:
+    cache: false
+    check-template-location: true
+    encoding: UTF-8
+    mode: HTML
+    prefix: classpath:/templates/
+    servlet:
+      content-type: text/html
+    suffix: .html
+# token配置
+token:
+  # 令牌自定义标识
+  header: Authorization
+  # 令牌密钥
+  secret: abcdefghijklmnopqrstuvwxyz
+  # 令牌有效期(默认30分钟)
+  expireTime: 1000
+
+# MyBatis配置
+mybatis-plus:
+  mapper-locations: mapper/system/*.xml,mapper/quartz/*.xml,mapper/generator/*.xml,mapper/business/*.xml
+  typeAliasesPackage: com.hz.**.domain
+  global-config:
+    banner: false
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+# PageHelper分页插件
+pagehelper:
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: true
+  # 请求前缀
+  #  pathMapping: /dev-api
+  pathMapping:
+
+# 防止XSS攻击
+xss:
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*
+
+qyapi:
+  agentid: 1000006
+  corpid: wwdccc977d110e91cc
+  corpsecret: U6X4LTwSS61CQCgBmKSTs67TEp5tFo4OHY3NoISqqDE
+
+
+ok:
+  http:
+    connect-timeout: 60
+    read-timeout: 60
+    write-timeout: 60
+    # 连接池中整体的空闲连接的最大数量
+    max-idle-connections: 200
+    # 连接空闲时间最多为 300 秒
+    keep-alive-duration: 300
+
+#lindorm:
+#  url: jdbc:lindorm:table:url=http://ld-bp16866o8uwo0a590-proxy-lindorm-pub.lindorm.rds.aliyuncs.com:30060
+#  lindormUser: user
+#  database: test
+#  lindormPassword: password
+#  userName: root
+#  password: root
+#  talbeName: ods_signal_new
+#  ascDataBase: offline_analysis
+
+phoenix:
+  url: jdbc:phoenix:192.168.0.105:2181
+  driver-class-name: org.apache.phoenix.jdbc.PhoenixDriver
+  talbeName: ods_signal_new
+  ascDataBase: offline_analysis
+
+oos:
+  endpoint: oss-cn-hangzhou.aliyuncs.com
+  keyId: LTAI4FyoDnXMjqd78rdRDFHN
+  keySecret: sdFl6vjM9l2rvWiUTzuFQb2xqjUoY5
+  bucketName: ff-hezhong
+  fileHost: ocv-soc
+  asc: asc
+  dbc: dbc
+  domain: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/
+  modelFilePath: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/ocv-soc/templates/OCV-SOC模板.xlsx
+  cellModelPath: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/ocv-soc/templates/volt_temp_template.xlsx
+
+algo:
+  dbcUrl: http://zxqwlm.tpddns.cn:8088/parse_dbc
+
+#ftp:
+#  ip: nas.fast-fun.cn
+#  port: 20
+#  user: qx
+#  pass: qx500

+ 213 - 0
hz-admin/src/main/resources/application-perf.yml

@@ -0,0 +1,213 @@
+# 项目相关配置
+hz:
+  # 名称
+  name: hz
+  # 版本
+  version: 3.6.0
+  # 版权年份
+  copyrightYear: 2021
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/hz/uploadPath,Linux配置 /home/hz/uploadPath)
+  profile: /home/uploadPath
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+  checkToken: https://backend-api-uat.chehezhi.cn/pivot/tenant-mgr/1.0/checkToken
+  refreshToken: https://backend-api-uat.chehezhi.cn/pivot/auth-mgr/1.0/refreshToken
+  getUsers: https://third-party-api-uat.chehezhi.cn/pivot/tenant-mgr/1.0/getUsers
+  appId: HOZON-B-enBtoI7E
+  appKey: ec0828775828db4de85f6c50097ddf04f40d52a7996479417bfaf6b3f9cebef5
+  appSecret: 5d2b73261097bda4bc9b235e0781343529fd42afdd5fb8bbb07d6798e62d8992
+  url: /pivot/tenant-mgr/1.0/getUsers
+
+  mail:
+    defaultSender: bigdata-analysis-report@hozonauto.com
+    linkUrl: http://fast-fun.cn/
+    title: 这个是邮件标题
+  voice:
+    #语音模板 需要阿里云上配置
+    accessKeyId: LTAI5tD1tgcm8HPGEmnFmQ1u
+    accessKeySecret: ch4SOvccw47hz4Pvjk7jOsXxbF1cpW
+    tts: TTS_237560732
+  sms:
+    accessKeyId: LTAI5tGVTxDCb2LSkKBAL5W3
+    accessKeySecret: 1mJYXI0AyIsdaVrRy34pA8kzT3nQT6
+    endpoint: dysmsapi.aliyuncs.com
+    signName: 合众汽车
+    templateCode: SMS_237570527
+
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8082
+  port: 8082
+  servlet:
+    # 应用的访问路径
+    context-path: /hz
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # tomcat最大线程数,默认为200
+    max-threads: 800
+    # Tomcat启动初始化的线程数,默认值25
+    min-spare-threads: 30
+
+# 日志配置
+logging:
+  level:
+    com.hz: debug
+    org.springframework: warn
+
+# Spring配置
+spring:
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://rm-uf6yuz40t98hvgb79.mysql.rds.aliyuncs.com:3306/db_lidian?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&tinyInt1isBit=false
+    username: u_manager
+    password: HvRgOuWxZ8TqM
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  # 文件上传
+  servlet:
+     multipart:
+       # 单个文件大小
+       max-file-size:  200MB
+       # 设置总上传的文件大小
+       max-request-size:  200MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: true
+  # redis 配置
+  redis:
+    # 地址
+    host: r-uf6vg4kcloawnamiyt.redis.rds.aliyuncs.com
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码 123456
+    password: QkNtEheRF*RqJvM
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms
+
+  mail:
+    default-encoding: UTF-8
+    host: smtp.hozonauto.com
+    password: eJnjcpVv1cZw5RNf
+    protocol: smtp
+    test-connection: true
+    username: bigdata-analysis-report@hozonauto.com
+    port: 465
+    properties:
+      mail:
+        smtp:
+          port: 465
+          auth: true
+          ssl:
+            enable: true
+  thymeleaf:
+    cache: false
+    check-template-location: true
+    encoding: UTF-8
+    mode: HTML
+    prefix: classpath:/templates/
+    servlet:
+      content-type: text/html
+    suffix: .html
+# token配置
+token:
+    # 令牌自定义标识
+    header: Authorization
+    # 令牌密钥
+    secret: abcdefghijklmnopqrstuvwxyz
+    # 令牌有效期(默认30分钟)
+    expireTime: 1000
+  
+# MyBatis配置
+mybatis-plus:
+  mapper-locations: mapper/system/*.xml,mapper/quartz/*.xml,mapper/generator/*.xml,mapper/business/*.xml
+  typeAliasesPackage: com.hz.**.domain
+  global-config:
+    banner: false
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+# PageHelper分页插件
+pagehelper: 
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql 
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: true
+  # 请求前缀
+#  pathMapping: /dev-api
+  pathMapping:
+
+# 防止XSS攻击
+xss: 
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*
+
+qyapi:
+  agentid: 1000006
+  corpid: wwdccc977d110e91cc
+  corpsecret: U6X4LTwSS61CQCgBmKSTs67TEp5tFo4OHY3NoISqqDE
+
+
+ok:
+  http:
+    connect-timeout: 60
+    read-timeout: 60
+    write-timeout: 60
+    # 连接池中整体的空闲连接的最大数量
+    max-idle-connections: 200
+    # 连接空闲时间最多为 300 秒
+    keep-alive-duration: 300
+    
+lindorm:
+  url: jdbc:lindorm:table:url=http://ld-uf63w5oqn0gt6m0e0-proxy-hbaseue.hbaseue.rds.aliyuncs.com:30060
+  lindormUser: user
+  database: test
+  lindormPassword: password
+  userName: root
+  password: root
+  talbeName: ods_signal
+  ascDataBase: offline_analysis
+  behaviorTable: algo_energy_ana_day
+
+oos:
+  endpoint: oss-cn-shanghai.aliyuncs.com
+  keyId: LTAI5tJcGiTjFfBQBN3HqLt7
+  keySecret: znqdCZsCIZCabgQ1UcPy6fQeTVfMUk
+  bucketName: hozon-zhili-pm
+  fileHost: ocv-soc
+  asc: asc
+  dbc: dbc
+  domain: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com
+  modelFilePath: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/OCV-SOC模板.xlsx
+  cellModelPath: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/volt_temp_template.xlsx
+algo:
+  dbcUrl: http://172.16.61.95:8088/parse_dbc

+ 247 - 0
hz-admin/src/main/resources/application-prod.yml

@@ -0,0 +1,247 @@
+# 项目相关配置
+hz:
+  # 名称
+  name: hz
+  # 版本
+  version: 4.7.4
+  # 版权年份
+  copyrightYear: 2022
+  # 实例演示开关
+  demoEnabled: false
+  # 文件路径 示例( Windows配置D:/hz/uploadPath,Linux配置 /home/hz/uploadPath)
+  profile: /home/uploadPath
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+  checkToken: https://backend-api.chehezhi.cn/pivot/tenant-mgr/1.0/checkToken?thirdPartyChannel=1
+  refreshToken: https://backend-api.chehezhi.cn/pivot/auth-mgr/1.0/refreshToken?thirdPartyChannel=1
+  getUsers: https://third-party-api.chehezhi.cn/pivot/tenant-mgr/1.0/getUsers?thirdPartyChannel=1
+  appId: HOZON-B-8STZ7NdY
+  appKey: 20a24e73c49bc39b6650b5e4d6a99e04d11ee29785bae59c992ed9ec233c4ba5
+  appSecret: cb6acc7f9a0b2e50b6db766e2f5c7e379af0c3c312d02cfb79ca6211c92a674f
+  url: /pivot/tenant-mgr/1.0/getUsers
+  mail:
+    defaultSender: bigdata-analysis-report@hozonauto.com
+    linkUrl: http://fast-fun.cn/
+    title: 这个是邮件标题
+  voice:
+    #语音模板 需要阿里云上配置
+    accessKeyId: LTAI5tD1tgcm8HPGEmnFmQ1u
+    accessKeySecret: ch4SOvccw47hz4Pvjk7jOsXxbF1cpW
+    tts: TTS_237560732
+  sms:
+    accessKeyId: LTAI5tGVTxDCb2LSkKBAL5W3
+    accessKeySecret: 1mJYXI0AyIsdaVrRy34pA8kzT3nQT6
+    endpoint: dysmsapi.aliyuncs.com
+    signName: 合众汽车
+    templateCode: SMS_237570527
+
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8082
+  port: 8082
+  servlet:
+    # 应用的访问路径
+    context-path: /hz
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # tomcat最大线程数,默认为200
+    max-threads: 800
+    # Tomcat启动初始化的线程数,默认值25
+    min-spare-threads: 30
+
+# 日志配置
+logging:
+  level:
+    com.hz: debug
+    org.springframework: warn
+
+# Spring配置
+spring:
+  main:
+    allow-circular-references: true
+    allow-bean-definition-overriding: true
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+#    url: jdbc:mysql://rm-uf61ej5p480z004h2.mysql.rds.aliyuncs.com:3306/db_lidian?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&tinyInt1isBit=false
+#    username: u_zhili
+#    password: HnIpTQo9Yv&lQxKuF
+    url: jdbc:mysql://192.168.0.40:3306/hz_ys?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&tinyInt1isBit=false
+    username: root
+    password: Qx123456
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  # 文件上传
+  servlet:
+    multipart:
+      # 单个文件大小
+      max-file-size:  200MB
+      # 设置总上传的文件大小
+      max-request-size:  200MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: false
+  # redis 配置
+  redis:
+    # 地址
+    host: 192.168.0.43
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码 123456
+    password:
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms
+
+  mail:
+    default-encoding: UTF-8
+    host: smtp.hozonauto.com
+    password: LSDlei123bigdata
+    protocol: smtp
+    test-connection: false
+    username: bigdata-analysis-report@hozonauto.com
+    port: 465
+    properties:
+      mail:
+        smtp:
+          port: 465
+          auth: true
+          ssl:
+            enable: true
+  thymeleaf:
+    cache: false
+    check-template-location: true
+    encoding: UTF-8
+    mode: HTML
+    prefix: classpath:/templates/
+    servlet:
+      content-type: text/html
+    suffix: .html
+# token配置
+token:
+  # 令牌自定义标识
+  header: Authorization
+  # 令牌密钥
+  secret: abcdefghijklmnopqrstuvwxyz
+  # 令牌有效期(默认30分钟)
+  expireTime: 1000
+
+# MyBatis配置
+mybatis-plus:
+  mapper-locations: mapper/system/*.xml,mapper/quartz/*.xml,mapper/generator/*.xml,mapper/business/*.xml
+  typeAliasesPackage: com.hz.**.domain
+  global-config:
+    banner: false
+  configuration:
+    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+
+
+# PageHelper分页插件
+pagehelper:
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: false
+  # 请求前缀
+  #  pathMapping: /dev-api
+  pathMapping:
+
+# 防止XSS攻击
+xss:
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*
+
+qyapi:
+  agentid: 1000006
+  corpid: wwdccc977d110e91cc
+  corpsecret: U6X4LTwSS61CQCgBmKSTs67TEp5tFo4OHY3NoISqqDE
+
+
+ok:
+  http:
+    connect-timeout: 60
+    read-timeout: 60
+    write-timeout: 60
+    # 连接池中整体的空闲连接的最大数量
+    max-idle-connections: 200
+    # 连接空闲时间最多为 300 秒
+    keep-alive-duration: 300
+
+lindorm:
+  url: jdbc:lindorm:table:url=http://ld-uf625g146ox78yz76-proxy-hbaseue.hbaseue.rds.aliyuncs.com:30060
+  lindormUser: user
+  database: vehicle_analysis
+  lindormPassword: password
+  userName: root
+  password: root
+  talbeName: ods_signal_base
+  ascDataBase: vehicle_analysis
+  behaviorTable: algo_energy_ana_day
+  #电池续驶里程算法表
+  batteryTable: algo_driving_mileage
+  #周均能耗
+  energyTable: tb_ads_persona_drive_energy_wek
+  # 用户充电习惯行为数据
+  chargeTableOne: dw_batt_persona_charge_behavior_di
+  # 用户充电习惯行为数据
+  chargeTableTwo: dw_batt_persona_charge_behavior_his_df
+  # 用户驾驶习惯行为数据
+  driveOne: dw_batt_persona_drive_behavior_di
+  # 用户驾驶习惯行为数据
+  driveTwo: dw_batt_persona_drive_behavior_his_df
+
+oos:
+  endpoint: oss-cn-shanghai.aliyuncs.com
+  keyId: LTAI5tJcGiTjFfBQBN3HqLt7
+  keySecret: znqdCZsCIZCabgQ1UcPy6fQeTVfMUk
+  bucketName: hozon-zhili-prd
+  fileHost: ocv-soc
+  asc: asc
+  dbc: dbc
+  domain: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com
+  modelFilePath: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/OCV-SOC模板.xlsx
+  cellModelPath: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/volt_temp_template.xlsx
+  vinModelPath: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/import-vin-template.xlsx
+  bigData: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/manual/大数据分析.pdf
+  battery: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/manual/电池管理.pdf
+  fault: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/manual/故障管理.pdf
+  user: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/manual/用户手册.pdf
+  mysqlFile: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/manual/表结构文档.docx
+  interfaceFile: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/manual/数据源数据接口文档模板.docx
+  userChartFile: https://hozon-zhili-prd.oss-cn-shanghai.aliyuncs.com/manual/用户画像图表内容说明.docx
+
+algo:
+  #  dbcUrl: http://172.16.63.37:8088/parse_dbc
+  dbcUrl: http://algo-dbcparse:8088/parse_dbc
+
+#ftp:
+#  ip: nas.fast-fun.cn
+#  port: 20
+#  user: qx
+#  pass: qx500

+ 263 - 0
hz-admin/src/main/resources/application-test.yml

@@ -0,0 +1,263 @@
+# 项目相关配置
+hz:
+  # 名称
+  name: hz
+  # 版本
+  version: 3.6.0
+  # 版权年份
+  copyrightYear: 2021
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/hz/uploadPath,Linux配置 /home/hz/uploadPath)
+  profile: /home/uploadPath
+#  profile: D:/file
+#  profile: D:/hz/uploadPath
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+  checkToken: https://backend-api-uat.chehezhi.cn/pivot/tenant-mgr/1.0/checkToken?thirdPartyChannel=1
+  refreshToken: https://backend-api-uat.chehezhi.cn/pivot/auth-mgr/1.0/refreshToken?thirdPartyChannel=1
+#  getUsers: https://third-party-api-uat.chehezhi.cn/pivot/tenant-mgr/1.0/getUsers
+  getUsers: https://third-party-api-uat.carobo.cn/pivot/tenant-mgr/1.0/getUsers?thirdPartyChannel=1
+  appId: HOZON-B-enBtoI7E
+  appKey: ec0828775828db4de85f6c50097ddf04f40d52a7996479417bfaf6b3f9cebef5
+  appSecret: 5d2b73261097bda4bc9b235e0781343529fd42afdd5fb8bbb07d6798e62d8992
+  url: /pivot/tenant-mgr/1.0/getUsers
+
+  mail:
+    defaultSender: bigdata-analysis-report@hozonauto.com
+    linkUrl: http://fast-fun.cn/
+    title: 这个是邮件标题
+  voice:
+    #语音模板 需要阿里云上配置
+    accessKeyId: LTAI5tD1tgcm8HPGEmnFmQ1u
+    accessKeySecret: ch4SOvccw47hz4Pvjk7jOsXxbF1cpW
+    tts: TTS_237560732
+  sms:
+    accessKeyId: LTAI5tGVTxDCb2LSkKBAL5W3
+    accessKeySecret: 1mJYXI0AyIsdaVrRy34pA8kzT3nQT6
+    endpoint: dysmsapi.aliyuncs.com
+    signName: 合众汽车
+    templateCode: SMS_237570527
+
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8082
+  port: 8082
+  servlet:
+    # 应用的访问路径
+    context-path: /hz
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # tomcat最大线程数,默认为200
+    max-threads: 800
+    # Tomcat启动初始化的线程数,默认值25
+    min-spare-threads: 30
+
+# 日志配置
+logging:
+  level:
+    com.hz: debug
+    org.springframework: warn
+
+# Spring配置
+spring:
+  main:
+    allow-circular-references: true
+    allow-bean-definition-overriding: true
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://rm-uf6bt29r702r14jh4.mysql.rds.aliyuncs.com:3306/db_lidian?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&tinyInt1isBit=false
+    username: u_devlid
+    password: EgL#EuQOlRqGml
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  # 文件上传
+  servlet:
+     multipart:
+       # 单个文件大小
+       max-file-size:  200MB
+       # 设置总上传的文件大小
+       max-request-size:  200MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: true
+  # redis 配置
+  redis:
+    # 地址
+    host: r-uf64s8vthelp3a9fhi.redis.rds.aliyuncs.com
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码 123456
+    password: QkNtEheRF*RqJvM
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms
+
+  mail:
+    default-encoding: UTF-8
+    host: smtp.hozonauto.com
+    password: LSDlei123bigdata
+    protocol: smtp
+    test-connection: false
+    username: bigdata-analysis-report@hozonauto.com
+    port: 465
+    properties:
+      mail:
+        smtp:
+          port: 465
+          auth: true
+          ssl:
+            enable: true
+  thymeleaf:
+    cache: false
+    check-template-location: true
+    encoding: UTF-8
+    mode: HTML
+    prefix: classpath:/templates/
+    servlet:
+      content-type: text/html
+    suffix: .html
+
+#  application:
+#      name: hz
+#management:
+#  endpoints:
+#    web:
+#      exposure:
+#        include: "*"
+#  metrics:
+#    tags:
+#      application: ${spring.application.name}
+
+# token配置
+token:
+    # 令牌自定义标识
+    header: Authorization
+    # 令牌密钥
+    secret: abcdefghijklmnopqrstuvwxyz
+    # 令牌有效期(默认30分钟)
+    expireTime: 1000
+
+# MyBatis配置
+mybatis-plus:
+  mapper-locations: mapper/system/*.xml,mapper/quartz/*.xml,mapper/generator/*.xml,mapper/business/*.xml
+  typeAliasesPackage: com.hz.**.domain
+  global-config:
+    banner: false
+  configuration:
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+
+# PageHelper分页插件
+pagehelper:
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: true
+  # 请求前缀
+#  pathMapping: /dev-api
+  pathMapping:
+
+# 防止XSS攻击
+xss:
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*
+
+qyapi:
+  agentid: 1000006
+  corpid: wwdccc977d110e91cc
+  corpsecret: U6X4LTwSS61CQCgBmKSTs67TEp5tFo4OHY3NoISqqDE
+
+
+ok:
+  http:
+    connect-timeout: 60
+    read-timeout: 60
+    write-timeout: 60
+    # 连接池中整体的空闲连接的最大数量
+    max-idle-connections: 200
+    # 连接空闲时间最多为 300 秒
+    keep-alive-duration: 300
+
+lindorm:
+  url: jdbc:lindorm:table:url=http://ld-uf69n0762fjx616l6-proxy-hbaseue.hbaseue.rds.aliyuncs.com:30060
+  lindormUser: user
+  database: test
+  lindormPassword: password
+  userName: root
+  password: root
+  talbeName: ods_signal_base
+  ascDataBase: test
+  behaviorTable: algo_energy_ana_day
+  #电池续驶里程算法表
+  batteryTable: algo_driving_mileage
+  #周均能耗
+  energyTable: tb_ads_persona_drive_energy_wek
+  # 用户充电习惯行为数据
+  chargeTableOne: dw_batt_persona_charge_behavior_di
+  # 用户充电习惯行为数据
+  chargeTableTwo: dw_batt_persona_charge_behavior_his_df
+  # 用户驾驶习惯行为数据
+  driveOne: dw_batt_persona_drive_behavior_di
+  # 用户驾驶习惯行为数据
+  driveTwo: dw_batt_persona_drive_behavior_his_df
+
+
+oos:
+  endpoint: oss-cn-shanghai.aliyuncs.com
+  keyId: LTAI5tJcGiTjFfBQBN3HqLt7
+  keySecret: znqdCZsCIZCabgQ1UcPy6fQeTVfMUk
+  bucketName: hozon-zhili-dev
+  fileHost: ocv-soc
+  asc: asc
+  dbc: dbc
+  domain: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com
+  modelFilePath: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/OCV-SOC模板.xlsx
+  cellModelPath: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/volt_temp_template.xlsx
+  vinModelPath: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/import-vin-template.xlsx
+  bigData: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/manual/大数据分析.pdf
+  battery: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/manual/电池管理.pdf
+  fault: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/manual/故障管理.pdf
+  user: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/manual/用户手册.pdf
+  mysqlFile: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/manual/表结构文档.docx
+  interfaceFile: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/manual/数据源数据接口文档模板.docx
+  userChartFile: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/manual/用户画像图表内容说明.docx
+
+algo:
+  dbcUrl: http://dbcparse:8088/parse_dbc
+
+project:
+  boss-token: 2A26DD0ADE53456D928562A17131A3B5
+
+#ftp:
+#  ip: nas.fast-fun.cn
+#  port: 20
+#  user: qx
+#  pass: qx500

+ 303 - 0
hz-admin/src/main/resources/application.yml

@@ -0,0 +1,303 @@
+# 项目相关配置
+hz:
+  # 名称
+  name: hz
+  # 版本
+  version: 3.6.0
+  # 版权年份
+  copyrightYear: 2022
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/hz/uploadPath,Linux配置 /home/hz/uploadPath)
+  profile: D:/hz/uploadPath
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+
+  checkToken: https://backend-api-uat.chehezhi.cn/pivot/tenant-mgr/1.0/checkToken
+  refreshToken: https://backend-api-uat.chehezhi.cn/pivot/auth-mgr/1.0/refreshToken
+  getUsers: https://third-party-api-uat.carobo.cn/pivot/tenant-mgr/1.0/getUsers
+  appId: HOZON-B-enBtoI7E
+  appKey: ec0828775828db4de85f6c50097ddf04f40d52a7996479417bfaf6b3f9cebef5
+  appSecret: 5d2b73261097bda4bc9b235e0781343529fd42afdd5fb8bbb07d6798e62d8992
+  url: /pivot/tenant-mgr/1.0/getUsers
+
+#  checkToken: https://backend-api.chehezhi.cn/pivot/tenant-mgr/1.0/checkToken
+#  refreshToken: https://backend-api.chehezhi.cn/pivot/auth-mgr/1.0/refreshToken
+#  getUsers: https://third-party-api.chehezhi.cn/pivot/tenant-mgr/1.0/getUsers
+#  appId: HOZON-B-8STZ7NdY
+#  appKey: 20a24e73c49bc39b6650b5e4d6a99e04d11ee29785bae59c992ed9ec233c4ba5
+#  appSecret: cb6acc7f9a0b2e50b6db766e2f5c7e379af0c3c312d02cfb79ca6211c92a674f
+#  url: /pivot/tenant-mgr/1.0/getUsers
+
+  mail:
+    defaultSender: zsoneyearhfj@163.com
+#    defaultSender: bigdata-analysis-report@hozonauto.com
+    linkUrl: http://fast-fun.cn/
+    title: 这个是邮件标题
+  voice:
+    #语音模板 需要阿里云上配置
+    accessKeyId: LTAI5tD1tgcm8HPGEmnFmQ1u
+    accessKeySecret: ch4SOvccw47hz4Pvjk7jOsXxbF1cpW
+    tts: TTS_237560732
+  sms:
+    accessKeyId: LTAI5tGVTxDCb2LSkKBAL5W3
+    accessKeySecret: 1mJYXI0AyIsdaVrRy34pA8kzT3nQT6
+    endpoint: dysmsapi.aliyuncs.com
+    signName: 合众汽车
+    templateCode: SMS_237570527
+
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8080
+  port: 8082
+  servlet:
+    # 应用的访问路径
+    context-path: /hz
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # tomcat最大线程数,默认为200
+    max-threads: 800
+    # Tomcat启动初始化的线程数,默认值25
+    min-spare-threads: 30
+
+# 日志配置
+logging:
+  level:
+    com.hz: debug
+    org.springframework: warn
+
+# Spring配置
+spring:
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+#    url: jdbc:mysql://rm-uf61ej5p480z004h2.mysql.rds.aliyuncs.com:3306/db_lidian?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&tinyInt1isBit=false
+#    username: u_zhili
+#    password: HnIpTQo9Yv&lQxKuF
+#    url: jdbc:mysql://rm-uf6bt29r702r14jh4.mysql.rds.aliyuncs.com:3306/db_lidian?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&tinyInt1isBit=false
+#    username: u_devlid
+#    password: EgL#EuQOlRqGml
+    url: jdbc:mysql://rm-bp10j10qy42bzy0q77o.mysql.rds.aliyuncs.com/hz_dev?useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&tinyInt1isBit=false
+    username: hz_dev
+    password: Qx@123456
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  profiles:
+    active: ${PRO_ENV:prod}
+  # 文件上传
+  servlet:
+     multipart:
+       # 单个文件大小
+       max-file-size:  200MB
+       # 设置总上传的文件大小
+       max-request-size:  200MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: true
+  # redis 配置
+  redis:
+    # 地址
+    host: 192.168.0.41
+#    host: localhost
+#    host: r-uf64s8vthelp3a9fhi.redis.rds.aliyuncs.com
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码 123456
+    password:
+#    password: QkNtEheRF*RqJvM
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms
+
+  mail:
+    default-encoding: UTF-8
+    host: smtp.163.com
+#    host: smtp.hozonauto.com
+    password: OQQFMTHNYBBUVCOG
+#    password: eJnjcpVv1cZw5RNf
+    protocol: smtp
+    test-connection: true
+    username: zsoneyearhfj@163.com
+#    username: bigdata-analysis-report@hozonauto.com
+    port: 465
+    properties:
+      mail:
+        smtp:
+          port: 465
+          auth: true
+          ssl:
+            enable: true
+  thymeleaf:
+    cache: false
+    check-template-location: true
+    encoding: UTF-8
+    mode: HTML
+    prefix: classpath:/templates/
+    servlet:
+      content-type: text/html
+    suffix: .html
+
+#  kafka:
+#    bootstrap-servers: 192.168.0.151:9092
+#    producer: #生产者
+#      # 发生错误后,消息重发的次数。重试1次,此值需要结合业务场景,重试与否各有千秋
+#      # (重试,好处:尽可能的确保生产者写入block成功;坏处:有可能时带有顺序写入的数据打乱顺序
+#      #比如:依次写入数据 1/2/3,但写入1时因网络异常,进行了重写,结果落到block的数据成了2/3/1)
+#      retries: 3
+#      #当有多个消息需要被发送到同一个分区时,生产者会把它们放在同一个批次里。该参数指定了一个批次可以使用的内存大小,按照字节数计算。模式时16k
+#      batch-size: 16384 #16k
+#      # 设置生产者内存缓冲区的大小
+#      buffer-memory: 33554432
+#      acks: 1
+#      # 键的序列化方式
+#      key-serializer: org.apache.kafka.common.serialization.StringSerializer
+#      # 值的序列化方式
+#      value-serializer: org.apache.kafka.common.serialization.StringSerializer
+#
+#    consumer:
+#      group-id: default-group # 消费者组
+#      # 自动提交的时间间隔 在spring boot 2.X 版本中这里采用的是值的类型为Duration 需要符合特定的格式,如1S,1M,2H,5D.此属性只有在enable-auto-commit:true时生效
+#      auto-commit-interval: 1S
+#      enable-auto-commit: false # 关闭自动提交
+#      # 该属性指定了消费者在读取一个没有偏移量的分区或者偏移量无效的情况下该作何处理:
+#      # latest(默认值)在偏移量无效的情况下,消费者将从最新的记录开始读取数据(在消费者启动之后生成的记录)
+#      # earliest :在偏移量无效的情况下,消费者将从起始位置读取分区的记录
+#      auto-offset-reset: earliest
+#      # 键的反序列化方式
+#      key-deserializer: org.apache.kafka.common.serialization.StringSerializer
+#      # 值的反序列化方式
+#      value-deserializer: org.apache.kafka.common.serialization.StringSerializer
+#
+#    listener:
+#      # 当每一条记录被消费者监听器(ListenerConsumer)处理之后提交
+#      # RECORD
+#      # 当每一批poll()的数据被消费者监听器(ListenerConsumer)处理之后提交
+#      # BATCH
+#      # 当每一批poll()的数据被消费者监听器(ListenerConsumer)处理之后,距离上次提交时间大于TIME时提交
+#      # TIME
+#      # 当每一批poll()的数据被消费者监听器(ListenerConsumer)处理之后,被处理record数量大于等于COUNT时提交
+#      # COUNT
+#      # TIME | COUNT 有一个条件满足时提交
+#      # COUNT_TIME
+#      # 当每一批poll()的数据被消费者监听器(ListenerConsumer)处理之后, 手动调用Acknowledgment.acknowledge()后提交
+#      # MANUAL
+#      # 手动调用Acknowledgment.acknowledge()后立即提交,一般使用这种
+#      # MANUAL_IMMEDIATE
+#      ack-mode: manual_immediate
+#      # 在侦听器容器中运行的线程数
+#      concurrency: 5
+
+
+# token配置
+token:
+    # 令牌自定义标识
+    header: Authorization
+    # 令牌密钥
+    secret: abcdefghijklmnopqrstuvwxyz
+    # 令牌有效期(默认30分钟)
+    expireTime: 1000
+  
+# MyBatis配置
+mybatis-plus:
+  mapper-locations: mapper/system/*.xml,mapper/quartz/*.xml,mapper/generator/*.xml,mapper/business/*.xml
+  typeAliasesPackage: com.hz.**.domain
+  global-config:
+    banner: false
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+# PageHelper分页插件
+pagehelper:
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql
+
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: true
+  # 请求前缀
+#  pathMapping: /dev-api
+  pathMapping:
+
+# 防止XSS攻击
+xss: 
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*
+
+qyapi:
+  agentid: 1000006
+  corpid: wwdccc977d110e91cc
+  corpsecret: U6X4LTwSS61CQCgBmKSTs67TEp5tFo4OHY3NoISqqDE
+
+
+ok:
+  http:
+    connect-timeout: 60
+    read-timeout: 60
+    write-timeout: 60
+    # 连接池中整体的空闲连接的最大数量
+    max-idle-connections: 200
+    # 连接空闲时间最多为 300 秒
+    keep-alive-duration: 300
+
+lindorm:
+  url: jdbc:lindorm:table:url=http://ld-bp16866o8uwo0a590-proxy-lindorm-pub.lindorm.rds.aliyuncs.com:30060
+  lindormUser: user
+  database: test
+  lindormPassword: password
+  userName: root
+  password: root
+  talbeName: ods_signal_new
+  ascDataBase: offline_analysis
+  behaviorTable: algo_energy_ana_day
+  #电池续驶里程算法表
+  batteryTable: algo_driving_mileage
+  #周均能耗
+  energyTable: tb_ads_persona_drive_energy_wek
+
+
+oos:
+  endpoint: oss-cn-hangzhou.aliyuncs.com
+  keyId: LTAI4FyoDnXMjqd78rdRDFHN
+  keySecret: sdFl6vjM9l2rvWiUTzuFQb2xqjUoY5
+  bucketName: ff-hezhong
+  fileHost: ocv-soc
+  asc: asc
+  dbc: dbc
+  domain: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/
+  modelFilePath: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/ocv-soc/templates/OCV-SOC模板.xlsx
+  cellModelPath: https://hozon-zhili-dev.oss-cn-shanghai.aliyuncs.com/ocv-soc/templates/volt_temp_template.xlsx
+  bigData: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/manual/大数据分析.pdf
+  battery: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/manual/电池管理.pdf
+  fault: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/manual/故障管理.pdf
+  user: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/manual/用户手册.pdf
+  mysqlFile: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/manual/表结构文档.docx
+  interfaceFile: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/manual/数据源数据接口文档模板.docx
+  userChartFile: https://ff-hezhong.oss-cn-hangzhou.aliyuncs.com/manual/用户画像图表内容说明.docx
+
+algo:
+  dbcUrl: http://zxqwlm.tpddns.cn:8088/parse_dbc

+ 28 - 0
hz-admin/src/main/resources/banner.txt

@@ -0,0 +1,28 @@
+Application Version: ${hz.version}
+Spring Boot Version: ${spring-boot.version}
+
+                  000000                            00000
+      000         000000000                      000000000          00
+     0000000000      000000000                000000000      0000000000
+      0000000000000     00000000            00000000    00000000000000
+              000000000    00000000      00000000    000000000
+                  00000000    0000000000000000    00000000
+            0000     0000000    000000000000    0000000     00000
+           00000000     000000    000000000   000000    000000000
+              00000000    000000   000000   000000    00000000
+                  000000    000000   000   00000    000000
+                   0000000   000000       00000   0000000
+                     000000    00000    000000   000000
+                       000000   00000  00000   000000
+                        000000   0000000000   000000
+                          00000   000000000  00000
+                           0000   00000000   0000
+                           00000   000000   00000
+                           000000  000000   0000
+                            00000  000000  00000
+                            00000   0000   00000
+                                    0000
+                                    0000
+                                     000
+                                     00
+                                      0

+ 37 - 0
hz-admin/src/main/resources/i18n/messages.properties

@@ -0,0 +1,37 @@
+#错误消息
+not.null=* 必须填写
+user.jcaptcha.error=验证码错误
+user.jcaptcha.expire=验证码已失效
+user.not.exists=用户不存在/密码错误
+user.password.not.match=用户不存在/密码错误
+user.password.retry.limit.count=密码输入错误{0}次
+user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
+user.password.delete=对不起,您的账号已被删除
+user.blocked=用户已封禁,请联系管理员
+role.blocked=角色已封禁,请联系管理员
+user.logout.success=退出成功
+
+length.not.valid=长度必须在{min}到{max}个字符之间
+
+user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
+user.password.not.valid=* 5-50个字符
+ 
+user.email.not.valid=邮箱格式错误
+user.mobile.phone.number.not.valid=手机号格式错误
+user.login.success=登录成功
+user.register.success=注册成功
+user.notfound=请重新登录
+user.forcelogout=管理员强制退出,请重新登录
+user.unknown.error=未知错误,请重新登录
+
+##文件上传消息
+upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
+upload.filename.exceed.length=上传的文件名最长{0}个字符
+
+##权限
+no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
+no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
+no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
+no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
+no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
+no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]

+ 93 - 0
hz-admin/src/main/resources/logback.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <!-- 日志存放路径 -->
+	<property name="log.path" value="/home/hz/logs" />
+    <!-- 日志输出格式 -->
+	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
+
+	<!-- 控制台输出 -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+	</appender>
+	
+	<!-- 系统日志输出 -->
+	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/sys-info.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+			<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>INFO</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+	</appender>
+	
+	<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/sys-error.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>ERROR</level>
+			<!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+			<!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+	
+	<!-- 用户访问日志输出  -->
+    <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/sys-user.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 按天回滚 daily -->
+            <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+	
+	<!-- 系统模块日志级别控制  -->
+	<logger name="com.hz" level="info" />
+	<!-- Spring日志级别控制  -->
+	<logger name="org.springframework" level="warn" />
+
+	<root level="info">
+		<appender-ref ref="console" />
+	</root>
+	
+	<!--系统操作日志-->
+    <root level="info">
+        <appender-ref ref="file_info" />
+        <appender-ref ref="file_error" />
+    </root>
+	
+	<!--系统用户操作日志-->
+    <logger name="sys-user" level="info">
+        <appender-ref ref="sys-user"/>
+    </logger>
+</configuration> 

+ 15 - 0
hz-admin/src/main/resources/mybatis/mybatis-config.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+	
+	<settings>
+		<setting name="cacheEnabled"             value="true" />  <!-- 全局映射器启用缓存 -->
+		<setting name="useGeneratedKeys"         value="true" />  <!-- 允许 JDBC 支持自动生成主键 -->
+		<setting name="defaultExecutorType"      value="REUSE" /> <!-- 配置默认的执行器 -->
+		<setting name="logImpl"                  value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
+		<!-- <setting name="mapUnderscoreToCamelCase" value="true"/>  驼峰式命名 -->
+	</settings>
+	
+</configuration>

+ 21 - 0
hz-admin/src/main/resources/templates/excelTemplate.html

@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+<p style="text-indent:2em">
+    <span>
+        [(${processPathMsg.detail!=null}?${processPathMsg.detail})]
+    </span>
+</p>
+<br>
+<p style="text-indent:2em">
+            <span>
+                请下载附件查看
+            </span>
+    <br>
+</p>
+</body>
+</html>

+ 23 - 0
hz-admin/src/main/resources/templates/mailTemplate.html

@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+<p style="text-indent:2em">
+    <span>
+    产品:[(${processPathMsg.sn!=null}?${processPathMsg.sn})],故障等级:[(${processPathMsg.level!=null}?${processPathMsg.level})],故障代码:[(${processPathMsg.code!=null}?${processPathMsg.code})],问题描述:[(${processPathMsg.detail!=null}?${processPathMsg.detail})]
+    </span>
+</p>
+<br>
+<p style="text-indent:2em">
+            <span>
+                请登录"整车预警监控与性能分析平台"查看。
+            </span>
+    <br>
+</p>
+</body>
+
+</html>

+ 23 - 0
hz-admin/src/main/resources/templates/reportEmailTemplate.html

@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+<p style="text-indent:2em">
+    <span>
+    [(${processPathMsg.detail!=null}?${processPathMsg.detail})]
+    </span>
+</p>
+<br>
+<p style="text-indent:2em">
+    <span>
+        请登录"整车预警监控与性能分析平台"查看。
+    </span>
+    <br>
+</p>
+</body>
+
+</html>

+ 23 - 0
hz-admin/src/main/resources/templates/reportTemplate.html

@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+<p style="text-indent:2em">
+    <span>
+    [(${processPathMsg.detail!=null}?${processPathMsg.detail})]
+    </span>
+</p>
+<br>
+<p style="text-indent:2em">
+    <span>
+        请登录"整车预警监控与性能分析平台"查看。
+    </span>
+    <br>
+</p>
+</body>
+
+</html>

+ 118 - 0
hz-business/pom.xml

@@ -0,0 +1,118 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>hz</artifactId>
+        <groupId>com.hz</groupId>
+        <version>3.6.0</version>
+    </parent>
+    <groupId>com.hz</groupId>
+    <artifactId>business</artifactId>
+ <version>3.6.0</version>
+    <name>business</name>
+    <description>Demo project for Spring Boot</description>
+    <properties>
+        <java.version>1.8</java.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-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- 通用工具-->
+        <dependency>
+            <groupId>com.hz</groupId>
+            <artifactId>hz-common</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.hz</groupId>
+            <artifactId>hz-system</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>2.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>1.2.8</version>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun.lindorm</groupId>
+            <artifactId>lindorm-all-client</artifactId>
+            <version>2.0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>5.1.35</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>7.6.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka -->
+        <dependency>
+            <groupId>org.springframework.kafka</groupId>
+            <artifactId>spring-kafka</artifactId>
+            <version>2.8.6</version>
+        </dependency>
+
+        <!-- hbaseClient依赖 -->
+        <dependency>
+            <groupId>org.apache.phoenix</groupId>
+            <artifactId>phoenix-queryserver-client</artifactId>
+            <version>5.0.0-HBase-2.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 18 - 0
hz-business/src/main/java/com/hz/business/BusinessApplication.java

@@ -0,0 +1,18 @@
+package com.hz.business;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+/**
+ * @author user
+ */
+@SpringBootApplication
+@EnableScheduling
+public class BusinessApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(BusinessApplication.class, args);
+    }
+
+}

+ 43 - 0
hz-business/src/main/java/com/hz/business/base/BaseAlarmWindowVo.java

@@ -0,0 +1,43 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className BaseAlarmWindowVo 故障小窗口
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseAlarmWindowVo implements Serializable {
+
+    @ApiModelProperty("窗口名称")
+    private String title;
+
+    @ApiModelProperty("故障编码")
+    private String code;
+
+    @ApiModelProperty("窗口序列号")
+    private Integer windowIndex;
+
+    @ApiModelProperty("故障数量")
+    private BigDecimal faultCount;
+
+    @ApiModelProperty("故障车数量")
+    private BigDecimal carCount;
+
+    @ApiModelProperty("故障数量排名")
+    private Integer index;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModelProperty("故障级别")
+    private Integer faultLevel;
+
+    @ApiModelProperty("故障类型")
+    private Integer faultType;
+}

+ 24 - 0
hz-business/src/main/java/com/hz/business/base/BaseCycleChartFloatVo.java

@@ -0,0 +1,24 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className BaseCycleChartVo 环状图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseCycleChartFloatVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("名称")
+    private String name;
+    @ApiModelProperty("数量")
+    private Double count;
+    @ApiModelProperty("百分比,保留两位小数")
+    private BigDecimal percent;
+}

+ 24 - 0
hz-business/src/main/java/com/hz/business/base/BaseCycleChartVo.java

@@ -0,0 +1,24 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className BaseCycleChartVo 环状图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseCycleChartVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("名称")
+    private String name;
+    @ApiModelProperty("数量")
+    private Long count;
+    @ApiModelProperty("百分比,保留两位小数")
+    private BigDecimal percent;
+}

+ 31 - 0
hz-business/src/main/java/com/hz/business/base/BaseExportExcelStringVo.java

@@ -0,0 +1,31 @@
+package com.hz.business.base;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className BaseCycleChartVo 环状图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseExportExcelStringVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ExcelProperty( value = "日期时间",index = 0)
+    @ApiModelProperty("日期时间")
+    @ColumnWidth(20)
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private String time;
+
+    @ColumnWidth(40)
+    @ExcelProperty( value = "数据",index = 1)
+    @ApiModelProperty("数据")
+    private String data;
+}

+ 32 - 0
hz-business/src/main/java/com/hz/business/base/BaseExportExcelVo.java

@@ -0,0 +1,32 @@
+package com.hz.business.base;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className BaseCycleChartVo 环状图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseExportExcelVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ExcelProperty( value = "日期时间",index = 0)
+    @ApiModelProperty("日期时间")
+    @ColumnWidth(20)
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private String time;
+
+    @ColumnWidth(20)
+    @ExcelProperty( value = "${title}",index = 1)
+    @ApiModelProperty("数据")
+    private BigDecimal quantity;
+
+}

+ 22 - 0
hz-business/src/main/java/com/hz/business/base/BaseKilometreLineChartVo.java

@@ -0,0 +1,22 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className BasePieChartVo 饼图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseKilometreLineChartVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "公里数")
+    private Integer kilometre;
+    @ApiModelProperty(value = "各类数值")
+    private List<KilometreCountVo> kindList;
+}

+ 24 - 0
hz-business/src/main/java/com/hz/business/base/BaseLineChartOdoVo.java

@@ -0,0 +1,24 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className BaseLineChartOdoVo
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseLineChartOdoVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "横轴")
+    private List<BigDecimal> horizontalAxis;
+
+    @ApiModelProperty(value = "各类数值")
+    private List<KindFloatValueListVo> kindList;
+}

+ 26 - 0
hz-business/src/main/java/com/hz/business/base/BaseLineChartVo.java

@@ -0,0 +1,26 @@
+package com.hz.business.base;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className BaseLineChartVo
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseLineChartVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "时间轴")
+    @JsonFormat(pattern = "yyyy-MM-dd 00:00:00", timezone = "GMT+8")
+    private List<String> timeAxis;
+
+    @ApiModelProperty(value = "各类数值")
+    private List<KindValueListVo> kindList;
+}

+ 24 - 0
hz-business/src/main/java/com/hz/business/base/BaseLineFloatChartVo.java

@@ -0,0 +1,24 @@
+package com.hz.business.base;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className BasePieChartVo 饼图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseLineFloatChartVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "时间轴")
+    @JsonFormat(pattern = "yyyy-MM-dd 00:00:00", timezone = "GMT+8")
+    private List<String> timeAxis;
+    @ApiModelProperty(value = "各类数值")
+    private List<KindFloatValueListVo> kindList;
+}

+ 28 - 0
hz-business/src/main/java/com/hz/business/base/BaseObjectLineChartVo.java

@@ -0,0 +1,28 @@
+package com.hz.business.base;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className BasePieChartVo 饼图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseObjectLineChartVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "时间轴")
+    @JsonFormat(pattern = "yyyy-MM-dd 00:00:00", timezone = "GMT+8")
+    private List<String> timeAxis;
+
+    @ApiModelProperty(value = "名称")
+    private String title;
+
+    @ApiModelProperty(value = "各类数值")
+    private List<KindObjectListVo> kindList;
+}

+ 27 - 0
hz-business/src/main/java/com/hz/business/base/BasePieChartVo.java

@@ -0,0 +1,27 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author zyg
+ * @className BasePieChartVo 饼图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BasePieChartVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("横坐标")
+    private Date abscissa;
+    @ApiModelProperty("名称")
+    private String name;
+    @ApiModelProperty("数量")
+    private Long count;
+    @ApiModelProperty("百分比,保留两位小数")
+    private BigDecimal percent;
+}

+ 22 - 0
hz-business/src/main/java/com/hz/business/base/BaseProjectExportExcelVo.java

@@ -0,0 +1,22 @@
+package com.hz.business.base;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className BaseCycleChartVo 环状图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseProjectExportExcelVo extends BaseExportExcelVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+    private String project;
+}

+ 31 - 0
hz-business/src/main/java/com/hz/business/base/BaseWindowDataVo.java

@@ -0,0 +1,31 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className BaseCycleChartVo 环状图基础数据类
+ * @date 2022年01月12日 9:37
+ */
+@Data
+public class BaseWindowDataVo implements Serializable{
+
+    @ApiModelProperty("名称")
+    private String name;
+
+    @ApiModelProperty("描述")
+    private String describe;
+
+    @ApiModelProperty("数量")
+    private BigDecimal count;
+
+    @ApiModelProperty("百分比,保留两位小数,例20%")
+    private BigDecimal percent;
+
+    @ApiModelProperty("排序")
+    private Integer rankOrder;
+}

+ 23 - 0
hz-business/src/main/java/com/hz/business/base/BehaviorValueVo.java

@@ -0,0 +1,23 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.poi.ss.formula.functions.T;
+
+import java.util.List;
+
+/**
+ * @author jek
+ * 用户行为概览返回对象
+ */
+@Data
+public class BehaviorValueVo {
+    @ApiModelProperty(value = "x轴")
+    private List<String> x;
+
+    @ApiModelProperty(value = "y轴")
+    private List<String> y;
+
+    @ApiModelProperty(value = "热力图v值")
+    private String v;
+}

+ 22 - 0
hz-business/src/main/java/com/hz/business/base/DateValueVo.java

@@ -0,0 +1,22 @@
+package com.hz.business.base;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author zyg
+ * @className PageParam
+ * @date 2021年11月24日 16:08
+ */
+@Data
+public class DateValueVo {
+    @ApiModelProperty(value = "横轴时间")
+    @JsonFormat(pattern = "yyyy-MM-dd 00:00:00", timezone = "GMT+8")
+    private Date xValue;
+    @ApiModelProperty(value = "纵轴数值")
+    private BigDecimal yValue;
+}

+ 29 - 0
hz-business/src/main/java/com/hz/business/base/FaultDetailVo.java

@@ -0,0 +1,29 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * @author zyg
+ * @className BatteryFolderParam
+ * @date 2022年02月15日 16:03
+ */
+@Data
+public class FaultDetailVo {
+
+    @ApiModelProperty(value = "车辆型号")
+    private String title;
+
+    @ApiModelProperty(value = "排序号")
+    private Integer order;
+
+    @ApiModelProperty(value = "故障数")
+    private Integer faultCount;
+
+    @ApiModelProperty(value = "车辆数")
+    private Integer carCount;
+
+    @ApiModelProperty(value = "报警级别")
+    private Integer faultLevel;
+}

+ 30 - 0
hz-business/src/main/java/com/hz/business/base/IdParam.java

@@ -0,0 +1,30 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * @author zyg
+ * @className IdParam
+ * @date 2021年11月24日 12:25
+ */
+public class IdParam implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(
+            value = "参数ID,多个用','分隔",
+            name = "id"
+    )
+    private String id;
+
+    public IdParam() {
+    }
+
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return this.id;
+    }
+}

+ 21 - 0
hz-business/src/main/java/com/hz/business/base/KeyValueVo.java

@@ -0,0 +1,21 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author zyg
+ * @className KeyValueVo
+ * @date 2022年03月04日 16:25
+ */
+@Data
+public class KeyValueVo {
+    @ApiModelProperty(value = "id")
+    private String value;
+
+    @ApiModelProperty(value = "电池型号")
+    private String label;
+
+    @ApiModelProperty(value = "模型类型")
+    private Integer type;
+}

+ 22 - 0
hz-business/src/main/java/com/hz/business/base/KilometreCountVo.java

@@ -0,0 +1,22 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className PageParam
+ * @date 2021年11月24日 16:08
+ */
+@Data
+public class KilometreCountVo implements Serializable {
+    @ApiModelProperty(value = "类别名称")
+    private String name;
+    @ApiModelProperty(value = "数值")
+    private BigDecimal kilometre;
+    @ApiModelProperty(value = "排序")
+    private Integer rankOrder;
+}

+ 20 - 0
hz-business/src/main/java/com/hz/business/base/KindFloatValueListVo.java

@@ -0,0 +1,20 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className KindFloatValueListVo
+ * @date 2021年11月24日 16:08
+ */
+@Data
+public class KindFloatValueListVo {
+    @ApiModelProperty(value = "类别名称")
+    private String name;
+    @ApiModelProperty(value = "数值")
+    private List<BigDecimal> value;
+}

+ 19 - 0
hz-business/src/main/java/com/hz/business/base/KindObjectListVo.java

@@ -0,0 +1,19 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className KindObjectListVo
+ * @date 2021年11月24日 16:08
+ */
+@Data
+public class KindObjectListVo {
+    @ApiModelProperty(value = "类别名称")
+    private String name;
+    @ApiModelProperty(value = "数值")
+    private List<Object> value;
+}

+ 32 - 0
hz-business/src/main/java/com/hz/business/base/KindValueListVo.java

@@ -0,0 +1,32 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className PageParam
+ * @date 2021年11月24日 16:08
+ */
+@Data
+public class KindValueListVo implements Serializable {
+
+    @ApiModelProperty(value = "类别名称")
+    private String name;
+
+    @ApiModelProperty(value = "数值")
+    private List<Long> value;
+
+    @ApiModelProperty(value = "标定字段")
+    private String field;
+
+    @ApiModelProperty(value = "标定字段判断条件 0-大于 1-大于等于 2-小于 3-小于等于 4-等于")
+    private String judge;
+
+    @ApiModelProperty(value = "标定值")
+    private String boundary;
+}

+ 20 - 0
hz-business/src/main/java/com/hz/business/base/KindValueVo.java

@@ -0,0 +1,20 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className PageParam
+ * @date 2021年11月24日 16:08
+ */
+@Data
+public class KindValueVo implements Serializable {
+    @ApiModelProperty(value = "类别名称")
+    private String name;
+    @ApiModelProperty(value = "数值")
+    private BigDecimal value;
+}

+ 32 - 0
hz-business/src/main/java/com/hz/business/base/ModelIdParam.java

@@ -0,0 +1,32 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * ModelIdParam
+ *
+ * @author zxj
+ * @version 2023/02/15 15:21
+ **/
+public class ModelIdParam implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(
+            value = "参数ID,多个用','分隔",
+            name = "id"
+    )
+    private List<String> id;
+
+    public ModelIdParam() {
+    }
+
+    public void setId(final List<String> id) {
+        this.id = id;
+    }
+
+    public List<String> getId() {
+        return this.id;
+    }
+}

+ 20 - 0
hz-business/src/main/java/com/hz/business/base/NameValueVo.java

@@ -0,0 +1,20 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @author zyg
+ * @className NameValueVo
+ * @date 2021年11月24日 16:08
+ */
+@Data
+public class NameValueVo {
+    @ApiModelProperty(value = "名称")
+    private String xValue;
+
+    @ApiModelProperty(value = "纵轴数值")
+    private BigDecimal yValue;
+}

+ 30 - 0
hz-business/src/main/java/com/hz/business/base/PageParam.java

@@ -0,0 +1,30 @@
+package com.hz.business.base;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author zyg
+ * @className PageParam
+ * @date 2021年11月24日 16:08
+ */
+@Data
+public class PageParam {
+    @ApiModelProperty(value = "分页数量", name = "pageSize")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "分页索引", name = "pageIndex")
+    private Integer pageIndex;
+
+    @ApiModelProperty(value = "开始时间")
+    @JsonFormat(pattern = "yyyy-MM-dd 00:00:00", timezone = "GMT+8")
+    private String startTime;
+
+    @ApiModelProperty(value = "截止时间")
+    @JsonFormat(pattern = "yyyy-MM-dd 23:59:59", timezone = "GMT+8")
+    private String endTime;
+
+    @ApiModelProperty(value = "排序方式")
+    private String orderBy;
+}

+ 55 - 0
hz-business/src/main/java/com/hz/business/base/ResultVO.java

@@ -0,0 +1,55 @@
+package com.hz.business.base;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author MiaoXiaoTao
+ * @version 1.0
+ * @classname
+ * @date 2021/1/7
+ */
+@Data
+@ApiModel("通用返回Vo")
+public class ResultVO<T> {
+
+    @ApiModelProperty("返回结果状态码")
+    private int code = 200;
+
+    @ApiModelProperty("返回消息")
+    private String message = "操作成功";
+
+    @ApiModelProperty("数据")
+    private T data;
+
+    @ApiModelProperty(value = "时间戳")
+    private long ts = System.currentTimeMillis();
+
+
+    public static <T> ResultVO<T> success() {
+        ResultVO<T> resultVO = new ResultVO<T>();
+        resultVO.setCode(0);
+        resultVO.setMessage("success");
+        return resultVO;
+    }
+
+    public static <T> ResultVO<T> success(T data) {
+        ResultVO<T> resultVO = new ResultVO<T>();
+        resultVO.setCode(0);
+        resultVO.setMessage("success");
+        resultVO.setData(data);
+        return resultVO;
+    }
+
+    public static <T> ResultVO<T> fail(int code, String message) {
+        ResultVO<T> resultVO = new ResultVO<T>();
+        resultVO.setCode(code);
+        resultVO.setMessage(message);
+        return resultVO;
+    }
+
+    public boolean isSuccess() {
+        return 200 == code;
+    }
+}

+ 117 - 0
hz-business/src/main/java/com/hz/business/controller/AiModelController.java

@@ -0,0 +1,117 @@
+package com.hz.business.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.hz.business.base.IdParam;
+import com.hz.business.domain.AiModel;
+import com.hz.business.dto.AiModelDto;
+import com.hz.business.req.AiModelLogParam;
+import com.hz.business.req.AiModelParam;
+import com.hz.business.vo.AiModelLogVo;
+import com.hz.business.vo.AiModelVo;
+import com.hz.business.vo.BatteryPackModelVo;
+import com.hz.common.annotation.Log;
+import com.hz.common.base.EnumEntity;
+import com.hz.common.base.EnumStringEntity;
+import com.hz.common.constant.Constants;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import com.hz.common.core.controller.BaseController;
+
+import javax.annotation.Resource;
+
+import com.hz.business.service.IAiModelService;
+
+import java.util.List;
+
+
+/**
+ * AI算法模型Controller
+ *
+ * @author zyg
+ * @date 2022-05-30
+ */
+@Api(tags = "AI算法模型")
+@RestController
+@RequestMapping("/business/aiModel")
+public class AiModelController extends BaseController {
+    @Resource
+    private IAiModelService aiModelService;
+
+    @ApiOperation("分页查询AI算法模型列表")
+    @PostMapping("/page")
+    public AjaxResult getAiModelPage(@RequestBody AiModelParam param) {
+        PageInfo<AiModelVo> result = aiModelService.getAiModelPage(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询AI算法模型详情")
+    @GetMapping("/detail/{id}")
+    public AjaxResult getAiModelDetail(@PathVariable("id") Long id) {
+        AiModel result = aiModelService.getAiModelDetail(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("新增/修改AI算法模型")
+    @Log(title = "AI算法模型", businessType = BusinessType.SAVE)
+    @PostMapping(value = "/save")
+    public AjaxResult saveAiModel(@RequestBody AiModelDto dto) {
+        String result = aiModelService.saveAiModel(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("起停用AI算法模型")
+    @Log(title = "AI算法模型", businessType = BusinessType.UPDATE)
+    @PostMapping("/enable")
+    public AjaxResult enabledAiModel(@RequestBody AiModelDto dto) {
+        String result = aiModelService.enabledAiModel(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("重命名/删除AI算法模型")
+    @Log(title = "AI算法模型", businessType = BusinessType.UPDATE)
+    @PostMapping(value = "/renameOrDel")
+    public AjaxResult renameAiModel(@RequestBody AiModelDto dto) {
+        String result = aiModelService.renameAiModel(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取ai模型状态列表")
+    @GetMapping(value = "/statusList")
+    public AjaxResult getAiModelStatusList() {
+        List<EnumEntity> result = aiModelService.getAiModelStatusList();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取ai模型类型列表")
+    @GetMapping(value = "/typeList")
+    public AjaxResult getAiModelTypeList() {
+        List<EnumStringEntity> result = aiModelService.getAiModelTypeList();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取ai模型类型日志")
+    @PostMapping(value = "/log")
+    public AjaxResult getAiModelLog(@RequestBody AiModelLogParam param) {
+        PageInfo<AiModelLogVo> result = aiModelService.getAiModelLog(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取ai模型包编号列表")
+    @PostMapping(value = "/packList")
+    public AjaxResult getAiModelPackList(@RequestBody IdParam param) {
+        List<BatteryPackModelVo> result = aiModelService.getAiModelPackList(param);
+        return AjaxResult.success(result);
+    }
+}

+ 185 - 0
hz-business/src/main/java/com/hz/business/controller/AlarmMsgController.java

@@ -0,0 +1,185 @@
+package com.hz.business.controller;
+
+import java.text.ParseException;
+import java.util.List;
+
+import com.github.pagehelper.PageInfo;
+import com.hz.business.base.BaseLineChartVo;
+import com.hz.business.base.ModelIdParam;
+import com.hz.business.domain.DealAlarmLog;
+import com.hz.business.dto.BatteryFolderDto;
+import com.hz.business.dto.DealAlarmMsgDto;
+import com.hz.business.dto.TagDto;
+import com.hz.business.req.*;
+import com.hz.business.vo.*;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.Constants;
+import com.hz.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+
+import javax.annotation.Resource;
+
+import com.hz.business.service.IAlarmMsgService;
+
+/**
+ * 电池报警信息Controller
+ *
+ * @author hz
+ * @date 2022-02-16
+ */
+@Api(tags = "故障报警")
+@RestController
+@RequestMapping("/business/alarmMsg")
+public class AlarmMsgController extends BaseController {
+    @Resource
+    private IAlarmMsgService alarmMsgService;
+
+    @ApiOperation("获取故障名称列表-树")
+    @GetMapping(value = "/modelTree")
+    public AjaxResult getModelTree() {
+        List<ModelTreeVo> result = alarmMsgService.getModelTree();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取故障名称列表")
+    @PostMapping(value = "/modelList")
+    public AjaxResult getModelList(@RequestBody ModelIdParam param) {
+        List<ModelSimpleVo> result = alarmMsgService.getModelList(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("收藏故障")
+    @PostMapping(value = "/collectAlarm")
+    @Log(title = "故障报警", businessType = BusinessType.UPDATE)
+    public AjaxResult doCollectAlarm(@RequestBody BatteryFolderDto dto) {
+        String result = alarmMsgService.doCollectAlarm(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("添加故障标签")
+    @Log(title = "故障报警", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/addTag")
+    public AjaxResult alarmAddTag(@RequestBody TagDto tagDto) {
+        String result = alarmMsgService.alarmAddTag(tagDto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("批量添加故障标签")
+    @Log(title = "故障报警", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/batchAddTag")
+    public AjaxResult alarmBatchAddTag(@RequestBody TagDto dto) {
+        String result = alarmMsgService.alarmBatchAddTag(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("修改故障标签")
+    @PostMapping(value = "/editTag")
+    @Log(title = "故障报警", businessType = BusinessType.UPDATE)
+    public AjaxResult alarmEditTag(@RequestBody TagDto tagDto) {
+        String result = alarmMsgService.alarmEditTag(tagDto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询故障标签")
+    @GetMapping(value = "/queryTag/{id}")
+    public AjaxResult alarmAddTag(@PathVariable("id") Long id) {
+        BatteryTagVo result = alarmMsgService.alarmQueryTag(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询故障信息列表")
+    @PostMapping("/list")
+    public AjaxResult selectAlarmList(@RequestBody AlarmParam param) {
+        PageInfo<AlarmMsgVo> result = alarmMsgService.selectAlarmList(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询故障标签")
+    @PostMapping(value = "/queryTag")
+    public AjaxResult alarmQueryTag(@RequestBody BatteryTagParam param) {
+        PageInfo<BatteryTagVo> result = alarmMsgService.alarmQueryTag(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("处理故障")
+    @PostMapping(value = "/deal")
+    @Log(title = "故障报警", businessType = BusinessType.UPDATE)
+    public AjaxResult dealAlarmMsg(@RequestBody DealAlarmMsgDto dto) {
+        String result = alarmMsgService.dealAlarmMsg(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("故障处理信息--详情")
+    @GetMapping("/{id}")
+    public AjaxResult getAlarmDetail(@PathVariable("id") Long id) {
+        AlarmMsgDetailVo result = alarmMsgService.getAlarmDetail(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("故障处理日志")
+    @GetMapping("/log/{id}")
+    public AjaxResult getDealAlarmLog(@PathVariable("id") Long id) {
+        List<DealAlarmLog> result = alarmMsgService.getDealAlarmLog(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("我的故障收藏")
+    @PostMapping("/collect")
+    public AjaxResult getMyCollectData(@RequestBody BatteryFolderParam param) {
+        PageInfo<BatteryFolderVo> result = alarmMsgService.getMyCollectData(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("我的故障收藏目录")
+    @PostMapping("/collectNew")
+    public AjaxResult getMyCollectDataAll(@RequestBody BatteryFolderParam param) {
+        List<MyBatteryFolderVo> result = alarmMsgService. getMyCollectDataAll(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("故障概览")
+    @PostMapping("/faultOverview")
+    public AjaxResult getFaultOverview(@RequestBody FaultOverviewParam param) {
+        FaultOverviewVo result = alarmMsgService.getFaultOverview(param);
+        return AjaxResult.success(result);
+    }
+    @ApiOperation("报警趋势图")
+    @PostMapping("/baseLineOverview")
+    public AjaxResult getBaseLineChartVo(@RequestBody FaultOverviewParam param) throws ParseException {
+        BaseLineChartVo result = alarmMsgService.getBaseLineChartVo(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("故障历史统计")
+    @PostMapping("/historyOverview")
+    public AjaxResult getHistoryFaultOverview() {
+        HistoryFaultOverviewVo result = alarmMsgService.getHistoryFaultOverview();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("单个电池--故障历史")
+    @GetMapping("/singleHistory/{sn}/{pageIndex}/{pageSize}")
+    public AjaxResult getSingleHistory(@PathVariable("sn") String sn,@PathVariable("pageIndex")Integer pageIndex,@PathVariable("pageSize")Integer pageSize) {
+        SingleHistoryOverviewVo result = alarmMsgService.getSingleHistory(sn,pageIndex,pageSize);
+        return AjaxResult.success(result);
+    }
+}

+ 16 - 0
hz-business/src/main/java/com/hz/business/controller/AlgoPackParamController.java

@@ -0,0 +1,16 @@
+package com.hz.business.controller;
+
+
+import com.hz.common.core.controller.BaseController;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 电池型号Controller
+ *
+ * @author hz
+ * @date 2022-03-16
+ */
+@RestController
+@RequestMapping("/business/algoPackParam")
+public class AlgoPackParamController extends BaseController {
+}

+ 129 - 0
hz-business/src/main/java/com/hz/business/controller/AnalysisReportController.java

@@ -0,0 +1,129 @@
+package com.hz.business.controller;
+
+
+import com.github.pagehelper.PageInfo;
+import com.hz.business.dto.AnalysisReportAddDto;
+import com.hz.business.dto.AnalysisReportDto;
+import com.hz.business.req.AnalysisReportParam;
+import com.hz.business.vo.*;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.Constants;
+import com.hz.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+
+import javax.annotation.Resource;
+
+import com.hz.business.service.IAnalysisReportService;
+
+import java.text.ParseException;
+import java.util.List;
+
+/**
+ * 分析报告Controller
+ *
+ * @author hz
+ * @date 2022-04-18
+ */
+@Api(tags = "分析报告")
+@RestController
+@RequestMapping("/business/analysisReport")
+public class AnalysisReportController extends BaseController {
+    @Resource
+    private IAnalysisReportService analysisReportService;
+
+    @ApiOperation("新建分析报告")
+    @PostMapping("/add")
+    @Log(title = "新建分析报告", businessType = BusinessType.INSERT)
+    public AjaxResult addAnalysisReport(@RequestBody AnalysisReportAddDto dto) throws ParseException {
+        String result = analysisReportService.addAnalysisReport(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("通过模板id查询数据集列表")
+    @GetMapping("/dataSetList/{id}")
+    public AjaxResult getDataSetByTemplateId(@PathVariable("id") Long id) {
+        List<DataSetSimpleVo> result = analysisReportService.getDataSetByTemplateId(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询分析报告信息列表")
+    @PostMapping("/list")
+    public AjaxResult getTemplatePage(@RequestBody AnalysisReportParam param) {
+        PageInfo<AnalysisReportVo> result = analysisReportService.getAnalysisReportPage(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("分享分析报告")
+    @PostMapping(value = "/share")
+    @Log(title = "分享分析报告", businessType = BusinessType.UPDATE)
+    public AjaxResult shareTemplate(@RequestBody AnalysisReportDto dto) {
+        String result = analysisReportService.shareAnalysisReport(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("重命名/删除分析报告")
+    @PostMapping(value = "/renameOrRemove")
+    @Log(title = "重命名/删除分析报告", businessType = BusinessType.UPDATE)
+    public AjaxResult renameOrRemoveTemplate(@RequestBody AnalysisReportDto dto) {
+        String result = analysisReportService.renameOrRemoveAnalysisReport(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+    @ApiOperation("分析报告展示")
+    @PostMapping("/showChart")
+    public AjaxResult getTemplateData(@RequestBody AnalysisReportAddDto dto) throws Exception{
+        AnalysisReportResultVo result = analysisReportService.getTemplateData(dto);
+        if (result==null) {
+            return AjaxResult.error();
+        }else{
+            return AjaxResult.success(result);
+        }
+    }
+
+    @ApiOperation("分析报告详情")
+    @GetMapping("/detail/{id}")
+    public AjaxResult getTemplateDetail(@PathVariable("id") Long id) throws Exception {
+        AnalysisReportResultVo result = analysisReportService.getTemplateDetail(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取电池参数列表")
+    @GetMapping("/batteryParam")
+    public AjaxResult getBatteryParams() {
+        List<FieldCommentVo> result = analysisReportService.getBatteryParams();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取数据集参数列表")
+    @GetMapping("/dataSetParam/{id}")
+    public AjaxResult getDataSetParam(@PathVariable("id") Long id) {
+        List<FieldCommentVo> result = analysisReportService.getDataSetParam(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("定时任务获取分析报告内容")
+    @GetMapping("/produceReport")
+    public AjaxResult setPresetValue() {
+        analysisReportService.setPresetValue();
+        return AjaxResult.success(Constants.OK);
+    }
+
+    @ApiOperation("手动分析热管理报告")
+    @PostMapping("/handle")
+    public AjaxResult handleAnalysisReport(@RequestBody ReportRedisListVo vo) {
+        analysisReportService.handleAnalysisReport(vo);
+        return AjaxResult.success(Constants.OK);
+    }
+}

+ 37 - 0
hz-business/src/main/java/com/hz/business/controller/AreasController.java

@@ -0,0 +1,37 @@
+package com.hz.business.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.hz.business.domain.Areas;
+import com.hz.business.mapper.AreasMapper;
+import com.hz.common.core.domain.AjaxResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author zhaoyuanqi
+ */
+@Api(tags = "区县")
+@RestController
+@RequestMapping("/business/area")
+public class AreasController {
+
+    @Resource
+    AreasMapper areasMapper;
+
+    /**
+     * 省编码获取市区编码列表
+     */
+    @ApiOperation("省编码获取市区编码列表")
+    @PostMapping(value = "/area/{code}")
+    public AjaxResult getCityList(@PathVariable("code") String code) {
+        List<Areas> result = areasMapper.selectList(new LambdaQueryWrapper<Areas>()
+                .select(Areas::getArea,Areas::getAreaCode)
+                .eq(Areas::getCityCode, code)
+                .eq(Areas::getIsDelete, 0));
+        return AjaxResult.success(result);
+    }
+}

+ 306 - 0
hz-business/src/main/java/com/hz/business/controller/BatteryController.java

@@ -0,0 +1,306 @@
+package com.hz.business.controller;
+
+
+import com.github.pagehelper.PageInfo;
+import com.hz.business.base.BaseLineChartVo;
+import com.hz.business.domain.Tag;
+import com.hz.business.dto.BatteryFolderDto;
+import com.hz.business.dto.TagDto;
+import com.hz.business.req.*;
+import com.hz.business.vo.*;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.Constants;
+import com.hz.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.business.service.IBatteryService;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.sql.SQLException;
+import java.text.ParseException;
+import java.util.List;
+
+/**
+ * 动力大电池数据
+ *
+ * @author zyg
+ * @date 2022-02-15
+ */
+@Api(tags = "电池信息管理")
+@RestController
+@RequestMapping("/business/battery")
+public class BatteryController extends BaseController {
+
+    @Resource
+    private IBatteryService batteryService;
+
+    @ApiOperation("查询电池信息列表")
+    @PostMapping("/list")
+    public AjaxResult list(@RequestBody BatteryParam param) {
+        PageInfo<BatteryVo> result = batteryService.selectBatteryList(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询快充电池信息列表")
+    @PostMapping("/fastList")
+    public AjaxResult selectFastChargeBatteryList(@RequestBody BatteryParam param) {
+        PageInfo<FastChargeBatteryVo> result = batteryService.selectFastChargeBatteryList(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("电池详细信息")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) throws SQLException {
+        BatteryVo result = batteryService.getBatteryDetail(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("通过sn/vin获取电池详细信息")
+    @GetMapping(value = "/detail/{sn}")
+    public AjaxResult getDetailInfo(@PathVariable("sn") String sn) throws SQLException {
+        BatteryVo result = batteryService.getDetailInfo(sn);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询自定义分析-电池编号精确查询")
+    @GetMapping(value = "/query/{sn}")
+    public AjaxResult getBattery(@PathVariable("sn") String sn) {
+        BatteryVo result = batteryService.getBattery(sn);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取电池详细信息趋势图")
+    @PostMapping(value = "/detailChart")
+    public AjaxResult getDetailCharts(@RequestBody BatteryDetailChartParam param) throws ParseException, SQLException {
+        BatteryDetailChartVo result = batteryService.getDetailCharts(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取电池数据概览")
+    @PostMapping(value = "/yesterdayList")
+    public AjaxResult getBatteryStatistics(@RequestBody BatteryOverviewParam param) {
+        BatteryStatisticsVo result = batteryService.getBatteryStatistics(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取SOH里程分布图")
+    @GetMapping(value = "/sohMileage")
+    public AjaxResult getSohMileage() {
+        List<SohMileageVo> result = batteryService.getSohMileage();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取状态概览-电池环状图信息")
+    @GetMapping(value = "/cycleList")
+    public AjaxResult batteryCyclePercentList() {
+        BatteryCycleDataVo result = batteryService.getBatteryCyclePercentList();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取电池故障类型日趋势信息")
+    @GetMapping(value = "/faultTrend")
+    public AjaxResult faultTrend() {
+        BaseLineChartVo result = batteryService.getFaultTrend();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取性能类实时指标信息")
+    @GetMapping(value = "/performance")
+    public AjaxResult performanceRealTime() {
+        PerformanceRealTimeVo result = batteryService.getPerformanceRealTime();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("收藏电池")
+    @PostMapping(value = "/collectBattery")
+    public AjaxResult doCollectBattery(@RequestBody BatteryFolderDto dto) {
+        String result = batteryService.doCollectBattery(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("添加电池标签")
+    @PostMapping(value = "/addTag")
+    @Log(title = "电池信息管理", businessType = BusinessType.INSERT)
+    public AjaxResult batteryAddTag(@RequestBody TagDto tagDto) {
+        String result = batteryService.batteryAddTag(tagDto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("修改电池标签")
+    @PostMapping(value = "/editTag")
+    @Log(title = "电池信息管理", businessType = BusinessType.INSERT)
+    public AjaxResult batteryEditTag(@RequestBody TagDto tagDto) {
+        String result = batteryService.batteryEditTag(tagDto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("删除电池标签")
+    @PostMapping(value = "/delTag/{id}")
+    public AjaxResult batteryDelTag(@PathVariable("id") Long id) {
+        String result = batteryService.batteryDelTag(id);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询电池标签")
+    @PostMapping(value = "/queryTag")
+    public AjaxResult batteryAddTag(@RequestBody BatteryTagParam param) {
+        PageInfo<BatteryTagVo> result = batteryService.batteryQueryTag(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询电池历史故障")
+    @GetMapping(value = "/historyFault/{sn}")
+    public AjaxResult historyFault(@PathVariable("sn") String sn) {
+        BatteryHistoryFaultVo result = batteryService.getHistoryFault(sn);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("电池安全诊断")
+    @GetMapping(value = "/checkBattery/{sn}")
+    public AjaxResult checkBattery(@PathVariable("sn") String sn) {
+        BatteryHistoryFaultVo result = batteryService.checkBattery(sn);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("电池列表准备工作")
+    @GetMapping(value = "/tagBattery/{type}")
+    public AjaxResult getTagBattery(@PathVariable("type") Integer type) {
+        List<Tag> result = batteryService.getTagBattery(type);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("电池概览")
+    @PostMapping(value = "/overview")
+    public AjaxResult getBatteryOverview(@RequestBody BatteryOverviewParam param) {
+        BatteryOverviewVo result = batteryService.getBatteryOverview(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询电池标签详情")
+    @GetMapping(value = "/batteryTag/{id}")
+    public AjaxResult getBatteryTagDetail(@PathVariable("id") Long id) {
+        BatteryTagVo result = batteryService.getBatteryTagDetail(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("我的电池收藏")
+    @PostMapping("/collect")
+    public AjaxResult getMyCollectData(@RequestBody BatteryFolderParam param) {
+        PageInfo<BatteryFolderVo> result = batteryService.getMyCollectData(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("电池健康度诊断--健康度趋势图")
+    @PostMapping("/health")
+    public AjaxResult getMyCollectData(@RequestBody BatteryHealthParam param) throws ParseException {
+        BatteryHealthVo result = batteryService.getHealthResult(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("导出电池详情数据")
+    @GetMapping("/export")
+    public void exportExcel(@RequestParam(required = false) String sn,
+                            @RequestParam(required = false) String startTime,
+                            @RequestParam(required = true) String vin,
+                            @RequestParam(required = false) String endTime, HttpServletResponse response) throws Exception {
+        BatteryDetailChartParam param = new BatteryDetailChartParam();
+        param.setSn(sn);
+        param.setStartTime(startTime);
+        param.setVin(vin);
+        param.setEndTime(endTime);
+        batteryService.exportDetailExcel(param, response);
+    }
+
+    @ApiOperation("导出电池详情数据-用电行为")
+    @GetMapping("/exportCharge")
+    public void exportDetailChargeExcel(@RequestParam(required = false) String sn,
+                                        @RequestParam(required = false) String startTime,
+                                        @RequestParam(required = true) String vin,
+                                        @RequestParam(required = false) String endTime,
+                                        HttpServletResponse response) throws IOException {
+        BatteryDetailChartParam param = new BatteryDetailChartParam();
+        param.setSn(sn);
+        param.setStartTime(startTime);
+        param.setVin(vin);
+        param.setEndTime(endTime);
+        batteryService.exportDetailChargeExcel(param, response);
+    }
+
+    @ApiOperation("导出电池详情数据")
+    @GetMapping("/exportHealth")
+    public void exportHealthExcel(@RequestParam(required = false) String sn,
+                                  @RequestParam(required = false) String startTime,
+                                  @RequestParam(required = true) String vin,
+                                  @RequestParam(required = false) String endTime,
+                                  HttpServletResponse response) throws Exception {
+        BatteryDetailChartParam param = new BatteryDetailChartParam();
+        param.setSn(sn);
+        param.setStartTime(startTime);
+        param.setVin(vin);
+        param.setEndTime(endTime);
+        batteryService.exportHealthExcel(param, response);
+    }
+
+    @ApiOperation("查询实时电池位置统计")
+    @PostMapping("/getLocation")
+    public AjaxResult getLocation() {
+        List<BatteryLocationVo> res = batteryService.getBatteryLocation();
+        return AjaxResult.success(res);
+    }
+
+    @ApiOperation("查询充电电池位置统计")
+    @PostMapping("/getChargingLocation")
+    public AjaxResult getChargingLocation() {
+        List<BatteryLocationVo> res = batteryService.getBatteryChargingLocation();
+        return AjaxResult.success(res);
+    }
+
+    @ApiOperation("查询电池详细信息-用电行为")
+    @PostMapping(value = "/detailCharge")
+    public AjaxResult getDetailCharge(@RequestBody BatteryDetailChartParam param) throws ParseException, SQLException {
+        BatteryDetailChartVo result = batteryService.getDetailCharge(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询电池详细信息-用电行为分析")
+    @GetMapping(value = "/behavior/{vin}")
+    public AjaxResult getBehaviorAnalysis(@PathVariable("vin") String vin) throws SQLException {
+        BehaviorAnalysisVo result = batteryService.getBehaviorAnalysis(vin);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("批量添加电池标签")
+    @Log(title = "批量添加电池标签", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/batchAddTag")
+    public AjaxResult batteryBatchAddTag(@RequestBody TagDto dto) {
+        String result = batteryService.batteryBatchAddTag(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("soh里程区间")
+    @GetMapping(value = "/sohOdo")
+    public AjaxResult calTotalElectricQuantity() {
+        batteryService.calTotalElectricQuantity();
+        return AjaxResult.success(Constants.OK);
+    }
+}

+ 55 - 0
hz-business/src/main/java/com/hz/business/controller/BatteryCoreController.java

@@ -0,0 +1,55 @@
+package com.hz.business.controller;
+
+import java.util.List;
+
+import com.hz.business.vo.BatteryCoreSimpleVo;
+import com.hz.business.vo.BatteryModelSimpleVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.poi.ExcelUtil;
+import javax.annotation.Resource;
+
+import com.hz.business.domain.BatteryCore;
+import com.hz.business.service.IBatteryCoreService;
+/**
+ * 电芯类型Controller
+ * 
+ * @author hz
+ * @date 2022-02-17
+ */
+@Api(tags = "电芯类型")
+@RestController
+@RequestMapping("/business/batteryCore")
+public class BatteryCoreController extends BaseController {
+    @Resource
+    private IBatteryCoreService batteryCoreService;
+
+
+    /**
+     * 导出电芯类型列表
+     */
+    @Log(title = "电芯类型", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export()
+    {
+        List<BatteryCore> list = batteryCoreService.list();
+        ExcelUtil<BatteryCore> util = new ExcelUtil<BatteryCore>(BatteryCore.class);
+        return util.exportExcel(list, "电芯类型数据");
+    }
+
+    @ApiOperation("查询电芯型号")
+    @GetMapping(value = "/batteryCore")
+    public AjaxResult getBatteryCore() {
+        List<BatteryCoreSimpleVo> result = batteryCoreService.getBatteryCore();
+        return AjaxResult.success(result);
+    }
+}

+ 140 - 0
hz-business/src/main/java/com/hz/business/controller/BatteryModelController.java

@@ -0,0 +1,140 @@
+package com.hz.business.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.github.pagehelper.PageInfo;
+import com.hz.business.domain.BatteryModel;
+import com.hz.business.dto.BatteryModelDto;
+import com.hz.business.dto.DeleteDto;
+import com.hz.business.req.BatteryModelParam;
+import com.hz.business.vo.BatteryModelSimpleVo;
+import com.hz.business.vo.BatteryModelVo;
+import com.hz.business.vo.BatterySupplierVo;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.Constants;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.bean.BeanUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+
+import javax.annotation.Resource;
+
+import com.hz.business.service.IBatteryModelService;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 电池型号Controller
+ *
+ * @author hz
+ * @date 2022-03-16
+ */
+@Api(tags = "电池型号管理")
+@RestController
+@RequestMapping("/business/batteryModel")
+public class BatteryModelController extends BaseController {
+    @Resource
+    private IBatteryModelService batteryModelService;
+
+
+    @ApiOperation("分页查询电池型号列表")
+    @PostMapping("/list")
+    public AjaxResult getBatteryModelList(@RequestBody BatteryModelParam param) {
+        PageInfo<BatteryModelVo> result = batteryModelService.getBatteryModelList(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("不分页查询电池型号列表")
+    @PostMapping("/all")
+    public AjaxResult getAllBatteryModel() {
+        List<BatteryModel> result = batteryModelService.list(new LambdaQueryWrapper<BatteryModel>()
+                .select(BatteryModel::getBatteryModel, BatteryModel::getId)
+                .eq(BatteryModel::getIsDelete,0));
+        return AjaxResult.success(result);
+    }
+
+
+    @ApiOperation("查询pack型号")
+    @PostMapping("/packList")
+    public AjaxResult packList(){
+        List<String> result = batteryModelService.packList();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询电池供应商")
+    @PostMapping("/supplier")
+    public AjaxResult getSupplierList(){
+        List<BatterySupplierVo> batterySupplierVos = new ArrayList<>();
+        List<BatteryModel> result = batteryModelService.list(new LambdaQueryWrapper<BatteryModel>()
+                .select(BatteryModel::getSupplier,BatteryModel::getId)
+                .eq(BatteryModel::getIsDelete,0)
+                .groupBy(BatteryModel::getSupplier));
+        result.forEach(r->{
+            BatterySupplierVo batterySupplierVo = new BatterySupplierVo();
+            BeanUtils.copyProperties(r,batterySupplierVo);
+            batterySupplierVos.add(batterySupplierVo);
+        });
+        return AjaxResult.success(batterySupplierVos);
+    }
+
+
+
+    @ApiOperation("电池型号详情")
+    @GetMapping("/detail/{id}")
+    public AjaxResult getBatteryModelList(@PathVariable Long id) {
+        BatteryModelVo result = batteryModelService.getBatteryModelList(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("电池型号保存")
+    @PostMapping("/save")
+    @Log(title = "电池型号保存", businessType = BusinessType.SAVE)
+    public AjaxResult saveBatteryModel(@RequestBody BatteryModelDto dto) {
+        String result = batteryModelService.saveBatteryModel(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("删除电池型号")
+    @PostMapping(value = "/delete")
+    @Log(title = "删除电池型号", businessType = BusinessType.DELETE)
+    public AjaxResult deleteBatteryModel(@RequestBody DeleteDto dto) {
+        String result = batteryModelService.deleteBatteryModel(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("下拉列表获取")
+    @GetMapping("/ready")
+    public AjaxResult readyForListBoxData() {
+        Map<String, Object> result = batteryModelService.readyForListBoxData();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("下载模板")
+    @GetMapping("/download")
+    @Log(title = "下载模板", businessType = BusinessType.EXPORT)
+    public AjaxResult downloadTemplate() {
+        String result = batteryModelService.downloadTemplate();
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询电池型号")
+    @GetMapping(value = "/batteryModel")
+    public AjaxResult getBatteryModel() {
+        List<BatteryModelSimpleVo> result = batteryModelService.getBatteryModel();
+        return AjaxResult.success(result);
+    }
+}

+ 42 - 0
hz-business/src/main/java/com/hz/business/controller/ChargePresetController.java

@@ -0,0 +1,42 @@
+package com.hz.business.controller;
+
+import com.hz.business.dto.TemplateDto;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.Constants;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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 com.hz.common.core.controller.BaseController;
+import javax.annotation.Resource;
+
+import com.hz.business.service.IChargePresetService;
+/**
+ * 充放电预置值Controller
+ * 
+ * @author zyg
+ * @date 2022-06-23
+ */
+@Api(tags = "充放电预置值")
+@RestController
+@RequestMapping("/business/preset")
+public class ChargePresetController extends BaseController {
+    @Resource
+    private IChargePresetService chargePresetService;
+
+    @ApiOperation("保存模板")
+    @PostMapping("/save")
+    @Log(title = "充放电预置值-保存模板", businessType = BusinessType.SAVE)
+    public AjaxResult saveTemplate(@RequestBody TemplateDto dto) {
+        String result = chargePresetService.saveTemplate(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+}

+ 46 - 0
hz-business/src/main/java/com/hz/business/controller/ChartController.java

@@ -0,0 +1,46 @@
+package com.hz.business.controller;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.poi.ExcelUtil;
+import javax.annotation.Resource;
+
+import com.hz.business.domain.Chart;
+import com.hz.business.service.IChartService;
+/**
+ * 模板下图表Controller
+ * 
+ * @author hz
+ * @date 2022-04-18
+ */
+@Api(tags = "图表")
+@RestController
+@RequestMapping("/business/chart")
+public class ChartController extends BaseController {
+    @Resource
+    private IChartService chartService;
+
+
+    /**
+     * 导出模板下图表列表
+     */
+    //@PreAuthorize("@ss.hasPermi('business:chart:export')")
+    @Log(title = "模板下图表", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export()
+    {
+        List<Chart> list = chartService.list();
+        ExcelUtil<Chart> util = new ExcelUtil<Chart>(Chart.class);
+        return util.exportExcel(list, "模板下图表数据");
+    }
+
+}

+ 40 - 0
hz-business/src/main/java/com/hz/business/controller/CityController.java

@@ -0,0 +1,40 @@
+package com.hz.business.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.hz.business.domain.City;
+import com.hz.business.mapper.CityMapper;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author zyg
+ * @className CityController
+ * @date 2022年09月07日 11:00
+ */
+@Api(tags = "市区")
+@RestController
+@RequestMapping("/business/city")
+public class CityController extends BaseController {
+
+    @Resource
+    CityMapper cityMapper;
+
+    /**
+     * 省编码获取市区编码列表
+     */
+    @ApiOperation("省编码获取市区编码列表")
+    @PostMapping(value = "/city/{code}")
+    public AjaxResult getCityList(@PathVariable("code") String code) {
+        List<City> result = cityMapper.selectList(new LambdaQueryWrapper<City>()
+                .select(City::getCity, City::getCityCode)
+                .eq(City::getProvinceCode, code)
+                .eq(City::getIsDelete, 0));
+        return AjaxResult.success(result);
+    }
+}

+ 99 - 0
hz-business/src/main/java/com/hz/business/controller/DataScreenController.java

@@ -0,0 +1,99 @@
+package com.hz.business.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.hz.business.domain.DataScreen;
+import com.hz.business.service.IDataScreenService;
+import com.hz.business.vo.*;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.log4j.Log4j2;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.client.RestTemplate;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * DataScreenController 数据大屏
+ *
+ * @author zxj
+ * @version 2022/10/22 15:59
+ **/
+@Api(tags = "数据大屏")
+@RestController
+@Log4j2
+@RequestMapping("/business/screen")
+public class DataScreenController extends BaseController {
+    // 字节私有云地址
+    final static String PRE_URL = "https://ve-portal.chehezhi.cn";
+
+    @Resource
+    IDataScreenService dataScreenService;
+
+    @ApiOperation("查询五分钟实时数据")
+    @GetMapping("/realTimeDataList")
+    public AjaxResult getRealTimeDataList(){
+        DataScreen.RealTimeData result = dataScreenService.getRealTimeDataScreen();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询十分钟实时数据")
+    @GetMapping("/realTimeDoubleDataList")
+    public AjaxResult getRealTimeDoubleDataList(){
+        DataScreen.RealTimeDoubleData result = dataScreenService.getRealTimeDoubleDataScreen();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询T+1数据")
+    @GetMapping("/yesterdayDataList")
+    public AjaxResult getYesterdayData(){
+        DataScreen.YesterdayData  result = dataScreenService.getYesterdayDataScreen();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询T+2数据")
+    @GetMapping("/beforeYesterdayDataList")
+    public AjaxResult getBeforeYesterdayData(){
+        DataScreen.BeforeYesterdayData result = dataScreenService.getBeforeYesterdayDataScreen();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询自然周数据")
+    @GetMapping("/weekDataList")
+    public AjaxResult getWeekData(){
+        DataScreen.WeekData result = dataScreenService.getWeekDataScreen();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("大屏token")
+    @PostMapping("/jwtToken")
+    public AjaxResult getJwtToken() {
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("jwtToken", loginJwtToken());
+        return ajax;
+    }
+
+    private String loginJwtToken() {
+        try {
+            RestTemplate client = new RestTemplate();
+            Map<String, Object> params = new HashMap<>();
+            Map<String, Object> metadata = new HashMap<>();
+            metadata.put("clientId", "fc5689ea5eb6cd7f7fab695552dd1882");
+            metadata.put("clientSecret", "4784a6c908c043dcd39c3bdc87c704d3");
+            metadata.put("expire", 7200);
+            params.put("metadata", metadata);
+            String str = client.postForEntity(PRE_URL.concat("/aeolus/api/v3/openapi/jwtToken"), params, String.class).getBody();
+//            System.out.println(str);
+            JSONObject jsonObject = client.postForEntity(PRE_URL.concat("/aeolus/api/v3/openapi/jwtToken"), params, JSONObject.class).getBody();
+            if (null != jsonObject) {
+                return jsonObject.getJSONObject("data").getString("jwtToken");
+            }
+        } catch (Exception e) {
+            log.error("获取字节jwtToken异常: {}", e.getMessage(), e);
+        }
+        return "";
+    }
+}

+ 137 - 0
hz-business/src/main/java/com/hz/business/controller/DataSetController.java

@@ -0,0 +1,137 @@
+package com.hz.business.controller;
+
+
+import com.github.pagehelper.PageInfo;
+import com.hz.business.dto.AscFileDto;
+import com.hz.business.req.DataSetListParam;
+import com.hz.business.req.DataSetParam;
+import com.hz.business.req.DataSetShareParam;
+import com.hz.business.service.IDataSetService;
+import com.hz.business.vo.DataSetSimpleVo;
+import com.hz.business.vo.DbcFileListVo;
+import com.hz.business.vo.DataSetVo;
+import com.hz.business.vo.OssConfigVo;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.Constants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 数据集Controller
+ *
+ * @author hz
+ * @date 2022-02-15
+ */
+@Api(tags = "数据集管理")
+@RestController
+@RequestMapping("/business/dataSet")
+public class DataSetController extends BaseController {
+
+    @Resource
+    IDataSetService dataSetService;
+
+    @ApiOperation("分页查询数据集列表")
+    @PostMapping(value = "/queryDataSet")
+    public AjaxResult getDataSetTree(@RequestBody DataSetParam param) {
+        List<DataSetVo> result = dataSetService.getDataSetTree(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("查询数据集列表")
+    @GetMapping(value = "/dataSetList")
+    public AjaxResult getDataSetList() {
+        List<DataSetSimpleVo> result = dataSetService.getDataSetList();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("数据集文件夹列表")
+    @PostMapping(value = "/getFolderTree")
+    public AjaxResult getDataSetFolderTree() {
+        List<DataSetVo> result = dataSetService.getDataSetFolderTree();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("分享数据集")
+    @Log(title = "数据集管理", businessType = BusinessType.UPDATE)
+    @PostMapping(value = "/shareDataSet")
+    public AjaxResult shareDataSet(@RequestBody DataSetShareParam param) {
+        String result = dataSetService.shareDataSet(param);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("重命名/删除数据集")
+    @PostMapping(value = "/renameOrDel")
+    @Log(title = "数据集管理", businessType = BusinessType.UPDATE)
+    public AjaxResult renameDataSet(@RequestBody DataSetShareParam param) {
+        String result = dataSetService.renameDataSet(param);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("数据集详情")
+    @GetMapping(value = "/detail/{id}")
+    public AjaxResult getDetail(@PathVariable("id") Long id) {
+        DataSetVo result = dataSetService.getDetail(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("获取dbc文件列表")
+    @GetMapping(value = "/dbcFileList")
+    public AjaxResult getDbcFileList() {
+        List<DbcFileListVo> result = dataSetService.getDbcFileList();
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("上传asc文件")
+    @PostMapping(value = "/upload")
+    @Log(title = "数据集管理", businessType = BusinessType.IMPORT)
+    public AjaxResult uploadAsc(@RequestBody AscFileDto dto) {
+        String result = dataSetService.uploadAsc(dto);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("离线数据详情")
+    @PostMapping(value = "/page")
+    public AjaxResult getDataSetPage(@RequestBody DataSetListParam param) throws Exception {
+        Map<String, Object> map = new HashMap<>();
+        PageInfo<Map<String, Object>> result = dataSetService.getDataSetPage(param);
+        map.put("page", result);
+        map.put("title", dataSetService.getFields(param.getAscId()));
+        return AjaxResult.success(map);
+    }
+
+    /*@ApiOperation("导出离线数据")
+    @PostMapping(value = "/export")
+    public AjaxResult exportDataSet(@RequestBody DataSetListParam param) throws Exception {
+        String result = dataSetService.exportDataSet(param);
+        if (Constants.FAILED.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }*/
+
+    @ApiOperation("获取oss地址配置信息")
+    @GetMapping(value = "/ossMsg")
+    public AjaxResult getOssMsg() {
+        OssConfigVo result = dataSetService.getOssMsg();
+        return AjaxResult.success(result);
+    }
+}

+ 99 - 0
hz-business/src/main/java/com/hz/business/controller/DbcFileController.java

@@ -0,0 +1,99 @@
+package com.hz.business.controller;
+
+
+import com.github.pagehelper.PageInfo;
+import com.hz.business.base.IdParam;
+import com.hz.business.req.DbcFileParam;
+import com.hz.business.service.IDbcFileService;
+import com.hz.business.vo.DbcFileVo;
+import com.hz.business.vo.FieldCommentVo;
+import com.hz.common.annotation.Log;
+import com.hz.common.constant.Constants;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.IOException;
+import java.util.List;
+import java.util.Set;
+
+
+/**
+ * 数据集Controller
+ *
+ * @author hz
+ * @date 2022-02-15
+ */
+@Api(tags = "DBC文件管理")
+@RestController
+@RequestMapping("/business/dbcFile")
+public class DbcFileController extends BaseController {
+
+    @Resource
+    IDbcFileService dbcFileService;
+
+
+    @ApiOperation("查询数据集列表")
+    @PostMapping(value = "/list")
+    public AjaxResult getDbcList(@RequestBody DbcFileParam param) {
+        PageInfo<DbcFileVo> result = dbcFileService.getDbcList(param);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("上传dbc文件")
+    @PostMapping(value = "/upload")
+    @Log(title = "上传dbc文件", businessType = BusinessType.IMPORT)
+    public AjaxResult uploadDbc(MultipartFile file, @RequestParam String id, @RequestParam String alias, @RequestParam String carModel) throws IOException {
+        String result = Constants.OK;
+        Long dbcId = dbcFileService.uploadDbc(file, StringUtils.isNotBlank(id) ? Long.parseLong(id) : -1, alias, carModel);
+            if (dbcId == null) {
+                return AjaxResult.error(5001, Constants.FAILED);
+            } else {
+                result = dbcFileService.explainDbc(dbcId);
+            }
+
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("解析DBC文件")
+    @PostMapping(value = "/explain")
+    @Log(title = "解析DBC文件", businessType = BusinessType.IMPORT)
+    public AjaxResult uploadDbc(@RequestBody IdParam param) throws IOException {
+        String result = dbcFileService.explainDbc(Long.parseLong(param.getId()));
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("dbc详情")
+    @GetMapping(value = "/detail/{id}")
+    public AjaxResult getDbcFileDetail(@PathVariable("id") Long id) {
+        DbcFileVo result = dbcFileService.getDbcFileDetail(id);
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("dbc移除")
+    @DeleteMapping(value = "/remove/{id}")
+    @Log(title = "dbc移除", businessType = BusinessType.DELETE)
+    public AjaxResult removeDbc(@PathVariable("id") Long id) {
+        String result = dbcFileService.removeDbc(id);
+        if (!Constants.OK.equals(result)) {
+            return AjaxResult.error(5001, result);
+        }
+        return AjaxResult.success(result);
+    }
+
+    @ApiOperation("dbc字段列表")
+    @GetMapping(value = "/fieldList/{id}")
+    public AjaxResult getFieldList(@PathVariable("id") Long id) {
+        List<FieldCommentVo> result = dbcFileService.getFieldList(id);
+        return AjaxResult.success(result);
+    }
+}

+ 45 - 0
hz-business/src/main/java/com/hz/business/controller/DealAlarmLogController.java

@@ -0,0 +1,45 @@
+package com.hz.business.controller;
+
+import java.util.List;
+
+import io.swagger.annotations.Api;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.hz.common.annotation.Log;
+import com.hz.common.core.controller.BaseController;
+import com.hz.common.core.domain.AjaxResult;
+import com.hz.common.enums.BusinessType;
+import com.hz.common.utils.poi.ExcelUtil;
+import javax.annotation.Resource;
+
+import com.hz.business.domain.DealAlarmLog;
+import com.hz.business.service.IDealAlarmLogService;
+/**
+ * 故障处理日志Controller
+ * 
+ * @author hz
+ * @date 2022-02-25
+ */
+@Api(tags = "故障处理日志")
+@RestController
+@RequestMapping("/business/log")
+public class DealAlarmLogController extends BaseController {
+    @Resource
+    private IDealAlarmLogService dealAlarmLogService;
+
+
+    /**
+     * 导出故障处理日志列表
+     */
+    @Log(title = "故障处理日志", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export()
+    {
+        List<DealAlarmLog> list = dealAlarmLogService.list();
+        ExcelUtil<DealAlarmLog> util = new ExcelUtil<DealAlarmLog>(DealAlarmLog.class);
+        return util.exportExcel(list, "故障处理日志数据");
+    }
+
+}

Деякі файли не було показано, через те що забагато файлів було змінено