Browse Source

首次提交

yangkangwei 2 years ago
commit
eab440f0c3
100 changed files with 12389 additions and 0 deletions
  1. 43 0
      .fastRequest/config/fastRequestCurrentProjectConfig.json
  2. 47 0
      .gitignore
  3. 20 0
      LICENSE
  4. 37 0
      README.md
  5. 262 0
      pom.xml
  6. 67 0
      ry.bat
  7. 86 0
      ry.sh
  8. 47 0
      yunnan-report-admin/.gitignore
  9. 166 0
      yunnan-report-admin/pom.xml
  10. 244 0
      yunnan-report-admin/src/main/java/com/ruoyi/RuoYiApplication.java
  11. 18 0
      yunnan-report-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
  12. 306 0
      yunnan-report-admin/src/main/java/com/ruoyi/imports/MyExcelDbImportUtils.java
  13. 1092 0
      yunnan-report-admin/src/main/java/com/ruoyi/imports/PatentPubImportUtils.java
  14. 171 0
      yunnan-report-admin/src/main/java/com/ruoyi/imports/util/DateUtils.java
  15. 102 0
      yunnan-report-admin/src/main/java/com/ruoyi/imports/util/DbConfig.java
  16. 367 0
      yunnan-report-admin/src/main/java/com/ruoyi/imports/util/DbUtils.java
  17. 39 0
      yunnan-report-admin/src/main/java/com/ruoyi/imports/util/GsonUtils.java
  18. 10 0
      yunnan-report-admin/src/main/java/com/ruoyi/task/PatentSyncTask.java
  19. 10 0
      yunnan-report-admin/src/main/java/com/ruoyi/task/TrademarkSyncTask.java
  20. 47 0
      yunnan-report-admin/src/main/java/com/ruoyi/task/impl/PatentSyncTaskImpl.java
  21. 111 0
      yunnan-report-admin/src/main/java/com/ruoyi/task/impl/TrademarkSyncTaskImpl.java
  22. 39 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/CircuitController.java
  23. 48 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/GeographicalController.java
  24. 51 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/PatentController.java
  25. 33 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/PrivateApiController.java
  26. 37 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/TrademarkController.java
  27. 282 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/base/BaseExportTempController.java
  28. 182 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/biz/BizPatentValidOgController.java
  29. 468 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/cgb/CgbActiveController.java
  30. 93 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
  31. 163 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  32. 53 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java
  33. 27 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java
  34. 69 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java
  35. 69 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java
  36. 92 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java
  37. 114 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/BladeRegionController.java
  38. 134 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
  39. 165 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
  40. 121 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java
  41. 132 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
  42. 29 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java
  43. 85 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
  44. 142 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
  45. 91 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
  46. 133 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
  47. 127 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
  48. 38 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysRegisterController.java
  49. 245 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
  50. 224 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  51. 28 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/TestNotifyController.java
  52. 98 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/UrPatentValidController.java
  53. 140 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/UrValidShowDataController.java
  54. 156 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/UrYearValidDataController.java
  55. 24 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java
  56. 181 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
  57. 56 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/core/config/MyMetaObjecthandler.java
  58. 125 0
      yunnan-report-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
  59. 1 0
      yunnan-report-admin/src/main/resources/META-INF/spring-devtools.properties
  60. 70 0
      yunnan-report-admin/src/main/resources/application-druid.yml
  61. 140 0
      yunnan-report-admin/src/main/resources/application.yml
  62. 2 0
      yunnan-report-admin/src/main/resources/banner.txt
  63. 37 0
      yunnan-report-admin/src/main/resources/i18n/messages.properties
  64. 54 0
      yunnan-report-admin/src/main/resources/logback.xml
  65. 93 0
      yunnan-report-admin/src/main/resources/logback_bak.xml
  66. 10 0
      yunnan-report-admin/src/main/resources/mapper/reportpub/DPatentPubInfoMapper.xml
  67. 20 0
      yunnan-report-admin/src/main/resources/mybatis/mybatis-config.xml
  68. 4 0
      yunnan-report-admin/src/main/resources/ureport.properties
  69. 1721 0
      yunnan-report-admin/src/test/java/com/ruoyi/ExcelExp.java
  70. 36 0
      yunnan-report-admin/src/test/java/com/ruoyi/ExcelExpMain.java
  71. 47 0
      yunnan-report-base/.gitignore
  72. 39 0
      yunnan-report-base/pom.xml
  73. 26 0
      yunnan-report-base/src/main/java/com/ruoyi/base/DTO/BaseTempExportDTO.java
  74. 144 0
      yunnan-report-base/src/main/java/com/ruoyi/base/domain/BaseExportTemp.java
  75. 91 0
      yunnan-report-base/src/main/java/com/ruoyi/base/mapper/BaseExportTempMapper.java
  76. 91 0
      yunnan-report-base/src/main/java/com/ruoyi/base/service/IBaseExportTempService.java
  77. 154 0
      yunnan-report-base/src/main/java/com/ruoyi/base/service/impl/BaseExportTempServiceImpl.java
  78. 31 0
      yunnan-report-base/src/main/java/com/ruoyi/jimureport/JimuReportConfig.java.txt
  79. 125 0
      yunnan-report-base/src/main/java/com/ruoyi/ureport/FileReportProvider.java
  80. 40 0
      yunnan-report-base/src/main/java/com/ruoyi/ureport/UReportConfig.java
  81. 82 0
      yunnan-report-base/src/main/java/com/ruoyi/ureport/UreportBusinessService.java
  82. 179 0
      yunnan-report-base/src/main/resources/mapper/base/BaseExportTempMapper.xml
  83. 47 0
      yunnan-report-biz/.gitignore
  84. 41 0
      yunnan-report-biz/pom.xml
  85. 154 0
      yunnan-report-biz/src/main/java/com/ruoyi/biz/domain/BizPatentValidOg.java
  86. 77 0
      yunnan-report-biz/src/main/java/com/ruoyi/biz/mapper/BizPatentValidOgMapper.java
  87. 86 0
      yunnan-report-biz/src/main/java/com/ruoyi/biz/service/IBizPatentValidOgService.java
  88. 153 0
      yunnan-report-biz/src/main/java/com/ruoyi/biz/service/impl/BizPatentValidOgServiceImpl.java
  89. 165 0
      yunnan-report-biz/src/main/resources/mapper/biz/BizPatentValidOgMapper.xml
  90. 47 0
      yunnan-report-common/.gitignore
  91. 213 0
      yunnan-report-common/pom.xml
  92. 19 0
      yunnan-report-common/src/main/java/com/ruoyi/common/annotation/Anonymous.java
  93. 28 0
      yunnan-report-common/src/main/java/com/ruoyi/common/annotation/DataScope.java
  94. 28 0
      yunnan-report-common/src/main/java/com/ruoyi/common/annotation/DataSource.java
  95. 176 0
      yunnan-report-common/src/main/java/com/ruoyi/common/annotation/Excel.java
  96. 18 0
      yunnan-report-common/src/main/java/com/ruoyi/common/annotation/Excels.java
  97. 46 0
      yunnan-report-common/src/main/java/com/ruoyi/common/annotation/Log.java
  98. 40 0
      yunnan-report-common/src/main/java/com/ruoyi/common/annotation/RateLimiter.java
  99. 31 0
      yunnan-report-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java
  100. 197 0
      yunnan-report-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java

+ 43 - 0
.fastRequest/config/fastRequestCurrentProjectConfig.json

@@ -0,0 +1,43 @@
+{
+	"dataList":[
+		{
+			"hostGroup":[
+				{
+					"env":"本地环境",
+					"url":"http://localhost:8080/prod-api"
+				}
+			],
+			"name":"yunnan-report"
+		}
+	],
+	"envList":[
+		"本地环境"
+	],
+	"headerList":[
+		{
+			"enabled":true,
+			"type":"Authorization",
+			"value":"eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImQ5ODI5YTNhLTk1NjYtNGQ5OS1iYjE2LWJlYzU2ZjI0NTBiYyJ9.otYx1GIxome0UlWYizd-hVnaHZ5ucFYAyM-q9aQW9JmCzpTxEm96qXt6bNekJdvsDjDCipOwTTjwiU7cASiy5Q"
+		}
+	],
+	"postScript":"",
+	"preScript":"",
+	"projectList":[
+		"yunnan-report"
+	],
+	"syncModel":{
+		"branch":"master",
+		"domain":"https://github.com",
+		"enabled":false,
+		"namingPolicy":"byDoc",
+		"owner":"",
+		"repo":"",
+		"repoUrl":"",
+		"syncAfterRun":false,
+		"token":"",
+		"type":"github"
+	},
+	"urlEncodedKeyValueList":[],
+	"urlParamsKeyValueList":[],
+	"urlSuffix":""
+}

+ 47 - 0
.gitignore

@@ -0,0 +1,47 @@
+######################################################################
+# Build Tools
+yunnan-report-ui_bak/
+.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
+
+### JRebel ###
+rebel.xml
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

+ 20 - 0
LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 RuoYi
+
+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.

+ 37 - 0
README.md

@@ -0,0 +1,37 @@
+<p align="center">
+	<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
+</p>
+<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.8.1</h1>
+<h4 align="center">基于SpringBoot+Vue前后端分离的Java快速开发框架</h4>
+
+
+## 平台简介
+
+若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
+
+* 前端采用Vue、Element UI。
+* 后端采用Spring Boot、Spring Security、MyBatis-Plus、Redis & Jwt。
+* 权限认证使用Jwt,支持多终端认证系统。
+* 支持加载动态权限菜单,多方式轻松权限控制。
+* 高效率开发,使用代码生成器可以一键生成前后端代码。
+
+## 内置功能
+
+1.  用户管理:用户是系统操作者,该功能主要完成系统用户配置。
+2.  部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
+3.  岗位管理:配置系统用户所属担任职务。
+4.  菜单管理:配置系统菜单,操作权限,按钮权限标识等。
+5.  角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
+6.  字典管理:对系统中经常使用的一些较为固定的数据进行维护。
+7.  参数管理:对系统动态配置常用参数。
+8.  通知公告:系统通知公告信息发布维护。
+9.  操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
+10. 登录日志:系统登录日志记录查询包含登录异常。
+11. 在线用户:当前系统中活跃用户状态监控。
+12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
+13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
+14. 系统接口:根据业务代码自动生成相关的api接口文档。
+15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
+16. 缓存监控:对系统的缓存信息查询,命令统计等。
+17. 在线构建器:拖动表单元素生成相应的HTML代码。
+18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。

+ 262 - 0
pom.xml

@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+    <groupId>com.ruoyi</groupId>
+    <artifactId>yunnan-report</artifactId>
+    <version>3.8.1</version>
+
+    <name>ruoyi</name>
+    <url>http://www.ruoyi.vip</url>
+    <description>若依管理系统</description>
+    
+    <properties>
+        <ruoyi.version>3.8.1</ruoyi.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
+        <druid.version>1.2.8</druid.version>
+        <bitwalker.version>1.21</bitwalker.version>
+        <swagger.version>3.0.0</swagger.version>
+        <kaptcha.version>2.3.2</kaptcha.version>
+        <mybatis-spring-boot.version>2.2.2</mybatis-spring-boot.version>
+        <pagehelper.boot.version>1.4.1</pagehelper.boot.version>
+        <fastjson.version>1.2.79</fastjson.version>
+        <oshi.version>6.1.2</oshi.version>
+        <jna.version>5.10.0</jna.version>
+        <commons.io.version>2.11.0</commons.io.version>
+        <commons.fileupload.version>1.4</commons.fileupload.version>
+        <commons.collections.version>3.2.2</commons.collections.version>
+        <poi.version>4.1.2</poi.version>
+        <velocity.version>2.3</velocity.version>
+        <jwt.version>0.9.1</jwt.version>
+    </properties>
+	
+    <!-- 依赖声明 -->
+    <dependencyManagement>
+        <dependencies>
+
+            <!-- SpringBoot的依赖配置-->
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>2.5.10</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <!-- 阿里数据库连接池 -->
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>druid-spring-boot-starter</artifactId>
+                <version>${druid.version}</version>
+            </dependency>
+
+            <!-- 解析客户端操作系统、浏览器等 -->
+            <dependency>
+                <groupId>eu.bitwalker</groupId>
+                <artifactId>UserAgentUtils</artifactId>
+                <version>${bitwalker.version}</version>
+            </dependency>
+
+            <!-- SpringBoot集成mybatis框架 -->
+            <dependency>
+                <groupId>org.mybatis.spring.boot</groupId>
+                <artifactId>mybatis-spring-boot-starter</artifactId>
+                <version>${mybatis-spring-boot.version}</version>
+            </dependency>
+
+            <!-- pagehelper 分页插件 -->
+            <dependency>
+                <groupId>com.github.pagehelper</groupId>
+                <artifactId>pagehelper-spring-boot-starter</artifactId>
+                <version>${pagehelper.boot.version}</version>
+            </dependency>
+
+            <!-- 获取系统信息 -->
+            <dependency>
+                <groupId>com.github.oshi</groupId>
+                <artifactId>oshi-core</artifactId>
+                <version>${oshi.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>net.java.dev.jna</groupId>
+                <artifactId>jna</artifactId>
+                <version>${jna.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>net.java.dev.jna</groupId>
+                <artifactId>jna-platform</artifactId>
+                <version>${jna.version}</version>
+            </dependency>
+
+            <!-- Swagger3依赖 -->
+            <dependency>
+                <groupId>io.springfox</groupId>
+                <artifactId>springfox-boot-starter</artifactId>
+                <version>${swagger.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>io.swagger</groupId>
+                        <artifactId>swagger-models</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <!-- io常用工具类 -->
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>${commons.io.version}</version>
+            </dependency>
+
+            <!-- 文件上传工具类 -->
+            <dependency>
+                <groupId>commons-fileupload</groupId>
+                <artifactId>commons-fileupload</artifactId>
+                <version>${commons.fileupload.version}</version>
+            </dependency>
+
+            <!-- excel工具 -->
+            <dependency>
+                <groupId>org.apache.poi</groupId>
+                <artifactId>poi-ooxml</artifactId>
+                <version>${poi.version}</version>
+            </dependency>
+
+            <!-- velocity代码生成使用模板 -->
+            <dependency>
+                <groupId>org.apache.velocity</groupId>
+                <artifactId>velocity-engine-core</artifactId>
+                <version>${velocity.version}</version>
+            </dependency>
+
+            <!-- collections工具类 -->
+            <dependency>
+                <groupId>commons-collections</groupId>
+                <artifactId>commons-collections</artifactId>
+                <version>${commons.collections.version}</version>
+            </dependency>
+
+            <!-- 阿里JSON解析器 -->
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>fastjson</artifactId>
+                <version>${fastjson.version}</version>
+            </dependency>
+
+            <!-- Token生成与解析-->
+            <dependency>
+                <groupId>io.jsonwebtoken</groupId>
+                <artifactId>jjwt</artifactId>
+                <version>${jwt.version}</version>
+            </dependency>
+
+            <!-- 验证码 -->
+            <dependency>
+                <groupId>com.github.penggle</groupId>
+                <artifactId>kaptcha</artifactId>
+                <version>${kaptcha.version}</version>
+            </dependency>
+
+            <!-- 定时任务-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>yunnan-report-quartz</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <!-- 代码生成-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>yunnan-report-generator</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <!-- 核心模块-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>yunnan-report-framework</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <!-- 系统模块-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>yunnan-report-system</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <!-- 通用工具-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>yunnan-report-common</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+        </dependencies>
+    </dependencyManagement>
+
+    <modules>
+        <module>yunnan-report-admin</module>
+        <module>yunnan-report-framework</module>
+        <module>yunnan-report-system</module>
+        <module>yunnan-report-base</module>
+        <module>yunnan-report-biz</module>
+        <module>yunnan-report-quartz</module>
+        <module>yunnan-report-generator</module>
+        <module>yunnan-report-common</module>
+    </modules>
+    <packaging>pom</packaging>
+
+
+    <dependencies>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                    <encoding>${project.build.sourceEncoding}</encoding>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>public</id>
+            <name>aliyun nexus</name>
+            <url>https://maven.aliyun.com/repository/public</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+    </repositories>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>public</id>
+            <name>aliyun nexus</name>
+            <url>https://maven.aliyun.com/repository/public</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
+</project>

+ 67 - 0
ry.bat

@@ -0,0 +1,67 @@
+@echo off
+
+rem jar平级目录
+set AppName=ruoyi-admin.jar
+
+rem JVM参数
+set JVM_OPTS="-Dname=%AppName%  -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps  -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
+
+
+ECHO.
+	ECHO.  [1] 启动%AppName%
+	ECHO.  [2] 关闭%AppName%
+	ECHO.  [3] 重启%AppName%
+	ECHO.  [4] 启动状态 %AppName%
+	ECHO.  [5] 退 出
+ECHO.
+
+ECHO.请输入选择项目的序号:
+set /p ID=
+	IF "%id%"=="1" GOTO start
+	IF "%id%"=="2" GOTO stop
+	IF "%id%"=="3" GOTO restart
+	IF "%id%"=="4" GOTO status
+	IF "%id%"=="5" EXIT
+PAUSE
+:start
+    for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
+		set pid=%%a
+		set image_name=%%b
+	)
+	if  defined pid (
+		echo %%is running
+		PAUSE
+	)
+
+start javaw %JVM_OPTS% -jar %AppName%
+
+echo  starting……
+echo  Start %AppName% success...
+goto:eof
+
+rem 函数stop通过jps命令查找pid并结束进程
+:stop
+	for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
+		set pid=%%a
+		set image_name=%%b
+	)
+	if not defined pid (echo process %AppName% does not exists) else (
+		echo prepare to kill %image_name%
+		echo start kill %pid% ...
+		rem 根据进程ID,kill进程
+		taskkill /f /pid %pid%
+	)
+goto:eof
+:restart
+	call :stop
+    call :start
+goto:eof
+:status
+	for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
+		set pid=%%a
+		set image_name=%%b
+	)
+	if not defined pid (echo process %AppName% is dead ) else (
+		echo %image_name% is running
+	)
+goto:eof

+ 86 - 0
ry.sh

@@ -0,0 +1,86 @@
+#!/bin/sh
+# ./ry.sh start 启动 stop 停止 restart 重启 status 状态
+AppName=ruoyi-admin.jar
+
+# JVM参数
+JVM_OPTS="-Dname=$AppName  -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps  -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
+APP_HOME=`pwd`
+LOG_PATH=$APP_HOME/logs/$AppName.log
+
+if [ "$1" = "" ];
+then
+    echo -e "\033[0;31m 未输入操作名 \033[0m  \033[0;34m {start|stop|restart|status} \033[0m"
+    exit 1
+fi
+
+if [ "$AppName" = "" ];
+then
+    echo -e "\033[0;31m 未输入应用名 \033[0m"
+    exit 1
+fi
+
+function start()
+{
+    PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
+
+	if [ x"$PID" != x"" ]; then
+	    echo "$AppName is running..."
+	else
+		nohup java $JVM_OPTS -jar $AppName > /dev/null 2>&1 &
+		echo "Start $AppName success..."
+	fi
+}
+
+function stop()
+{
+    echo "Stop $AppName"
+
+	PID=""
+	query(){
+		PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
+	}
+
+	query
+	if [ x"$PID" != x"" ]; then
+		kill -TERM $PID
+		echo "$AppName (pid:$PID) exiting..."
+		while [ x"$PID" != x"" ]
+		do
+			sleep 1
+			query
+		done
+		echo "$AppName exited."
+	else
+		echo "$AppName already stopped."
+	fi
+}
+
+function restart()
+{
+    stop
+    sleep 2
+    start
+}
+
+function status()
+{
+    PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l`
+    if [ $PID != 0 ];then
+        echo "$AppName is running..."
+    else
+        echo "$AppName is not running..."
+    fi
+}
+
+case $1 in
+    start)
+    start;;
+    stop)
+    stop;;
+    restart)
+    restart;;
+    status)
+    status;;
+    *)
+
+esac

+ 47 - 0
yunnan-report-admin/.gitignore

@@ -0,0 +1,47 @@
+######################################################################
+# Build Tools
+yunnan-report-ui_bak/
+.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
+
+### JRebel ###
+rebel.xml
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

+ 166 - 0
yunnan-report-admin/pom.xml

@@ -0,0 +1,166 @@
+<?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>yunnan-report</artifactId>
+        <groupId>com.ruoyi</groupId>
+        <version>3.8.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <artifactId>yunnan-report-admin</artifactId>
+
+    <description>
+        web服务入口
+    </description>
+
+    <dependencies>
+<!-- 业务-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>yunnan-report-biz</artifactId>
+            <version>3.8.1</version>
+            <exclusions>
+            	<exclusion>
+            		<groupId>org.jeecgframework.jimureport</groupId>
+            		<artifactId>jimureport-spring-boot-starter</artifactId>
+            	</exclusion>
+            	<exclusion>
+            		<groupId>com.bstek.ureport</groupId>
+            		<artifactId>ureport2-console</artifactId>
+            	</exclusion>
+            	<exclusion>
+            		<groupId>com.alibaba</groupId>
+            		<artifactId>easyexcel</artifactId>
+            	</exclusion>
+            </exclusions>
+        </dependency>
+        <!-- spring-boot-devtools
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>true</optional> 
+        </dependency>
+         -->
+
+        <!-- swagger3-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+        </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.ruoyi</groupId>
+            <artifactId>yunnan-report-framework</artifactId>
+            <exclusions>
+            	<exclusion>
+            		<groupId>com.alibaba</groupId>
+            		<artifactId>easyexcel</artifactId>
+            	</exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- 定时任务-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>yunnan-report-quartz</artifactId>
+        </dependency>
+
+        <!-- 代码生成-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>yunnan-report-generator</artifactId>
+        </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>
+                </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>
+            -->
+            <plugin>
+                <groupId>com.openjad.devtools</groupId>
+                <artifactId>openjad-devtools-maven</artifactId>
+                <version>3.0.1-RELEASE</version>
+                <configuration>
+                    <outputDirectoryLib>${project.build.directory}/lib</outputDirectoryLib>
+                    <layout>ZIP</layout>
+                    <autoPackGroupIds>com.openjad</autoPackGroupIds>
+                    <finalNameSub>${project.build.finalName}-jad</finalNameSub>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>jad-export-dependencies</id>
+                        <goals>
+                            <goal>jad-export-dependencies</goal>
+                            <goal>jad-copy-dependencies</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                    </execution>
+                    <execution>
+                        <id>jad-repackage</id>
+                        <goals>
+                            <goal>jad-repackage</goal>
+                        </goals>
+                        <phase>package</phase>
+                    </execution>
+
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>**/application*.yml</exclude>
+                        <exclude>**/logback*.xml</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+
+
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+
+</project>

+ 244 - 0
yunnan-report-admin/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -0,0 +1,244 @@
+package com.ruoyi;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+
+import com.google.gson.Gson;
+import com.ruoyi.adjust.service.IDAdjustSyncLogService;
+import com.ruoyi.circuit.service.ICIntegratedCircuitService;
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.dimp.service.IDPatentAuthInfoService;
+import com.ruoyi.dimp.service.IDPatentEffectiveInfoService;
+import com.ruoyi.indica.service.ICIndicationInfoService;
+import com.ruoyi.madridmark.service.ICMadridmarkService;
+import com.ruoyi.reportpub.service.IDPatentPubInfoService;
+import com.ruoyi.system.domain.BladeRegion;
+import com.ruoyi.system.service.IBladeRegionService;
+import com.ruoyi.system.service.IDIpcTypeService;
+import com.ruoyi.trade.service.ICTrademarkService;
+
+/**
+ * 启动程序
+ *
+ * @author ruoyi
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+public class RuoYiApplication implements ApplicationRunner {
+
+	private static final Logger logger = LoggerFactory.getLogger(RuoYiApplication.class);
+
+	@Autowired
+	private RuoYiConfig ruoYiConfig;
+	@Autowired
+	private IDPatentPubInfoService dPatentPubInfoService;
+	@Autowired
+	private IDPatentAuthInfoService dPatentAuthInfoService;
+	
+	@Autowired
+	private IDPatentEffectiveInfoService dPatentEffectiveInfoService;
+
+	@Autowired
+	private IBladeRegionService bladeRegionService;
+	@Autowired
+	private IDIpcTypeService dIpcTypeService;
+	@Autowired
+	private ICTrademarkService cTrademarkService;
+	@Autowired
+	private ICIntegratedCircuitService iCIntegratedCircuitService;
+	@Autowired
+	private ICIndicationInfoService iCIndicationInfoService;
+
+	@Autowired
+	private ICMadridmarkService cMadridmarkService;
+	@Autowired
+	private IDAdjustSyncLogService dAdjustSyncLogService;
+
+	public static void main(String[] args) {
+		SpringApplication.run(RuoYiApplication.class, args);
+		System.out.println("(♥◠‿◠)ノ゙  若依启动成功");
+	}
+
+	// 处理专利调整数据
+	private void syncPatentAdjuest() {
+		dAdjustSyncLogService.syncAdjuestAfterRestart();
+	}
+
+	private void syncArea() {
+		List<BladeRegion> list = bladeRegionService.selectBladeRegionList(new BladeRegion());
+		for (BladeRegion br : list) {
+			BladeRegion qo = new BladeRegion();
+			qo.setParentCode(br.getCode());
+			br.setAreaList(bladeRegionService.selectBladeRegionList(qo));
+
+			if (br.getAreaList() != null && !br.getAreaList().isEmpty()) {
+				for (BladeRegion sbr : br.getAreaList()) {
+					BladeRegion qo2 = new BladeRegion();
+					qo2.setParentCode(sbr.getCode());
+					sbr.setAreaList(bladeRegionService.selectBladeRegionList(qo2));
+				}
+			}
+		}
+
+		AreaItem item = new AreaItem();
+		item.code = "53";
+		item.name = "云南省";
+		item.level = 0;
+		List<AreaItem> areaList = new ArrayList<AreaItem>();
+		item.areaList = areaList;
+
+		int level = 1;
+		for (BladeRegion br : list) {
+			if (br.getCode().equals("53")) {
+				continue;
+			}
+			item.areaList.add(toAreaItem(br, level));
+		}
+
+		System.out.println(new Gson().toJson(item));
+
+	}
+
+	private static AreaItem toAreaItem(BladeRegion br, int level) {
+		AreaItem item = new AreaItem();
+		item.code = br.getCode();
+		item.level = level;
+		String name = br.getName();
+		if (StringUtils.isNotBlank(br.getCityShortName())) {
+			name = br.getCityShortName().replace("-", "");
+		} else if (StringUtils.isNotBlank(br.getDistrictShortName())) {
+			name = br.getDistrictShortName();
+		}
+
+		item.name = name;
+		if (br.getAreaList() != null && !br.getAreaList().isEmpty()) {
+			List<AreaItem> areaList = new ArrayList<AreaItem>();
+			item.areaList = areaList;
+			int sublev = level + 1;
+			for (BladeRegion sbr : br.getAreaList()) {
+				item.areaList.add(toAreaItem(sbr, sublev));
+			}
+		}
+
+		return item;
+	}
+
+	private static class AreaItem {
+		String code;
+		int level;
+		String name;
+		List<AreaItem> areaList;
+	}
+
+	public void refreshHv() {
+		new Thread() {
+			public void run() {
+				try {
+					dPatentAuthInfoService.doRefreshHv();
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}.start();
+		new Thread() {
+			public void run() {
+				try {
+					dPatentEffectiveInfoService.doRefreshHv();
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}.start();
+	}
+
+	
+	/**
+	 * 同步商标地区
+	 * 
+	 * 20231017
+	 * 
+	 */
+	private void syncTrademarkArea() {
+		cTrademarkService.syncTrademarkArea();
+	}
+	
+	public static Thread authReMatchThread=null;
+	public static Thread actReMatchThread=null;
+	
+	
+	private void reMatch3() {
+		authReMatchThread = new Thread() {
+			public void run() {
+				dPatentAuthInfoService.reMatch3();
+			}
+		};
+		authReMatchThread.start();
+		
+		actReMatchThread = new Thread() {
+			public void run() {
+				dPatentEffectiveInfoService.reMatch3();
+			}
+		};
+		actReMatchThread.start();
+	}
+	
+	@Override
+	public void run(ApplicationArguments args) throws Exception {
+		new Thread() {
+			public void run() {
+				try {
+
+//					syncArea();
+					if (ruoYiConfig.getAutoImpPub()) {
+
+//						refreshHv();
+						String beginDate = "20210101";
+						String endDate = new SimpleDateFormat("yyyyMMdd").format(new Date());
+//						PatentPubImportUtils.imp(bladeRegionService, dIpcTypeService);
+
+//						dPatentEffectiveInfoService.reMatch();
+//						PatentPubImportUtils.impByIprd(ruoYiConfig, dPatentPubInfoService, dIpcTypeService, bladeRegionService, beginDate);
+//						dPatentEffectiveInfoService.reMatch2();
+
+						// 同步集成电路
+//						iCIntegratedCircuitService.doSyncForIprd(beginDate, endDate);
+//						
+//						//同步地理标志
+//						iCIndicationInfoService.doSyncForIprd(beginDate, endDate);
+//						
+////						//同步马德里商标
+//						cMadridmarkService.doSyncForIprd(beginDate, endDate);
+//						
+////						//同步商标
+//						cTrademarkService.doSyncForIprd(beginDate, endDate);
+
+					}
+					if (ruoYiConfig.getLoadPub()) {
+//						dPatentPubInfoService.loadToCache();
+//						dPatentAuthInfoService.cleanData();
+//						dPatentEffectiveInfoService.cleanData();
+					}
+					
+					//test
+//					syncTrademarkArea();
+//					reMatch3();
+					
+					syncPatentAdjuest();
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}.start();
+	}
+}

+ 18 - 0
yunnan-report-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java

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

+ 306 - 0
yunnan-report-admin/src/main/java/com/ruoyi/imports/MyExcelDbImportUtils.java

@@ -0,0 +1,306 @@
+package com.ruoyi.imports;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.DateUtil;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.WorkbookFactory;
+
+public class MyExcelDbImportUtils {
+
+	public static void main(String[] args) {
+
+		// 数据库定义文件
+//		String filePath="C:\\workspace\\myworkspace2022\\jad-authing\\doc\\db20221120.xlsx";
+//		String filePath = "E:\\workspace\\workspace2023\\bill-manager\\doc\\db\\数据库表设计-核算.xlsx";
+		String filePath = "D:\\9fu\\业务\\云南省知识产权数据统计系统\\设计\\云南省知识产权数据统计系统表设计\\数据整理模块表设计-新.xlsx";
+//		String filePath = "D:\\9fu\\业务\\云南省知识产权数据统计系统\\设计\\云南省知识产权数据统计系统表设计\\数据整理模块\\专利统计模块\\3-高价值专利统计模块表设计.xlsx";
+		// 从excel读取内容
+		List<List<String>> excelData = importExcel("ipc分类", filePath);//
+
+		// 转换成表模型
+		List<TableModel> tmList = toTableModelList(excelData);
+
+		// 转换成建表语句
+		List<String> sqlList = toSql(tmList);
+
+		
+		for (String sql : sqlList) {
+			System.out.println(sql);
+		}
+		System.out.println("解析完成,一共" + tmList.size() + "张表");
+//		for (TableModel tm : tmList) {
+//			System.out.println(tm.name);
+//		}
+//		System.out.println("ok");
+
+	}
+
+	/**
+	 * 转换成建表语句
+	 * 
+	 * @param tmList
+	 * @return
+	 */
+	private static List<String> toSql(List<TableModel> tmList) {
+
+		List<String> sqlList = new ArrayList<String>();
+
+		for (TableModel tm : tmList) {
+			sqlList.add(tm.toSql());
+		}
+
+		return sqlList;
+	}
+
+	/**
+	 * 转换成表模型
+	 * 
+	 * @param excelData
+	 * @return
+	 */
+	private static List<TableModel> toTableModelList(List<List<String>> excelData) {
+		List<TableModel> tableList = new ArrayList<TableModel>();
+
+		TableModel tm = null;
+		for (int i = 0; i < excelData.size(); i++) {// 逐行循环
+			List<String> cells = excelData.get(i);
+
+			if (cells.size() < 2) {
+				continue;
+			}
+
+			if ("表名".equals(cells.get(0))) {// 遇到一个表
+				tm = new TableModel();
+				tm.name = cells.get(1);
+				if(tm.name!=null && tm.name.trim().endsWith("表")) {
+					tm.name=tm.name.trim();
+					tm.name=tm.name.substring(0,tm.name.length()-1);
+				}
+				
+				tm.comment = cells.get(3);
+				if(tm.comment!=null && tm.comment.trim().endsWith("表")) {
+					tm.comment=tm.comment.trim();
+					tm.comment=tm.comment.substring(0,tm.comment.length()-1);
+				}
+				
+				
+				tm.columns = new ArrayList<ColumnModel>();
+				
+				tableList.add(tm);
+				continue;
+			}
+
+			if ("名称".equals(cells.get(0))) {
+				continue;
+			}
+
+			if (cells.get(0) == null || "".equals(cells.get(0))) {
+				continue;
+			}
+			ColumnModel cm = new ColumnModel();
+			cm.name = cells.get(0).trim().toLowerCase();
+			cm.type = cells.get(1);
+			if (cells.size() >= 3) {
+				cm.length = cells.get(2);
+			}
+			if (cells.size() >= 4) {
+				cm.comment = cells.get(3);
+			}
+			
+			if (cells.size() >= 5) {
+				cm.defaultVal = cells.get(4);
+			}
+			tm.columns.add(cm);
+		}
+
+		return tableList;
+	}
+
+	/**
+	 * 表模型定义
+	 *
+	 */
+	private static class TableModel {
+		String name;
+		String comment;
+		List<ColumnModel> columns;
+
+		String toSql() {
+			StringBuffer sb = new StringBuffer();
+			sb.append("DROP TABLE IF EXISTS `" + name + "`;");
+			sb.append("\n");
+			sb.append("CREATE TABLE `" + name + "`  (");
+			sb.append("\n");
+			for (ColumnModel cm : columns) {
+				if ("id".equals(cm.name)) {
+					sb.append("`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',");
+					sb.append("\n");
+				} else {
+					String type = cm.type;
+					if ("date".equals(cm.type)) {
+						type = "varchar";
+					}
+					sb.append("`").append(cm.name).append("` ").append(type);
+					if (cm.length != null && !"".equals(cm.length.trim())) {
+						sb.append("(").append(cm.length).append(")");
+					} else if ("date".equals(cm.type)) {
+						sb.append("(").append("10").append(")");
+					}
+
+					if (cm.defaultVal != null && !"".equals(cm.defaultVal.trim())) {
+						sb.append(" default '").append(cm.defaultVal.trim()).append("'");
+					}
+
+					sb.append(" COMMENT ");
+					if (cm.comment != null && !"".equals(cm.comment.trim())) {
+						sb.append("'").append(cm.comment).append("'");
+					} else {
+						sb.append("'").append(cm.name).append("'");
+					}
+					sb.append(",");
+					sb.append("\n");
+				}
+			}
+
+			sb.append("PRIMARY KEY (`id`)");
+			sb.append("\n");
+
+//			 COMMENT = '用户信息表'
+			String comment2 = (comment == null || "".equals(comment.trim())) ? name : comment;
+			sb.append(")  COMMENT = '").append(comment2).append("' ;");
+			sb.append("\n");
+			return sb.toString();
+		}
+	}
+
+	/**
+	 * 列模型定义
+	 *
+	 */
+	private static class ColumnModel {
+		String name;
+		String type;
+		String length;
+		String comment;
+		String defaultVal;
+	}
+
+	/**
+	 * 从excel中读内容
+	 * 
+	 * @param sheetName
+	 * @param FilePath
+	 * @return
+	 */
+	public static List<List<String>> importExcel(String sheetName, String FilePath) {
+		List<List<String>> list = new ArrayList();
+		InputStream in = null;
+		Workbook wb = null;
+
+		try {
+			try {
+				in = new FileInputStream(new File(FilePath));
+				wb = WorkbookFactory.create(in);
+			} catch (Exception e) {
+				throw new RuntimeException("加载Workbook失败" + e.getMessage(), e);
+			}
+			Sheet sheet = StringUtils.isNotEmpty(sheetName) ? wb.getSheet(sheetName) : wb.getSheetAt(0);
+			if (sheet == null) {
+				throw new RuntimeException("文件sheet不存在");
+			}
+			boolean isXSSFWorkbook = !(wb instanceof HSSFWorkbook);
+			if (!isXSSFWorkbook) {
+				throw new RuntimeException("只支持导入2007及以上的excel文件");
+			}
+
+			// 获取后最后一行的下标
+			int rows = sheet.getLastRowNum();
+			if (rows <= 0) {
+				return null;
+			}
+			for (int r = 0; r < rows; r++) {
+				Row row = sheet.getRow(r);
+				if (row == null) {
+					continue;
+				}
+				List<String> cellList = new ArrayList<String>();
+				list.add(cellList);
+				for (int i = 0; i < row.getPhysicalNumberOfCells(); i++) {
+					Cell cell = row.getCell(i);
+					if (cell != null) {
+						Object value = getCellValue(row, i);
+						cellList.add(value == null ? "" : value.toString());
+					} else {
+						cellList.add("");
+					}
+				}
+			}
+		} finally {
+			if (in != null) {
+				try {
+					in.close();
+				} catch (IOException e) {
+				}
+				in = null;
+			}
+		}
+
+		return list;
+	}
+
+	/**
+	 * 获取单元格值
+	 * 
+	 * @param row
+	 * @param column
+	 * @return
+	 */
+	public static Object getCellValue(Row row, int column) {
+		if (row == null) {
+			return row;
+		}
+		Object val = "";
+		try {
+			Cell cell = row.getCell(column);
+			if (cell != null) {
+				if (cell.getCellType() == CellType.NUMERIC || cell.getCellType() == CellType.FORMULA) {
+					val = cell.getNumericCellValue();
+					if (DateUtil.isCellDateFormatted(cell)) {
+						val = DateUtil.getJavaDate((Double) val); // POI Excel 日期格式转换
+					} else {
+						if ((Double) val % 1 != 0) {
+							val = new BigDecimal(val.toString());
+						} else {
+							val = new DecimalFormat("0").format(val);
+						}
+					}
+				} else if (cell.getCellType() == CellType.STRING) {
+					val = cell.getStringCellValue();
+				} else if (cell.getCellType() == CellType.BOOLEAN) {
+					val = cell.getBooleanCellValue();
+				} else if (cell.getCellType() == CellType.ERROR) {
+					val = cell.getErrorCellValue();
+				}
+
+			}
+		} catch (Exception e) {
+			return val;
+		}
+		return val;
+	}
+
+}

+ 1092 - 0
yunnan-report-admin/src/main/java/com/ruoyi/imports/PatentPubImportUtils.java

@@ -0,0 +1,1092 @@
+package com.ruoyi.imports;
+
+import java.io.File;
+import java.sql.Connection;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.mchange.io.FileUtils;
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.constant.IpcType;
+import com.ruoyi.common.constant.LocStr;
+import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.imports.util.DbConfig;
+import com.ruoyi.imports.util.DbUtils;
+import com.ruoyi.imports.util.GsonUtils;
+import com.ruoyi.reportpub.domain.DPatentPubInfo;
+import com.ruoyi.reportpub.service.IDPatentPubInfoService;
+import com.ruoyi.system.domain.BladeRegion;
+import com.ruoyi.system.domain.DFixAddressArea;
+import com.ruoyi.system.domain.DIpcType;
+import com.ruoyi.system.service.IBladeRegionService;
+import com.ruoyi.system.service.IDIpcTypeService;
+
+public class PatentPubImportUtils {
+
+	private static final Logger logger = LoggerFactory.getLogger(PatentPubImportUtils.class);
+
+	private static class PubSyncThread extends Thread {
+		private ResClass mod;
+		RuoYiConfig ruoYiConfig;
+		IDPatentPubInfoService dPatentPubInfoService;
+		IDIpcTypeService dIpcTypeService;
+		IBladeRegionService bladeRegionService;
+
+		public PubSyncThread(ResClass mod, RuoYiConfig ruoYiConfig, IDPatentPubInfoService dPatentPubInfoService, IDIpcTypeService dIpcTypeService,
+				IBladeRegionService bladeRegionService) {
+			this.mod = mod;
+			this.ruoYiConfig = ruoYiConfig;
+			this.dPatentPubInfoService = dPatentPubInfoService;
+			this.dIpcTypeService = dIpcTypeService;
+			this.bladeRegionService = bladeRegionService;
+		}
+
+		public void run() {
+
+			DbUtils dbUtils;
+			Connection conn;
+			try {
+				DbConfig dbConfig = new DbConfig();
+
+				String jdbcurl = SpringUtils.getApplicationContext().getEnvironment().getProperty("spring.datasource.druid.master.url");
+				logger.debug("重置数据源:" + jdbcurl);
+				if (StringUtils.isNotBlank(jdbcurl)) {
+					dbConfig.setUrl(jdbcurl);
+				}
+				dbUtils = DbUtils.newDbUtil(dbConfig);
+				conn = dbUtils.getConnections();
+			} catch (Exception e) {
+				e.printStackTrace();
+				logger.error("同步失败,数据库失败," + e.getMessage(), e);
+				throw new RuntimeException(e.getMessage(), e);
+			}
+
+			try {
+				for (ResItem item : mod.results) {
+//				TODO	
+//				DPatentPubInfo exist = dPatentPubInfoService.queryByPid(item._id, true);
+//				DPatentPubInfo exist = dPatentPubInfoService.queryByPidFromCache(item._id);
+					DPatentPubInfo exist = null;
+					if (exist != null) {
+						logger.info("存在公开数据,pid:" + item._id);
+						if (StringUtils.isNotBlank(item.pub_date)) {
+							if (20230703 < Integer.parseInt(item.pub_date)) {
+								logger.info("查询到20230703以后的公开数据:" + item._id);
+							}
+						}
+						updatePub(dPatentPubInfoService, bladeRegionService, exist, item);
+
+					} else {
+						logger.debug("不存在公开数据,pid:" + item._id);
+
+//					TODO	匹配一下固定地址	20230705
+						String modify_appli_city = item.modify_appli_city;
+						if (StringUtils.isBlank(modify_appli_city)) {
+							modify_appli_city = item.appli_city;
+						}
+						String address = ResItem.getAddress(item.appli_address);
+						DFixAddressArea area = dPatentPubInfoService.matchByAddress(address, modify_appli_city);
+						if (area != null) {
+							item.yunnan_modify_appli_city = area.getCityName();
+							item.yunnan_modify_appli_county = area.getAreaName();
+							item.yunnan_modify_appli_province = area.getProvinceName();
+						}
+
+						List param = new ArrayList();
+						String sql = ResItem.toSql(item, param, bladeRegionService, dIpcTypeService);
+						int ext = dbUtils.executeUpdate(conn, sql, param);
+
+					}
+				}
+			} catch (Exception e) {
+				logger.error("公开数据同步失败," + e.getMessage(), e);
+				throw new RuntimeException("同步失败," + e.getMessage(), e);
+
+			} finally {
+				dbUtils.close(conn);
+			}
+		}
+	}
+
+	public static void impByIprd(RuoYiConfig ruoYiConfig, IDPatentPubInfoService dPatentPubInfoService, IDIpcTypeService dIpcTypeService,
+			IBladeRegionService bladeRegionService, String time_update) throws Exception {
+
+		List<PubSyncThread> threads = new ArrayList<PubSyncThread>();
+
+		logger.debug("准备同步专利公开数据,time_update:" + time_update);
+
+		logger.debug("开始加载公开数据...");
+		long begin = System.currentTimeMillis();
+//		dPatentPubInfoService.loadToCacheWidthPid();
+		dPatentPubInfoService.clearData();
+		long endTime = System.currentTimeMillis();
+		logger.debug("公开数据清理完成,用时:" + (endTime - begin));
+
+		try {
+			// TODO Auto-generated method stub
+//		http://111.198.99.166:20000/pat/iprd_patent?project_code=530000&ak=77f39e749%4020230406&time_update=20210431&size=10000
+			String baseUrl = ruoYiConfig.getPressApiServer();
+			baseUrl = baseUrl + "pat/iprd_patent";
+			baseUrl = baseUrl + "?project_code=530000";
+			baseUrl = baseUrl + "&ak=77f39e749%4020230406";
+			baseUrl = baseUrl + "&time_update=" + time_update;
+			baseUrl = baseUrl + "&size=10000";
+
+			String code = "200";
+			String scroll_id = null;
+
+			int i = 0;
+			while ("200".equals(code)) {
+				String url = baseUrl;
+				if (StringUtils.isNotBlank(scroll_id)) {
+					url = baseUrl + "&scroll_id=" + scroll_id;
+				}
+				i++;
+				logger.debug("开始查询第" + i + "页专利公开数据,url:" + url);
+				long beginTime = System.currentTimeMillis();
+				String httpRes = HttpUtils.sendGet(url);
+//				logger.debug("第" + i + "页专利公开数据查询结果,用时:" + (System.currentTimeMillis() - beginTime) + ",res:" + httpRes);
+				logger.debug("第" + i + "页专利公开数据查询结果,用时:" + (System.currentTimeMillis() - beginTime));
+				logger.debug("公开数据结果:" + httpRes);
+				ResClass mod = GsonUtils.formJson(httpRes, ResClass.class);
+				scroll_id = mod.scroll_id;
+				code = mod.code;
+				if (!"200".equals(code) && !"204".equals(code)) {
+					throw new RuntimeException("同步第[" + i + "]页公开数据同步失败,请求响应码[" + code + "]不正常");
+				}
+				if (mod.results == null || mod.results.isEmpty()) {
+					break;
+				}
+
+				PubSyncThread thread = new PubSyncThread(mod, ruoYiConfig, dPatentPubInfoService, dIpcTypeService, bladeRegionService);
+				thread.setDaemon(true);
+				thread.setName(Thread.currentThread().getName() + "-ps-" + i);
+				threads.add(thread);
+				thread.start();
+			}
+
+			for (PubSyncThread thread : threads) {
+				thread.join();
+			}
+
+			logger.info("公开专利数据同步完成...");
+		} catch (Throwable e) {
+			logger.error("同步专利公开数据失败," + e.getMessage(), e);
+			throw new RuntimeException(e);
+		}
+
+	}
+
+	private static void updatePub(IDPatentPubInfoService dPatentPubInfoService, IBladeRegionService bladeRegionService, DPatentPubInfo old, ResItem item) {
+
+		DPatentPubInfo up = new DPatentPubInfo();
+		up.setId(old.getId());
+
+		String modify_appli_province_code = null;
+		String modify_appli_city_code = null;
+		String modify_appli_county_code = null;
+
+		if (StringUtils.isNotBlank(item.modify_appli_province)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByProvinceName(item.modify_appli_province);
+			if (bladeRegion != null) {
+				modify_appli_province_code = bladeRegion.getCode();
+			} else {
+				modify_appli_province_code = "";
+			}
+		} else {
+			modify_appli_province_code = "";
+		}
+		if (StringUtils.isNotBlank(item.modify_appli_city) && StringUtils.isNotBlank(modify_appli_province_code)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByCityName(item.modify_appli_city, modify_appli_province_code);
+			if (bladeRegion != null) {
+				modify_appli_city_code = bladeRegion.getCode();
+			} else {
+				modify_appli_city_code = "";
+			}
+		} else {
+			modify_appli_city_code = "";
+		}
+		if (StringUtils.isNotBlank(item.modify_appli_county) && StringUtils.isNotBlank(modify_appli_city_code)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByAreaName(item.modify_appli_county, modify_appli_city_code);
+			if (bladeRegion != null) {
+				modify_appli_county_code = bladeRegion.getCode();
+			} else {
+				modify_appli_county_code = "";
+			}
+		} else {
+			modify_appli_county_code = "";
+		}
+
+//		if (StringUtils.isNotBlank(modify_appli_province_code)) {
+		up.setModifyAppliProvince(item.modify_appli_province == null ? "" : item.modify_appli_province);
+		up.setModifyAppliProvinceCode(modify_appli_province_code);
+//		}
+//		if (StringUtils.isNotBlank(modify_appli_city_code)) {
+		up.setModifyAppliCity(item.modify_appli_city == null ? "" : item.modify_appli_city);
+		up.setModifyAppliCityCode(modify_appli_city_code);
+//		}
+//		if (StringUtils.isNotBlank(modify_appli_county_code)) {
+		up.setModifyAppliCounty(item.modify_appli_county == null ? "" : item.modify_appli_county);
+		up.setModifyAppliCountyCode(modify_appli_county_code);
+//		}
+
+		if (StringUtils.isNotBlank(item.appli_type)) {
+			up.setAppliType(item.appli_type);
+			up.setModifyAppliType(item.appli_type);
+		}
+
+		if (StringUtils.isNotBlank(item.status)) {
+			up.setStatus(item.status);
+			up.setPatentStatus(item.status);
+		}
+
+		if (StringUtils.isNotBlank(item.app_date)) {
+			up.setAppDate(item.app_date);
+		}
+		if (StringUtils.isNotBlank(item.app_number)) {
+			String appNumber2 = item.app_number;
+			if (appNumber2.startsWith("CN")) {
+				appNumber2 = appNumber2.replace("CN", "");
+			}
+
+			if (appNumber2.contains(".")) {
+				appNumber2 = appNumber2.replace(".", "");
+			}
+			up.setAppNumber2(appNumber2);
+		}
+
+		if (StringUtils.isNotBlank(item.pri_date)) {
+			up.setPriDate(item.pri_date);
+		}
+		if (StringUtils.isNotBlank(item.pri_number)) {
+			up.setPriNumber(item.pri_number);
+		}
+		if (StringUtils.isNotBlank(item.pub_date)) {
+			up.setPubDate(item.pub_date);
+		}
+		if (StringUtils.isNotBlank(item.pub_number)) {
+			up.setPubNumber(item.pub_number);
+		}
+		if (StringUtils.isNotBlank(item.time_update)) {
+			up.setTimeUpdate(item.time_update);
+		}
+		if (StringUtils.isNotBlank(item.high_value)) {
+			up.setHighValue(item.high_value);
+			if (item.high_value.contains("1")) {
+				up.setHvSeisDept(1);
+			}
+//			20230710 2,3 对调
+			if (item.high_value.contains("3")) {
+				up.setHvKeep10Dept(1);
+			}
+			if (item.high_value.contains("2")) {
+				up.setHvHaveOverseasDept(1);
+			}
+
+//			if (item.high_value.contains("2")) {
+//				up.setHvKeep10Dept(1);
+//			}
+//			if (item.high_value.contains("3")) {
+//				up.setHvHaveOverseasDept(1);
+//			}
+			if (item.high_value.contains("4")) {
+				up.setHvHighPledgeDept(1);
+			}
+			if (item.high_value.contains("5")) {
+				up.setHvTechnologyAwardDept(1);
+			}
+		}
+		if (StringUtils.isNotBlank(up.getPubDate())) {
+			String year = up.getPubDate().trim().substring(0, 4);
+			String month = up.getPubDate().trim().substring(4, 6);
+			up.setCreateMonth(year + "-" + month);
+		}
+
+		String cowner_province_code = null;
+		String cowner_city_code = null;
+		String cowner_county_code = null;
+		String modify_cowner_province_code = null;
+		String modify_cowner_city_code = null;
+		String modify_cowner_county_code = null;
+
+//		20230616
+		if (StringUtils.isNotBlank(item.cowner_province)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByProvinceName(item.cowner_province);
+			if (bladeRegion != null) {
+				cowner_province_code = bladeRegion.getCode();
+			} else {
+				cowner_province_code = "";
+			}
+		} else {
+			cowner_province_code = "";
+		}
+		if (StringUtils.isNotBlank(item.cowner_city) && StringUtils.isNotBlank(cowner_province_code)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByCityName(item.cowner_city, cowner_province_code);
+			if (bladeRegion != null) {
+				cowner_city_code = bladeRegion.getCode();
+			} else {
+				cowner_city_code = "";
+			}
+		} else {
+			cowner_city_code = "";
+		}
+		if (StringUtils.isNotBlank(item.cowner_county) && StringUtils.isNotBlank(cowner_city_code)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByAreaName(item.cowner_county, cowner_city_code);
+			if (bladeRegion != null) {
+				cowner_county_code = bladeRegion.getCode();
+			} else {
+				cowner_county_code = "";
+			}
+		} else {
+			cowner_county_code = "";
+		}
+
+		if (StringUtils.isNotBlank(item.modify_cowner_province)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByProvinceName(item.modify_cowner_province);
+			if (bladeRegion != null) {
+				modify_cowner_province_code = bladeRegion.getCode();
+			} else {
+				modify_cowner_province_code = "";
+			}
+		} else {
+			modify_cowner_province_code = "";
+		}
+		if (StringUtils.isNotBlank(item.modify_cowner_city) && StringUtils.isNotBlank(modify_cowner_province_code)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByCityName(item.modify_cowner_city, modify_cowner_province_code);
+			if (bladeRegion != null) {
+				modify_cowner_city_code = bladeRegion.getCode();
+			} else {
+				modify_cowner_city_code = "";
+			}
+		} else {
+			modify_cowner_city_code = "";
+		}
+		if (StringUtils.isNotBlank(item.modify_cowner_county) && StringUtils.isNotBlank(modify_cowner_city_code)) {
+			BladeRegion bladeRegion = bladeRegionService.selectByAreaName(item.modify_cowner_county, modify_cowner_city_code);
+			if (bladeRegion != null) {
+				modify_cowner_county_code = bladeRegion.getCode();
+			} else {
+				modify_cowner_county_code = "";
+			}
+		} else {
+			modify_cowner_county_code = "";
+		}
+
+		up.setCownerProvince(item.cowner_province == null ? "" : item.cowner_province);
+		up.setCownerCity(item.cowner_city == null ? "" : item.cowner_city);
+		up.setCownerCounty(item.cowner_county == null ? "" : item.cowner_county);
+		up.setModifyCownerProvince(item.modify_cowner_province == null ? "" : item.modify_cowner_province);
+		up.setModifyCownerCity(item.modify_cowner_city == null ? "" : item.modify_cowner_city);
+		up.setModifyCownerCounty(item.modify_cowner_county == null ? "" : item.modify_cowner_county);
+
+		up.setCownerProvinceCode(cowner_province_code);
+		up.setCownerCityCode(cowner_city_code);
+		up.setCownerCountyCode(cowner_county_code);
+		up.setModifyCownerProvinceCode(modify_cowner_province_code);
+		up.setModifyCownerCityCode(modify_cowner_city_code);
+		up.setModifyCownerCountyCode(modify_cowner_county_code);
+
+		dPatentPubInfoService.updateById(up);
+	}
+
+	private static void doImp(File file, IBladeRegionService bladeRegionService, IDIpcTypeService dIpcTypeService, boolean iprd) throws Exception {
+		String str = FileUtils.getContentsAsString(file);
+		ResClass res = GsonUtils.formJson(str, ResClass.class);
+		DbUtils dbUtils = DbUtils.newDbUtil(new DbConfig());
+
+		Connection conn = dbUtils.getConnections();
+
+		for (int i = 0; i < res.results.size(); i++) {
+			ResItem item = res.results.get(i);
+			List param = new ArrayList();
+			String sql = ResItem.toSql(item, param, bladeRegionService, dIpcTypeService);
+
+//			logger.debug("准备执行sql:"+sql);
+//			logger.debug("参数:"+GsonUtils.toJson(param));
+
+			int ext = dbUtils.executeUpdate(conn, sql, param);
+
+			System.out.println("第i:" + i + "条执行结果,file:" + file.getName() + ",:" + ext + ",一共" + res.results.size() + "条");
+		}
+
+		dbUtils.close(conn);
+	}
+
+	public static void imp(IBladeRegionService bladeRegionService, IDIpcTypeService dIpcTypeService) throws Exception {
+		// TODO Auto-generated method stub
+
+//		String filePath = "D:\\9fu\\业务\\云南省知识产权数据统计系统\\iprd_patent _20230328.json";
+//		String filePath = "/data/iprd_patent _20230328.json";
+		String filePathStr = "/data/yunnan-report-admin/data";
+
+		File filePath = new File(filePathStr);
+
+		List<File> fileList = new ArrayList<File>();
+		File[] files = filePath.listFiles();
+		for (File file : files) {
+			if (file.isFile() && file.getName().endsWith("json")) {
+				fileList.add(file);
+			}
+		}
+
+		Collections.sort(fileList, new Comparator<File>() {
+			@Override
+			public int compare(File o1, File o2) {
+				return o1.getName().compareTo(o2.getName());
+			}
+		});
+
+		for (File file : fileList) {
+			doImp(file, bladeRegionService, dIpcTypeService, false);
+		}
+
+	}
+
+	public static String getKeyByAppNumber(String appNumber2) {
+		String key = "DPatentPubInfo:AppNumber:" + appNumber2.trim();
+		return key;
+	}
+
+	public static class ResClass {
+		public String code;
+		public Integer total;
+		public String scroll_id;
+		public List<ResItem> results;
+
+	}
+
+	public static class ResItem {
+		public String _id;
+		public int pre_counts;
+		public String high_value;
+		public String appli_province;
+		public int lic_counts;
+		public String title;
+		public String ipc_main;
+		public String appli_city;
+		public int ple_counts;
+		public String appli;
+		public String app_date;
+		public int app_tran_counts;
+		public String loc_str;
+		public String modify_appli_city;
+		public int curt_counts;
+		public String national_eco_str;
+		public String agency_name;
+		public String modify_appli_province;
+		public String appli_county;
+		public String pub_number;
+		public String appli_address;
+		public int pat_tran_counts;
+		public String app_number;
+		public String modify_appli_county;
+		public String patent_type;
+		public String appli_type;
+		public String status;
+
+		public String cowner_province;
+		public String cowner_city;
+		public String cowner_county;
+		public String modify_cowner_province;
+		public String modify_cowner_city;
+		public String modify_cowner_county;
+
+		public String pub_date;
+		public String pri_number;
+		public String pri_date;
+
+		public String yunnan_modify_appli_province;
+		public String yunnan_modify_appli_city;
+		public String yunnan_modify_appli_county;
+		public String time_create;
+		public String time_update;
+		public String current_owners;
+		public String cowner_address;
+
+		public Integer hv_seis_dept = 0;
+		public Integer hv_have_overseas_dept = 0;
+		public Integer hv_keep10_dept = 0;
+		public Integer hv_high_pledge_dept = 0;
+		public Integer hv_technology_award_dept = 0;
+
+		public String app_number2;
+
+//		,,,pub_date,pri_number,pri_date,ple_counts
+
+		public static String toSql(ResItem item, List param, IBladeRegionService bladeRegionService, IDIpcTypeService dIpcTypeService) {
+			String sql = "insert into d_patent_pub_info(pub_id,pre_counts,high_value,appli_province,lic_counts,"
+					+ "title,ipc_main,appli_city,ple_counts,appli,app_date,app_tran_counts,loc_str,"
+					+ "modify_appli_city,curt_counts,national_eco_str,agency_name,"
+					+ "modify_appli_province,appli_county,pub_number,appli_address,pat_tran_counts,app_number,modify_appli_county,"
+					+ "patent_type,appli_type,status,pub_date,pri_number,pri_date,"
+					+ "yunnan_modify_appli_province,yunnan_modify_appli_city,yunnan_modify_appli_county,"
+					+ "time_create,time_update,current_owners,cowner_address," + "hv_seis_dept,hv_have_overseas_dept,hv_keep10_dept,hv_high_pledge_dept,"
+					+ "hv_technology_award_dept,app_number2,create_time,patent_holder_pub," + "appli_province_code,appli_city_code,appli_county_code,"
+					+ "modify_appli_province_code,modify_appli_city_code,modify_appli_county_code,"
+					+ "yunnan_modify_appli_province_code,yunnan_modify_appli_city_code,yunnan_modify_appli_county_code,"
+					+ "modify_appli_address,modify_cowner_address,modify_loc_str,modify_loc_str_desc,"
+					+ "modify_ipc_type,modify_ipc_sub_type,modify_ipc_type_name,modify_ipc_sub_type_name,modify_appli_type,"
+					+ "year_batch,month_batch,patent_status,create_month,"
+//ALTER TABLE d_patent_pub_info add cowner_province varchar ( 100 ) comment '当前第一专利权人省份';
+//ALTER TABLE d_patent_pub_info add cowner_city varchar ( 100 ) comment '当前第一专利权人城市';
+//ALTER TABLE d_patent_pub_info add cowner_county varchar ( 100 ) comment '当前第一专利权人区县';
+//ALTER TABLE d_patent_pub_info add modify_cowner_province varchar ( 100 ) comment '修改后当前第一专利权人省份';
+//ALTER TABLE d_patent_pub_info add modify_cowner_city varchar ( 100 ) comment '修改后当前第一专利权人城市';
+//ALTER TABLE d_patent_pub_info add modify_cowner_county varchar ( 100 ) comment '修改后当前第一专利权人区县';
+//ALTER TABLE d_patent_pub_info add cowner_province_code varchar ( 100 ) comment '当前第一专利权人省份代码';
+//ALTER TABLE d_patent_pub_info add cowner_city_code varchar ( 100 ) comment '当前第一专利权人城市代码';
+//ALTER TABLE d_patent_pub_info add cowner_county_code varchar ( 100 ) comment '当前第一专利权人区县代码';
+//ALTER TABLE d_patent_pub_info add modify_cowner_province_code varchar ( 100 ) comment '修改后当前第一专利权人省份代码';
+//ALTER TABLE d_patent_pub_info add modify_cowner_city_code varchar ( 100 ) comment '修改后当前第一专利权人城市代码';
+//ALTER TABLE d_patent_pub_info add modify_cowner_county_code varchar ( 100 ) comment '修改后当前第一专利权人区县代码';
+					+ "cowner_province,cowner_city,cowner_county,modify_cowner_province,modify_cowner_city,modify_cowner_county,"
+					+ "cowner_province_code,cowner_city_code,cowner_county_code,"
+					+ "modify_cowner_province_code,modify_cowner_city_code,modify_cowner_county_code" + ")values(" + "?,?,?,?,?," + "?,?,?,?,?,?,?,?,"
+					+ "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," + "?,?,?,?,?,?,?,?,?,?,sysdate(),?,?,?,?,?,?,?," + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+					+ "?,?,?,?,?,?,?,?,?,?,?,?)";
+
+//			public String _id;
+			param.add(item._id);
+//			public String pre_counts;
+			param.add(item.pre_counts);
+//			public String high_value;
+			param.add(item.high_value);
+//			public String appli_province;
+			if (StringUtils.isBlank(item.appli_province)) {
+				if (StringUtils.isNotBlank(item.modify_appli_province)) {
+					item.appli_province = item.modify_appli_province;
+				} else if (StringUtils.isNotBlank(item.yunnan_modify_appli_province)) {
+					item.appli_province = item.yunnan_modify_appli_province;
+					item.modify_appli_province = item.yunnan_modify_appli_province;
+				}
+			}
+
+			if (StringUtils.isBlank(item.modify_appli_province) && StringUtils.isNotBlank(item.yunnan_modify_appli_province)) {
+				item.modify_appli_province = item.yunnan_modify_appli_province;
+			}
+			if (StringUtils.isBlank(item.modify_appli_province) && StringUtils.isNotBlank(item.appli_province)) {
+				item.modify_appli_province = item.appli_province;
+			}
+			param.add(item.appli_province);
+//			public String lic_counts;
+			param.add(item.lic_counts);
+//			public String title;
+			param.add(item.title);
+//			public String ipc_main;
+//			public String appli_city;
+//			public String ple_counts;
+//			public String appli;
+//			public String app_date;
+//			public String app_tran_counts;
+//			public String loc_str;
+//			public String modify_appli_city;
+//			public String curt_counts;
+//			public String national_eco_str;
+//			public String agency_name;
+//			public String modify_appli_province;
+//			public String appli_county;
+//			public String pub_number;
+//			public String appli_address;
+//			public String pat_tran_counts;
+//			public String app_number;
+//			public String modify_appli_county;
+//			public String patent_type;
+//			public String appli_type;
+//			public String status;
+
+			param.add(item.ipc_main);
+			if (StringUtils.isBlank(item.appli_city)) {
+				if (StringUtils.isNotBlank(item.modify_appli_city)) {
+					item.appli_city = item.modify_appli_city;
+				} else if (StringUtils.isNotBlank(item.yunnan_modify_appli_city)) {
+					item.appli_city = item.yunnan_modify_appli_city;
+					item.modify_appli_city = item.yunnan_modify_appli_city;
+				}
+			}
+			if (StringUtils.isBlank(item.modify_appli_city) && StringUtils.isNotBlank(item.yunnan_modify_appli_city)) {
+				item.modify_appli_city = item.yunnan_modify_appli_city;
+			}
+			if (StringUtils.isBlank(item.modify_appli_city) && StringUtils.isNotBlank(item.appli_city)) {
+				item.modify_appli_city = item.appli_city;
+			}
+			param.add(item.appli_city);
+
+			param.add(item.ple_counts);
+			param.add(item.appli);
+			param.add(item.app_date);
+			param.add(item.app_tran_counts);
+			param.add(item.loc_str);
+
+			param.add(item.modify_appli_city);
+			param.add(item.curt_counts);
+			param.add(item.national_eco_str);
+			param.add(item.agency_name);
+
+			param.add(item.modify_appli_province);
+
+			if (StringUtils.isBlank(item.appli_county)) {
+				if (StringUtils.isNotBlank(item.modify_appli_county)) {
+					item.appli_county = item.modify_appli_county;
+				} else if (StringUtils.isNotBlank(item.yunnan_modify_appli_county)) {
+					item.appli_county = item.yunnan_modify_appli_county;
+					item.modify_appli_county = item.yunnan_modify_appli_county;
+				}
+			}
+
+			if (StringUtils.isBlank(item.modify_appli_county)) {
+				if (StringUtils.isNotBlank(item.appli_county)) {
+					item.modify_appli_county = item.appli_county;
+				}
+			}
+
+			param.add(item.appli_county);
+
+			param.add(item.pub_number);
+			param.add(item.appli_address);
+			param.add(item.pat_tran_counts);
+			param.add(item.app_number);
+
+			param.add(item.modify_appli_county);
+			param.add(item.patent_type);
+			param.add(item.appli_type);
+			param.add(item.status);
+
+//			public String pub_date;
+//			public String pri_number;
+//			public String pri_date;
+			param.add(item.pub_date);
+			param.add(item.pri_number);
+			param.add(item.pri_date);
+
+			if (StringUtils.isBlank(item.yunnan_modify_appli_province)) {
+				if (StringUtils.isNotBlank(item.modify_appli_province)) {
+					item.yunnan_modify_appli_province = item.modify_appli_province;
+				} else if (StringUtils.isNotBlank(item.appli_province)) {
+					item.yunnan_modify_appli_province = item.appli_province;
+				}
+			}
+			param.add(item.yunnan_modify_appli_province);
+
+			if (StringUtils.isBlank(item.yunnan_modify_appli_city)) {
+				if (StringUtils.isNotBlank(item.modify_appli_city)) {
+					item.yunnan_modify_appli_city = item.modify_appli_city;
+				} else if (StringUtils.isNotBlank(item.appli_city)) {
+					item.yunnan_modify_appli_city = item.appli_city;
+				}
+			}
+			param.add(item.yunnan_modify_appli_city);
+
+			if (StringUtils.isBlank(item.yunnan_modify_appli_county)) {
+				if (StringUtils.isNotBlank(item.modify_appli_county)) {
+					item.yunnan_modify_appli_county = item.modify_appli_county;
+				} else if (StringUtils.isNotBlank(item.appli_county)) {
+					item.yunnan_modify_appli_county = item.appli_county;
+				}
+			}
+			param.add(item.yunnan_modify_appli_county);
+
+			param.add(item.time_create);
+			param.add(item.time_update);
+			param.add(item.current_owners);
+			param.add(item.cowner_address);
+
+			if (StringUtils.isNotBlank(item.high_value)) {
+				if (item.high_value.contains("1")) {
+					item.hv_seis_dept = 1;
+				}
+//				if (item.high_value.contains("2")) {
+//					item.hv_keep10_dept = 1;
+//				}
+//				if (item.high_value.contains("3")) {
+//					item.hv_have_overseas_dept = 1;
+//				}
+//				20230710 2,3 对调
+				if (item.high_value.contains("3")) {
+					item.hv_keep10_dept = 1;
+				}
+				if (item.high_value.contains("2")) {
+					item.hv_have_overseas_dept = 1;
+				}
+				if (item.high_value.contains("4")) {
+					item.hv_high_pledge_dept = 1;
+				}
+				if (item.high_value.contains("5")) {
+					item.hv_technology_award_dept = 1;
+				}
+
+			}
+
+			param.add(item.hv_seis_dept);
+			param.add(item.hv_have_overseas_dept);
+			param.add(item.hv_keep10_dept);
+			param.add(item.hv_high_pledge_dept);
+			param.add(item.hv_technology_award_dept);
+
+			String appNumber2 = item.app_number;
+			if (appNumber2.startsWith("CN")) {
+				appNumber2 = appNumber2.replace("CN", "");
+			}
+
+			if (appNumber2.contains(".")) {
+				appNumber2 = appNumber2.replace(".", "");
+			}
+			item.app_number2 = appNumber2;
+
+			param.add(appNumber2);
+			param.add(item.current_owners);
+
+			// 省代码
+			String appli_province_code = null;
+			if (StringUtils.isNotBlank(item.appli_province)) {
+//				TODO	
+				BladeRegion bladeRegion = bladeRegionService.selectByProvinceName(item.appli_province);
+				if (bladeRegion != null) {
+					appli_province_code = bladeRegion.getCode();
+				}
+			}
+			param.add(appli_province_code);
+
+			// 市代码
+			String appli_city_code = null;
+			if (StringUtils.isNotBlank(appli_province_code) && StringUtils.isNotBlank(item.appli_city)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByCityName(item.appli_city, appli_province_code);
+				if (bladeRegion != null) {
+					appli_city_code = bladeRegion.getCode();
+				}
+			}
+			param.add(appli_city_code);
+
+			// 区县
+			String appli_county_code = null;
+			if (StringUtils.isNotBlank(appli_city_code) && StringUtils.isNotBlank(item.appli_county)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByAreaName(item.appli_county, appli_city_code);
+				if (bladeRegion != null) {
+					appli_county_code = bladeRegion.getCode();
+				}
+			}
+			param.add(appli_county_code);
+
+			// 省
+			String modify_appli_province_code = null;
+			if (StringUtils.isNotBlank(item.modify_appli_province)) {
+//				TODO	
+				BladeRegion bladeRegion = bladeRegionService.selectByProvinceName(item.modify_appli_province);
+				if (bladeRegion != null) {
+					modify_appli_province_code = bladeRegion.getCode();
+				}
+			}
+			param.add(modify_appli_province_code);
+
+//			
+			// 市
+			String modify_appli_city_code = null;
+			if (StringUtils.isNotBlank(modify_appli_province_code) && StringUtils.isNotBlank(item.modify_appli_city)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByCityName(item.modify_appli_city, modify_appli_province_code);
+				if (bladeRegion != null) {
+					modify_appli_city_code = bladeRegion.getCode();
+				}
+			}
+			param.add(modify_appli_city_code);
+
+//			
+
+			// 区县
+			String modify_appli_county_code = null;
+			if (StringUtils.isNotBlank(modify_appli_city_code) && StringUtils.isNotBlank(item.modify_appli_county)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByAreaName(item.modify_appli_county, modify_appli_city_code);
+				if (bladeRegion != null) {
+					modify_appli_county_code = bladeRegion.getCode();
+				}
+			}
+			param.add(modify_appli_county_code);
+
+//			yunnan_modify_appli_province_code,yunnan_modify_appli_city_code,yunnan_modify_appli_county_code"
+//			+ "yunnan_modify_appli_province_code,yunnan_modify_appli_city_code,yunnan_modify_appli_county_code"
+
+			// 省
+			String yunnan_modify_appli_province_code = null;
+			if (StringUtils.isNotBlank(item.yunnan_modify_appli_province)) {
+//				TODO	
+				BladeRegion bladeRegion = bladeRegionService.selectByProvinceName(item.yunnan_modify_appli_province);
+				if (bladeRegion != null) {
+					yunnan_modify_appli_province_code = bladeRegion.getCode();
+				}
+			}
+			param.add(yunnan_modify_appli_province_code);
+
+			// 市
+			String yunnan_modify_appli_city_code = null;
+			if (StringUtils.isNotBlank(yunnan_modify_appli_province_code) && StringUtils.isNotBlank(item.yunnan_modify_appli_city)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByCityName(item.yunnan_modify_appli_city, yunnan_modify_appli_province_code);
+				if (bladeRegion != null) {
+					yunnan_modify_appli_city_code = bladeRegion.getCode();
+				}
+			}
+			param.add(yunnan_modify_appli_city_code);
+
+			// 区县
+			String yunnan_modify_appli_county_code = null;
+			if (StringUtils.isNotBlank(yunnan_modify_appli_city_code) && StringUtils.isNotBlank(item.yunnan_modify_appli_county)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByAreaName(item.yunnan_modify_appli_county, yunnan_modify_appli_city_code);
+				if (bladeRegion != null) {
+					yunnan_modify_appli_county_code = bladeRegion.getCode();
+				}
+			}
+			param.add(yunnan_modify_appli_county_code);
+
+			param.add(getAddress(item.appli_address));
+			param.add(getAddress(item.cowner_address));
+
+			String locStr = item.loc_str;
+			String locStr2 = toModifyLocStr(locStr);
+			if (StringUtils.isNotBlank(locStr2)) {
+				param.add(locStr2);
+				param.add(LocStr.ALL.get(locStr2));
+			} else {
+				param.add(null);
+				param.add(null);
+			}
+
+			if ("3".equals(item.patent_type)) {// 外观专利
+				param.add(locStr2);// modify_ipc_type
+				param.add(null);// modify_ipc_sub_type
+				param.add(LocStr.ALL.get(locStr2));// modify_ipc_type_name
+				param.add(null);// modify_ipc_sub_type_name
+			} else if (StringUtils.isNotBlank(item.ipc_main) && item.ipc_main.trim().length() >= 3) {
+				// 非外观专利
+				String ipcType = item.ipc_main.trim().substring(0, 1);
+				String ipcSubType = item.ipc_main.trim().substring(0, 3);
+
+				String ipcTypeName = null;
+				String ipcSubTypeName = null;
+
+				IpcType ipcTypeEnum = IpcType.valueOf(ipcType);
+				if (ipcTypeEnum != null) {
+					ipcTypeName = ipcTypeEnum.getTypeName();
+				}
+
+				DIpcType dIpcType = dIpcTypeService.getDIpcTypeByCode(ipcSubType);
+				if (dIpcType != null) {
+					ipcSubTypeName = dIpcType.getName();
+				}
+
+				param.add(ipcType);
+				param.add(ipcSubType);
+				param.add(ipcTypeName);
+				param.add(ipcSubTypeName);
+
+			} else {
+				param.add(null);
+				param.add(null);
+				param.add(null);
+				param.add(null);
+
+			}
+			param.add(item.appli_type);
+
+			String year = null;
+			String month = null;
+			if (StringUtils.isNotBlank(item.pub_date) && item.pub_date.trim().length() >= 6) {
+				year = item.pub_date.trim().substring(0, 4);
+				month = item.pub_date.trim().substring(4, 6);
+				param.add(year);
+				param.add(month);
+			} else {
+				param.add(null);
+				param.add(null);
+			}
+			param.add(item.status);
+			if (StringUtils.isNotBlank(year) && StringUtils.isNotBlank(month)) {
+				param.add(year + "-" + month);
+			} else {
+				param.add(new SimpleDateFormat("yyyyMM").format(new Date()));
+			}
+
+//			ALTER TABLE d_patent_pub_info add modify_ipc_type varchar ( 10 );
+//			ALTER TABLE d_patent_pub_info add modify_ipc_sub_type varchar ( 10 );
+//			ALTER TABLE d_patent_pub_info add modify_ipc_type_name varchar ( 500 );
+//			ALTER TABLE d_patent_pub_info add modify_ipc_sub_type_name varchar ( 500 );
+
+			String cowner_province_code = null;
+			String cowner_city_code = null;
+			String cowner_county_code = null;
+			String modify_cowner_province_code = null;
+			String modify_cowner_city_code = null;
+			String modify_cowner_county_code = null;
+
+//			20230616
+			if (StringUtils.isNotBlank(item.cowner_province)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByProvinceName(item.cowner_province);
+				if (bladeRegion != null) {
+					cowner_province_code = bladeRegion.getCode();
+				}
+			}
+			if (StringUtils.isNotBlank(item.cowner_city) && StringUtils.isNotBlank(cowner_province_code)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByCityName(item.cowner_city, cowner_province_code);
+				if (bladeRegion != null) {
+					cowner_city_code = bladeRegion.getCode();
+				}
+			}
+			if (StringUtils.isNotBlank(item.cowner_county) && StringUtils.isNotBlank(cowner_city_code)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByAreaName(item.cowner_county, cowner_city_code);
+				if (bladeRegion != null) {
+					cowner_county_code = bladeRegion.getCode();
+				}
+			}
+
+			if (StringUtils.isNotBlank(item.modify_cowner_province)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByProvinceName(item.modify_cowner_province);
+				if (bladeRegion != null) {
+					modify_cowner_province_code = bladeRegion.getCode();
+				}
+			}
+			if (StringUtils.isNotBlank(item.modify_cowner_city) && StringUtils.isNotBlank(modify_cowner_province_code)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByCityName(item.modify_cowner_city, modify_cowner_province_code);
+				if (bladeRegion != null) {
+					modify_cowner_city_code = bladeRegion.getCode();
+				}
+			}
+			if (StringUtils.isNotBlank(item.modify_cowner_county) && StringUtils.isNotBlank(modify_cowner_city_code)) {
+				BladeRegion bladeRegion = bladeRegionService.selectByAreaName(item.modify_cowner_county, modify_cowner_city_code);
+				if (bladeRegion != null) {
+					modify_cowner_county_code = bladeRegion.getCode();
+				}
+			}
+
+			param.add(item.cowner_province);
+			param.add(item.cowner_city);
+			param.add(item.cowner_county);
+			param.add(item.modify_cowner_province);
+			param.add(item.modify_cowner_city);
+			param.add(item.modify_cowner_county);
+			param.add(cowner_province_code);
+			param.add(cowner_city_code);
+			param.add(cowner_county_code);
+			param.add(modify_cowner_province_code);
+			param.add(modify_cowner_city_code);
+			param.add(modify_cowner_county_code);
+
+//			+"cowner_province,cowner_city,cowner_county,modify_cowner_province,modify_cowner_city,modify_cowner_county,"
+//			+ "cowner_province_code,cowner_city_code,cowner_county_code,"
+//			+ "modify_cowner_province_code,modify_cowner_city_code,modify_cowner_county_code"
+//			
+			return sql;
+		}
+
+		public static void main(String[] args) {
+			String str = "202212";
+			String year = str.substring(0, 4);
+			String month = str.substring(4, 6);
+			System.out.println("year:" + year + ",month:" + month);
+		}
+
+		public static String toModifyLocStr(String locStr) {
+			if (StringUtils.isBlank(locStr)) {
+				return null;
+			}
+			String locStr2 = locStr.trim();
+			if (locStr.contains(";")) {
+//	    		14-03;14-04
+				locStr2 = locStr2.substring(0, locStr2.indexOf(";"));
+			}
+			if (locStr2.contains("-")) {
+				locStr2 = locStr2.replace("-", "");
+			}
+			String locStr3 = null;
+			if (locStr2.length() <= 3) {
+				locStr3 = locStr2.substring(0, 1);
+			} else {
+				locStr3 = locStr2.substring(0, 2);
+			}
+
+			return Integer.parseInt(locStr3) + "";
+		}
+
+		private static String getAddress(String addrSrc) {
+			if (StringUtils.isBlank(addrSrc)) {
+				return null;
+			}
+			if (addrSrc.contains("云南省") && !addrSrc.startsWith("云南省")) {
+				return addrSrc.substring(addrSrc.indexOf("云南省"));
+			}
+			return null;
+		}
+
+//		public Integer hv_seis_dept;
+//		public Integer hv_have_overseas_dept;
+//		public Integer hv_keep10_dept;
+//		public Integer hv_high_pledge_dept;
+//		public Integer hv_technology_award_dept;
+
+//		public static DPatentPubInfo toDPatentPubInfo(ResItem item) {
+//			DPatentPubInfo d = new DPatentPubInfo();
+//
+////			public String _id;
+//			d.setPubId(item._id);
+////			public String pre_counts;
+//			d.setPreCounts(item.pre_counts);
+////			public String high_value;
+//			d.setHighValue(item.high_value);
+////			public String appli_province;
+//			d.setAppliProvince(item.appli_province);
+////			public String lic_counts;
+//			d.setLicCounts(item.lic_counts);
+////			public String title;
+//			d.setTitle(item.title);
+////			public String ipc_main;
+//			d.setIpcMain(item.ipc_main);
+////			public String appli_city;
+//			d.setAppliCity(item.appli_city);
+////			public String ple_counts;
+//			d.setPleCounts(item.ple_counts);
+////			public String appli;
+//			d.setAppli(item.appli);
+////			public String app_date;
+//			d.setAppDate(item.app_date);
+////			public String app_tran_counts;
+//			d.setAppTranCounts(item.app_tran_counts);
+////			public String loc_str;
+//			d.setLocStr(item.loc_str);
+////			public String modify_appli_city;
+//			d.setModifyAppliCity(item.modify_appli_city);
+////			public String curt_counts;
+//			d.setCurtCounts(item.curt_counts);
+////			public String national_eco_str;
+//			d.setNationalEcoStr(item.national_eco_str);
+////			public String agency_name;
+//			d.setAgencyName(item.agency_name);
+////			public String modify_appli_province;
+//			d.setModifyAppliProvince(item.modify_appli_province);
+////			public String appli_county;
+//			d.setAppliCounty(item.appli_county);
+////			public String pub_number;
+//			d.setPubNumber(item.pub_number);
+////			public String appli_address;
+//			d.setAppliAddress(item.appli_address);
+////			public String pat_tran_counts;
+//			d.setPatTranCounts(item.pat_tran_counts);
+////			public String app_number;
+//			d.setAppNumber(item.app_number);
+////			public String modify_appli_county;
+//			d.setModifyAppliCounty(item.modify_appli_county);
+////			public String patent_type;
+//			d.setPatentType(item.patent_type);
+////			public String appli_type;
+//			d.setAppliType(item.appli_type);
+////			public String status;
+//			d.setStatus(item.status);
+//			return d;
+//		}
+
+	}
+
+}

+ 171 - 0
yunnan-report-admin/src/main/java/com/ruoyi/imports/util/DateUtils.java

@@ -0,0 +1,171 @@
+/**
+ */
+package com.ruoyi.imports.util;
+
+import java.text.ParseException;
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+/**
+ * 日期工具类, 继承org.apache.commons.lang.time.DateUtils类
+ * @version 2014-4-15
+ */
+public class DateUtils   {
+	
+	private static String[] parsePatterns = {
+		"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", 
+		"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
+		"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
+
+	/**
+	 * 得到当前日期字符串 格式(yyyy-MM-dd)
+	 */
+	public static String getDate() {
+		return getDate("yyyy-MM-dd");
+	}
+	
+	/**
+	 * 得到当前日期字符串 格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
+	 */
+	public static String getDate(String pattern) {
+		return DateFormatUtils.format(new Date(), pattern);
+	}
+	
+	/**
+	 * 得到日期字符串 默认格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
+	 */
+	public static String formatDate(Date date, Object... pattern) {
+		String formatDate = null;
+		if (pattern != null && pattern.length > 0) {
+			formatDate = DateFormatUtils.format(date, pattern[0].toString());
+		} else {
+			formatDate = DateFormatUtils.format(date, "yyyy-MM-dd");
+		}
+		return formatDate;
+	}
+	
+	/**
+	 * 得到日期时间字符串,转换格式(yyyy-MM-dd HH:mm:ss)
+	 */
+	public static String formatDateTime(Date date) {
+		return formatDate(date, "yyyy-MM-dd HH:mm:ss");
+	}
+
+	/**
+	 * 得到当前时间字符串 格式(HH:mm:ss)
+	 */
+	public static String getTime() {
+		return formatDate(new Date(), "HH:mm:ss");
+	}
+
+	/**
+	 * 得到当前日期和时间字符串 格式(yyyy-MM-dd HH:mm:ss)
+	 */
+	public static String getDateTime() {
+		return formatDate(new Date(), "yyyy-MM-dd HH:mm:ss");
+	}
+
+	/**
+	 * 得到当前年份字符串 格式(yyyy)
+	 */
+	public static String getYear() {
+		return formatDate(new Date(), "yyyy");
+	}
+
+	/**
+	 * 得到当前月份字符串 格式(MM)
+	 */
+	public static String getMonth() {
+		return formatDate(new Date(), "MM");
+	}
+
+	/**
+	 * 得到当天字符串 格式(dd)
+	 */
+	public static String getDay() {
+		return formatDate(new Date(), "dd");
+	}
+
+	/**
+	 * 得到当前星期字符串 格式(E)星期几
+	 */
+	public static String getWeek() {
+		return formatDate(new Date(), "E");
+	}
+	
+	/**
+	 * 日期型字符串转化为日期 格式
+	 * { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", 
+	 *   "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm",
+	 *   "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm" }
+	 */
+//	public static Date parseDate(Object str) {
+//		if (str == null){
+//			return null;
+//		}
+//		try {
+//			return parseDate(str.toString(), parsePatterns);
+//		} catch (ParseException e) {
+//			return null;
+//		}
+//	}
+
+	/**
+	 * 获取过去的天数
+	 * @param date
+	 * @return
+	 */
+	public static long pastDays(Date date) {
+		long t = new Date().getTime()-date.getTime();
+		return t/(24*60*60*1000);
+	}
+
+	/**
+	 * 获取过去的小时
+	 * @param date
+	 * @return
+	 */
+	public static long pastHour(Date date) {
+		long t = new Date().getTime()-date.getTime();
+		return t/(60*60*1000);
+	}
+	
+	/**
+	 * 获取过去的分钟
+	 * @param date
+	 * @return
+	 */
+	public static long pastMinutes(Date date) {
+		long t = new Date().getTime()-date.getTime();
+		return t/(60*1000);
+	}
+	
+	/**
+	 * 转换为时间(天,时:分:秒.毫秒)
+	 * @param timeMillis
+	 * @return
+	 */
+    public static String formatDateTime(long timeMillis){
+		long day = timeMillis/(24*60*60*1000);
+		long hour = (timeMillis/(60*60*1000)-day*24);
+		long min = ((timeMillis/(60*1000))-day*24*60-hour*60);
+		long s = (timeMillis/1000-day*24*60*60-hour*60*60-min*60);
+		long sss = (timeMillis-day*24*60*60*1000-hour*60*60*1000-min*60*1000-s*1000);
+		return (day>0?day+",":"")+hour+":"+min+":"+s+"."+sss;
+    }
+	
+	/**
+	 * 获取两个日期之间的天数
+	 * 
+	 * @param before
+	 * @param after
+	 * @return
+	 */
+	public static double getDistanceOfTwoDate(Date before, Date after) {
+		long beforeTime = before.getTime();
+		long afterTime = after.getTime();
+		return (afterTime - beforeTime) / (1000 * 60 * 60 * 24);
+	}
+	
+}

+ 102 - 0
yunnan-report-admin/src/main/java/com/ruoyi/imports/util/DbConfig.java

@@ -0,0 +1,102 @@
+package com.ruoyi.imports.util;
+
+import org.apache.commons.lang3.StringUtils;
+
+public class DbConfig {
+	
+//	private String driver = "oracle.jdbc.driver.OracleDriver";
+//	private String url = "jdbc:oracle:thin:@127.0.0.1:1521:orcl";
+//	private String username = "dream_cai_piao";
+//	private String pwd = "piao";
+	
+	private String driver = "com.mysql.cj.jdbc.Driver";
+	//test
+//	private String url = "jdbc:mysql://127.0.0.1:4442/yunnan_report?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8";
+	
+	//pro
+	private String url = "jdbc:mysql://10.253.228.75:3306/yunnan_report?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8";
+	private String username = "root";
+	private String pwd = "96ee46cebd2e2518";
+	
+	private String dbType= "mysql";
+//	private String driver ;
+//	private String url ;
+//	private String username ;
+//	private String pwd ;
+	
+	private boolean autoCommit=true;//是否自动提交
+	private boolean stopOnError=true;//出错时是否继续执行
+	
+	public String validate(){
+		String err=null;
+		if(StringUtils.isBlank(dbType)){
+			err="末知数据库类型";
+		}
+		else if(StringUtils.isBlank(driver)){
+			err="缺失数据库驱动";
+		}
+		else if(StringUtils.isBlank(url)){
+			err="缺失数据库url";
+		}
+		else if(StringUtils.isBlank(username)){
+			err="缺失数据库用户名";
+		}
+		else if(StringUtils.isBlank(pwd)){
+			err="缺失数据库密码";
+		}		
+		return err;
+	}
+	
+	
+	public boolean isAutoCommit() {
+		return autoCommit;
+	}
+
+
+	public void setAutoCommit(boolean autoCommit) {
+		this.autoCommit = autoCommit;
+	}
+
+
+	public boolean isStopOnError() {
+		return stopOnError;
+	}
+
+
+	public void setStopOnError(boolean stopOnError) {
+		this.stopOnError = stopOnError;
+	}
+
+
+	public String getDriver() {
+		return driver;
+	}
+	public void setDriver(String driver) {
+		this.driver = driver;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	public String getUsername() {
+		return username;
+	}
+	public void setUsername(String username) {
+		this.username = username;
+	}
+	public String getPwd() {
+		return pwd;
+	}
+	public void setPwd(String pwd) {
+		this.pwd = pwd;
+	}
+	public String getDbType() {
+		return dbType;
+	}
+	public void setDbType(String dbType) {
+		this.dbType = dbType;
+	}
+
+}

+ 367 - 0
yunnan-report-admin/src/main/java/com/ruoyi/imports/util/DbUtils.java

@@ -0,0 +1,367 @@
+package com.ruoyi.imports.util;
+
+import java.math.BigDecimal;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.io.Resources;
+import org.apache.ibatis.jdbc.ScriptRunner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+
+public class DbUtils {
+	
+	private static final Logger logger=LoggerFactory.getLogger(DbUtils.class);
+	
+	private DbConfig conf;
+	
+	private DbUtils(){
+	}
+	
+	
+	public static DbUtils newDbUtil(DbConfig conf)throws Exception{
+		if(conf==null ){
+			throw new Exception("无法实例化DbUtils,原因:末知的数据库配置");
+		}
+		String err=conf.validate();
+		if(StringUtils.isNotBlank(err)){
+			throw new Exception("无法实例化DbUtils,原因:"+err);	
+		}
+		
+		DbUtils util=new DbUtils();
+		
+		util.conf=conf;
+		
+		return util;
+		
+	}
+	
+	public static DbUtils newDbUtil(String driver,String username,String pwd,String url)throws Exception{
+		if(StringUtils.isBlank(driver) || StringUtils.isBlank(username) 
+				|| StringUtils.isBlank(pwd) || StringUtils.isBlank(url)  ){
+			throw new Exception("无法实例化DbUtils,缺少必要信息");
+		}
+		DbUtils util=new DbUtils();
+		DbConfig conf=new DbConfig();
+		conf.setDriver(driver);
+		conf.setUsername(username);
+		conf.setPwd(pwd);
+		conf.setUrl(url);
+		util.conf=conf;
+
+		return util;
+	}
+	
+	
+//	public static void main(String[] args) throws Exception{
+//		
+//		DbUtils util=new DbUtils();
+//		util.conf=new DbConfig();
+//		
+//		String sql="select * from t_member where userid=?";
+//		List param=new ArrayList();
+//		param.add(777777);
+//		List<Map<String,Object>>list= util.executeQuery(sql, param);
+//		Map<String,Object>map=list.get(0);
+////		MyLogUtils.print(DbUtils.class, "查询结果:"+map.get("email"));
+//		
+//		sql="update t_member set email=? where userid=?";
+//		param.clear();
+//		param.add("fdfdfsdf");
+//		param.add(777777);
+//		
+//		int c=util.executeUpdate(sql,param);
+////		MyLogUtils.print(DbUtils.class, "更新行数:"+c);
+//		
+//		
+//		sql="select * from t_member where userid=?";
+//		param=new ArrayList();
+//		param.add(777777);
+//		list= util.executeQuery(sql, param);
+//		map=list.get(0);
+////		MyLogUtils.print(DbUtils.class, "查询结果:"+map.get("email"));
+//		
+//		
+//	}
+	
+	
+	public void executeSqlFile(String filePath)throws Exception {
+//			   String url = "jdbc:mysql://localhost:3306/jeesite?useUnicode=true&characterEncoding=utf-8";
+//			   String driver = "com.mysql.jdbc.Driver";
+//			   String username = "root";
+//			   String password ="root";
+	  
+	   String url = conf.getUrl();
+	   String driver = conf.getDriver();
+	   String username = conf.getUsername();
+	   String password =conf.getPwd();
+	   
+			   
+	   Class.forName(driver).newInstance();
+	   Connection conn = (Connection) DriverManager.getConnection(url, username, password);
+	   ScriptRunner runner = new ScriptRunner(conn);
+//			   runner.setAutoCommit(false);
+//			   runner.setStopOnError(true);
+	   
+	   runner.setAutoCommit(conf.isAutoCommit());
+	   runner.setStopOnError(conf.isStopOnError());
+	    
+	   runner.setErrorLogWriter(null);
+	   runner.setLogWriter(null);
+	   runner.runScript(Resources.getResourceAsReader(filePath));
+//			   runner.runScript(Resources.getResourceAsReader("ddl/mysql/jpetstore-mysql-dataload.sql"));
+			    
+			   
+	}
+	
+	public Connection getConnections()throws Exception{
+		Connection connection = null;
+		Class.forName(conf.getDriver());
+		connection= DriverManager.getConnection(conf.getUrl(),conf.getUsername(),conf.getPwd());
+		return connection;
+	}
+	
+	
+	@SuppressWarnings("rawtypes")
+	public int executeUpdate(String sql,List param)throws Exception {
+		Connection conn=getConnections();
+		
+		PreparedStatement ps = conn.prepareStatement(sql);
+		if(param!=null){
+            for(int i=0;i<param.size();i++){
+                Object obj = param.get(i);  
+                this.setParameterValue(ps, i+1, obj);  
+            }  
+        }
+		
+		int count = ps.executeUpdate();
+		close(ps);
+		close(conn);
+		return count;
+	}
+	
+	@SuppressWarnings("rawtypes")
+	public int executeUpdate(Connection conn,String sql,List param)throws Exception {
+		
+		PreparedStatement ps = conn.prepareStatement(sql);
+		
+		if(param!=null){  
+            for(int i=0;i<param.size();i++){
+                Object obj = param.get(i);  
+                this.setParameterValue(ps, i+1, obj);  
+            }  
+        }
+		
+		int count = ps.executeUpdate();
+		close(ps);
+		
+		return count;
+	}
+	
+	@SuppressWarnings("rawtypes")
+	public List<Map<String,Object>> executeQuery(String sql,List param)throws Exception {
+		Connection conn=getConnections();
+		PreparedStatement ps = conn.prepareStatement(sql);
+		
+        if(param!=null){  
+            for(int i=0;i<param.size();i++){
+                Object obj = param.get(i);  
+                this.setParameterValue(ps, i+1, obj);  
+            }  
+        }
+          
+        ResultSet rs = ps.executeQuery();  
+        List<Map<String,Object>> dataList = new ArrayList<Map<String,Object>>();  
+        Map<String,Integer> metaDataMap = null;  
+        while(rs.next()){  
+            if(rs.isFirst()){  
+                metaDataMap = this.getMetaData(rs);  
+            }  
+            dataList.add(this.setData(rs,metaDataMap));  
+        }  
+        
+        dataList=upperCaseKey(dataList);
+        
+        close(rs);
+        close(ps);
+        close(conn);
+        
+		return dataList;
+	}
+	
+	private List<Map<String,Object>>upperCaseKey(List<Map<String,Object>>list){
+		List<Map<String,Object>>newList=new ArrayList<Map<String,Object>>();
+		if(list!=null && !list.isEmpty()){
+			for(Map<String,Object>map:list){
+				newList.add(upperCaseKey(map));
+			}
+		}
+		
+		return newList;
+	}
+	private Map<String,Object> upperCaseKey(Map<String,Object> map){
+		Map<String,Object>newMap=new HashMap<String,Object>();
+		if(map!=null && !map.isEmpty()){
+			for(Map.Entry<String, Object>ent:map.entrySet()){
+				newMap.put(ent.getKey().toUpperCase(), ent.getValue());
+			}
+		}
+		return newMap;
+	}
+	
+	
+	private void setParameterValue(PreparedStatement pStatement, int piIndex,Object pValueObject) throws Exception {  
+        if (pValueObject instanceof String) {  
+            pStatement.setString(piIndex, (String) pValueObject);  
+        } else if (pValueObject instanceof Boolean) {  
+            pStatement.setBoolean(piIndex, ((Boolean) pValueObject).booleanValue());  
+        } else if (pValueObject instanceof Byte) {  
+            pStatement.setByte(piIndex, ((Byte) pValueObject).byteValue());  
+        } else if (pValueObject instanceof Short) {  
+            pStatement.setShort(piIndex, ((Short) pValueObject).shortValue());  
+        } else if (pValueObject instanceof Integer) {  
+            pStatement.setInt(piIndex, ((Integer) pValueObject).intValue());  
+        } else if (pValueObject instanceof Long) {  
+            pStatement.setLong(piIndex, ((Long) pValueObject).longValue());  
+        } else if (pValueObject instanceof Float) {  
+            pStatement.setFloat(piIndex, ((Float) pValueObject).floatValue());  
+        } else if (pValueObject instanceof Double) {  
+            pStatement.setDouble(piIndex, ((Double) pValueObject).doubleValue());  
+        } else if (pValueObject instanceof BigDecimal) {  
+            pStatement.setBigDecimal(piIndex, (BigDecimal) pValueObject);  
+        } else if (pValueObject instanceof java.sql.Date) {  
+            pStatement.setDate(piIndex, (java.sql.Date) pValueObject);  
+        } else if (pValueObject instanceof Time) {  
+            pStatement.setTime(piIndex, (Time) pValueObject);  
+        } else if (pValueObject instanceof Timestamp) {  
+            pStatement.setTimestamp(piIndex, (Timestamp) pValueObject);  
+        } else {  
+            pStatement.setObject(piIndex, pValueObject);  
+        }  
+    }  
+  
+    /** 
+     * 根据传入的结果集返回结果集的元数据,以列名为键以列类型为值的map对象 
+     * @param rs 
+     * @return  
+     * @throws SQLException 
+     */  
+    private Map<String,Integer> getMetaData(ResultSet rs) throws SQLException{  
+        Map<String,Integer> map = new HashMap<String,Integer>();  
+        ResultSetMetaData metaData = rs.getMetaData();  
+        int numberOfColumns =  metaData.getColumnCount();  
+        for(int column = 0; column < numberOfColumns; column++) {  
+            String columnName = metaData.getColumnLabel(column+1);  
+            int colunmType = metaData.getColumnType(column+1);  
+            columnName = columnName.toLowerCase();  
+            map.put(columnName, colunmType);  
+        }  
+        return map;  
+    }  
+      
+    /** 
+     * 将结果集封装为以列名存储的map对象 
+     * @param rs 
+     * @param metaDataMap元数据集合 
+     * @return 
+     * @throws Exception 
+     */  
+    private Map<String,Object> setData(ResultSet rs,Map<String,Integer> metaDataMap) throws Exception {  
+        Map<String,Object> map = new HashMap<String,Object>();  
+        for (String columnName : metaDataMap.keySet()) {  
+            int columnType = metaDataMap.get(columnName);  
+            Object object = rs.getObject(columnName);  
+            if(object==null){  
+                map.put(columnName, null);  
+                continue;  
+            }  
+            switch (columnType) {  
+            case java.sql.Types.VARCHAR:  
+                map.put(columnName, object);  
+                break;  
+            case java.sql.Types.DATE:  
+                map.put(columnName, DateUtils.formatDateTime( (java.sql.Date) object));  
+                break;  
+            case java.sql.Types.TIMESTAMP:  
+                map.put(columnName, DateUtils.formatDateTime( (java.sql.Timestamp) object));  
+                break;  
+            case java.sql.Types.TIME:  
+                map.put(columnName, DateUtils.formatDateTime( (java.sql.Time) object));  
+                break;  
+            case java.sql.Types.CLOB:  
+                try{  
+                    if(object!=null){  
+                        Clob clob = (Clob)object;  
+                        long length = clob.length();  
+                        map.put(columnName, clob.getSubString(1L, (int)length));  
+                    }  
+                }catch(Exception e){  
+                	logger.error( e.getMessage(),e);
+                }  
+                break;  
+            case java.sql.Types.BLOB:  
+                map.put(columnName, "");  
+                break;  
+            default:  
+                map.put(columnName, object);  
+                break;  
+            }  
+        }  
+        return map;  
+    }  
+	
+	public void close(Connection conn) {
+		try {
+			if (conn != null) {
+				conn.close();
+				conn = null;
+			}
+		} catch (SQLException e) {
+
+			logger.error( e.getMessage(),e);
+		}
+	}
+	
+	public void close(PreparedStatement ps) {
+		try {
+			if (ps != null) {
+				ps.close();
+				ps = null;
+			}
+		} catch (SQLException e) {
+
+			logger.error( e.getMessage(),e);
+		}
+	}
+	
+	public void close(ResultSet resultSet) {
+		try {
+			if (resultSet != null) {
+				resultSet.close();
+				resultSet = null;
+			}
+		} catch (SQLException e) {
+
+			logger.error( e.getMessage(), e);
+		}
+	}
+	
+	
+	
+	
+	
+}

+ 39 - 0
yunnan-report-admin/src/main/java/com/ruoyi/imports/util/GsonUtils.java

@@ -0,0 +1,39 @@
+package com.ruoyi.imports.util;
+
+import java.lang.reflect.Type;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+public class GsonUtils {
+
+	public static String toJson(Object src) {
+		if (src == null) {
+			return null;
+		}
+		return getGson().toJson(src);
+	}
+	
+
+	
+	public static <T>T formJson(String json,Type t){
+		if(json==null || "".equals(json.trim())) {
+			return null;
+		}
+		return getGson().fromJson(json, t);
+	}
+	
+//	public static <T>T formJson(String json,Class<T>clazz){
+//		if(json==null || "".equals(json.trim())) {
+//			return null;
+//		}
+//		return getGson().fromJson(json, clazz);
+//	}
+	
+	private static Gson getGson() {
+		GsonBuilder gsonBuilder = new GsonBuilder();
+		gsonBuilder.setDateFormat("yyyy-MM-dd HH:mm:ss");
+		return gsonBuilder.create();
+	}
+
+}

+ 10 - 0
yunnan-report-admin/src/main/java/com/ruoyi/task/PatentSyncTask.java

@@ -0,0 +1,10 @@
+package com.ruoyi.task;
+
+public interface PatentSyncTask {
+	
+	/**
+	 * 同步公开专利
+	 */
+	void syncPubPatent();
+
+}

+ 10 - 0
yunnan-report-admin/src/main/java/com/ruoyi/task/TrademarkSyncTask.java

@@ -0,0 +1,10 @@
+package com.ruoyi.task;
+
+public interface TrademarkSyncTask {
+	/**
+	 * 同步商标
+	 */
+	void syncTrademark();
+	
+	void syncCircuit() ;
+}

+ 47 - 0
yunnan-report-admin/src/main/java/com/ruoyi/task/impl/PatentSyncTaskImpl.java

@@ -0,0 +1,47 @@
+package com.ruoyi.task.impl;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.imports.PatentPubImportUtils;
+import com.ruoyi.reportpub.service.IDPatentPubInfoService;
+import com.ruoyi.system.service.IBladeRegionService;
+import com.ruoyi.system.service.IDIpcTypeService;
+import com.ruoyi.task.PatentSyncTask;
+
+
+@Service("patentSyncTask")
+public class PatentSyncTaskImpl implements PatentSyncTask {
+	
+	private static final Logger logger=LoggerFactory.getLogger(PatentSyncTaskImpl.class);
+	
+	@Autowired
+	private RuoYiConfig ruoYiConfig;
+	@Autowired
+	private IDPatentPubInfoService dPatentPubInfoService;
+	@Autowired
+	private IBladeRegionService bladeRegionService;
+	@Autowired
+	private IDIpcTypeService dIpcTypeService;
+	
+	@Override
+	public void syncPubPatent() {
+		String beginDate="20210101";
+		try {
+			logger.debug("同步公开专利定时任务开始。。。");
+			if (ruoYiConfig.getAutoImpPub()) {
+				PatentPubImportUtils.impByIprd(ruoYiConfig, dPatentPubInfoService, dIpcTypeService, bladeRegionService, beginDate);
+			}else {
+				logger.warn("跳过同步公开专利任务");
+			}
+			
+		} catch (Exception e) {
+			logger.error("同步公开专利定时任务失败,"+e.getMessage(),e);
+			throw new RuntimeException(e);
+		}
+	}
+
+}

+ 111 - 0
yunnan-report-admin/src/main/java/com/ruoyi/task/impl/TrademarkSyncTaskImpl.java

@@ -0,0 +1,111 @@
+package com.ruoyi.task.impl;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ruoyi.circuit.service.ICIntegratedCircuitService;
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.indica.service.ICIndicationInfoService;
+import com.ruoyi.madridmark.service.ICMadridmarkService;
+import com.ruoyi.system.domain.SysConfig;
+import com.ruoyi.system.service.ISysConfigService;
+import com.ruoyi.task.TrademarkSyncTask;
+import com.ruoyi.trade.service.ICTrademarkService;
+
+@Service("trademarkSyncTask")
+public class TrademarkSyncTaskImpl implements TrademarkSyncTask {
+
+	private static final Logger logger = LoggerFactory.getLogger(TrademarkSyncTaskImpl.class);
+
+	@Autowired
+	private RuoYiConfig ruoYiConfig;
+
+	@Autowired
+	private ICTrademarkService cTrademarkService;
+	
+	@Autowired
+	private ICIntegratedCircuitService iCIntegratedCircuitService;
+	
+	@Autowired
+	private ICIndicationInfoService iCIndicationInfoService;
+
+	@Autowired
+	private ICMadridmarkService cMadridmarkService;
+	@Autowired
+	private ISysConfigService sysConfigService;
+	
+	@Override
+	public void syncCircuit() {
+		
+		if (ruoYiConfig.getAutoImpPub()) {
+			String beginDate = "19890101";
+
+			String endDate = new SimpleDateFormat("yyyyMMdd").format(new Date());
+			// 同步集成电路
+			logger.debug("开始全量同步集成电路数据。。。");
+			iCIntegratedCircuitService.doSyncForIprd(beginDate, endDate);
+
+			// 同步地理标志
+			logger.debug("开始同步地理标志数据");
+			iCIndicationInfoService.doSyncForIprd(beginDate, endDate);
+
+			// 同步马德里商标
+			logger.debug("开始同步马德里商标数据");
+			cMadridmarkService.doSyncForIprd(beginDate, endDate);
+			logger.debug("同步同步马德里商标完成");
+			
+			String lastTimeKey = "trademark_last_time";
+			SysConfig config = sysConfigService.selectConfigByKey2(lastTimeKey);
+			config.setConfigValue(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
+			sysConfigService.updateConfig(config);
+			
+			
+			String lastTimeKey2 = "indication_last_time";
+			SysConfig config2 = sysConfigService.selectConfigByKey2(lastTimeKey2);
+			config2.setConfigValue(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
+			sysConfigService.updateConfig(config2);
+			
+			
+			String lastTimeKey3 = "circuit_last_time";
+			SysConfig config3 = sysConfigService.selectConfigByKey2(lastTimeKey3);
+			config3.setConfigValue(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
+			sysConfigService.updateConfig(config3);
+			
+			
+		}
+		
+		
+	}
+	@Override
+	public void syncTrademark() {
+
+		logger.debug("同步商标数据定时任务开始。。。");
+
+		try {
+			if (ruoYiConfig.getAutoImpPub()) {
+				String beginDate = "19890101";
+				String endDate = new SimpleDateFormat("yyyyMMdd").format(new Date());
+
+				// 同步商标
+				logger.debug("开始全量同步商标数据。。。");
+				cTrademarkService.doSyncForIprd(beginDate, endDate);
+
+				logger.debug("同步商标数据完成");
+
+			} else {
+				logger.warn("跳过同步商标任务");
+			}
+		} catch (Exception e) {
+			logger.error("同步商标数据失败," + e.getMessage(), e);
+		}
+
+	}
+
+}
+
+

+ 39 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/CircuitController.java

@@ -0,0 +1,39 @@
+package com.ruoyi.web.controller.api;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ruoyi.circuit.service.ICIntegratedCircuitService;
+import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.report.vo.LastSumDTO;
+
+import cn.hutool.http.HttpRequest;
+
+/**
+ * 集成电路接口
+ *
+ */
+@RestController
+@RequestMapping("/private/circuit")
+public class CircuitController extends PrivateApiController{
+
+	@Autowired
+    private ICIntegratedCircuitService cIntegratedCircuitService;
+	
+	@GetMapping("/lastSum")
+	public AjaxResult list(HttpServletRequest req) {
+		try {
+			checkAuth(req);
+		} catch (Exception e) {
+			return AjaxResult.error(HttpStatus.UNAUTHORIZED,"权限验证不通过");
+		}
+		LastSumDTO dto = cIntegratedCircuitService.listForLast();
+		return AjaxResult.success(dto);
+	}
+
+}

+ 48 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/GeographicalController.java

@@ -0,0 +1,48 @@
+package com.ruoyi.web.controller.api;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.indica.service.ICIndicationInfoService;
+import com.ruoyi.report.vo.CIndicationLastSumDTO;
+
+@RestController
+@RequestMapping("/private/geographical")
+public class GeographicalController  extends PrivateApiController{
+
+	
+	@Autowired
+	private ICIndicationInfoService cIndicationInfoService;
+	@GetMapping("/lastSum")
+	public AjaxResult list(HttpServletRequest req) {
+		try {
+			checkAuth(req);
+		} catch (Exception e) {
+			return AjaxResult.error(HttpStatus.UNAUTHORIZED,"权限验证不通过");
+		}
+		CIndicationLastSumDTO dto = cIndicationInfoService.listForLast();
+		return AjaxResult.success(dto);
+	}
+	
+	public static void main(String[] args) {
+
+//		String appid = PrivateApiController.APPID;
+//		String secret = PrivateApiController.SECRET;
+//		String url="http://127.0.0.1:8080/prod-api/private/geographical/lastSum?appid="+appid+"&secret="+secret;
+		
+		String appid = PrivateApiController.APPID;
+		String secret = PrivateApiController.SECRET;
+//		String url="http://127.0.0.1:8080/prod-api/private/geographical/lastSum?appid="+appid+"&secret="+secret;
+		String url="http://root49.publicdi.com/prod-api/private/geographical/lastSum?appid="+appid+"&secret="+secret;
+		String res = HttpUtils.sendGet(url);
+		System.out.println(res);
+	}
+	
+}

+ 51 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/PatentController.java

@@ -0,0 +1,51 @@
+package com.ruoyi.web.controller.api;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.report.service.IRzlViewStatisticsInfoService;
+import com.ruoyi.report.vo.PatentLastSumDTO;
+
+@RestController
+@RequestMapping("/private/patent")
+public class PatentController extends PrivateApiController {
+	@Autowired
+	private IRzlViewStatisticsInfoService rzlViewStatisticsInfoService;
+
+	@GetMapping("/lastSum")
+	public AjaxResult list(HttpServletRequest req) {
+		try {
+			checkAuth(req);
+		} catch (Exception e) {
+			return AjaxResult.error(HttpStatus.UNAUTHORIZED,"权限验证不通过");
+		}
+		
+		PatentLastSumDTO dto = rzlViewStatisticsInfoService.listForLast();
+		return AjaxResult.success(dto);
+	}
+	
+	
+
+	public static void main(String[] args) {
+
+//		String appid = PrivateApiController.APPID;
+//		String secret = PrivateApiController.SECRET;
+//		String url="http://127.0.0.1:8080/prod-api/private/geographical/lastSum?appid="+appid+"&secret="+secret;
+		
+		String appid = PrivateApiController.APPID;
+		String secret = PrivateApiController.SECRET;
+//		String url="http://127.0.0.1:8080/prod-api/private/geographical/lastSum?appid="+appid+"&secret="+secret;
+		String url="http://root49.publicdi.com/prod-api/private/patent/lastSum?appid="+appid+"&secret="+secret;
+		String res = HttpUtils.sendGet(url);
+		System.out.println(res);
+	}
+	
+
+}

+ 33 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/PrivateApiController.java

@@ -0,0 +1,33 @@
+package com.ruoyi.web.controller.api;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.utils.uuid.UUID;
+import com.ruoyi.system.service.IBladeRegionService;
+
+public class PrivateApiController extends BaseController {
+
+//	ba51b8d620754f088445f34ce7476639
+//	a9078c97b0704ad1b5a59fd8346c3673
+	
+	public static String APPID="ba51b8d620754f088445f34ce7476639";
+	public static String SECRET="a9078c97b0704ad1b5a59fd8346c3673";
+	
+	
+	
+
+	protected void checkAuth(HttpServletRequest req) {
+
+		String appid = req.getParameter("appid");
+		String secret = req.getParameter("secret");
+		
+		if(!APPID.equals(appid) || !SECRET.equals(secret)) {
+			throw new RuntimeException("权限验证不通过");
+		}
+
+	}
+
+}

+ 37 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/api/TrademarkController.java

@@ -0,0 +1,37 @@
+package com.ruoyi.web.controller.api;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.report.vo.TrademarkLastSumDTO;
+import com.ruoyi.trade.service.ICTrademarkService;
+
+
+@RestController
+@RequestMapping("/private/trademark")
+public class TrademarkController extends PrivateApiController{
+
+
+	@Autowired
+	private ICTrademarkService cTrademarkService;
+	@GetMapping("/lastSum")
+	public AjaxResult list(HttpServletRequest req) {
+		
+		try {
+			checkAuth(req);
+		} catch (Exception e) {
+			return AjaxResult.error(HttpStatus.UNAUTHORIZED,"权限验证不通过");
+		}
+		
+		TrademarkLastSumDTO dto = cTrademarkService.listForLast();
+		return AjaxResult.success(dto);
+	}
+
+
+}

+ 282 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/base/BaseExportTempController.java

@@ -0,0 +1,282 @@
+package com.ruoyi.web.controller.base;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import com.ruoyi.base.DTO.BaseTempExportDTO;
+import com.ruoyi.common.utils.DateUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.domain.ResponseData;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.validation.Valid;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.core.env.Environment;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.base.domain.BaseExportTemp;
+import com.ruoyi.base.service.IBaseExportTempService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * ureport2模板管理Controller
+ * 
+ * @author ruoyi
+ * @date 2022-01-21
+ */
+@Api(value = "ureport2模板管理",tags = "ureport2模板管理")
+@ApiSupport(author = "ruoyi",order = 10)
+@RestController
+@RequestMapping("/base/baseExportTemp")
+public class BaseExportTempController extends BaseController
+{
+    @Autowired
+    private IBaseExportTempService baseExportTempService;
+
+    @Autowired
+    Environment environment;
+    /**
+     * 查询ureport2模板管理列表
+     */
+    @ApiOperation(value = "查询ureport2模板管理列表",notes = "查询ureport2模板管理列表")
+    @ApiOperationSupport(order = 10)
+    @PreAuthorize("@ss.hasPermi('base:baseExportTemp:list')")
+    @GetMapping("/list")
+    public TableDataInfo<BaseExportTemp> list(BaseExportTemp baseExportTemp)
+    {
+        startPage();
+        List<BaseExportTemp> list = baseExportTempService.selectBaseExportTempList(baseExportTemp);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出ureport2模板管理列表
+     */
+    @ApiOperation(value = "导出ureport2模板管理列表",notes = "导出ureport2模板管理列表")
+    @ApiOperationSupport(order = 20)
+    @PreAuthorize("@ss.hasPermi('base:baseExportTemp:export')")
+    @Log(title = "ureport2模板管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BaseExportTemp baseExportTemp)
+    {
+        List<BaseExportTemp> list = baseExportTempService.selectBaseExportTempList(baseExportTemp);
+        ExcelUtil<BaseExportTemp> util = new ExcelUtil<BaseExportTemp>(BaseExportTemp.class);
+        util.exportExcel(response, list, "ureport2模板管理数据");
+    }
+
+    /**
+     * 获取ureport2模板管理详细信息
+     */
+    @ApiOperation(value = "获取ureport2模板管理详细信息",notes = "获取ureport2模板管理详细信息")
+    @ApiOperationSupport(order = 30)
+    @PreAuthorize("@ss.hasPermi('base:baseExportTemp:query')")
+    @GetMapping(value = "/{id}")
+    public ResponseData<BaseExportTemp> getInfo(@PathVariable("id") Long id)
+    {
+        return ResponseData.success(baseExportTempService.selectBaseExportTempById(id));
+    }
+
+    /**
+     * 新增ureport2模板管理
+     */
+    @ApiOperation(value = "新增ureport2模板管理",notes = "新增ureport2模板管理")
+    @ApiOperationSupport(order = 40,ignoreParameters = {"baseExportTemp.id"})
+    @PreAuthorize("@ss.hasPermi('base:baseExportTemp:add')")
+    @Log(title = "ureport2模板管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    @RepeatSubmit
+    public ResponseData add(@RequestBody @Valid @ApiParam(required=true) BaseExportTemp baseExportTemp)
+    {
+        int i = baseExportTempService.insertBaseExportTemp(baseExportTemp);
+        if(i>0){
+            //返回主键
+            return ResponseData.success(baseExportTemp.getId());
+        }else{
+            return ResponseData.error();
+        }
+    }
+
+    /**
+     * 修改ureport2模板管理
+     */
+    @ApiOperation(value = "修改ureport2模板管理",notes = "修改ureport2模板管理")
+    @ApiOperationSupport(order = 50)
+    @PreAuthorize("@ss.hasPermi('base:baseExportTemp:edit')")
+    @Log(title = "ureport2模板管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @RepeatSubmit
+    public ResponseData edit(@RequestBody @Valid @ApiParam(required=true) BaseExportTemp baseExportTemp)
+    {
+        int i = baseExportTempService.updateBaseExportTemp(baseExportTemp);
+        if(i>0){
+            //返回主键
+            return ResponseData.success(baseExportTemp.getId());
+        }else{
+            return ResponseData.error();
+        }
+    }
+
+    /**
+     * 删除ureport2模板管理
+     */
+    @ApiOperation(value = "删除ureport2模板管理",notes = "删除ureport2模板管理")
+    @ApiOperationSupport(order = 60)
+    @PreAuthorize("@ss.hasPermi('base:baseExportTemp:remove')")
+    @Log(title = "ureport2模板管理", businessType = BusinessType.DELETE)
+    @PostMapping("/delete/{ids}")
+    public ResponseData remove(@PathVariable Long[] ids)
+    {
+        //return toResult(baseExportTempService.deleteBaseExportTempByIds(ids));
+        //逻辑删除
+        return toResult(baseExportTempService.setDeleteByIds(ids));
+    }
+
+    /**
+     * 查询ureport2模板管理列表---不进行分页
+     */
+    @ApiOperation(value = "查询ureport2模板管理列表---不进行分页",notes = "查询ureport2模板管理列表---不进行分页")
+    @ApiOperationSupport(order = 70)
+    @PreAuthorize("@ss.hasPermi('base:baseExportTemp:list')")
+    @PostMapping("/getDataList")
+    public ResponseData<List<BaseExportTemp>> getDataList(@RequestBody BaseExportTemp baseExportTemp)
+    {
+        List<BaseExportTemp> list = baseExportTempService.selectBaseExportTempList(baseExportTemp);
+        return ResponseData.success(list);
+    }
+
+    /**
+     * 跳转到添加模板页面
+     * @return
+     */
+    @ApiOperation(value = "返回添加模板页面路径",notes = "返回添加模板页面路径")
+    @ApiOperationSupport(order = 80)
+    @GetMapping("/addTemp")
+    @PreAuthorize("@ss.hasPermi('baseExportTemp:baseExportTemp:add')")
+    public String addTemp(){
+//        return "http://"+ IpUtils.getHostIp() +":"+environment.getProperty("server.port")+"/ureport/designer";
+        return environment.getProperty("ruoyi.ureporturl")+"/ureport/designer";
+    }
+
+    /**
+     * 跳转到修改模板页面
+     * @return
+     */
+    @ApiOperation(value = "返回修改模板页面路径",notes = "返回修改模板页面路径")
+    @ApiOperationSupport(order = 90)
+    @GetMapping("/editTemp/{id}")
+    @PreAuthorize("@ss.hasPermi('baseExportTemp:baseExportTemp:edit')")
+    public String editTemp(@PathVariable Long id){
+        BaseExportTemp baseExportTemp1 = baseExportTempService.selectBaseExportTempById(id);
+        if(baseExportTemp1==null){
+            throw new SecurityException("当前模板不存在");
+        }
+//        return "http://"+ IpUtils.getHostIp() +":"+environment.getProperty("server.port")+"/ureport/designer"+"?_u="+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName();
+        return environment.getProperty("ruoyi.ureporturl")+"/ureport/designer"+"?_u="+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName();
+    }
+
+    /**
+     * 跳转到预览模板页面
+     * @return
+     */
+    @ApiOperation(value = "返回预览模板页面路径",notes = "返回预览模板页面路径")
+    @ApiOperationSupport(order = 90)
+    @GetMapping("/previwTemp/{id}")
+    @PreAuthorize("@ss.hasPermi('baseExportTemp:baseExportTemp:list')")
+    public String previwTemp(@PathVariable Long id){
+        BaseExportTemp baseExportTemp1 = baseExportTempService.selectBaseExportTempById(id);
+        if(baseExportTemp1==null){
+            throw new SecurityException("当前模板不存在");
+        }
+//        return "http://"+ IpUtils.getHostIp() +":"+environment.getProperty("server.port")+"/ureport/preview?_u="+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName();
+        return environment.getProperty("ruoyi.ureporturl")+"/ureport/preview?_u="+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName();
+    }
+    /**
+     * 实际业务--跳转到预览模板页面
+     * @return
+     */
+    @ApiOperation(value = "实际业务--跳转到预览模板页面",notes = "实际业务--跳转到预览模板页面")
+    @ApiOperationSupport(order = 90)
+    @GetMapping("/businessPreviwTemp")
+    public String businessPreviwTemp(@Valid BaseTempExportDTO baseTempExportDTO){
+        BaseExportTemp baseExportTemp1 = baseExportTempService.selectParamByCode(baseTempExportDTO.getCode());
+        if(baseExportTemp1==null){
+            throw new SecurityException("当前模板不存在");
+        }
+        String extraStr = "";
+        if(StringUtils.isNotBlank(baseTempExportDTO.getOrderNo())){
+            extraStr = extraStr+"&orderNo="+baseTempExportDTO.getOrderNo();
+        }
+        if(baseTempExportDTO.getExtraParams()!=null){
+            String extraParams = baseTempExportDTO.getExtraParams().stream().collect(Collectors.joining(","));
+            extraStr = extraStr+"&extraParams="+extraParams;
+        }
+//        return "http://"+ IpUtils.getHostIp() +":"
+//                +environment.getProperty("server.port")+"/ureport/preview?_u="
+//                +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
+//                +"&orderNo="+orderNo;
+        //直接跳转到PDF预览页面
+//        return "http://"+ IpUtils.getHostIp() +":"
+//                +environment.getProperty("server.port")+"/ureport/pdf/show?_u="
+//                +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
+//                +"&orderNo="+orderNo;
+        return environment.getProperty("ruoyi.ureporturl")+"/ureport/pdf/show?_u="
+                +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
+                +extraStr;
+    }
+
+    /**
+     * 实际业务--导出excel
+     * @return
+     */
+    @ApiOperation(value = "实际业务--导出excel",notes = "实际业务--导出excel")
+    @ApiOperationSupport(order = 100)
+    @GetMapping("/businessExportExcel")
+    public String businessExportExcel(@Valid BaseTempExportDTO baseTempExportDTO){
+        BaseExportTemp baseExportTemp1 = baseExportTempService.selectParamByCode(baseTempExportDTO.getCode());
+        if(baseExportTemp1==null){
+            throw new SecurityException("当前模板不存在");
+        }
+//        return "http://"+ IpUtils.getHostIp() +":"
+//                +environment.getProperty("server.port")+"/ureport/preview?_u="
+//                +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
+//                +"&orderNo="+orderNo;
+        //直接跳转到PDF预览页面
+//        return "http://"+ IpUtils.getHostIp() +":"
+//                +environment.getProperty("server.port")+"/ureport/excel?_u="
+//                +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
+//                +"&orderNo="+orderNo;
+        String extraStr = "";
+        if(StringUtils.isNotBlank(baseTempExportDTO.getOrderNo())){
+            extraStr = extraStr+"&orderNo="+baseTempExportDTO.getOrderNo();
+        }
+        if(baseTempExportDTO.getBeginTime()!=null){
+            extraStr = extraStr+"&beginTime="+ DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",baseTempExportDTO.getBeginTime());
+        }
+        if(baseTempExportDTO.getEndTime()!=null){
+            extraStr = extraStr+"&endTime="+ DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",baseTempExportDTO.getEndTime());
+        }
+        if(baseTempExportDTO.getExtraParams()!=null){
+            String extraParams = baseTempExportDTO.getExtraParams().stream().collect(Collectors.joining(","));
+            extraStr = extraStr+"&extraParams="+extraParams;
+        }
+        return environment.getProperty("ruoyi.ureporturl")+"/ureport/excel?_u="
+                +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
+                +extraStr;
+    }
+}

+ 182 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/biz/BizPatentValidOgController.java

@@ -0,0 +1,182 @@
+package com.ruoyi.web.controller.biz;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import com.ruoyi.biz.domain.BizPatentValidOg;
+import com.ruoyi.biz.service.IBizPatentValidOgService;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileTypeUtils;
+import com.ruoyi.common.utils.file.MimeTypeUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.domain.ResponseData;
+import javax.validation.Valid;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.enums.BusinessType;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 专利有效原始Controller
+ * 
+ * @author dm
+ * @date 2023-03-09
+ */
+@Api(value = "专利有效原始",tags = "专利有效原始")
+@ApiSupport(author = "dm",order = 10)
+@RestController
+@RequestMapping("/biz/bizPatentValidOg")
+public class BizPatentValidOgController extends BaseController
+{
+    @Autowired
+    private IBizPatentValidOgService bizPatentValidOgService;
+
+    /**
+     * 查询专利有效原始列表
+     */
+    @ApiOperation(value = "查询专利有效原始列表",notes = "查询专利有效原始列表")
+    @ApiOperationSupport(order = 10)
+    @PreAuthorize("@ss.hasPermi('biz:bizPatentValidOg:list')")
+    @GetMapping("/list")
+    public TableDataInfo<BizPatentValidOg> list(BizPatentValidOg bizPatentValidOg)
+    {
+        startPage();
+        List<BizPatentValidOg> list = bizPatentValidOgService.selectBizPatentValidOgList(bizPatentValidOg);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出专利有效原始列表
+     */
+    @ApiOperation(value = "导出专利有效原始列表",notes = "导出专利有效原始列表")
+    @ApiOperationSupport(order = 20)
+    @PreAuthorize("@ss.hasPermi('biz:bizPatentValidOg:export')")
+    @Log(title = "专利有效原始", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizPatentValidOg bizPatentValidOg)
+    {
+        List<BizPatentValidOg> list = bizPatentValidOgService.selectBizPatentValidOgList(bizPatentValidOg);
+        ExcelUtil<BizPatentValidOg> util = new ExcelUtil<BizPatentValidOg>(BizPatentValidOg.class);
+        util.exportExcel(response, list, "专利有效原始数据");
+    }
+
+    /**
+     * 获取专利有效原始详细信息
+     */
+    @ApiOperation(value = "获取专利有效原始详细信息",notes = "获取专利有效原始详细信息")
+    @ApiOperationSupport(order = 30)
+    @PreAuthorize("@ss.hasPermi('biz:bizPatentValidOg:query')")
+    @GetMapping(value = "/{id}")
+    public ResponseData<BizPatentValidOg> getInfo(@PathVariable("id") String id)
+    {
+        return ResponseData.success(bizPatentValidOgService.selectBizPatentValidOgById(id));
+    }
+
+    /**
+     * 新增专利有效原始
+     */
+    @ApiOperation(value = "新增专利有效原始",notes = "新增专利有效原始")
+    @ApiOperationSupport(order = 40,ignoreParameters = {"bizPatentValidOg.id"})
+    @PreAuthorize("@ss.hasPermi('biz:bizPatentValidOg:add')")
+    @Log(title = "专利有效原始", businessType = BusinessType.INSERT)
+    @PostMapping
+    @RepeatSubmit
+    public ResponseData add(@RequestBody @Valid @ApiParam(required=true) BizPatentValidOg bizPatentValidOg)
+    {
+        int i = bizPatentValidOgService.insertBizPatentValidOg(bizPatentValidOg);
+        if(i>0){
+            //返回主键
+            return ResponseData.success(bizPatentValidOg.getId());
+        }else{
+            return ResponseData.error();
+        }
+    }
+
+    /**
+     * 修改专利有效原始
+     */
+    @ApiOperation(value = "修改专利有效原始",notes = "修改专利有效原始")
+    @ApiOperationSupport(order = 50)
+    @PreAuthorize("@ss.hasPermi('biz:bizPatentValidOg:edit')")
+    @Log(title = "专利有效原始", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @RepeatSubmit
+    public ResponseData edit(@RequestBody @Valid @ApiParam(required=true) BizPatentValidOg bizPatentValidOg)
+    {
+        int i = bizPatentValidOgService.updateBizPatentValidOg(bizPatentValidOg);
+        if(i>0){
+            //返回主键
+            return ResponseData.success(bizPatentValidOg.getId());
+        }else{
+            return ResponseData.error();
+        }
+    }
+
+    /**
+     * 删除专利有效原始
+     */
+    @ApiOperation(value = "删除专利有效原始",notes = "删除专利有效原始")
+    @ApiOperationSupport(order = 60)
+    @PreAuthorize("@ss.hasPermi('biz:bizPatentValidOg:remove')")
+    @Log(title = "专利有效原始", businessType = BusinessType.DELETE)
+    @PostMapping("/delete/{ids}")
+    public ResponseData remove(@PathVariable String[] ids)
+    {
+        //return toResult(bizPatentValidOgService.deleteBizPatentValidOgByIds(ids));
+        //逻辑删除
+        return toResult(bizPatentValidOgService.setDeleteByIds(ids));
+    }
+
+    /**
+     * 查询专利有效原始列表---不进行分页
+     */
+    @ApiOperation(value = "查询专利有效原始列表---不进行分页",notes = "查询专利有效原始列表---不进行分页")
+    @ApiOperationSupport(order = 70)
+    @PreAuthorize("@ss.hasPermi('biz:bizPatentValidOg:list')")
+    @PostMapping("/getDataList")
+    public ResponseData<List<BizPatentValidOg>> getDataList(@RequestBody BizPatentValidOg bizPatentValidOg)
+    {
+        List<BizPatentValidOg> list = bizPatentValidOgService.selectBizPatentValidOgList(bizPatentValidOg);
+        return ResponseData.success(list);
+    }
+
+    @ApiOperation(value = "导入专利有效原始信息",notes = "导入专利有效原始信息")
+    @ApiOperationSupport(order = 80)
+    @Log(title = "专利有效原始", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('biz:bizPatentValidOg:import')")
+    @PostMapping("/importData")
+    public ResponseData importData(MultipartFile file) throws Exception
+    {
+        String message = null;
+        if (!file.isEmpty())
+        {
+            String extension = FileTypeUtils.getExtension(file);
+            if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.CSV_EXTENSION))
+            {
+                message = "文件格式不正确,请上传" + Arrays.toString(MimeTypeUtils.CSV_EXTENSION) + "格式";
+                return ResponseData.error(message);
+            }
+        }
+        ExcelUtil<BizPatentValidOg> util = new ExcelUtil<BizPatentValidOg>(BizPatentValidOg.class);
+        List<BizPatentValidOg> bizPatentValidOgList = util.importExcel(file.getInputStream());
+        String operName = getUsername();
+        message = bizPatentValidOgService.importBizPatentValidOg(bizPatentValidOgList, operName);
+        return ResponseData.success(message);
+    }
+}

+ 468 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/cgb/CgbActiveController.java

@@ -0,0 +1,468 @@
+package com.ruoyi.web.controller.cgb;
+
+import java.util.*;
+
+import org.apache.commons.lang3.StringUtils;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ruoyi.cgb.domain.CgbScoreDetail;
+import com.ruoyi.cgb.domain.CgbScoreItem;
+import com.ruoyi.cgb.domain.CgbScoreSession;
+import com.ruoyi.cgb.domain.CgbWorksInfo;
+import com.ruoyi.cgb.service.ICgbScoreDetailService;
+import com.ruoyi.cgb.service.ICgbScoreItemService;
+import com.ruoyi.cgb.service.ICgbScoreSessionService;
+import com.ruoyi.cgb.service.ICgbWorksInfoService;
+import com.ruoyi.common.core.domain.AjaxResult;
+
+@RestController
+@RequestMapping("/cgbActive")
+public class CgbActiveController {
+
+	@Autowired
+	private ICgbScoreSessionService cgbScoreSessionService;
+
+	@Autowired
+	private ICgbScoreDetailService cgbScoreDetailService;
+
+	@Autowired
+	private ICgbScoreItemService cgbScoreItemService;
+
+	@Autowired
+	private ICgbWorksInfoService cgbWorksInfoService;
+
+	
+	
+	
+
+	/**
+	 * 接口0:创建评分场次
+	 * 
+	 * @param id
+	 * @return
+	 */
+	@PostMapping(value = "/createScoreSession")
+	public AjaxResult createScoreSession() {
+		CgbScoreSession session = new CgbScoreSession();
+		session.setStatus("1");
+		session.setCurrScoreWorksGroup("0");
+		session.setCurrRankWorksGroup("0");
+		cgbScoreSessionService.save(session);
+		return AjaxResult.success(session);
+	}
+
+	/**
+	 *  接口1:查看当前场次信息
+	 * 
+	 * @return
+	 */
+	@GetMapping(value = "/queryCurrScoreSession")
+	public AjaxResult queryCurrScoreSession() {
+		CgbScoreSession session = new CgbScoreSession();
+		List<CgbScoreSession> sessionList = cgbScoreSessionService.queryList(session);
+		if (sessionList != null && !sessionList.isEmpty()) {
+			return AjaxResult.success(sessionList.get(0));
+		} else {
+			return AjaxResult.error("暂无评分场次,请先创建");
+		}
+
+	}
+	
+	/**
+	 *  接口2:查看作品列表
+	 * 
+	 * @return
+	 */
+	@GetMapping(value = "/queryWorkList")
+	public AjaxResult queryWorkList(CgbScoreItem cgbScoreItem) {
+		Long sessionId = cgbScoreItem.getSessionId();
+		if (sessionId == null) {
+			throw new RuntimeException("场次id不能为空");
+		}
+		CgbWorksInfo cgbWorksInfo = new CgbWorksInfo();
+		
+		
+		List<CgbWorksInfo> list = cgbWorksInfoService.queryList(cgbWorksInfo);
+		for(CgbWorksInfo w:list) {
+			CgbScoreItem itemQo=new CgbScoreItem();
+			itemQo.setSessionId(sessionId);
+			itemQo.setWorksGroup(w.getWorksGroup());
+			List<CgbScoreItem> itemList = cgbScoreItemService.queryList(itemQo);
+			if(itemList!=null && !itemList.isEmpty()) {
+				CgbScoreItem item=itemList.get(0);
+				if(item!=null && "1".equals(item.getIsStopScore())) {
+					w.setIsStopScore("1");
+				}else {
+					w.setIsStopScore("0");
+				}
+				w.setIsStartScore("1");
+			}else {
+				w.setIsStartScore("0");
+				w.setIsStopScore("0");
+			}
+			
+		}
+		
+		Collections.sort(list, new Comparator<CgbWorksInfo>() {
+			@Override
+			public int compare(CgbWorksInfo o1, CgbWorksInfo o2) {
+				return Integer.parseInt(o1.getWorksGroup())-Integer.parseInt(o2.getWorksGroup());
+			}
+		});
+		
+		
+		return AjaxResult.success(list);
+	}
+
+	/**
+	 * 接口3:管理员开启评分通道
+	 * 
+	 * @param cgbScoreDetail
+	 * @return
+	 */
+	@PostMapping(value = "/adminStartScore")
+	public AjaxResult adminStartScore(@RequestBody CgbScoreDetail cgbScoreDetail) {
+		// 场次id
+		Long sessionId = cgbScoreDetail.getSessionId();
+		// 作品组号
+		String worksGroup = cgbScoreDetail.getWorksGroup();
+
+		if (sessionId == null || StringUtils.isBlank(worksGroup)) {
+			throw new RuntimeException("场次id或作品组号不能为空");
+		}
+
+		CgbScoreItem cgbScoreItem = new CgbScoreItem();
+		cgbScoreItem.setSessionId(sessionId);
+		cgbScoreItem.setWorksGroup(worksGroup);
+
+		List<CgbScoreItem> itemList = cgbScoreItemService.queryList(cgbScoreItem);
+		if (itemList == null || itemList.isEmpty()) {
+			CgbScoreItem item = new CgbScoreItem();
+			item.setSessionId(sessionId);
+			item.setIsStopScore("0");
+			item.setWorksGroup(worksGroup);
+			item.setTotalCommentCtl(0);
+			item.setMaxScore(0d);
+			item.setMinScore(0d);
+			item.setCurrScore(0d);
+			item.setRanking(0);
+			item.setStatus("1");
+			cgbScoreItemService.save(item);
+		}
+
+		CgbScoreSession cgbScoreSession = cgbScoreSessionService.getById(sessionId);
+		cgbScoreSession.setCurrScoreWorksGroup(worksGroup);
+		cgbScoreSessionService.updateById(cgbScoreSession);
+
+		CgbScoreItem item = doQuerySubmitInfo(cgbScoreItem);
+
+		return AjaxResult.success(item);
+	}
+
+	/**
+	 * 接口4:查看评分信息
+	 * 
+	 * @param cgbScoreItem
+	 * @return
+	 */
+	@GetMapping(value = "/querySubmitInfo")
+	public AjaxResult querySubmitInfo(CgbScoreItem cgbScoreItem) {
+		try {
+			CgbScoreItem item = doQuerySubmitInfo(cgbScoreItem);
+			return AjaxResult.success(item);
+		} catch (Exception e) {
+			return AjaxResult.error(e.getMessage());
+		}
+	}
+
+	private CgbScoreItem doQuerySubmitInfo(CgbScoreItem cgbScoreItem) {
+
+		// 场次id
+		Long sessionId = cgbScoreItem.getSessionId();
+
+		// 作品组号
+		String worksGroup = cgbScoreItem.getWorksGroup();
+
+		if (sessionId == null || StringUtils.isBlank(worksGroup)) {
+			throw new RuntimeException("场次id或作品组号不能为空");
+		}
+
+		CgbScoreSession cgbScoreSession = cgbScoreSessionService.getById(sessionId);
+
+		CgbScoreItem qo = new CgbScoreItem();
+		qo.setSessionId(sessionId);
+		qo.setWorksGroup(worksGroup);
+
+		List<CgbScoreItem> itemList = cgbScoreItemService.queryList(qo);
+		if (itemList == null || itemList.isEmpty()) {
+			CgbScoreItem zone = new CgbScoreItem();
+			zone.setSessionId(sessionId);
+			zone.setWorksGroup(worksGroup);
+			zone.setMaxScore(0d);
+			zone.setMinScore(0d);
+			zone.setCurrScore(0d);
+			zone.setRemark("0");
+			zone.setTotalCommentCtl(0);
+			zone.setCurrScoreWorksGroup("0");
+			return zone;
+
+		}
+
+		CgbScoreItem item = itemList.get(0);
+		if (cgbScoreSession != null) {
+
+			CgbWorksInfo currCgbWorksInfoQo = new CgbWorksInfo();
+			currCgbWorksInfoQo.setWorksGroup(cgbScoreSession.getCurrScoreWorksGroup());
+
+			List<CgbWorksInfo> cgbWorksInfoList = cgbWorksInfoService.queryList(currCgbWorksInfoQo);
+			if (cgbWorksInfoList != null && cgbWorksInfoList.get(0) != null) {
+				item.setCurrCgbWorksInfo(cgbWorksInfoList.get(0));
+			}
+
+			CgbScoreDetail cgbScoreDetailQo = new CgbScoreDetail();
+			cgbScoreDetailQo.setSessionId(sessionId);
+			cgbScoreDetailQo.setWorksGroup(cgbScoreSession.getCurrScoreWorksGroup());
+			List<CgbScoreDetail> currScoreDetailList = cgbScoreDetailService.queryList(cgbScoreDetailQo);
+
+			item.setCurrScoreDetailList(currScoreDetailList);
+
+			item.setTotalCommentCtl(currScoreDetailList.size());
+
+			item.setCurrScoreWorksGroup(cgbScoreSession.getCurrScoreWorksGroup());
+		}
+		return item;
+	}
+
+	/**
+	 * 接口5:评委提交评分
+	 * 
+	 * @return
+	 */
+	@PostMapping(value = "/commentSumitScore")
+	public AjaxResult commentSumitScore(@RequestBody CgbScoreDetail cgbScoreDetail) {
+
+		// 场次id
+		Long sessionId = cgbScoreDetail.getSessionId();
+		// 作品组号
+		String worksGroup = cgbScoreDetail.getWorksGroup();
+
+		CgbScoreSession cgbScoreSession = cgbScoreSessionService.getById(sessionId);
+
+		String commentId = cgbScoreDetail.getCommentId();
+
+		/** 评分1 */
+		Double score1 = cgbScoreDetail.getScore1();
+
+		/** 评分2 */
+		Double score2 = cgbScoreDetail.getScore2();
+
+		/** 评分3 */
+		Double score3 = cgbScoreDetail.getScore3();
+
+		/** 评分4 */
+		Double score4 = cgbScoreDetail.getScore4();
+
+		if (sessionId == null || StringUtils.isBlank(worksGroup) || StringUtils.isBlank(commentId) || score1 == null || score2 == null || score3 == null
+				|| score4 == null) {
+			return AjaxResult.error("场次id、作品组号、评委id、评分不能为空");
+		}
+
+		CgbScoreDetail cgbScoreDetailQo = new CgbScoreDetail();
+		cgbScoreDetailQo.setSessionId(sessionId);
+		cgbScoreDetailQo.setWorksGroup(cgbScoreSession.getCurrScoreWorksGroup());
+		cgbScoreDetailQo.setCommentId(commentId);
+		List<CgbScoreDetail> currScoreDetailList = cgbScoreDetailService.queryList(cgbScoreDetailQo);
+		if (currScoreDetailList != null && !currScoreDetailList.isEmpty()) {
+			return AjaxResult.error("您已经提交过了,请勿重复提交");
+		}
+
+		cgbScoreDetailService.save(cgbScoreDetail);
+//		TODO	统计评分
+
+		CgbScoreItem cgbScoreItem = new CgbScoreItem();
+		cgbScoreItem.setSessionId(sessionId);
+		cgbScoreItem.setWorksGroup(worksGroup);
+
+		List<CgbScoreItem> itemList = cgbScoreItemService.queryList(cgbScoreItem);
+
+		if (itemList != null && !itemList.isEmpty()) {
+
+			CgbScoreItem item = itemList.get(0);
+			item.setTotalCommentCtl(item.getTotalCommentCtl() == null ? 1 : (item.getTotalCommentCtl() + 1));
+			cgbScoreItemService.updateById(item);
+
+		}
+
+		CgbScoreItem item = doQuerySubmitInfo(cgbScoreItem);
+
+		return AjaxResult.success(item);
+	}
+
+	
+
+	/**
+	 * 接口6:管理员确认评分
+	 * 
+	 * @param cgbScoreDetail
+	 * @return
+	 */
+	@PostMapping(value = "/adminConfirmScore")
+	public AjaxResult adminConfirmScore(@RequestBody CgbScoreDetail cgbScoreDetail) {
+
+		// 场次id
+		Long sessionId = cgbScoreDetail.getSessionId();
+
+		// 作品组号
+		String worksGroup = cgbScoreDetail.getWorksGroup();
+
+		if (sessionId == null || StringUtils.isBlank(worksGroup)) {
+			throw new RuntimeException("场次id或作品组号不能为空");
+		}
+
+		CgbScoreItem cgbScoreItem = new CgbScoreItem();
+		cgbScoreItem.setSessionId(sessionId);
+
+		// 所有作品评分
+		Map<String, CgbScoreItem> itemMap = new HashMap<String, CgbScoreItem>();
+		List<CgbScoreItem> itemList = cgbScoreItemService.queryList(cgbScoreItem);
+		if (itemList != null && !itemList.isEmpty() && itemList.get(0) != null) {
+			for (CgbScoreItem item : itemList) {
+				itemMap.put(item.getWorksGroup(), item);
+			}
+			for (CgbScoreItem item : itemMap.values()) {
+
+				CgbScoreDetail cgbScoreDetailQo1 = new CgbScoreDetail();
+				cgbScoreDetailQo1.setSessionId(sessionId);
+				cgbScoreDetailQo1.setWorksGroup(item.getWorksGroup());
+				List<CgbScoreDetail> detailList = cgbScoreDetailService.queryList(cgbScoreDetailQo1);
+
+				double totalScore = 0;
+				double maxScore = 0;
+				double minScore = 0;
+				double currScore = 0;
+				int totalCommentCtl = 0;
+
+				if (detailList != null && !detailList.isEmpty()) {
+					Double[] list = new Double[detailList.size()];
+					totalCommentCtl = detailList.size();// 评分人数
+//					for (CgbScoreDetail detail : detailList) {
+						for (int i = 0; i < detailList.size(); i++) {
+							CgbScoreDetail detail = detailList.get(i);
+
+							double score = (detail.getScore1() == null ? 0d : detail.getScore1()) + (detail.getScore2() == null ? 0d : detail.getScore2())
+								+ (detail.getScore3() == null ? 0d : detail.getScore3()) + (detail.getScore4() == null ? 0d : detail.getScore4());
+//						if (maxScore < score) {
+//							maxScore = score;
+//						}
+//						if (minScore > score) {
+//							minScore = score;
+//						}
+						list[i] = score;
+						totalScore = totalScore + score;
+					}
+					Arrays.sort(list);
+					maxScore =list[list.length-1];
+					minScore = list[0];
+					
+					if (totalCommentCtl > 2) {
+//						currScore = (totalScore - maxScore - minScore) / (totalCommentCtl - 2);// 去掉最高分,最低分
+						currScore = totalScore / totalCommentCtl;//不再去掉最高分最底分,直接取平均分
+					} else if (totalCommentCtl > 0) {
+						currScore = totalScore / totalCommentCtl;
+					}
+ 
+				}
+
+				item.setTotalCommentCtl(totalCommentCtl);
+				item.setMaxScore(maxScore);
+				item.setMinScore(minScore);
+				item.setCurrScore(currScore);
+				item.setTotalScore(totalScore);
+
+			}
+
+			List<CgbScoreItem> allItemList = new ArrayList<CgbScoreItem>();
+			allItemList.addAll(itemMap.values());
+
+			Collections.sort(allItemList, new Comparator<CgbScoreItem>() {
+				@Override
+				public int compare(CgbScoreItem o1, CgbScoreItem o2) {
+					double diff = o2.getCurrScore() - o1.getCurrScore();
+					if (diff > 0) {
+						return 1;
+					} else if (diff < 0) {
+						return -1;
+					} else {
+						return 0;
+					}
+				}
+			});
+
+			for (int i = 0; i < allItemList.size(); i++) {
+				int r = i + 1;
+				CgbScoreItem item = allItemList.get(i);
+				item.setRanking(r);
+				if(worksGroup.equals(item.getWorksGroup())) {
+					item.setIsStopScore("1");
+				}
+				cgbScoreItemService.updateById(item);
+			}
+		}
+
+		CgbScoreSession cgbScoreSession = cgbScoreSessionService.getById(sessionId);
+		cgbScoreSession.setCurrRankWorksGroup(worksGroup);
+		cgbScoreSessionService.updateById(cgbScoreSession);
+
+		return AjaxResult.success();
+	}
+
+	/**
+	 * 接口7:查看排行榜
+	 * 
+	 * @param cgbScoreDetail
+	 * @return
+	 */
+	@GetMapping(value = "/queryRank")
+	public AjaxResult queryRank(CgbScoreDetail cgbScoreDetail) {
+		CgbWorksInfo cgbWorksInfo = new CgbWorksInfo();
+		List<CgbWorksInfo> list = cgbWorksInfoService.queryList(cgbWorksInfo);
+		// 场次id
+		Long sessionId = cgbScoreDetail.getSessionId();
+
+		if (sessionId == null) {
+			throw new RuntimeException("场次id不能为空");
+		}
+
+		for (CgbWorksInfo work : list) {
+			CgbScoreItem cgbScoreItem = new CgbScoreItem();
+			cgbScoreItem.setSessionId(sessionId);
+			cgbScoreItem.setWorksGroup(work.getWorksGroup());
+			List<CgbScoreItem> itemList = cgbScoreItemService.queryList(cgbScoreItem);
+
+			if (itemList != null && !itemList.isEmpty()) {
+				CgbScoreItem item = itemList.get(0);
+				work.setTotalCommentCtl(item.getTotalCommentCtl());
+				work.setMaxScore(item.getMaxScore());
+				work.setMinScore(item.getMinScore());
+				work.setCurrScore(item.getCurrScore());
+				work.setRanking(item.getRanking());
+			} else {
+				work.setTotalCommentCtl(0);
+				work.setMaxScore(0d);
+				work.setMinScore(0d);
+				work.setCurrScore(0d);
+				work.setRanking(0);
+			}
+
+		}
+		Collections.reverse(list);
+//		TODO	分数排序
+		return AjaxResult.success(list);
+	}
+
+}

+ 93 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java

@@ -0,0 +1,93 @@
+package com.ruoyi.web.controller.common;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+import com.ruoyi.common.config.RuoYiConfig;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.FastByteArrayOutputStream;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.google.code.kaptcha.Producer;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.sign.Base64;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.system.service.ISysConfigService;
+
+/**
+ * 验证码操作处理
+ * 
+ * @author ruoyi
+ */
+@RestController
+public class CaptchaController
+{
+    @Resource(name = "captchaProducer")
+    private Producer captchaProducer;
+
+    @Resource(name = "captchaProducerMath")
+    private Producer captchaProducerMath;
+
+    @Autowired
+    private RedisCache redisCache;
+    
+    @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;
+
+        // 生成验证码
+        String captchaType = RuoYiConfig.getCaptchaType();
+        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;
+    }
+}

+ 163 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -0,0 +1,163 @@
+package com.ruoyi.web.controller.common;
+
+import java.util.ArrayList;
+import java.util.List;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.common.utils.file.FileUtils;
+import com.ruoyi.framework.config.ServerConfig;
+
+/**
+ * 通用请求处理
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/common")
+public class CommonController
+{
+    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+
+    @Autowired
+    private ServerConfig serverConfig;
+
+    private static final String FILE_DELIMETER = ",";
+
+    /**
+     * 通用下载请求
+     * 
+     * @param fileName 文件名称
+     * @param delete 是否删除
+     */
+    @GetMapping("/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 = RuoYiConfig.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("/upload")
+    public AjaxResult uploadFile(MultipartFile file) throws Exception
+    {
+        try
+        {
+            // 上传文件路径
+            String filePath = RuoYiConfig.getUploadPath();
+            // 上传并返回新文件名称
+            String fileName = FileUploadUtils.upload(filePath, file);
+            String url = serverConfig.getUrl() + fileName;
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("url", url);
+            ajax.put("fileName", fileName);
+            ajax.put("newFileName", FileUtils.getName(fileName));
+            ajax.put("originalFilename", file.getOriginalFilename());
+            return ajax;
+        }
+        catch (Exception e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 通用上传请求(多个)
+     */
+    @PostMapping("/uploads")
+    public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception
+    {
+        try
+        {
+            // 上传文件路径
+            String filePath = RuoYiConfig.getUploadPath();
+            List<String> urls = new ArrayList<String>();
+            List<String> fileNames = new ArrayList<String>();
+            List<String> newFileNames = new ArrayList<String>();
+            List<String> originalFilenames = new ArrayList<String>();
+            for (MultipartFile file : files)
+            {
+                // 上传并返回新文件名称
+                String fileName = FileUploadUtils.upload(filePath, file);
+                String url = serverConfig.getUrl() + fileName;
+                urls.add(url);
+                fileNames.add(fileName);
+                newFileNames.add(FileUtils.getName(fileName));
+                originalFilenames.add(file.getOriginalFilename());
+            }
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
+            ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
+            ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
+            ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
+            return ajax;
+        }
+        catch (Exception e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 本地资源通用下载
+     */
+    @GetMapping("/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 = RuoYiConfig.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
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java

@@ -0,0 +1,53 @@
+package com.ruoyi.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.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.StringUtils;
+
+/**
+ * 缓存监控
+ * 
+ * @author ruoyi
+ */
+@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
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java

@@ -0,0 +1,27 @@
+package com.ruoyi.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.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.framework.web.domain.Server;
+
+/**
+ * 服务器监控
+ * 
+ * @author ruoyi
+ */
+@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);
+    }
+}

+ 69 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java

@@ -0,0 +1,69 @@
+package com.ruoyi.web.controller.monitor;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysLogininfor;
+import com.ruoyi.system.service.ISysLogininforService;
+
+/**
+ * 系统访问记录
+ * 
+ * @author ruoyi
+ */
+@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')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysLogininfor logininfor)
+    {
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
+        util.exportExcel(response, 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();
+    }
+}

+ 69 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java

@@ -0,0 +1,69 @@
+package com.ruoyi.web.controller.monitor;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysOperLog;
+import com.ruoyi.system.service.ISysOperLogService;
+
+/**
+ * 操作日志记录
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/monitor/operlog")
+public class SysOperlogController extends BaseController
+{
+    @Autowired
+    private ISysOperLogService operLogService;
+
+    @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')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysOperLog operLog)
+    {
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
+        util.exportExcel(response, list, "操作日志");
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.DELETE)
+    @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
+    @DeleteMapping("/{operIds}")
+    public AjaxResult remove(@PathVariable Long[] operIds)
+    {
+        return toAjax(operLogService.deleteOperLogByIds(operIds));
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.CLEAN)
+    @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
+    @DeleteMapping("/clean")
+    public AjaxResult clean()
+    {
+        operLogService.cleanOperLog();
+        return AjaxResult.success();
+    }
+}

+ 92 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java

@@ -0,0 +1,92 @@
+package com.ruoyi.web.controller.monitor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.SysUserOnline;
+import com.ruoyi.system.service.ISysUserOnlineService;
+
+/**
+ * 在线用户监控
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/monitor/online")
+public class SysUserOnlineController extends BaseController
+{
+    @Autowired
+    private ISysUserOnlineService userOnlineService;
+
+    @Autowired
+    private RedisCache redisCache;
+
+    @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);
+    }
+
+    /**
+     * 强退用户
+     */
+    @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();
+    }
+}

+ 114 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/BladeRegionController.java

@@ -0,0 +1,114 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.ResponseData;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.BladeRegion;
+import com.ruoyi.system.service.IBladeRegionService;
+import com.ruoyi.utils.BladeRegionUtils;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 行政区划Controller
+ * 
+ * @author dm
+ * @date 2023-02-13
+ */
+@Api(value = "行政区划", tags = "行政区划")
+@ApiSupport(author = "dm", order = 10)
+@RestController
+@RequestMapping("/system/bladeRegion")
+public class BladeRegionController extends BaseController {
+	@Autowired
+	private IBladeRegionService bladeRegionService;
+	@Autowired
+	private RedisCache redisCache;
+
+	/**
+	 * 查询行政区划列表
+	 */
+//	@ApiOperation(value = "查询行政区划列表", notes = "查询行政区划列表")
+//	@ApiOperationSupport(order = 10)
+//	@PreAuthorize("@ss.hasPermi('system:bladeRegion:list')")
+	@GetMapping("/list")
+	public TableDataInfo<BladeRegion> list(BladeRegion bladeRegion) {
+		startPage();
+		List<BladeRegion> list = bladeRegionService.selectBladeRegionList(bladeRegion);
+		return getDataTable(list);
+	}
+
+	/**
+	 * 导出行政区划列表
+	 */
+	@ApiOperation(value = "导出行政区划列表", notes = "导出行政区划列表")
+	@ApiOperationSupport(order = 20)
+	@PreAuthorize("@ss.hasPermi('system:bladeRegion:export')")
+	@Log(title = "行政区划", businessType = BusinessType.EXPORT)
+	@PostMapping("/export")
+	public void export(HttpServletResponse response, BladeRegion bladeRegion) {
+		List<BladeRegion> list = bladeRegionService.selectBladeRegionList(bladeRegion);
+		ExcelUtil<BladeRegion> util = new ExcelUtil<BladeRegion>(BladeRegion.class);
+		util.exportExcel(response, list, "行政区划数据");
+	}
+
+	/**
+	 * 获取行政区划详细信息
+	 */
+//	@ApiOperation(value = "获取行政区划详细信息", notes = "获取行政区划详细信息")
+//	@ApiOperationSupport(order = 30)
+//	@PreAuthorize("@ss.hasPermi('system:bladeRegion:query')")
+	@GetMapping(value = "/{code}")
+	public ResponseData<BladeRegion> getInfo(@PathVariable("code") String code) {
+		return ResponseData.success(BladeRegionUtils.selectByCode(code));
+	}
+
+	/**
+	 * 查询行政区划列表---不进行分页
+	 */
+//	@ApiOperation(value = "查询行政区划列表---不进行分页", notes = "查询行政区划列表---不进行分页")
+//	@ApiOperationSupport(order = 70)
+//	@PreAuthorize("@ss.hasPermi('system:bladeRegion:list')")
+	@PostMapping("/getDataList")
+	public ResponseData<List<BladeRegion>> getDataList(@RequestBody BladeRegion bladeRegion) {
+		String key="ALLResponseData";
+		
+		ResponseData data= redisCache.getCacheObject(key);
+		if(data!=null) {
+			return data;
+		}
+		
+		List<BladeRegion> list = bladeRegionService.selectBladeRegionList(new BladeRegion());
+		for(BladeRegion br:list) {
+			BladeRegion qo=new BladeRegion();
+			qo.setParentCode(br.getCode());
+			br.setAreaList(bladeRegionService.selectBladeRegionList(qo));
+		}
+		
+		data=ResponseData.success(list);
+		redisCache.setCacheObject(key, data);
+		return data;
+	}
+	
+	
+}

+ 134 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java

@@ -0,0 +1,134 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysConfig;
+import com.ruoyi.system.service.ISysConfigService;
+
+/**
+ * 参数配置 信息操作处理
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/config")
+public class SysConfigController extends BaseController
+{
+    @Autowired
+    private ISysConfigService configService;
+
+    /**
+     * 获取参数配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysConfig config)
+    {
+        startPage();
+        List<SysConfig> list = configService.selectConfigList(config);
+        return getDataTable(list);
+    }
+
+    @Log(title = "参数管理", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:config:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysConfig config)
+    {
+        List<SysConfig> list = configService.selectConfigList(config);
+        ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
+        util.exportExcel(response, list, "参数数据");
+    }
+
+    /**
+     * 根据参数编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:query')")
+    @GetMapping(value = "/{configId}")
+    public AjaxResult getInfo(@PathVariable Long configId)
+    {
+        return AjaxResult.success(configService.selectConfigById(configId));
+    }
+
+    /**
+     * 根据参数键名查询参数值
+     */
+    @GetMapping(value = "/configKey/{configKey}")
+    public AjaxResult getConfigKey(@PathVariable String configKey)
+    {
+        return AjaxResult.success(configService.selectConfigByKey(configKey));
+    }
+
+    /**
+     * 新增参数配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:add')")
+    @Log(title = "参数管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    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));
+    }
+
+    /**
+     * 修改参数配置
+     */
+    @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));
+    }
+
+    /**
+     * 删除参数配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:remove')")
+    @Log(title = "参数管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{configIds}")
+    public AjaxResult remove(@PathVariable Long[] configIds)
+    {
+        configService.deleteConfigByIds(configIds);
+        return success();
+    }
+
+    /**
+     * 刷新参数缓存
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:remove')")
+    @Log(title = "参数管理", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/refreshCache")
+    public AjaxResult refreshCache()
+    {
+        configService.resetConfigCache();
+        return AjaxResult.success();
+    }
+}

+ 165 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java

@@ -0,0 +1,165 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.Iterator;
+import java.util.List;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.service.ISysDeptService;
+
+/**
+ * 部门信息
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/dept")
+public class SysDeptController extends BaseController
+{
+    @Autowired
+    private ISysDeptService deptService;
+
+    /**
+     * 获取部门列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:list')")
+    @GetMapping("/list")
+    public AjaxResult list(SysDept dept)
+    {
+        List<SysDept> depts = deptService.selectDeptList(dept);
+        return AjaxResult.success(depts);
+    }
+
+    /**
+     * 查询部门列表(排除节点)
+     */
+    @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);
+    }
+
+    /**
+     * 根据部门编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:query')")
+    @GetMapping(value = "/{deptId}")
+    public AjaxResult getInfo(@PathVariable Long deptId)
+    {
+        deptService.checkDeptDataScope(deptId);
+        return AjaxResult.success(deptService.selectDeptById(deptId));
+    }
+
+    /**
+     * 获取部门下拉树列表
+     */
+    @GetMapping("/treeselect")
+    public AjaxResult treeselect(SysDept dept)
+    {
+        List<SysDept> depts = deptService.selectDeptList(dept);
+        return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
+    }
+
+    /**
+     * 加载对应角色部门列表树
+     */
+    @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;
+    }
+
+    /**
+     * 新增部门
+     */
+    @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));
+    }
+
+    /**
+     * 修改部门
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:edit')")
+    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysDept dept)
+    {
+        Long deptId = dept.getDeptId();
+        deptService.checkDeptDataScope(deptId);
+        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
+        {
+            return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
+        }
+        else if (dept.getParentId().equals(deptId))
+        {
+            return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
+        }
+        else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0)
+        {
+            return AjaxResult.error("该部门包含未停用的子部门!");
+        }
+        dept.setUpdateBy(getUsername());
+        return toAjax(deptService.updateDept(dept));
+    }
+
+    /**
+     * 删除部门
+     */
+    @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("部门存在用户,不允许删除");
+        }
+        deptService.checkDeptDataScope(deptId);
+        return toAjax(deptService.deleteDeptById(deptId));
+    }
+}

+ 121 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java

@@ -0,0 +1,121 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.service.ISysDictDataService;
+import com.ruoyi.system.service.ISysDictTypeService;
+
+/**
+ * 数据字典信息
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/dict/data")
+public class SysDictDataController extends BaseController
+{
+    @Autowired
+    private ISysDictDataService dictDataService;
+
+    @Autowired
+    private ISysDictTypeService dictTypeService;
+
+    @PreAuthorize("@ss.hasPermi('system:dict:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysDictData dictData)
+    {
+        startPage();
+        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
+        return getDataTable(list);
+    }
+
+    @Log(title = "字典数据", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:dict:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysDictData dictData)
+    {
+        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
+        ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
+        util.exportExcel(response, list, "字典数据");
+    }
+
+    /**
+     * 查询字典数据详细
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:query')")
+    @GetMapping(value = "/{dictCode}")
+    public AjaxResult getInfo(@PathVariable Long dictCode)
+    {
+        return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
+    }
+
+    /**
+     * 根据字典类型查询字典数据信息
+     */
+    @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);
+    }
+
+    /**
+     * 新增字典类型
+     */
+    @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));
+    }
+
+    /**
+     * 修改保存字典类型
+     */
+    @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));
+    }
+
+    /**
+     * 删除字典类型
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{dictCodes}")
+    public AjaxResult remove(@PathVariable Long[] dictCodes)
+    {
+        dictDataService.deleteDictDataByIds(dictCodes);
+        return success();
+    }
+}

+ 132 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java

@@ -0,0 +1,132 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysDictType;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.service.ISysDictTypeService;
+
+/**
+ * 数据字典信息
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/dict/type")
+public class SysDictTypeController extends BaseController
+{
+    @Autowired
+    private ISysDictTypeService dictTypeService;
+
+    @PreAuthorize("@ss.hasPermi('system:dict:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysDictType dictType)
+    {
+        startPage();
+        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
+        return getDataTable(list);
+    }
+
+    @Log(title = "字典类型", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:dict:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysDictType dictType)
+    {
+        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
+        ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
+        util.exportExcel(response, list, "字典类型");
+    }
+
+    /**
+     * 查询字典类型详细
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:query')")
+    @GetMapping(value = "/{dictId}")
+    public AjaxResult getInfo(@PathVariable Long dictId)
+    {
+        return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
+    }
+
+    /**
+     * 新增字典类型
+     */
+    @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));
+    }
+
+    /**
+     * 修改字典类型
+     */
+    @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));
+    }
+
+    /**
+     * 删除字典类型
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{dictIds}")
+    public AjaxResult remove(@PathVariable Long[] dictIds)
+    {
+        dictTypeService.deleteDictTypeByIds(dictIds);
+        return success();
+    }
+
+    /**
+     * 刷新字典缓存
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/refreshCache")
+    public AjaxResult refreshCache()
+    {
+        dictTypeService.resetDictCache();
+        return AjaxResult.success();
+    }
+
+    /**
+     * 获取字典选择框列表
+     */
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect()
+    {
+        List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
+        return AjaxResult.success(dictTypes);
+    }
+}

+ 29 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java

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

+ 85 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java

@@ -0,0 +1,85 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+import java.util.Set;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysMenu;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.domain.model.LoginBody;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.framework.web.service.SysLoginService;
+import com.ruoyi.framework.web.service.SysPermissionService;
+import com.ruoyi.system.service.ISysMenuService;
+
+/**
+ * 登录验证
+ * 
+ * @author ruoyi
+ */
+@RestController
+public class SysLoginController
+{
+    @Autowired
+    private SysLoginService loginService;
+
+    @Autowired
+    private ISysMenuService menuService;
+
+    @Autowired
+    private SysPermissionService permissionService;
+
+    /**
+     * 登录方法
+     * 
+     * @param loginBody 登录信息
+     * @return 结果
+     */
+    @PostMapping("/login")
+    public AjaxResult login(@RequestBody LoginBody loginBody)
+    {
+        AjaxResult ajax = AjaxResult.success();
+        // 生成令牌
+        String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),loginBody.getUuid());
+        ajax.put(Constants.TOKEN, token);
+        return ajax;
+    }
+
+    /**
+     * 获取用户信息
+     * 
+     * @return 用户信息
+     */
+    @GetMapping("getInfo")
+    public AjaxResult getInfo()
+    {
+        SysUser user = SecurityUtils.getLoginUser().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 路由信息
+     */
+    @GetMapping("getRouters")
+    public AjaxResult getRouters()
+    {
+        Long userId = SecurityUtils.getUserId();
+        List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
+        return AjaxResult.success(menuService.buildMenus(menus));
+    }
+}

+ 142 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java

@@ -0,0 +1,142 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysMenu;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.service.ISysMenuService;
+
+/**
+ * 菜单信息
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/menu")
+public class SysMenuController extends BaseController
+{
+    @Autowired
+    private ISysMenuService menuService;
+
+    /**
+     * 获取菜单列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:menu:list')")
+    @GetMapping("/list")
+    public AjaxResult list(SysMenu menu)
+    {
+        List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
+        return AjaxResult.success(menus);
+    }
+
+    /**
+     * 根据菜单编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:menu:query')")
+    @GetMapping(value = "/{menuId}")
+    public AjaxResult getInfo(@PathVariable Long menuId)
+    {
+        return AjaxResult.success(menuService.selectMenuById(menuId));
+    }
+
+    /**
+     * 获取菜单下拉树列表
+     */
+    @GetMapping("/treeselect")
+    public AjaxResult treeselect(SysMenu menu)
+    {
+        List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
+        return AjaxResult.success(menuService.buildMenuTreeSelect(menus));
+    }
+
+    /**
+     * 加载对应角色菜单列表树
+     */
+    @GetMapping(value = "/roleMenuTreeselect/{roleId}")
+    public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
+    {
+        List<SysMenu> menus = menuService.selectMenuList(getUserId());
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
+        ajax.put("menus", menuService.buildMenuTreeSelect(menus));
+        return ajax;
+    }
+
+    /**
+     * 新增菜单
+     */
+    @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));
+    }
+
+    /**
+     * 修改菜单
+     */
+    @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.getMenuId().equals(menu.getParentId()))
+        {
+            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
+        }
+        menu.setUpdateBy(getUsername());
+        return toAjax(menuService.updateMenu(menu));
+    }
+
+    /**
+     * 删除菜单
+     */
+    @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));
+    }
+}

+ 91 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java

@@ -0,0 +1,91 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.SysNotice;
+import com.ruoyi.system.service.ISysNoticeService;
+
+/**
+ * 公告 信息操作处理
+ * 
+ * @author ruoyi
+ */
+@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));
+    }
+}

+ 133 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java

@@ -0,0 +1,133 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletResponse;
+
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysPost;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.service.ISysPostService;
+
+/**
+ * 岗位信息操作处理
+ * 
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/post")
+public class SysPostController extends BaseController
+{
+    @Autowired
+    private ISysPostService postService;
+
+    /**
+     * 获取岗位列表
+     */
+    @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')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysPost post)
+    {
+        List<SysPost> list = postService.selectPostList(post);
+        ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
+        util.exportExcel(response, list, "岗位数据");
+    }
+
+    /**
+     * 根据岗位编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:post:query')")
+    @GetMapping(value = "/{postId}")
+    public AjaxResult getInfo(@PathVariable Long postId)
+    {
+        return AjaxResult.success(postService.selectPostById(postId));
+    }
+
+    /**
+     * 新增岗位
+     */
+    @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));
+    }
+
+    /**
+     * 修改岗位
+     */
+    @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));
+    }
+
+    /**
+     * 删除岗位
+     */
+    @PreAuthorize("@ss.hasPermi('system:post:remove')")
+    @Log(title = "岗位管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{postIds}")
+    public AjaxResult remove(@PathVariable Long[] postIds)
+    {
+        return toAjax(postService.deletePostByIds(postIds));
+    }
+
+    /**
+     * 获取岗位选择框列表
+     */
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect()
+    {
+        List<SysPost> posts = postService.selectPostAll();
+        return AjaxResult.success(posts);
+    }
+}

+ 127 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java

@@ -0,0 +1,127 @@
+package com.ruoyi.web.controller.system;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.system.service.ISysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+/**
+ * 个人信息 业务处理
+ *
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/user/profile")
+public class SysProfileController extends BaseController {
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 个人信息
+     */
+    @GetMapping
+    public AjaxResult profile() {
+        LoginUser loginUser = getLoginUser();
+        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;
+    }
+
+    /**
+     * 修改用户
+     */
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult updateProfile(@RequestBody SysUser user) {
+        LoginUser loginUser = getLoginUser();
+        SysUser sysUser = loginUser.getUser();
+        user.setUserName(sysUser.getUserName());
+        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() + "'失败,邮箱账号已存在");
+        }
+        user.setUserId(sysUser.getUserId());
+        user.setPassword(null);
+        if (userService.updateUserProfile(user) > 0) {
+            // 更新缓存用户信息
+            sysUser.setNickName(user.getNickName());
+            sysUser.setPhonenumber(user.getPhonenumber());
+            sysUser.setEmail(user.getEmail());
+            sysUser.setSex(user.getSex());
+            tokenService.setLoginUser(loginUser);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("修改个人信息异常,请联系管理员");
+    }
+
+    /**
+     * 重置密码
+     */
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @PutMapping("/updatePwd")
+    public AjaxResult updatePwd(String oldPassword, String newPassword) {
+        LoginUser loginUser = getLoginUser();
+        String userName = loginUser.getUsername();
+        String password = loginUser.getPassword();
+        if (!SecurityUtils.matchesPassword(oldPassword, password)) {
+            return AjaxResult.error("修改密码失败,旧密码错误");
+        }
+        if (SecurityUtils.matchesPassword(newPassword, password)) {
+            return AjaxResult.error("新密码不能与旧密码相同");
+        }
+        // 匹配至少包含大小写字母/符号/数字中的2种的8-16位字符串
+        String regex = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9a-zA-Z-`=\\[\\];',.~!@#$%^&*()_+|{}:\"?]{8,16}$";
+        if (!newPassword.matches(regex)) {
+            return AjaxResult.error("新密码应为8-16个字符,至少包含大小写字母/符号/数字中的2种");
+        }
+        if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0) {
+            // 更新缓存用户密码
+            loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
+            tokenService.setLoginUser(loginUser);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("修改密码异常,请联系管理员");
+    }
+
+    /**
+     * 头像上传
+     */
+    @Log(title = "用户头像", businessType = BusinessType.UPDATE)
+    @PostMapping("/avatar")
+    public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws IOException {
+        if (!file.isEmpty()) {
+            LoginUser loginUser = getLoginUser();
+            String avatar = FileUploadUtils.upload(RuoYiConfig.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
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysRegisterController.java

@@ -0,0 +1,38 @@
+package com.ruoyi.web.controller.system;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.model.RegisterBody;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.framework.web.service.SysRegisterService;
+import com.ruoyi.system.service.ISysConfigService;
+
+/**
+ * 注册验证
+ * 
+ * @author ruoyi
+ */
+@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);
+    }
+}

+ 245 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java

@@ -0,0 +1,245 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.web.service.SysPermissionService;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.system.domain.SysUserRole;
+import com.ruoyi.system.service.ISysRoleService;
+import com.ruoyi.system.service.ISysUserService;
+
+/**
+ * 角色信息
+ * 
+ * @author ruoyi
+ */
+@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;
+
+    @PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysRole role)
+    {
+        startPage();
+        List<SysRole> list = roleService.selectRoleList(role);
+        return getDataTable(list);
+    }
+
+    @Log(title = "角色管理", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:role:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysRole role)
+    {
+        List<SysRole> list = roleService.selectRoleList(role);
+        ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
+        util.exportExcel(response, list, "角色数据");
+    }
+
+    /**
+     * 根据角色编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:query')")
+    @GetMapping(value = "/{roleId}")
+    public AjaxResult getInfo(@PathVariable Long roleId)
+    {
+        roleService.checkRoleDataScope(roleId);
+        return AjaxResult.success(roleService.selectRoleById(roleId));
+    }
+
+    /**
+     * 新增角色
+     */
+    @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));
+
+    }
+
+    /**
+     * 修改保存角色
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        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 = getLoginUser();
+            if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin())
+            {
+                loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
+                loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName()));
+                tokenService.setLoginUser(loginUser);
+            }
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
+    }
+
+    /**
+     * 修改保存数据权限
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/dataScope")
+    public AjaxResult dataScope(@RequestBody SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        return toAjax(roleService.authDataScope(role));
+    }
+
+    /**
+     * 状态修改
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStatus")
+    public AjaxResult changeStatus(@RequestBody SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        role.setUpdateBy(getUsername());
+        return toAjax(roleService.updateRoleStatus(role));
+    }
+
+    /**
+     * 删除角色
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:remove')")
+    @Log(title = "角色管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{roleIds}")
+    public AjaxResult remove(@PathVariable Long[] roleIds)
+    {
+        return toAjax(roleService.deleteRoleByIds(roleIds));
+    }
+
+    /**
+     * 获取角色选择框列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:query')")
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect()
+    {
+        return AjaxResult.success(roleService.selectRoleAll());
+    }
+
+    /**
+     * 查询已分配用户角色列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/authUser/allocatedList")
+    public TableDataInfo allocatedList(SysUser user)
+    {
+        startPage();
+        List<SysUser> list = userService.selectAllocatedList(user);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询未分配用户角色列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/authUser/unallocatedList")
+    public TableDataInfo unallocatedList(SysUser user)
+    {
+        startPage();
+        List<SysUser> list = userService.selectUnallocatedList(user);
+        return getDataTable(list);
+    }
+
+    /**
+     * 取消授权用户
+     */
+    @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));
+    }
+
+    /**
+     * 批量取消授权用户
+     */
+    @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));
+    }
+
+    /**
+     * 批量选择用户授权
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authUser/selectAll")
+    public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
+    {
+        roleService.checkRoleDataScope(roleId);
+        return toAjax(roleService.insertAuthUsers(roleId, userIds));
+    }
+}

+ 224 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -0,0 +1,224 @@
+package com.ruoyi.web.controller.system;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.service.ISysDeptService;
+import com.ruoyi.system.service.ISysPostService;
+import com.ruoyi.system.service.ISysRoleService;
+import com.ruoyi.system.service.ISysUserService;
+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.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 用户信息
+ *
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/user")
+public class SysUserController extends BaseController {
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysRoleService roleService;
+
+    @Autowired
+    private ISysPostService postService;
+    @Autowired
+    private ISysDeptService deptService;
+
+    /**
+     * 获取用户列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysUser user) {
+        startPage();
+        List<SysUser> list = userService.selectUserList(user);
+        return getDataTable(list);
+    }
+
+    @Log(title = "用户管理", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:user:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysUser user) {
+        List<SysUser> list = userService.selectUserList(user);
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        util.exportExcel(response, 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());
+        String operName = getUsername();
+        String message = userService.importUser(userList, updateSupport, operName);
+        return AjaxResult.success(message);
+    }
+
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response) {
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        util.importTemplateExcel(response, "用户数据");
+    }
+
+    /**
+     * 根据用户编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:query')")
+    @GetMapping(value = {"/", "/{userId}"})
+    public AjaxResult getInfo(@PathVariable(value = "userId", required = false) String userIdStr) {
+        if ("deptTree".equals(userIdStr)) {
+            List<SysDept> depts = deptService.selectDeptList(new SysDept());
+            return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
+        }
+        long userId = Long.parseLong(userIdStr);
+        userService.checkUserDataScope(userId);
+        AjaxResult ajax = AjaxResult.success();
+        List<SysRole> roles = roleService.selectRoleAll();
+        ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
+        ajax.put("posts", postService.selectPostAll());
+        if (StringUtils.isNotNull(userId)) {
+            SysUser sysUser = userService.selectUserById(userId);
+            ajax.put(AjaxResult.DATA_TAG, sysUser);
+            ajax.put("postIds", postService.selectPostListByUserId(userId));
+            ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList()));
+        }
+        return ajax;
+    }
+
+
+    /**
+     * 新增用户
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:add')")
+    @Log(title = "用户管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysUser user) {
+        // 匹配至少包含大小写字母/符号/数字中的2种的8-16位字符串
+        String regex = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9a-zA-Z-`=\\[\\];',.~!@#$%^&*()_+|{}:\"?]{8,16}$";
+        if (!user.getPassword().matches(regex)) {
+            return AjaxResult.error("密码应为8-16个字符,至少包含大小写字母/符号/数字中的2种");
+        }
+        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));
+    }
+
+    /**
+     * 修改用户
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysUser user) {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        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));
+    }
+
+    /**
+     * 删除用户
+     */
+    @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("当前用户不能删除");
+        }
+        return toAjax(userService.deleteUserByIds(userIds));
+    }
+
+    /**
+     * 重置密码
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/resetPwd")
+    public AjaxResult resetPwd(@RequestBody SysUser user) {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        // 匹配至少包含大小写字母/符号/数字中的2种的8-16位字符串
+        String regex = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9a-zA-Z-`=\\[\\];',.~!@#$%^&*()_+|{}:\"?]{8,16}$";
+        if (!user.getPassword().matches(regex)) {
+            return AjaxResult.error("密码应为8-16个字符,至少包含大小写字母/符号/数字中的2种");
+        }
+        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.resetPwd(user));
+    }
+
+    /**
+     * 状态修改
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStatus")
+    public AjaxResult changeStatus(@RequestBody SysUser user) {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.updateUserStatus(user));
+    }
+
+    /**
+     * 根据用户编号获取授权角色
+     */
+    @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()));
+        return ajax;
+    }
+
+    /**
+     * 用户授权角色
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authRole")
+    public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
+        userService.checkUserDataScope(userId);
+        userService.insertUserAuth(userId, roleIds);
+        return success();
+    }
+}

+ 28 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/TestNotifyController.java

@@ -0,0 +1,28 @@
+package com.ruoyi.web.controller.system;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class TestNotifyController {
+	
+	private static final Logger log=LoggerFactory.getLogger(TestNotifyController.class);
+	@RequestMapping("/test/push")
+	public String testPush(HttpServletRequest req) {
+		String method = req.getMethod();
+		log.info("收到推送鸟,推送方式:"+method);
+		try {
+			byte[] bytesMsg = IOUtils.toByteArray(req.getInputStream());
+			String msg=new String(bytesMsg,"UTF-8");
+			log.info("收到的推送报文:"+msg);
+		} catch (Exception e) {
+			log.error("解析推送报文失败鸟:"+e.getMessage(),e);
+		}
+		return "success";
+	}
+}

+ 98 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/UrPatentValidController.java

@@ -0,0 +1,98 @@
+package com.ruoyi.web.controller.system;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.vo.UrPatentValidStaticVo;
+import com.ruoyi.system.domain.vo.UrPatentValidVo;
+import com.ruoyi.system.service.IUrYearValidDataService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.domain.ResponseData;
+
+import java.util.Calendar;
+import java.util.List;
+import javax.validation.Valid;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.UrPatentValid;
+import com.ruoyi.system.service.IUrPatentValidService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.report.service.IRzlViewStatisticsInfoService;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 有效专利Controller
+ * 
+ * @author dm
+ * @date 2023-02-10
+ */
+@Api(value = "有效专利",tags = "有效专利")
+@ApiSupport(author = "dm",order = 10)
+@RestController
+@RequestMapping("/system/urPatentValid")
+public class UrPatentValidController extends BaseController {
+    @Autowired
+    private IUrPatentValidService urPatentValidService;
+
+    @Autowired
+    private IUrYearValidDataService iUrYearValidDataService;
+    @Autowired
+    private IRzlViewStatisticsInfoService rzlViewStatisticsInfoService;
+    /**
+     * 查询有效专利列表
+     */
+    @ApiOperation(value = "查询有效专利列表", notes = "查询有效专利列表")
+    @ApiOperationSupport(order = 10)
+    @GetMapping("/list")
+    public AjaxResult list(UrPatentValidVo urPatentValid) {
+        List<UrPatentValidStaticVo> list = urPatentValidService.selectList(urPatentValid);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 获取动态表头
+     */
+    @GetMapping("/getHeader")
+    public AjaxResult getHeader(String year) {
+        UrPatentValidVo vo = new UrPatentValidVo();
+        if(StringUtils.isNotBlank(year)) {
+            vo.setEndDate(year);
+            int intYear = Integer.parseInt(year);
+            vo.setStartDate(String.valueOf(intYear - 9));
+        }
+        List<UrPatentValid> list = urPatentValidService.selectHeaderList(vo);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 获取查询年列表
+     */
+    @GetMapping("/getYearList")
+    public AjaxResult getYearList() {
+//        List<String> list = iUrYearValidDataService.selectYearList();
+    	
+    	 Calendar c = Calendar.getInstance();
+         int year = c.get(Calendar.YEAR);
+         year = year - 10;
+         List<String> list = rzlViewStatisticsInfoService.selectYearList(year);
+         
+        return AjaxResult.success(list);
+    }
+
+}

+ 140 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/UrValidShowDataController.java

@@ -0,0 +1,140 @@
+package com.ruoyi.web.controller.system;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import com.ruoyi.system.domain.vo.UrPatentValidStaticVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.domain.ResponseData;
+import java.util.List;
+import javax.validation.Valid;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.UrValidShowData;
+import com.ruoyi.system.service.IUrValidShowDataService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 有效概览成品Controller
+ * 
+ * @author dm
+ * @date 2023-02-14
+ */
+@Api(value = "有效概览成品",tags = "有效概览成品")
+@ApiSupport(author = "dm",order = 10)
+@RestController
+@RequestMapping("/system/urValidShowData")
+public class UrValidShowDataController extends BaseController
+{
+    @Autowired
+    private IUrValidShowDataService urValidShowDataService;
+
+    /**
+     * 获取有效概览成品详细信息
+     */
+    @ApiOperation(value = "获取有效概览成品详细信息",notes = "获取有效概览成品详细信息")
+    @ApiOperationSupport(order = 30)
+    @PreAuthorize("@ss.hasPermi('system:urValidShowData:query')")
+    @GetMapping(value = "/{id}")
+    public ResponseData<UrValidShowData> getInfo(@PathVariable("id") Long id)
+    {
+        return ResponseData.success(urValidShowDataService.selectUrValidShowDataById(id));
+    }
+
+    /**
+     * 新增有效概览成品
+     */
+    @ApiOperation(value = "新增有效概览成品",notes = "新增有效概览成品")
+    @ApiOperationSupport(order = 40,ignoreParameters = {"urValidShowData.id"})
+    @PreAuthorize("@ss.hasPermi('system:urValidShowData:add')")
+    @Log(title = "有效概览成品", businessType = BusinessType.INSERT)
+    @PostMapping
+    @RepeatSubmit
+    public ResponseData add(@RequestBody @Valid @ApiParam(required=true) UrValidShowData urValidShowData)
+    {
+        int i = urValidShowDataService.insertUrValidShowData(urValidShowData);
+        if(i>0){
+            //返回主键
+            return ResponseData.success(urValidShowData.getId());
+        }else{
+            return ResponseData.error();
+        }
+    }
+
+    /**
+     * 修改有效概览成品
+     */
+    @ApiOperation(value = "修改有效概览成品",notes = "修改有效概览成品")
+    @ApiOperationSupport(order = 50)
+    @PreAuthorize("@ss.hasPermi('system:urValidShowData:edit')")
+    @Log(title = "有效概览成品", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @RepeatSubmit
+    public ResponseData edit(@RequestBody @Valid @ApiParam(required=true) UrValidShowData urValidShowData)
+    {
+        int i = urValidShowDataService.updateUrValidShowData(urValidShowData);
+        if(i>0){
+            //返回主键
+            return ResponseData.success(urValidShowData.getId());
+        }else{
+            return ResponseData.error();
+        }
+    }
+
+    /**
+     * 删除有效概览成品
+     */
+    @ApiOperation(value = "删除有效概览成品",notes = "删除有效概览成品")
+    @ApiOperationSupport(order = 60)
+    @PreAuthorize("@ss.hasPermi('system:urValidShowData:remove')")
+    @Log(title = "有效概览成品", businessType = BusinessType.DELETE)
+    @PostMapping("/delete/{ids}")
+    public ResponseData remove(@PathVariable Long[] ids)
+    {
+        //return toResult(urValidShowDataService.deleteUrValidShowDataByIds(ids));
+        //逻辑删除
+        return toResult(urValidShowDataService.setDeleteByIds(ids));
+    }
+
+    /**
+     * 查询有效概览成品列表---不进行分页
+     */
+    @ApiOperation(value = "查询有效概览成品列表---不进行分页",notes = "查询有效概览成品列表---不进行分页")
+    @ApiOperationSupport(order = 70)
+    @PreAuthorize("@ss.hasPermi('system:urValidShowData:list')")
+    @GetMapping("/getDataList")
+    public ResponseData<List<UrPatentValidStaticVo>> getDataList(UrValidShowData urValidShowData)
+    {
+        List<UrPatentValidStaticVo> list = urValidShowDataService.selectUrValidShowDataList(urValidShowData);
+        return ResponseData.success(list);
+    }
+
+    /**
+     * 导出excel
+     */
+    @ApiOperation(value = "导出excel",notes = "导出excel")
+    @ApiOperationSupport(order = 20)
+    @PreAuthorize("@ss.hasPermi('system:urYearValidData:export')")
+    @Log(title = "导出excel", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, UrValidShowData vo)
+    {
+        urValidShowDataService.export(vo, response);
+    }
+}

+ 156 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/system/UrYearValidDataController.java

@@ -0,0 +1,156 @@
+package com.ruoyi.web.controller.system;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import com.ruoyi.system.domain.vo.UrYearValidDataVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.domain.ResponseData;
+import java.util.List;
+import javax.validation.Valid;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.UrYearValidData;
+import com.ruoyi.system.service.IUrYearValidDataService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 专利有效按年统计结果Controller
+ * 
+ * @author dm
+ * @date 2023-02-12
+ */
+@Api(value = "专利有效按年统计结果",tags = "专利有效按年统计结果")
+@ApiSupport(author = "dm",order = 10)
+@RestController
+@RequestMapping("/system/urYearValidData")
+public class UrYearValidDataController extends BaseController
+{
+    @Autowired
+    private IUrYearValidDataService urYearValidDataService;
+
+    /**
+     * 查询专利有效按年统计结果列表
+     */
+    @ApiOperation(value = "查询专利有效按年统计结果列表",notes = "查询专利有效按年统计结果列表")
+    @ApiOperationSupport(order = 10)
+    @PreAuthorize("@ss.hasPermi('system:urYearValidData:list')")
+    @GetMapping("/list")
+    public TableDataInfo<UrYearValidData> list(UrYearValidDataVo urYearValidData)
+    {
+        startPage();
+        List<UrYearValidData> list = urYearValidDataService.selectUrYearValidDataList(urYearValidData);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出专利有效按年统计结果列表
+     */
+    @ApiOperation(value = "导出专利有效按年统计结果列表",notes = "导出专利有效按年统计结果列表")
+    @ApiOperationSupport(order = 20)
+    @PreAuthorize("@ss.hasPermi('system:urYearValidData:export')")
+    @Log(title = "专利有效按年统计结果", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, UrYearValidDataVo urYearValidData)
+    {
+        List<UrYearValidData> list = urYearValidDataService.selectUrYearValidDataList(urYearValidData);
+        ExcelUtil<UrYearValidData> util = new ExcelUtil<UrYearValidData>(UrYearValidData.class);
+        util.exportExcel(response, list, "专利有效按年统计结果数据");
+    }
+
+    /**
+     * 获取专利有效按年统计结果详细信息
+     */
+    @ApiOperation(value = "获取专利有效按年统计结果详细信息",notes = "获取专利有效按年统计结果详细信息")
+    @ApiOperationSupport(order = 30)
+    @PreAuthorize("@ss.hasPermi('system:urYearValidData:query')")
+    @GetMapping(value = "/{id}")
+    public ResponseData<UrYearValidData> getInfo(@PathVariable("id") Long id)
+    {
+        return ResponseData.success(urYearValidDataService.selectUrYearValidDataById(id));
+    }
+
+    /**
+     * 新增专利有效按年统计结果
+     */
+    @ApiOperation(value = "新增专利有效按年统计结果",notes = "新增专利有效按年统计结果")
+    @ApiOperationSupport(order = 40,ignoreParameters = {"urYearValidData.id"})
+    @PreAuthorize("@ss.hasPermi('system:urYearValidData:add')")
+    @Log(title = "专利有效按年统计结果", businessType = BusinessType.INSERT)
+    @PostMapping
+    @RepeatSubmit
+    public ResponseData add(@RequestBody @Valid @ApiParam(required=true) UrYearValidData urYearValidData)
+    {
+        int i = urYearValidDataService.insertUrYearValidData(urYearValidData);
+        if(i>0){
+            //返回主键
+            return ResponseData.success(urYearValidData.getId());
+        }else{
+            return ResponseData.error();
+        }
+    }
+
+    /**
+     * 修改专利有效按年统计结果
+     */
+    @ApiOperation(value = "修改专利有效按年统计结果",notes = "修改专利有效按年统计结果")
+    @ApiOperationSupport(order = 50)
+    @PreAuthorize("@ss.hasPermi('system:urYearValidData:edit')")
+    @Log(title = "专利有效按年统计结果", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @RepeatSubmit
+    public ResponseData edit(@RequestBody @Valid @ApiParam(required=true) UrYearValidData urYearValidData)
+    {
+        int i = urYearValidDataService.updateUrYearValidData(urYearValidData);
+        if(i>0){
+            //返回主键
+            return ResponseData.success(urYearValidData.getId());
+        }else{
+            return ResponseData.error();
+        }
+    }
+
+    /**
+     * 删除专利有效按年统计结果
+     */
+    @ApiOperation(value = "删除专利有效按年统计结果",notes = "删除专利有效按年统计结果")
+    @ApiOperationSupport(order = 60)
+    @PreAuthorize("@ss.hasPermi('system:urYearValidData:remove')")
+    @Log(title = "专利有效按年统计结果", businessType = BusinessType.DELETE)
+    @PostMapping("/delete/{ids}")
+    public ResponseData remove(@PathVariable Long[] ids)
+    {
+        //return toResult(urYearValidDataService.deleteUrYearValidDataByIds(ids));
+        //逻辑删除
+        return toResult(urYearValidDataService.setDeleteByIds(ids));
+    }
+
+    /**
+     * 查询专利有效按年统计结果列表---不进行分页
+     */
+    @ApiOperation(value = "查询专利有效按年统计结果列表---不进行分页",notes = "查询专利有效按年统计结果列表---不进行分页")
+    @ApiOperationSupport(order = 70)
+//    @PreAuthorize("@ss.hasPermi('system:urYearValidData:list')")
+    @GetMapping("/getDataList")
+    public ResponseData<List<UrYearValidData>> getDataList(UrYearValidDataVo urYearValidData)
+    {
+        List<UrYearValidData> list = urYearValidDataService.selectUrYearValidDataList(urYearValidData);
+        return ResponseData.success(list);
+    }
+}

+ 24 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java

@@ -0,0 +1,24 @@
+package com.ruoyi.web.controller.tool;
+
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.ruoyi.common.core.controller.BaseController;
+
+/**
+ * swagger 接口
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/tool/swagger")
+public class SwaggerController extends BaseController
+{
+    @PreAuthorize("@ss.hasPermi('tool:swagger:view')")
+    @GetMapping()
+    public String index()
+    {
+        return redirect("/swagger-ui.html");
+    }
+}

+ 181 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java

@@ -0,0 +1,181 @@
+package com.ruoyi.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.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.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 ruoyi
+ */
+@Api("用户信息管理")
+@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"));
+    }
+
+    @ApiOperation("获取用户列表")
+    @GetMapping("/list")
+    public AjaxResult userList()
+    {
+        List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
+        return AjaxResult.success(userList);
+    }
+
+    @ApiOperation("获取用户详细")
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+    @GetMapping("/{userId}")
+    public AjaxResult getUser(@PathVariable Integer userId)
+    {
+        if (!users.isEmpty() && users.containsKey(userId))
+        {
+            return AjaxResult.success(users.get(userId));
+        }
+        else
+        {
+            return error("用户不存在");
+        }
+    }
+
+    @ApiOperation("新增用户")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
+        @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
+        @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
+        @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
+    })
+    @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));
+    }
+
+    @ApiOperation("更新用户")
+    @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));
+    }
+
+    @ApiOperation("删除用户信息")
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+    @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;
+    }
+}

+ 56 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/core/config/MyMetaObjecthandler.java

@@ -0,0 +1,56 @@
+package com.ruoyi.web.core.config;
+
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import com.ruoyi.common.utils.SecurityUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.reflection.MetaObject;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * description: 自定义元数据自动填充功能
+ *
+ * @author guanxu
+ * @date 2023-03-09
+ */
+@Component
+@Slf4j
+public class MyMetaObjecthandler implements MetaObjectHandler {
+
+    @Override
+    public void insertFill(MetaObject metaObject) {
+        log.info("公共字段自动填充[insert]...");
+        // 起始版本 3.3.0(推荐使用)
+        this.setFieldValByName("createTime",new Date(),metaObject);
+        this.setFieldValByName("updateTime",new Date(),metaObject);
+        //this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
+        //this.strictInsertFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
+        try {
+            metaObject.setValue("createBy", SecurityUtils.getLoginUser().getUser().getUserName());
+        } catch (Exception e) {
+            log.trace("没有获取当前登录用户," + e.getMessage(), e);
+            metaObject.setValue("createBy", "");
+        }
+        try {
+            metaObject.setValue("updateBy", SecurityUtils.getLoginUser().getUser().getUserName());
+        } catch (Exception e) {
+            log.trace("没有获取当前登录用户," + e.getMessage(), e);
+            metaObject.setValue("updateBy", "");
+        }
+    }
+
+    @Override
+    public void updateFill(MetaObject metaObject) {
+        log.info("公共字段自动填充[update]...");
+        // 起始版本 3.3.0(推荐)
+        //this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
+        this.setFieldValByName("updateTime",new Date(),metaObject);
+        try {
+            metaObject.setValue("updateBy", SecurityUtils.getLoginUser().getUser().getUserName());
+        } catch (Exception e) {
+            log.trace("没有获取当前登录用户," + e.getMessage(), e);
+            metaObject.setValue("updateBy", "");
+        }
+    }
+}

+ 125 - 0
yunnan-report-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java

@@ -0,0 +1,125 @@
+package com.ruoyi.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.ruoyi.common.config.RuoYiConfig;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
+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 ruoyi
+ */
+@Configuration
+public class SwaggerConfig
+{
+    /** 系统基础配置 */
+    @Autowired
+    private RuoYiConfig ruoyiConfig;
+
+    /** 是否开启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.ruoyi.project.tool.swagger"))
+                // 扫描所有 .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(ruoyiConfig.getName(), null, null))
+                // 版本
+                .version("版本号:" + ruoyiConfig.getVersion())
+                .build();
+    }
+}

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

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

+ 70 - 0
yunnan-report-admin/src/main/resources/application-druid.yml

@@ -0,0 +1,70 @@
+# 数据源配置
+spring:
+    datasource:
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: com.mysql.cj.jdbc.Driver
+        druid:
+            # 主库数据源
+            master:
+                #url: jdbc:mysql://localhost:3306/yunnan_report?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                #username: root
+                #password: root
+                
+                #开发环境
+                #url: jdbc:mysql://43.139.123.109:3308/yunnan_report?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                #username: root
+                #password: 96ee46cebd2e2518
+                
+                #客户测试环境
+                url: jdbc:mysql://43.139.123.109:3338/yunnan_report?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: 96ee46cebd2e2518
+            # 从库数据源
+            slave:
+                # 从数据源开关/默认关闭
+                enabled: false
+                url: 
+                username: 
+                password: 
+            # 初始连接数
+            initialSize: 5
+            # 最小连接池数量
+            minIdle: 10
+            # 最大连接池数量
+            maxActive: 20
+            # 配置获取连接等待超时的时间
+            maxWait: 60000
+            # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+            timeBetweenEvictionRunsMillis: 60000
+            # 配置一个连接在池中最小生存的时间,单位是毫秒
+            minEvictableIdleTimeMillis: 300000
+            # 配置一个连接在池中最大生存的时间,单位是毫秒
+            maxEvictableIdleTimeMillis: 900000
+            validationQueryTimeout: 20
+            # 配置检测连接是否有效
+            validationQuery: SELECT 1 FROM DUAL
+            testWhileIdle: true
+            testOnBorrow: false
+            testOnReturn: false
+            webStatFilter: 
+                enabled: true
+            statViewServlet:
+                enabled: true
+                # 设置白名单,不填则允许所有访问
+                allow:
+                url-pattern: /druid/*
+                # 控制台管理用户名和密码
+                login-username: ruoyi
+                login-password: 123456
+            filter:
+                stat:
+                    enabled: true
+                    # 慢SQL记录
+                    log-slow-sql: true
+                    slow-sql-millis: 1000
+                    merge-sql: true
+                wall:
+                    config:
+                        multi-statement-allow: true
+    main:
+        banner-mode: off

+ 140 - 0
yunnan-report-admin/src/main/resources/application.yml

@@ -0,0 +1,140 @@
+# 项目相关配置
+ruoyi:
+  pressApiServer: http://111.198.99.166:20000/
+  autoImpPub: false
+  loadPub: false
+  # 名称
+  name: RuoYi
+  # 版本
+  version: 3.8.1
+  # 版权年份
+  copyrightYear: 2022
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
+  profile: D:/ruoyi/uploadPath
+  filePath: http://localhost/prod-api
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+  autoSync: false
+
+# 用户配置
+user:
+  password:
+    # 密码最大错误次数
+    maxRetryCount: 5
+    # 密码锁定时间(默认10分钟)
+    lockTime: 10
+    
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8080
+  port: 8080
+  servlet:
+    # 应用的访问路径
+    context-path: /prod-api
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # 连接数满后的排队数,默认为100
+    accept-count: 1000
+    threads:
+      # tomcat最大线程数,默认为200
+      max: 800
+      # Tomcat启动初始化的线程数,默认值10
+      min-spare: 100
+
+# 日志配置
+logging:
+  level:
+    com.ruoyi: debug
+    org.springframework: warn
+
+# Spring配置
+spring:
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  profiles:
+    active: druid
+  # 文件上传
+  servlet:
+     multipart:
+       # 单个文件大小
+       max-file-size:  10MB
+       # 设置总上传的文件大小
+       max-request-size:  20MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: false
+  # redis 配置
+  redis:
+    # 地址
+    host: localhost
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码
+    password: 123456
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms
+
+# token配置
+token:
+    # 令牌自定义标识
+    header: Authorization
+    # 令牌密钥
+    secret: abcdefghijklmnopqrstuvwxyz
+    # 令牌有效期(默认30分钟)
+    expireTime: 30
+
+# mybatis-plus配置
+mybatis-plus:
+    # 搜索指定包别名
+    typeAliasesPackage: com.ruoyi.**.domain
+    # 配置mapper的扫描,找到所有的mapper.xml映射文件
+    mapperLocations: classpath*:mapper/**/*Mapper.xml
+    # 加载全局的配置文件
+    configLocation: classpath:mybatis/mybatis-config.xml
+    global-config:
+      banner: off # 关闭mybatisplus启动图标
+      db-config:
+        id-type: auto
+
+# PageHelper分页插件
+pagehelper:
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: true
+  # 请求前缀
+  pathMapping: /dev-api
+
+# 防止XSS攻击
+xss:
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*

+ 2 - 0
yunnan-report-admin/src/main/resources/banner.txt

@@ -0,0 +1,2 @@
+Application Version: ${ruoyi.version}
+Spring Boot Version: ${spring-boot.version}

+ 37 - 0
yunnan-report-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}]

+ 54 - 0
yunnan-report-admin/src/main/resources/logback.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <!-- 日志存放路径 -->
+	<property name="log.path" value="/home/ruoyi/logs" />
+    <!-- 日志输出格式 -->
+	<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %level %logger - [%method,%line] - %msg%n" />
+
+	<!-- 控制台输出 -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+	</appender>
+
+	<!-- 系统日志输出 -->
+	<appender name="file_debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/sys-debug.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+			<fileNamePattern>${log.path}/sys-debug.%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>debug</level>
+        </filter>
+	</appender>
+
+
+	<!-- 系统模块日志级别控制  -->
+	<logger name="com.ruoyi" level="debug" />
+	<logger name="org.dozer" level="warn" />
+	<logger name="io.lettuce" level="warn" />
+	<logger name="org.apache.commons" level="warn" />
+	
+	<!-- Spring日志级别控制  -->
+	<logger name="org.springframework" level="warn" />
+
+	<root level="debug">
+		<appender-ref ref="file_debug" />
+		<appender-ref ref="console" />
+	</root>
+
+
+</configuration>
+
+
+
+

+ 93 - 0
yunnan-report-admin/src/main/resources/logback_bak.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <!-- 日志存放路径 -->
+	<property name="log.path" value="/home/ruoyi/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.ruoyi" 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>

+ 10 - 0
yunnan-report-admin/src/main/resources/mapper/reportpub/DPatentPubInfoMapper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.reportpub.mapper.DPatentPubInfoMapper">
+	<delete id="clearData"    >
+		truncate table d_patent_pub_info  
+	</delete>
+</mapper>
+

+ 20 - 0
yunnan-report-admin/src/main/resources/mybatis/mybatis-config.xml

@@ -0,0 +1,20 @@
+<?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"   />
+        <!-- 允许JDBC 支持自动生成主键 -->
+        <setting name="useGeneratedKeys"         value="true"   />
+        <!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
+        <setting name="defaultExecutorType"      value="SIMPLE" />
+		<!-- 指定 MyBatis 所用日志的具体实现 -->
+        <setting name="logImpl"                  value="SLF4J"  />
+        <!-- 使用驼峰命名法转换字段 -->
+		<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
+	</settings>
+	
+</configuration>

+ 4 - 0
yunnan-report-admin/src/main/resources/ureport.properties

@@ -0,0 +1,4 @@
+ureport.disableHttpSessionReportCache=false
+ureport.disableFileProvider=true
+ureport.fileStoreDir=${ruoyi.profile}/ureport2
+ureport.debug=true

+ 1721 - 0
yunnan-report-admin/src/test/java/com/ruoyi/ExcelExp.java

@@ -0,0 +1,1721 @@
+package com.ruoyi;
+
+public class ExcelExp {
+	
+	
+	
+ public static String json="{\r\n" + 
+			"	\"data\": {\r\n" + 
+			"		\"yearList\": [\r\n" + 
+			"			\"2021\",\r\n" + 
+			"			\"2022\"\r\n" + 
+			"		],\r\n" + 
+			"		\"dataList\": [\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"云南省\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 122364,\r\n" + 
+			"						\"higherSchool\": 16375,\r\n" + 
+			"						\"researchInstitute\": 5510,\r\n" + 
+			"						\"enterprise\": 81021,\r\n" + 
+			"						\"institutions\": 7783,\r\n" + 
+			"						\"individual\": 11675\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 145342,\r\n" + 
+			"						\"higherSchool\": 16266,\r\n" + 
+			"						\"researchInstitute\": 6006,\r\n" + 
+			"						\"enterprise\": 101443,\r\n" + 
+			"						\"institutions\": 9301,\r\n" + 
+			"						\"individual\": 12326\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 267706\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 18784,\r\n" + 
+			"						\"higherSchool\": 5421,\r\n" + 
+			"						\"researchInstitute\": 2489,\r\n" + 
+			"						\"enterprise\": 9385,\r\n" + 
+			"						\"institutions\": 545,\r\n" + 
+			"						\"individual\": 944\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 21956,\r\n" + 
+			"						\"higherSchool\": 6286,\r\n" + 
+			"						\"researchInstitute\": 2915,\r\n" + 
+			"						\"enterprise\": 11137,\r\n" + 
+			"						\"institutions\": 736,\r\n" + 
+			"						\"individual\": 882\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 40740\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 91604,\r\n" + 
+			"						\"higherSchool\": 9700,\r\n" + 
+			"						\"researchInstitute\": 2907,\r\n" + 
+			"						\"enterprise\": 64508,\r\n" + 
+			"						\"institutions\": 6995,\r\n" + 
+			"						\"individual\": 7494\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 110460,\r\n" + 
+			"						\"higherSchool\": 8928,\r\n" + 
+			"						\"researchInstitute\": 2997,\r\n" + 
+			"						\"enterprise\": 82498,\r\n" + 
+			"						\"institutions\": 8275,\r\n" + 
+			"						\"individual\": 7762\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 202064\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 11976,\r\n" + 
+			"						\"higherSchool\": 1254,\r\n" + 
+			"						\"researchInstitute\": 114,\r\n" + 
+			"						\"enterprise\": 7128,\r\n" + 
+			"						\"institutions\": 243,\r\n" + 
+			"						\"individual\": 3237\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 12926,\r\n" + 
+			"						\"higherSchool\": 1052,\r\n" + 
+			"						\"researchInstitute\": 94,\r\n" + 
+			"						\"enterprise\": 7808,\r\n" + 
+			"						\"institutions\": 290,\r\n" + 
+			"						\"individual\": 3682\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 24902\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"昆明市\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 76532,\r\n" + 
+			"						\"higherSchool\": 13667,\r\n" + 
+			"						\"researchInstitute\": 4672,\r\n" + 
+			"						\"enterprise\": 48915,\r\n" + 
+			"						\"institutions\": 3830,\r\n" + 
+			"						\"individual\": 5448\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 90927,\r\n" + 
+			"						\"higherSchool\": 13784,\r\n" + 
+			"						\"researchInstitute\": 5125,\r\n" + 
+			"						\"enterprise\": 62115,\r\n" + 
+			"						\"institutions\": 4322,\r\n" + 
+			"						\"individual\": 5581\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 167459\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 14445,\r\n" + 
+			"						\"higherSchool\": 5251,\r\n" + 
+			"						\"researchInstitute\": 2176,\r\n" + 
+			"						\"enterprise\": 6175,\r\n" + 
+			"						\"institutions\": 262,\r\n" + 
+			"						\"individual\": 581\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 17107,\r\n" + 
+			"						\"higherSchool\": 6080,\r\n" + 
+			"						\"researchInstitute\": 2564,\r\n" + 
+			"						\"enterprise\": 7553,\r\n" + 
+			"						\"institutions\": 361,\r\n" + 
+			"						\"individual\": 549\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 31552\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 55933,\r\n" + 
+			"						\"higherSchool\": 7515,\r\n" + 
+			"						\"researchInstitute\": 2410,\r\n" + 
+			"						\"enterprise\": 38761,\r\n" + 
+			"						\"institutions\": 3479,\r\n" + 
+			"						\"individual\": 3768\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 67243,\r\n" + 
+			"						\"higherSchool\": 7000,\r\n" + 
+			"						\"researchInstitute\": 2494,\r\n" + 
+			"						\"enterprise\": 50026,\r\n" + 
+			"						\"institutions\": 3860,\r\n" + 
+			"						\"individual\": 3863\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 123176\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 6154,\r\n" + 
+			"						\"higherSchool\": 901,\r\n" + 
+			"						\"researchInstitute\": 86,\r\n" + 
+			"						\"enterprise\": 3979,\r\n" + 
+			"						\"institutions\": 89,\r\n" + 
+			"						\"individual\": 1099\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 6577,\r\n" + 
+			"						\"higherSchool\": 704,\r\n" + 
+			"						\"researchInstitute\": 67,\r\n" + 
+			"						\"enterprise\": 4536,\r\n" + 
+			"						\"institutions\": 101,\r\n" + 
+			"						\"individual\": 1169\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 12731\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"玉溪市\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 9755,\r\n" + 
+			"						\"higherSchool\": 108,\r\n" + 
+			"						\"researchInstitute\": 215,\r\n" + 
+			"						\"enterprise\": 8408,\r\n" + 
+			"						\"institutions\": 458,\r\n" + 
+			"						\"individual\": 566\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 11448,\r\n" + 
+			"						\"higherSchool\": 128,\r\n" + 
+			"						\"researchInstitute\": 136,\r\n" + 
+			"						\"enterprise\": 9930,\r\n" + 
+			"						\"institutions\": 591,\r\n" + 
+			"						\"individual\": 663\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 21203\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1112,\r\n" + 
+			"						\"higherSchool\": 12,\r\n" + 
+			"						\"researchInstitute\": 86,\r\n" + 
+			"						\"enterprise\": 923,\r\n" + 
+			"						\"institutions\": 15,\r\n" + 
+			"						\"individual\": 76\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1209,\r\n" + 
+			"						\"higherSchool\": 8,\r\n" + 
+			"						\"researchInstitute\": 81,\r\n" + 
+			"						\"enterprise\": 1026,\r\n" + 
+			"						\"institutions\": 20,\r\n" + 
+			"						\"individual\": 74\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 2321\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 7839,\r\n" + 
+			"						\"higherSchool\": 92,\r\n" + 
+			"						\"researchInstitute\": 127,\r\n" + 
+			"						\"enterprise\": 6859,\r\n" + 
+			"						\"institutions\": 394,\r\n" + 
+			"						\"individual\": 367\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 9422,\r\n" + 
+			"						\"higherSchool\": 103,\r\n" + 
+			"						\"researchInstitute\": 55,\r\n" + 
+			"						\"enterprise\": 8334,\r\n" + 
+			"						\"institutions\": 521,\r\n" + 
+			"						\"individual\": 409\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 17261\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 804,\r\n" + 
+			"						\"higherSchool\": 4,\r\n" + 
+			"						\"researchInstitute\": 2,\r\n" + 
+			"						\"enterprise\": 626,\r\n" + 
+			"						\"institutions\": 49,\r\n" + 
+			"						\"individual\": 123\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 817,\r\n" + 
+			"						\"higherSchool\": 17,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 570,\r\n" + 
+			"						\"institutions\": 50,\r\n" + 
+			"						\"individual\": 180\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1621\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"曲靖市\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 8675,\r\n" + 
+			"						\"higherSchool\": 1204,\r\n" + 
+			"						\"researchInstitute\": 11,\r\n" + 
+			"						\"enterprise\": 5563,\r\n" + 
+			"						\"institutions\": 936,\r\n" + 
+			"						\"individual\": 961\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 9816,\r\n" + 
+			"						\"higherSchool\": 1083,\r\n" + 
+			"						\"researchInstitute\": 16,\r\n" + 
+			"						\"enterprise\": 6623,\r\n" + 
+			"						\"institutions\": 1074,\r\n" + 
+			"						\"individual\": 1020\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 18491\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 726,\r\n" + 
+			"						\"higherSchool\": 48,\r\n" + 
+			"						\"researchInstitute\": 1,\r\n" + 
+			"						\"enterprise\": 575,\r\n" + 
+			"						\"institutions\": 63,\r\n" + 
+			"						\"individual\": 39\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 857,\r\n" + 
+			"						\"higherSchool\": 56,\r\n" + 
+			"						\"researchInstitute\": 1,\r\n" + 
+			"						\"enterprise\": 680,\r\n" + 
+			"						\"institutions\": 79,\r\n" + 
+			"						\"individual\": 41\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1583\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 7213,\r\n" + 
+			"						\"higherSchool\": 1005,\r\n" + 
+			"						\"researchInstitute\": 10,\r\n" + 
+			"						\"enterprise\": 4621,\r\n" + 
+			"						\"institutions\": 858,\r\n" + 
+			"						\"individual\": 719\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 8156,\r\n" + 
+			"						\"higherSchool\": 854,\r\n" + 
+			"						\"researchInstitute\": 15,\r\n" + 
+			"						\"enterprise\": 5557,\r\n" + 
+			"						\"institutions\": 974,\r\n" + 
+			"						\"individual\": 756\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 15369\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 736,\r\n" + 
+			"						\"higherSchool\": 151,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 367,\r\n" + 
+			"						\"institutions\": 15,\r\n" + 
+			"						\"individual\": 203\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 803,\r\n" + 
+			"						\"higherSchool\": 173,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 386,\r\n" + 
+			"						\"institutions\": 21,\r\n" + 
+			"						\"individual\": 223\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1539\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"楚雄彝族自治州\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 4335,\r\n" + 
+			"						\"higherSchool\": 272,\r\n" + 
+			"						\"researchInstitute\": 48,\r\n" + 
+			"						\"enterprise\": 3456,\r\n" + 
+			"						\"institutions\": 280,\r\n" + 
+			"						\"individual\": 279\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 5198,\r\n" + 
+			"						\"higherSchool\": 270,\r\n" + 
+			"						\"researchInstitute\": 64,\r\n" + 
+			"						\"enterprise\": 4131,\r\n" + 
+			"						\"institutions\": 410,\r\n" + 
+			"						\"individual\": 323\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 9533\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 376,\r\n" + 
+			"						\"higherSchool\": 22,\r\n" + 
+			"						\"researchInstitute\": 12,\r\n" + 
+			"						\"enterprise\": 302,\r\n" + 
+			"						\"institutions\": 7,\r\n" + 
+			"						\"individual\": 33\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 414,\r\n" + 
+			"						\"higherSchool\": 22,\r\n" + 
+			"						\"researchInstitute\": 28,\r\n" + 
+			"						\"enterprise\": 334,\r\n" + 
+			"						\"institutions\": 12,\r\n" + 
+			"						\"individual\": 18\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 790\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 3657,\r\n" + 
+			"						\"higherSchool\": 242,\r\n" + 
+			"						\"researchInstitute\": 36,\r\n" + 
+			"						\"enterprise\": 2918,\r\n" + 
+			"						\"institutions\": 269,\r\n" + 
+			"						\"individual\": 192\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 4433,\r\n" + 
+			"						\"higherSchool\": 243,\r\n" + 
+			"						\"researchInstitute\": 36,\r\n" + 
+			"						\"enterprise\": 3541,\r\n" + 
+			"						\"institutions\": 378,\r\n" + 
+			"						\"individual\": 235\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 8090\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 302,\r\n" + 
+			"						\"higherSchool\": 8,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 236,\r\n" + 
+			"						\"institutions\": 4,\r\n" + 
+			"						\"individual\": 54\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 351,\r\n" + 
+			"						\"higherSchool\": 5,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 256,\r\n" + 
+			"						\"institutions\": 20,\r\n" + 
+			"						\"individual\": 70\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 653\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"大理白族自治州\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 4362,\r\n" + 
+			"						\"higherSchool\": 269,\r\n" + 
+			"						\"researchInstitute\": 26,\r\n" + 
+			"						\"enterprise\": 2782,\r\n" + 
+			"						\"institutions\": 448,\r\n" + 
+			"						\"individual\": 837\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 5042,\r\n" + 
+			"						\"higherSchool\": 300,\r\n" + 
+			"						\"researchInstitute\": 28,\r\n" + 
+			"						\"enterprise\": 3343,\r\n" + 
+			"						\"institutions\": 548,\r\n" + 
+			"						\"individual\": 823\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 9404\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 290,\r\n" + 
+			"						\"higherSchool\": 30,\r\n" + 
+			"						\"researchInstitute\": 2,\r\n" + 
+			"						\"enterprise\": 204,\r\n" + 
+			"						\"institutions\": 31,\r\n" + 
+			"						\"individual\": 23\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 333,\r\n" + 
+			"						\"higherSchool\": 41,\r\n" + 
+			"						\"researchInstitute\": 3,\r\n" + 
+			"						\"enterprise\": 215,\r\n" + 
+			"						\"institutions\": 43,\r\n" + 
+			"						\"individual\": 31\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 623\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 3408,\r\n" + 
+			"						\"higherSchool\": 231,\r\n" + 
+			"						\"researchInstitute\": 24,\r\n" + 
+			"						\"enterprise\": 2223,\r\n" + 
+			"						\"institutions\": 401,\r\n" + 
+			"						\"individual\": 529\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 4040,\r\n" + 
+			"						\"higherSchool\": 251,\r\n" + 
+			"						\"researchInstitute\": 25,\r\n" + 
+			"						\"enterprise\": 2757,\r\n" + 
+			"						\"institutions\": 493,\r\n" + 
+			"						\"individual\": 514\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 7448\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 664,\r\n" + 
+			"						\"higherSchool\": 8,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 355,\r\n" + 
+			"						\"institutions\": 16,\r\n" + 
+			"						\"individual\": 285\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 669,\r\n" + 
+			"						\"higherSchool\": 8,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 371,\r\n" + 
+			"						\"institutions\": 12,\r\n" + 
+			"						\"individual\": 278\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1333\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"红河哈尼族彝族自治州\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 4154,\r\n" + 
+			"						\"higherSchool\": 328,\r\n" + 
+			"						\"researchInstitute\": 129,\r\n" + 
+			"						\"enterprise\": 2483,\r\n" + 
+			"						\"institutions\": 440,\r\n" + 
+			"						\"individual\": 774\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 4971,\r\n" + 
+			"						\"higherSchool\": 205,\r\n" + 
+			"						\"researchInstitute\": 162,\r\n" + 
+			"						\"enterprise\": 3190,\r\n" + 
+			"						\"institutions\": 601,\r\n" + 
+			"						\"individual\": 813\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 9125\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 475,\r\n" + 
+			"						\"higherSchool\": 35,\r\n" + 
+			"						\"researchInstitute\": 48,\r\n" + 
+			"						\"enterprise\": 322,\r\n" + 
+			"						\"institutions\": 28,\r\n" + 
+			"						\"individual\": 42\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 523,\r\n" + 
+			"						\"higherSchool\": 44,\r\n" + 
+			"						\"researchInstitute\": 45,\r\n" + 
+			"						\"enterprise\": 358,\r\n" + 
+			"						\"institutions\": 35,\r\n" + 
+			"						\"individual\": 41\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 998\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 3125,\r\n" + 
+			"						\"higherSchool\": 206,\r\n" + 
+			"						\"researchInstitute\": 70,\r\n" + 
+			"						\"enterprise\": 1962,\r\n" + 
+			"						\"institutions\": 392,\r\n" + 
+			"						\"individual\": 495\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 3911,\r\n" + 
+			"						\"higherSchool\": 118,\r\n" + 
+			"						\"researchInstitute\": 106,\r\n" + 
+			"						\"enterprise\": 2637,\r\n" + 
+			"						\"institutions\": 536,\r\n" + 
+			"						\"individual\": 514\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 7036\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 554,\r\n" + 
+			"						\"higherSchool\": 87,\r\n" + 
+			"						\"researchInstitute\": 11,\r\n" + 
+			"						\"enterprise\": 199,\r\n" + 
+			"						\"institutions\": 20,\r\n" + 
+			"						\"individual\": 237\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 537,\r\n" + 
+			"						\"higherSchool\": 43,\r\n" + 
+			"						\"researchInstitute\": 11,\r\n" + 
+			"						\"enterprise\": 195,\r\n" + 
+			"						\"institutions\": 30,\r\n" + 
+			"						\"individual\": 258\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1091\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"昭通市\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 2247,\r\n" + 
+			"						\"higherSchool\": 46,\r\n" + 
+			"						\"researchInstitute\": 33,\r\n" + 
+			"						\"enterprise\": 850,\r\n" + 
+			"						\"institutions\": 209,\r\n" + 
+			"						\"individual\": 1109\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 2814,\r\n" + 
+			"						\"higherSchool\": 46,\r\n" + 
+			"						\"researchInstitute\": 49,\r\n" + 
+			"						\"enterprise\": 1175,\r\n" + 
+			"						\"institutions\": 232,\r\n" + 
+			"						\"individual\": 1312\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 5061\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 147,\r\n" + 
+			"						\"higherSchool\": 8,\r\n" + 
+			"						\"researchInstitute\": 5,\r\n" + 
+			"						\"enterprise\": 86,\r\n" + 
+			"						\"institutions\": 17,\r\n" + 
+			"						\"individual\": 31\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 195,\r\n" + 
+			"						\"higherSchool\": 8,\r\n" + 
+			"						\"researchInstitute\": 9,\r\n" + 
+			"						\"enterprise\": 135,\r\n" + 
+			"						\"institutions\": 15,\r\n" + 
+			"						\"individual\": 28\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 342\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1328,\r\n" + 
+			"						\"higherSchool\": 36,\r\n" + 
+			"						\"researchInstitute\": 25,\r\n" + 
+			"						\"enterprise\": 688,\r\n" + 
+			"						\"institutions\": 188,\r\n" + 
+			"						\"individual\": 391\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1639,\r\n" + 
+			"						\"higherSchool\": 37,\r\n" + 
+			"						\"researchInstitute\": 37,\r\n" + 
+			"						\"enterprise\": 955,\r\n" + 
+			"						\"institutions\": 211,\r\n" + 
+			"						\"individual\": 399\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 2967\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 772,\r\n" + 
+			"						\"higherSchool\": 2,\r\n" + 
+			"						\"researchInstitute\": 3,\r\n" + 
+			"						\"enterprise\": 76,\r\n" + 
+			"						\"institutions\": 4,\r\n" + 
+			"						\"individual\": 687\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 980,\r\n" + 
+			"						\"higherSchool\": 1,\r\n" + 
+			"						\"researchInstitute\": 3,\r\n" + 
+			"						\"enterprise\": 85,\r\n" + 
+			"						\"institutions\": 6,\r\n" + 
+			"						\"individual\": 885\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1752\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"保山市\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 2048,\r\n" + 
+			"						\"higherSchool\": 140,\r\n" + 
+			"						\"researchInstitute\": 51,\r\n" + 
+			"						\"enterprise\": 1359,\r\n" + 
+			"						\"institutions\": 187,\r\n" + 
+			"						\"individual\": 311\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 2419,\r\n" + 
+			"						\"higherSchool\": 122,\r\n" + 
+			"						\"researchInstitute\": 66,\r\n" + 
+			"						\"enterprise\": 1705,\r\n" + 
+			"						\"institutions\": 220,\r\n" + 
+			"						\"individual\": 306\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 4467\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 178,\r\n" + 
+			"						\"higherSchool\": 5,\r\n" + 
+			"						\"researchInstitute\": 3,\r\n" + 
+			"						\"enterprise\": 127,\r\n" + 
+			"						\"institutions\": 24,\r\n" + 
+			"						\"individual\": 19\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 188,\r\n" + 
+			"						\"higherSchool\": 6,\r\n" + 
+			"						\"researchInstitute\": 5,\r\n" + 
+			"						\"enterprise\": 131,\r\n" + 
+			"						\"institutions\": 29,\r\n" + 
+			"						\"individual\": 17\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 366\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1601,\r\n" + 
+			"						\"higherSchool\": 93,\r\n" + 
+			"						\"researchInstitute\": 48,\r\n" + 
+			"						\"enterprise\": 1122,\r\n" + 
+			"						\"institutions\": 145,\r\n" + 
+			"						\"individual\": 193\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1953,\r\n" + 
+			"						\"higherSchool\": 82,\r\n" + 
+			"						\"researchInstitute\": 61,\r\n" + 
+			"						\"enterprise\": 1456,\r\n" + 
+			"						\"institutions\": 170,\r\n" + 
+			"						\"individual\": 184\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 3554\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 269,\r\n" + 
+			"						\"higherSchool\": 42,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 110,\r\n" + 
+			"						\"institutions\": 18,\r\n" + 
+			"						\"individual\": 99\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 278,\r\n" + 
+			"						\"higherSchool\": 34,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 118,\r\n" + 
+			"						\"institutions\": 21,\r\n" + 
+			"						\"individual\": 105\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 547\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"文山壮族苗族自治州\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1863,\r\n" + 
+			"						\"higherSchool\": 30,\r\n" + 
+			"						\"researchInstitute\": 18,\r\n" + 
+			"						\"enterprise\": 1414,\r\n" + 
+			"						\"institutions\": 129,\r\n" + 
+			"						\"individual\": 272\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 2374,\r\n" + 
+			"						\"higherSchool\": 25,\r\n" + 
+			"						\"researchInstitute\": 16,\r\n" + 
+			"						\"enterprise\": 1838,\r\n" + 
+			"						\"institutions\": 187,\r\n" + 
+			"						\"individual\": 308\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 4237\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 174,\r\n" + 
+			"						\"higherSchool\": 3,\r\n" + 
+			"						\"researchInstitute\": 10,\r\n" + 
+			"						\"enterprise\": 137,\r\n" + 
+			"						\"institutions\": 7,\r\n" + 
+			"						\"individual\": 17\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 180,\r\n" + 
+			"						\"higherSchool\": 5,\r\n" + 
+			"						\"researchInstitute\": 7,\r\n" + 
+			"						\"enterprise\": 144,\r\n" + 
+			"						\"institutions\": 9,\r\n" + 
+			"						\"individual\": 15\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 354\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1463,\r\n" + 
+			"						\"higherSchool\": 27,\r\n" + 
+			"						\"researchInstitute\": 8,\r\n" + 
+			"						\"enterprise\": 1128,\r\n" + 
+			"						\"institutions\": 120,\r\n" + 
+			"						\"individual\": 180\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1926,\r\n" + 
+			"						\"higherSchool\": 20,\r\n" + 
+			"						\"researchInstitute\": 9,\r\n" + 
+			"						\"enterprise\": 1542,\r\n" + 
+			"						\"institutions\": 173,\r\n" + 
+			"						\"individual\": 182\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 3389\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 226,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 149,\r\n" + 
+			"						\"institutions\": 2,\r\n" + 
+			"						\"individual\": 75\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 268,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 152,\r\n" + 
+			"						\"institutions\": 5,\r\n" + 
+			"						\"individual\": 111\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 494\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"西双版纳傣族自治州\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1797,\r\n" + 
+			"						\"higherSchool\": 6,\r\n" + 
+			"						\"researchInstitute\": 217,\r\n" + 
+			"						\"enterprise\": 1313,\r\n" + 
+			"						\"institutions\": 124,\r\n" + 
+			"						\"individual\": 137\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 2128,\r\n" + 
+			"						\"higherSchool\": 8,\r\n" + 
+			"						\"researchInstitute\": 256,\r\n" + 
+			"						\"enterprise\": 1552,\r\n" + 
+			"						\"institutions\": 154,\r\n" + 
+			"						\"individual\": 158\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 3925\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 263,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 99,\r\n" + 
+			"						\"enterprise\": 132,\r\n" + 
+			"						\"institutions\": 13,\r\n" + 
+			"						\"individual\": 19\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 296,\r\n" + 
+			"						\"higherSchool\": 1,\r\n" + 
+			"						\"researchInstitute\": 127,\r\n" + 
+			"						\"enterprise\": 137,\r\n" + 
+			"						\"institutions\": 14,\r\n" + 
+			"						\"individual\": 17\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 559\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1220,\r\n" + 
+			"						\"higherSchool\": 6,\r\n" + 
+			"						\"researchInstitute\": 110,\r\n" + 
+			"						\"enterprise\": 914,\r\n" + 
+			"						\"institutions\": 103,\r\n" + 
+			"						\"individual\": 87\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1457,\r\n" + 
+			"						\"higherSchool\": 7,\r\n" + 
+			"						\"researchInstitute\": 120,\r\n" + 
+			"						\"enterprise\": 1098,\r\n" + 
+			"						\"institutions\": 129,\r\n" + 
+			"						\"individual\": 103\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 2677\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 314,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 8,\r\n" + 
+			"						\"enterprise\": 267,\r\n" + 
+			"						\"institutions\": 8,\r\n" + 
+			"						\"individual\": 31\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 375,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 9,\r\n" + 
+			"						\"enterprise\": 317,\r\n" + 
+			"						\"institutions\": 11,\r\n" + 
+			"						\"individual\": 38\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 689\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"普洱市\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1759,\r\n" + 
+			"						\"higherSchool\": 91,\r\n" + 
+			"						\"researchInstitute\": 22,\r\n" + 
+			"						\"enterprise\": 1179,\r\n" + 
+			"						\"institutions\": 191,\r\n" + 
+			"						\"individual\": 276\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 2108,\r\n" + 
+			"						\"higherSchool\": 98,\r\n" + 
+			"						\"researchInstitute\": 22,\r\n" + 
+			"						\"enterprise\": 1476,\r\n" + 
+			"						\"institutions\": 223,\r\n" + 
+			"						\"individual\": 289\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 3867\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 197,\r\n" + 
+			"						\"higherSchool\": 5,\r\n" + 
+			"						\"researchInstitute\": 10,\r\n" + 
+			"						\"enterprise\": 146,\r\n" + 
+			"						\"institutions\": 18,\r\n" + 
+			"						\"individual\": 18\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 197,\r\n" + 
+			"						\"higherSchool\": 9,\r\n" + 
+			"						\"researchInstitute\": 10,\r\n" + 
+			"						\"enterprise\": 143,\r\n" + 
+			"						\"institutions\": 21,\r\n" + 
+			"						\"individual\": 14\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 394\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1281,\r\n" + 
+			"						\"higherSchool\": 65,\r\n" + 
+			"						\"researchInstitute\": 12,\r\n" + 
+			"						\"enterprise\": 876,\r\n" + 
+			"						\"institutions\": 166,\r\n" + 
+			"						\"individual\": 162\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1620,\r\n" + 
+			"						\"higherSchool\": 65,\r\n" + 
+			"						\"researchInstitute\": 12,\r\n" + 
+			"						\"enterprise\": 1165,\r\n" + 
+			"						\"institutions\": 198,\r\n" + 
+			"						\"individual\": 180\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 2901\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 281,\r\n" + 
+			"						\"higherSchool\": 21,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 157,\r\n" + 
+			"						\"institutions\": 7,\r\n" + 
+			"						\"individual\": 96\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 291,\r\n" + 
+			"						\"higherSchool\": 24,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 168,\r\n" + 
+			"						\"institutions\": 4,\r\n" + 
+			"						\"individual\": 95\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 572\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"临沧市\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1382,\r\n" + 
+			"						\"higherSchool\": 63,\r\n" + 
+			"						\"researchInstitute\": 4,\r\n" + 
+			"						\"enterprise\": 930,\r\n" + 
+			"						\"institutions\": 138,\r\n" + 
+			"						\"individual\": 247\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1868,\r\n" + 
+			"						\"higherSchool\": 46,\r\n" + 
+			"						\"researchInstitute\": 5,\r\n" + 
+			"						\"enterprise\": 1369,\r\n" + 
+			"						\"institutions\": 193,\r\n" + 
+			"						\"individual\": 255\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 3250\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 100,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 66,\r\n" + 
+			"						\"institutions\": 23,\r\n" + 
+			"						\"individual\": 11\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 129,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 70,\r\n" + 
+			"						\"institutions\": 50,\r\n" + 
+			"						\"individual\": 9\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 229\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 986,\r\n" + 
+			"						\"higherSchool\": 61,\r\n" + 
+			"						\"researchInstitute\": 4,\r\n" + 
+			"						\"enterprise\": 673,\r\n" + 
+			"						\"institutions\": 114,\r\n" + 
+			"						\"individual\": 134\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1424,\r\n" + 
+			"						\"higherSchool\": 45,\r\n" + 
+			"						\"researchInstitute\": 5,\r\n" + 
+			"						\"enterprise\": 1096,\r\n" + 
+			"						\"institutions\": 142,\r\n" + 
+			"						\"individual\": 136\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 2410\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 296,\r\n" + 
+			"						\"higherSchool\": 2,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 191,\r\n" + 
+			"						\"institutions\": 1,\r\n" + 
+			"						\"individual\": 102\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 315,\r\n" + 
+			"						\"higherSchool\": 1,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 203,\r\n" + 
+			"						\"institutions\": 1,\r\n" + 
+			"						\"individual\": 110\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 611\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"丽江市\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 1406,\r\n" + 
+			"						\"higherSchool\": 54,\r\n" + 
+			"						\"researchInstitute\": 27,\r\n" + 
+			"						\"enterprise\": 1072,\r\n" + 
+			"						\"institutions\": 103,\r\n" + 
+			"						\"individual\": 150\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1745,\r\n" + 
+			"						\"higherSchool\": 74,\r\n" + 
+			"						\"researchInstitute\": 30,\r\n" + 
+			"						\"enterprise\": 1310,\r\n" + 
+			"						\"institutions\": 158,\r\n" + 
+			"						\"individual\": 173\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 3151\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 158,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 18,\r\n" + 
+			"						\"enterprise\": 117,\r\n" + 
+			"						\"institutions\": 13,\r\n" + 
+			"						\"individual\": 10\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 168,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 20,\r\n" + 
+			"						\"enterprise\": 124,\r\n" + 
+			"						\"institutions\": 15,\r\n" + 
+			"						\"individual\": 9\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 326\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 993,\r\n" + 
+			"						\"higherSchool\": 39,\r\n" + 
+			"						\"researchInstitute\": 9,\r\n" + 
+			"						\"enterprise\": 770,\r\n" + 
+			"						\"institutions\": 90,\r\n" + 
+			"						\"individual\": 85\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1297,\r\n" + 
+			"						\"higherSchool\": 44,\r\n" + 
+			"						\"researchInstitute\": 10,\r\n" + 
+			"						\"enterprise\": 995,\r\n" + 
+			"						\"institutions\": 142,\r\n" + 
+			"						\"individual\": 106\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 2290\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 255,\r\n" + 
+			"						\"higherSchool\": 15,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 185,\r\n" + 
+			"						\"institutions\": 0,\r\n" + 
+			"						\"individual\": 55\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 280,\r\n" + 
+			"						\"higherSchool\": 30,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 191,\r\n" + 
+			"						\"institutions\": 1,\r\n" + 
+			"						\"individual\": 58\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 535\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"德宏傣族景颇族自治州\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 988,\r\n" + 
+			"						\"higherSchool\": 97,\r\n" + 
+			"						\"researchInstitute\": 35,\r\n" + 
+			"						\"enterprise\": 486,\r\n" + 
+			"						\"institutions\": 171,\r\n" + 
+			"						\"individual\": 199\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 1130,\r\n" + 
+			"						\"higherSchool\": 77,\r\n" + 
+			"						\"researchInstitute\": 29,\r\n" + 
+			"						\"enterprise\": 609,\r\n" + 
+			"						\"institutions\": 220,\r\n" + 
+			"						\"individual\": 195\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 2118\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 82,\r\n" + 
+			"						\"higherSchool\": 2,\r\n" + 
+			"						\"researchInstitute\": 18,\r\n" + 
+			"						\"enterprise\": 37,\r\n" + 
+			"						\"institutions\": 12,\r\n" + 
+			"						\"individual\": 13\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 86,\r\n" + 
+			"						\"higherSchool\": 6,\r\n" + 
+			"						\"researchInstitute\": 14,\r\n" + 
+			"						\"enterprise\": 39,\r\n" + 
+			"						\"institutions\": 16,\r\n" + 
+			"						\"individual\": 11\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 168\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 640,\r\n" + 
+			"						\"higherSchool\": 82,\r\n" + 
+			"						\"researchInstitute\": 13,\r\n" + 
+			"						\"enterprise\": 287,\r\n" + 
+			"						\"institutions\": 154,\r\n" + 
+			"						\"individual\": 104\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 760,\r\n" + 
+			"						\"higherSchool\": 59,\r\n" + 
+			"						\"researchInstitute\": 11,\r\n" + 
+			"						\"enterprise\": 394,\r\n" + 
+			"						\"institutions\": 199,\r\n" + 
+			"						\"individual\": 97\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1400\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 266,\r\n" + 
+			"						\"higherSchool\": 13,\r\n" + 
+			"						\"researchInstitute\": 4,\r\n" + 
+			"						\"enterprise\": 162,\r\n" + 
+			"						\"institutions\": 5,\r\n" + 
+			"						\"individual\": 82\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 284,\r\n" + 
+			"						\"higherSchool\": 12,\r\n" + 
+			"						\"researchInstitute\": 4,\r\n" + 
+			"						\"enterprise\": 176,\r\n" + 
+			"						\"institutions\": 5,\r\n" + 
+			"						\"individual\": 87\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 550\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"迪庆藏族自治州\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 714,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 2,\r\n" + 
+			"						\"enterprise\": 579,\r\n" + 
+			"						\"institutions\": 70,\r\n" + 
+			"						\"individual\": 63\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 871,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 2,\r\n" + 
+			"						\"enterprise\": 720,\r\n" + 
+			"						\"institutions\": 83,\r\n" + 
+			"						\"individual\": 66\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1585\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 39,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 1,\r\n" + 
+			"						\"enterprise\": 28,\r\n" + 
+			"						\"institutions\": 6,\r\n" + 
+			"						\"individual\": 4\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 53,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 1,\r\n" + 
+			"						\"enterprise\": 38,\r\n" + 
+			"						\"institutions\": 9,\r\n" + 
+			"						\"individual\": 5\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 92\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 621,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 1,\r\n" + 
+			"						\"enterprise\": 503,\r\n" + 
+			"						\"institutions\": 63,\r\n" + 
+			"						\"individual\": 54\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 753,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 1,\r\n" + 
+			"						\"enterprise\": 624,\r\n" + 
+			"						\"institutions\": 73,\r\n" + 
+			"						\"individual\": 55\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 1374\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 54,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 48,\r\n" + 
+			"						\"institutions\": 1,\r\n" + 
+			"						\"individual\": 5\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 65,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 58,\r\n" + 
+			"						\"institutions\": 1,\r\n" + 
+			"						\"individual\": 6\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 119\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": \"怒江傈僳族自治州\",\r\n" + 
+			"				\"patentType\": \"总计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 347,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 232,\r\n" + 
+			"						\"institutions\": 69,\r\n" + 
+			"						\"individual\": 46\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 483,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 357,\r\n" + 
+			"						\"institutions\": 85,\r\n" + 
+			"						\"individual\": 41\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 830\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"发明\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 22,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 8,\r\n" + 
+			"						\"institutions\": 6,\r\n" + 
+			"						\"individual\": 8\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 21,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 10,\r\n" + 
+			"						\"institutions\": 8,\r\n" + 
+			"						\"individual\": 3\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 43\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"实用新型\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 296,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 203,\r\n" + 
+			"						\"institutions\": 59,\r\n" + 
+			"						\"individual\": 34\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 426,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 321,\r\n" + 
+			"						\"institutions\": 76,\r\n" + 
+			"						\"individual\": 29\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 722\r\n" + 
+			"			},\r\n" + 
+			"			{\r\n" + 
+			"				\"areaName\": null,\r\n" + 
+			"				\"patentType\": \"外观设计\",\r\n" + 
+			"				\"yearData\": {\r\n" + 
+			"					\"2021\": {\r\n" + 
+			"						\"year\": \"2021\",\r\n" + 
+			"						\"totalCnt\": 29,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 21,\r\n" + 
+			"						\"institutions\": 4,\r\n" + 
+			"						\"individual\": 4\r\n" + 
+			"					},\r\n" + 
+			"					\"2022\": {\r\n" + 
+			"						\"year\": \"2022\",\r\n" + 
+			"						\"totalCnt\": 36,\r\n" + 
+			"						\"higherSchool\": 0,\r\n" + 
+			"						\"researchInstitute\": 0,\r\n" + 
+			"						\"enterprise\": 26,\r\n" + 
+			"						\"institutions\": 1,\r\n" + 
+			"						\"individual\": 9\r\n" + 
+			"					}\r\n" + 
+			"				},\r\n" + 
+			"				\"total\": 65\r\n" + 
+			"			}\r\n" + 
+			"		]\r\n" + 
+			"	}\r\n" + 
+			"}";
+	
+
+	
+
+}

+ 36 - 0
yunnan-report-admin/src/test/java/com/ruoyi/ExcelExpMain.java

@@ -0,0 +1,36 @@
+package com.ruoyi;
+
+import java.util.List;
+import java.util.Map;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.report.vo.ViewStatisticsInfoRep;
+
+public class ExcelExpMain {
+
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+		String json=ExcelExp.json;
+		
+		Map obj = (Map)JSON.parse(json);
+		Map data=(Map)obj.get("data");
+		List yearList=(List)data.get("yearList");
+		
+		List dataList=(List)data.get("dataList");
+		for(Object d:dataList) {
+			
+			JSONObject jo=(JSONObject)d;
+			jo.getString("");
+			
+		}
+		
+		ViewStatisticsInfoRep rep=new ViewStatisticsInfoRep();
+		
+		
+		System.out.println("ok");
+		
+
+	}
+
+}

+ 47 - 0
yunnan-report-base/.gitignore

@@ -0,0 +1,47 @@
+######################################################################
+# Build Tools
+yunnan-report-ui_bak/
+.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
+
+### JRebel ###
+rebel.xml
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

+ 39 - 0
yunnan-report-base/pom.xml

@@ -0,0 +1,39 @@
+<?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>yunnan-report</artifactId>
+        <groupId>com.ruoyi</groupId>
+        <version>3.8.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>yunnan-report-base</artifactId>
+
+    <dependencies>
+
+        <!--ureport2 依赖
+        <dependency>
+            <groupId>com.bstek.ureport</groupId>
+            <artifactId>ureport2-console</artifactId>
+            <version>2.2.9</version>
+        </dependency>
+        -->
+
+        <!-- 通用工具-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>yunnan-report-common</artifactId>
+        </dependency>
+
+        <!-- 积木报表 
+        <dependency>
+            <groupId>org.jeecgframework.jimureport</groupId>
+            <artifactId>jimureport-spring-boot-starter</artifactId>
+            <version>1.5.2</version>
+        </dependency>
+        -->
+
+    </dependencies>
+</project>

+ 26 - 0
yunnan-report-base/src/main/java/com/ruoyi/base/DTO/BaseTempExportDTO.java

@@ -0,0 +1,26 @@
+package com.ruoyi.base.DTO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+import java.util.List;
+
+@Data
+@ApiModel(value = "模板导出通用参数")
+public class BaseTempExportDTO {
+
+    @NotBlank(message = "模板代码不能为空")
+    @ApiModelProperty(value = "模板代码")
+    private String code;
+    @ApiModelProperty(value = "单号")
+    private String orderNo;
+    @ApiModelProperty(value = "开始时间")
+    private Date beginTime;
+    @ApiModelProperty(value = "结束时间")
+    private Date endTime;
+    @ApiModelProperty(value = "数组参数")
+    private List<String> extraParams;
+}

+ 144 - 0
yunnan-report-base/src/main/java/com/ruoyi/base/domain/BaseExportTemp.java

@@ -0,0 +1,144 @@
+package com.ruoyi.base.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import lombok.Data;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * ureport2模板管理对象 base_export_temp
+ * 
+ * @author ruoyi
+ * @date 2022-01-21
+ */
+@Data
+@ApiModel(value = "ureport2模板管理对象")
+public class BaseExportTemp extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    /** 模板名称 */
+    @Excel(name = "模板名称")
+    @ApiModelProperty(value = "模板名称")
+    private String name;
+
+    /** 模板编号(该编号取自字典表) */
+    @Excel(name = "模板编号(该编号取自字典表)")
+    @ApiModelProperty(value = "模板编号(该编号取自字典表)")
+    private String code;
+
+    /** 模板文件名称 */
+    @Excel(name = "模板文件名称")
+    @ApiModelProperty(value = "模板文件名称")
+    private String tempFileName;
+
+    /** 访问前缀 */
+    @Excel(name = "访问前缀")
+    @ApiModelProperty(value = "访问前缀")
+    private String prefix;
+
+    /** 存储目录 */
+    @Excel(name = "存储目录")
+    @ApiModelProperty(value = "存储目录")
+    private String fileStoreDir;
+
+    /** 完整路径 */
+    @Excel(name = "完整路径")
+    @ApiModelProperty(value = "完整路径")
+    private String fullPath;
+
+    /** 模板内容 */
+    @Excel(name = "模板内容")
+    @ApiModelProperty(value = "模板内容")
+    private String content;
+
+    /** 创建人主键 */
+    @Excel(name = "创建人主键")
+    @ApiModelProperty(value = "创建人主键")
+    private Long createUserId;
+
+    /** 创建人姓名 */
+    @Excel(name = "创建人姓名")
+    @ApiModelProperty(value = "创建人姓名")
+    private String createUserName;
+
+    /** 更新人主键 */
+    @Excel(name = "更新人主键")
+    @ApiModelProperty(value = "更新人主键")
+    private Long updateUserId;
+
+    /** 更新人姓名 */
+    @Excel(name = "更新人姓名")
+    @ApiModelProperty(value = "更新人姓名")
+    private String updateUserName;
+
+    /** 启用禁用状态(字典通用是否) */
+    @Excel(name = "启用禁用状态(字典通用是否)")
+    @ApiModelProperty(value = "启用禁用状态(字典通用是否)")
+    private String enableFlag;
+
+    /** 删除状态(通用是否) */
+    @Excel(name = "删除状态(通用是否)")
+    @ApiModelProperty(value = "删除状态(通用是否)")
+    private String deleteFlag;
+
+    /** 备用字段1 */
+    @Excel(name = "备用字段1")
+    @ApiModelProperty(value = "备用字段1")
+    private String spareParam1;
+
+    /** 备用字段2 */
+    @Excel(name = "备用字段2")
+    @ApiModelProperty(value = "备用字段2")
+    private String spareParam2;
+
+    /** 备用字段3 */
+    @Excel(name = "备用字段3")
+    @ApiModelProperty(value = "备用字段3")
+    private String spareParam3;
+
+    /** 备用字段4 */
+    @Excel(name = "备用字段4")
+    @ApiModelProperty(value = "备用字段4")
+    private String spareParam4;
+
+    /** 备用字段5 */
+    @Excel(name = "备用字段5")
+    @ApiModelProperty(value = "备用字段5")
+    private String spareParam5;
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("code", getCode())
+            .append("tempFileName", getTempFileName())
+            .append("prefix", getPrefix())
+            .append("fileStoreDir", getFileStoreDir())
+            .append("fullPath", getFullPath())
+            .append("content", getContent())
+            .append("createUserId", getCreateUserId())
+            .append("createUserName", getCreateUserName())
+            .append("createTime", getCreateTime())
+            .append("updateUserId", getUpdateUserId())
+            .append("updateUserName", getUpdateUserName())
+            .append("updateTime", getUpdateTime())
+            .append("enableFlag", getEnableFlag())
+            .append("deleteFlag", getDeleteFlag())
+            .append("remark", getRemark())
+            .append("spareParam1", getSpareParam1())
+            .append("spareParam2", getSpareParam2())
+            .append("spareParam3", getSpareParam3())
+            .append("spareParam4", getSpareParam4())
+            .append("spareParam5", getSpareParam5())
+            .toString();
+    }
+}

+ 91 - 0
yunnan-report-base/src/main/java/com/ruoyi/base/mapper/BaseExportTempMapper.java

@@ -0,0 +1,91 @@
+package com.ruoyi.base.mapper;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+import com.ruoyi.base.domain.BaseExportTemp;
+
+/**
+ * ureport2模板管理Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-01-21
+ */
+public interface BaseExportTempMapper 
+{
+    /**
+     * 查询ureport2模板管理
+     * 
+     * @param id ureport2模板管理主键
+     * @return ureport2模板管理
+     */
+    public BaseExportTemp selectBaseExportTempById(Long id);
+
+    /**
+     * 查询ureport2模板管理列表
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return ureport2模板管理集合
+     */
+    public List<BaseExportTemp> selectBaseExportTempList(BaseExportTemp baseExportTemp);
+
+    /**
+     * 新增ureport2模板管理
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return 结果
+     */
+    public int insertBaseExportTemp(BaseExportTemp baseExportTemp);
+
+    /**
+     * 修改ureport2模板管理
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return 结果
+     */
+    public int updateBaseExportTemp(BaseExportTemp baseExportTemp);
+
+    /**
+     * 删除ureport2模板管理
+     * 
+     * @param id ureport2模板管理主键
+     * @return 结果
+     */
+    public int deleteBaseExportTempById(Long id);
+
+    /**
+     * 批量删除ureport2模板管理
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBaseExportTempByIds(Long[] ids);
+    /**
+     * 删除ureport2模板管理
+     *
+     * @param id ureport2模板管理ID
+     * @return 结果
+     */
+    public int setDeleteById(@Param("id")Long id,@Param("operId")Long operId,@Param("operName")String operName);
+
+    /**
+     * 批量删除ureport2模板管理---逻辑删除
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int setDeleteByIds(@Param("ids")Long[] ids,@Param("operId")Long operId,@Param("operName")String operName);
+
+    /**
+     * 根据code查询参数
+     * @param code
+     * @return
+     */
+    public BaseExportTemp selectParamByCode(@Param("code") String code);
+
+    /**
+     * 根据模板的存放路径查询唯一的模板信息
+     * @param fullPath
+     * @return
+     */
+    public BaseExportTemp selectSignleByFullPath(@Param("fullPath") String fullPath);
+}

+ 91 - 0
yunnan-report-base/src/main/java/com/ruoyi/base/service/IBaseExportTempService.java

@@ -0,0 +1,91 @@
+package com.ruoyi.base.service;
+
+import java.util.List;
+import com.ruoyi.base.domain.BaseExportTemp;
+
+/**
+ * ureport2模板管理Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-01-21
+ */
+public interface IBaseExportTempService 
+{
+    /**
+     * 查询ureport2模板管理
+     * 
+     * @param id ureport2模板管理主键
+     * @return ureport2模板管理
+     */
+    public BaseExportTemp selectBaseExportTempById(Long id);
+
+    /**
+     * 查询ureport2模板管理列表
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return ureport2模板管理集合
+     */
+    public List<BaseExportTemp> selectBaseExportTempList(BaseExportTemp baseExportTemp);
+
+    /**
+     * 新增ureport2模板管理
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return 结果
+     */
+    public int insertBaseExportTemp(BaseExportTemp baseExportTemp);
+
+    /**
+     * 修改ureport2模板管理
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return 结果
+     */
+    public int updateBaseExportTemp(BaseExportTemp baseExportTemp);
+
+    /**
+     * 批量删除ureport2模板管理
+     * 
+     * @param ids 需要删除的ureport2模板管理主键集合
+     * @return 结果
+     */
+    public int deleteBaseExportTempByIds(Long[] ids);
+
+    /**
+     * 删除ureport2模板管理信息
+     * 
+     * @param id ureport2模板管理主键
+     * @return 结果
+     */
+    public int deleteBaseExportTempById(Long id);
+
+    /**
+     * 批量删除---逻辑删除
+     *
+     * @param ids 需要删除的ureport2模板管理ID
+     * @return 结果
+     */
+    public int setDeleteByIds(Long[] ids);
+
+    /**
+     * 删除---逻辑删除
+     *
+     * @param id ureport2模板管理ID
+     * @return 结果
+     */
+    public int setDeleteById(Long id);
+
+    /**
+     * 根据code查询参数
+     * @param code
+     * @return
+     */
+    public BaseExportTemp selectParamByCode(String code);
+
+    /**
+     * 根据模板的存放路径查询唯一的模板信息
+     * @param fullPath
+     * @return
+     */
+    public BaseExportTemp selectSignleByFullPath(String fullPath);
+}

+ 154 - 0
yunnan-report-base/src/main/java/com/ruoyi/base/service/impl/BaseExportTempServiceImpl.java

@@ -0,0 +1,154 @@
+package com.ruoyi.base.service.impl;
+
+import com.ruoyi.base.domain.BaseExportTemp;
+import com.ruoyi.base.mapper.BaseExportTempMapper;
+import com.ruoyi.base.service.IBaseExportTempService;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.SnowFlakeUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * ureport2模板管理Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2022-01-21
+ */
+@Service
+@Transactional
+public class BaseExportTempServiceImpl implements IBaseExportTempService 
+{
+    @Autowired
+    private BaseExportTempMapper baseExportTempMapper;
+
+    /**
+     * 查询ureport2模板管理
+     * 
+     * @param id ureport2模板管理主键
+     * @return ureport2模板管理
+     */
+    @Override
+    public BaseExportTemp selectBaseExportTempById(Long id)
+    {
+        return baseExportTempMapper.selectBaseExportTempById(id);
+    }
+
+    /**
+     * 查询ureport2模板管理列表
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return ureport2模板管理
+     */
+    @Override
+    public List<BaseExportTemp> selectBaseExportTempList(BaseExportTemp baseExportTemp)
+    {
+        return baseExportTempMapper.selectBaseExportTempList(baseExportTemp);
+    }
+
+    /**
+     * 新增ureport2模板管理
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return 结果
+     */
+    @Override
+    public int insertBaseExportTemp(BaseExportTemp baseExportTemp)
+    {
+        if(baseExportTemp.getId()==null){
+        baseExportTemp.setId(SnowFlakeUtils.snowFlakeId());
+    }
+        baseExportTemp.setCreateUserId(SecurityUtils.getUserId());
+        baseExportTemp.setCreateUserName(SecurityUtils.getUserNickName());
+        baseExportTemp.setCreateTime(DateUtils.getNowDate());
+        return baseExportTempMapper.insertBaseExportTemp(baseExportTemp);
+    }
+
+    /**
+     * 修改ureport2模板管理
+     * 
+     * @param baseExportTemp ureport2模板管理
+     * @return 结果
+     */
+    @Override
+    public int updateBaseExportTemp(BaseExportTemp baseExportTemp)
+    {
+        baseExportTemp.setUpdateUserId(SecurityUtils.getUserId());
+        baseExportTemp.setUpdateUserName(SecurityUtils.getUserNickName());
+        baseExportTemp.setUpdateTime(DateUtils.getNowDate());
+        return baseExportTempMapper.updateBaseExportTemp(baseExportTemp);
+    }
+
+    /**
+     * 批量删除ureport2模板管理
+     * 
+     * @param ids 需要删除的ureport2模板管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBaseExportTempByIds(Long[] ids)
+    {
+        return baseExportTempMapper.deleteBaseExportTempByIds(ids);
+    }
+
+    /**
+     * 删除ureport2模板管理信息
+     * 
+     * @param id ureport2模板管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBaseExportTempById(Long id)
+    {
+        return baseExportTempMapper.deleteBaseExportTempById(id);
+    }
+
+    /**
+     * 批量---逻辑删除
+     *
+     * @param ids 需要删除的ureport2模板管理ID
+     * @return 结果
+     */
+    @Override
+    public int setDeleteByIds(Long[] ids)
+    {
+        Long userId = SecurityUtils.getUserId();
+        String userNickName = SecurityUtils.getUserNickName();
+        return baseExportTempMapper.setDeleteByIds(ids,userId,userNickName);
+    }
+
+    /**
+     * 删除---逻辑删除
+     *
+     * @param id ureport2模板管理ID
+     * @return 结果
+     */
+    @Override
+    public int setDeleteById(Long id)
+    {
+        Long userId = SecurityUtils.getUserId();
+        String userNickName = SecurityUtils.getUserNickName();
+        return baseExportTempMapper.setDeleteById(id,userId,userNickName);
+    }
+
+    /**
+     * 根据code查询参数
+     * @param code
+     * @return
+     */
+    public BaseExportTemp selectParamByCode(String code){
+        return baseExportTempMapper.selectParamByCode(code);
+    }
+
+    /**
+     * 根据模板的存放路径查询唯一的模板信息
+     * @param fullPath
+     * @return
+     */
+    public BaseExportTemp selectSignleByFullPath(String fullPath){
+        return baseExportTempMapper.selectSignleByFullPath(fullPath);
+    }
+}

+ 31 - 0
yunnan-report-base/src/main/java/com/ruoyi/jimureport/JimuReportConfig.java.txt

@@ -0,0 +1,31 @@
+package com.ruoyi.jimureport;
+
+import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 积木报表
+ *
+ * 该配置可删除,1.5.2版本不支持多租户,token校验不足以支撑多租户,需用另外的模式实现租户报表隔离(可参考系统内的ureport)
+ */
+//@Component
+public class JimuReportConfig implements JmReportTokenServiceI {
+    @Override
+    public String getUsername(String s) {
+        return "admin";
+    }
+
+    @Override
+    public Map<String, Object> getUserInfo(String token) {
+        Map<String, Object> map = new HashMap<>();
+        return map;
+    }
+
+    @Override
+    public Boolean verifyToken(String s) {
+        return true;
+    }
+}

+ 125 - 0
yunnan-report-base/src/main/java/com/ruoyi/ureport/FileReportProvider.java

@@ -0,0 +1,125 @@
+package com.ruoyi.ureport;
+
+import com.bstek.ureport.exception.ReportException;
+import com.bstek.ureport.provider.report.ReportFile;
+import com.bstek.ureport.provider.report.ReportProvider;
+import com.ruoyi.common.utils.ServletUtils;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+import javax.servlet.http.HttpServletRequest;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.*;
+
+@Component
+@PropertySource(value = { "classpath:ureport.properties" })
+public abstract class FileReportProvider implements ReportProvider {
+
+    private String prefix="file:";
+    private boolean disabled;
+
+    @Getter
+    @Setter
+    @Value("${ureport.fileStoreDir}")
+    private String fileStoreDir;
+
+    @PostConstruct
+    public void init(){
+        File file = new File(fileStoreDir);
+        if(!file.exists()){
+            file.mkdirs();
+        }
+    }
+
+    @Override
+    public InputStream loadReport(String file) {
+        HttpServletRequest request = ServletUtils.getRequest();
+        if(file.startsWith(prefix)){
+            file=file.substring(prefix.length(),file.length());
+        }
+        String fullPath=fileStoreDir+"/"+file;
+        try {
+            return new FileInputStream(fullPath);
+        } catch (FileNotFoundException e) {
+            throw new ReportException(e);
+        }
+    }
+
+    public abstract void deleteReport(String file);
+//    @Override
+//    public void deleteReport(String file) {
+//        if(file.startsWith(prefix)){
+//            file=file.substring(prefix.length(),file.length());
+//        }
+//        String fullPath=fileStoreDir+"/"+file;
+//        File f=new File(fullPath);
+//        if(f.exists()){
+//            f.delete();
+//        }
+//    }
+
+    @Override
+    public List<ReportFile> getReportFiles() {
+        File file=new File(fileStoreDir);
+        List<ReportFile> list=new ArrayList<ReportFile>();
+        for(File f:file.listFiles()){
+            Calendar calendar=Calendar.getInstance();
+            calendar.setTimeInMillis(f.lastModified());
+            list.add(new ReportFile(f.getName(),calendar.getTime()));
+        }
+        Collections.sort(list, new Comparator<ReportFile>(){
+            @Override
+            public int compare(ReportFile f1, ReportFile f2) {
+                return f2.getUpdateDate().compareTo(f1.getUpdateDate());
+            }
+        });
+        return list;
+    }
+
+    public abstract void saveReport(String file, String content);
+
+//    @Override
+//    public void saveReport(String file, String content) {
+//        if(file.startsWith(prefix)){
+//            file=file.substring(prefix.length(),file.length());
+//        }
+//        String fullPath=fileStoreDir+"/"+file;
+//        FileOutputStream outStream=null;
+//        try{
+//            outStream=new FileOutputStream(new File(fullPath));
+//            IOUtils.write(content, outStream,"utf-8");
+//        }catch(Exception ex){
+//            throw new ReportException(ex);
+//        }finally{
+//            if(outStream!=null){
+//                try {
+//                    outStream.close();
+//                } catch (IOException e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//        }
+//    }
+
+    @Override
+    public String getName() {
+        return "自定义文件系统";
+    }
+
+    @Override
+    public boolean disabled() {
+        return false;
+    }
+
+    @Override
+    public String getPrefix() {
+        return prefix;
+    }
+}

+ 40 - 0
yunnan-report-base/src/main/java/com/ruoyi/ureport/UReportConfig.java

@@ -0,0 +1,40 @@
+package com.ruoyi.ureport;
+
+import com.bstek.ureport.console.UReportServlet;
+import com.bstek.ureport.definition.datasource.BuildinDatasource;
+import lombok.SneakyThrows;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.ImportResource;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+
+
+//@ImportResource("classpath:ureport-console-context.xml")//不加项目能够启动但是会导致加载数据源报错或加载不了
+//@Configuration
+public class UReportConfig implements BuildinDatasource {
+    @Autowired
+    private DataSource datasource;
+
+    @Bean //定义ureport的启动servlet
+    @SuppressWarnings("unchecked")
+    public ServletRegistrationBean ureportServlet(){
+        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new UReportServlet());
+        servletRegistrationBean.addUrlMappings("/ureport/*");
+        return servletRegistrationBean;
+    }
+
+    @Override
+    public String name() {
+        return "内部数据源";
+    }
+
+    @SneakyThrows
+    @Override
+    public Connection getConnection() {
+        return datasource.getConnection();
+    }
+}

+ 82 - 0
yunnan-report-base/src/main/java/com/ruoyi/ureport/UreportBusinessService.java

@@ -0,0 +1,82 @@
+package com.ruoyi.ureport;
+
+import com.bstek.ureport.exception.ReportException;
+import com.ruoyi.base.domain.BaseExportTemp;
+import com.ruoyi.base.mapper.BaseExportTempMapper;
+import com.ruoyi.common.utils.SnowFlakeUtils;
+import org.apache.commons.io.IOUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Date;
+
+//@Service
+public class UreportBusinessService extends FileReportProvider{
+    @Autowired
+    private BaseExportTempMapper baseExportTempMapper;
+
+    @Override
+    public void deleteReport(String file) {
+        if(file.startsWith(getPrefix())){
+            file=file.substring(getPrefix().length(),file.length());
+        }
+        String fullPath=getFileStoreDir()+"/"+file;
+
+        //删除数据库记录
+        BaseExportTemp baseExportTemp = baseExportTempMapper.selectSignleByFullPath(fullPath);
+        if(baseExportTemp!=null){
+            baseExportTempMapper.deleteBaseExportTempById(baseExportTemp.getId());
+        }
+
+        File f=new File(fullPath);
+        if(f.exists()){
+            f.delete();
+        }
+    }
+
+    @Override
+    public void saveReport(String file, String content) {
+        if(file.startsWith(getPrefix())){
+            file=file.substring(getPrefix().length(),file.length());
+        }
+        String fullPath=getFileStoreDir()+"/"+file;
+        FileOutputStream outStream=null;
+        try{
+            outStream=new FileOutputStream(new File(fullPath));
+            IOUtils.write(content, outStream,"utf-8");
+            //判断模板是否已存在---根据模板fullPath查询
+            BaseExportTemp baseExportTemp = baseExportTempMapper.selectSignleByFullPath(fullPath);
+            if(baseExportTemp!=null){
+                //更新模板数据库
+                baseExportTemp.setContent(content);
+                baseExportTemp.setUpdateTime(new Date());
+                baseExportTempMapper.updateBaseExportTemp(baseExportTemp);
+            }else{
+                //将模板数据保存在数据库中
+                baseExportTemp = new BaseExportTemp();
+                baseExportTemp.setId(SnowFlakeUtils.snowFlakeId());
+                baseExportTemp.setContent(content);
+                baseExportTemp.setFileStoreDir(getFileStoreDir());
+                baseExportTemp.setFullPath(fullPath);
+                baseExportTemp.setName(file.replaceAll("\\.ureport\\.xml",""));
+                baseExportTemp.setPrefix(getPrefix());
+                baseExportTemp.setTempFileName(file);
+                baseExportTemp.setCreateTime(new Date());
+                baseExportTempMapper.insertBaseExportTemp(baseExportTemp);
+            }
+        }catch(Exception ex){
+            throw new ReportException(ex);
+        }finally{
+            if(outStream!=null){
+                try {
+                    outStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+}

+ 179 - 0
yunnan-report-base/src/main/resources/mapper/base/BaseExportTempMapper.xml

@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.base.mapper.BaseExportTempMapper">
+    
+    <resultMap type="BaseExportTemp" id="BaseExportTempResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="code"    column="code"    />
+        <result property="tempFileName"    column="temp_file_name"    />
+        <result property="prefix"    column="prefix"    />
+        <result property="fileStoreDir"    column="file_store_dir"    />
+        <result property="fullPath"    column="full_path"    />
+        <result property="content"    column="content"    />
+        <result property="createUserId"    column="create_user_id"    />
+        <result property="createUserName"    column="create_user_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateUserId"    column="update_user_id"    />
+        <result property="updateUserName"    column="update_user_name"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="enableFlag"    column="enable_flag"    />
+        <result property="deleteFlag"    column="delete_flag"    />
+        <result property="remark"    column="remark"    />
+        <result property="spareParam1"    column="spare_param_1"    />
+        <result property="spareParam2"    column="spare_param_2"    />
+        <result property="spareParam3"    column="spare_param_3"    />
+        <result property="spareParam4"    column="spare_param_4"    />
+        <result property="spareParam5"    column="spare_param_5"    />
+    </resultMap>
+
+    <sql id="selectBaseExportTempVo">
+        select id, name, code, temp_file_name, prefix, file_store_dir, full_path, content, create_user_id, create_user_name, create_time, update_user_id, update_user_name, update_time, enable_flag, delete_flag, remark, spare_param_1, spare_param_2, spare_param_3, spare_param_4, spare_param_5 from base_export_temp
+    </sql>
+
+    <select id="selectBaseExportTempList" parameterType="BaseExportTemp" resultMap="BaseExportTempResult">
+        <include refid="selectBaseExportTempVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="code != null  and code != ''"> and code = #{code}</if>
+            <if test="tempFileName != null  and tempFileName != ''"> and temp_file_name like concat('%', #{tempFileName}, '%')</if>
+            <if test="prefix != null  and prefix != ''"> and prefix = #{prefix}</if>
+            <if test="fileStoreDir != null  and fileStoreDir != ''"> and file_store_dir = #{fileStoreDir}</if>
+            <if test="fullPath != null  and fullPath != ''"> and full_path = #{fullPath}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
+            <if test="createUserName != null  and createUserName != ''"> and create_user_name like concat('%', #{createUserName}, '%')</if>
+            <if test="updateUserId != null "> and update_user_id = #{updateUserId}</if>
+            <if test="updateUserName != null  and updateUserName != ''"> and update_user_name like concat('%', #{updateUserName}, '%')</if>
+            <if test="enableFlag != null  and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
+            <if test="deleteFlag != null  and deleteFlag != ''"> and delete_flag = #{deleteFlag}</if>
+            <if test="spareParam1 != null  and spareParam1 != ''"> and spare_param_1 = #{spareParam1}</if>
+            <if test="spareParam2 != null  and spareParam2 != ''"> and spare_param_2 = #{spareParam2}</if>
+            <if test="spareParam3 != null  and spareParam3 != ''"> and spare_param_3 = #{spareParam3}</if>
+            <if test="spareParam4 != null  and spareParam4 != ''"> and spare_param_4 = #{spareParam4}</if>
+            <if test="spareParam5 != null  and spareParam5 != ''"> and spare_param_5 = #{spareParam5}</if>
+        </where>
+    </select>
+    
+    <select id="selectBaseExportTempById" parameterType="Long" resultMap="BaseExportTempResult">
+        <include refid="selectBaseExportTempVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertBaseExportTemp" parameterType="BaseExportTemp">
+        insert into base_export_temp
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="name != null">name,</if>
+            <if test="code != null">code,</if>
+            <if test="tempFileName != null">temp_file_name,</if>
+            <if test="prefix != null">prefix,</if>
+            <if test="fileStoreDir != null">file_store_dir,</if>
+            <if test="fullPath != null">full_path,</if>
+            <if test="content != null">content,</if>
+            <if test="createUserId != null">create_user_id,</if>
+            <if test="createUserName != null">create_user_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateUserId != null">update_user_id,</if>
+            <if test="updateUserName != null">update_user_name,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="enableFlag != null">enable_flag,</if>
+            <if test="deleteFlag != null">delete_flag,</if>
+            <if test="remark != null">remark,</if>
+            <if test="spareParam1 != null">spare_param_1,</if>
+            <if test="spareParam2 != null">spare_param_2,</if>
+            <if test="spareParam3 != null">spare_param_3,</if>
+            <if test="spareParam4 != null">spare_param_4,</if>
+            <if test="spareParam5 != null">spare_param_5,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="name != null">#{name},</if>
+            <if test="code != null">#{code},</if>
+            <if test="tempFileName != null">#{tempFileName},</if>
+            <if test="prefix != null">#{prefix},</if>
+            <if test="fileStoreDir != null">#{fileStoreDir},</if>
+            <if test="fullPath != null">#{fullPath},</if>
+            <if test="content != null">#{content},</if>
+            <if test="createUserId != null">#{createUserId},</if>
+            <if test="createUserName != null">#{createUserName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateUserId != null">#{updateUserId},</if>
+            <if test="updateUserName != null">#{updateUserName},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="enableFlag != null">#{enableFlag},</if>
+            <if test="deleteFlag != null">#{deleteFlag},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="spareParam1 != null">#{spareParam1},</if>
+            <if test="spareParam2 != null">#{spareParam2},</if>
+            <if test="spareParam3 != null">#{spareParam3},</if>
+            <if test="spareParam4 != null">#{spareParam4},</if>
+            <if test="spareParam5 != null">#{spareParam5},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBaseExportTemp" parameterType="BaseExportTemp">
+        update base_export_temp
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="code != null">code = #{code},</if>
+            <if test="tempFileName != null">temp_file_name = #{tempFileName},</if>
+            <if test="prefix != null">prefix = #{prefix},</if>
+            <if test="fileStoreDir != null">file_store_dir = #{fileStoreDir},</if>
+            <if test="fullPath != null">full_path = #{fullPath},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="createUserId != null">create_user_id = #{createUserId},</if>
+            <if test="createUserName != null">create_user_name = #{createUserName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateUserId != null">update_user_id = #{updateUserId},</if>
+            <if test="updateUserName != null">update_user_name = #{updateUserName},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="enableFlag != null">enable_flag = #{enableFlag},</if>
+            <if test="deleteFlag != null">delete_flag = #{deleteFlag},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="spareParam1 != null">spare_param_1 = #{spareParam1},</if>
+            <if test="spareParam2 != null">spare_param_2 = #{spareParam2},</if>
+            <if test="spareParam3 != null">spare_param_3 = #{spareParam3},</if>
+            <if test="spareParam4 != null">spare_param_4 = #{spareParam4},</if>
+            <if test="spareParam5 != null">spare_param_5 = #{spareParam5},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBaseExportTempById" parameterType="Long">
+        delete from base_export_temp where id = #{id}
+    </delete>
+
+    <delete id="deleteBaseExportTempByIds" parameterType="String">
+        delete from base_export_temp where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <!-- 逻辑删除 -->
+    <update id="setDeleteById">
+        update base_export_temp set delete_flag="Y",update_time=sysdate(),update_user_id=#{operId},update_user_name=#{operName} where id = #{id}
+    </update>
+
+    <!-- 逻辑删除 -->
+    <update id="setDeleteByIds">
+        update base_export_temp set delete_flag="Y",update_time=sysdate(),update_user_id=#{operId},update_user_name=#{operName} where id in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    <!-- **************************自定义SQL区域************************** -->
+    <!-- 根据code查询参数 -->
+    <select id="selectParamByCode" parameterType="string" resultMap="BaseExportTempResult">
+        <include refid="selectBaseExportTempVo"/>
+        where code = #{code}
+    </select>
+    <!-- 根据模板的存放路径查询唯一的模板信息 -->
+    <select id="selectSignleByFullPath" parameterType="string" resultMap="BaseExportTempResult">
+        <include refid="selectBaseExportTempVo"/>
+        where full_path = #{fullPath}
+    </select>
+</mapper>

+ 47 - 0
yunnan-report-biz/.gitignore

@@ -0,0 +1,47 @@
+######################################################################
+# Build Tools
+yunnan-report-ui_bak/
+.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
+
+### JRebel ###
+rebel.xml
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

+ 41 - 0
yunnan-report-biz/pom.xml

@@ -0,0 +1,41 @@
+<?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>yunnan-report</artifactId>
+        <groupId>com.ruoyi</groupId>
+        <version>3.8.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>yunnan-report-biz</artifactId>
+
+    <description>
+        biz业务模块
+    </description>
+
+    <dependencies>
+
+        <!-- 通用工具-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>yunnan-report-common</artifactId>
+        </dependency>
+        <!-- easyexcel依赖
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>3.0.5</version>
+        </dependency>
+         -->
+        
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>yunnan-report-base</artifactId>
+             <version>3.8.1</version>
+        </dependency>
+
+    </dependencies>
+
+</project>

+ 154 - 0
yunnan-report-biz/src/main/java/com/ruoyi/biz/domain/BizPatentValidOg.java

@@ -0,0 +1,154 @@
+package com.ruoyi.biz.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import lombok.Data;
+import com.ruoyi.common.annotation.Excel;
+import java.util.Date;
+
+/**
+ * 专利有效原始对象 biz_patent_valid_og
+ * 
+ * @author dm
+ * @date 2023-03-09
+ */
+@Data
+@ApiModel(value = "专利有效原始对象") 
+public class BizPatentValidOg
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @ApiModelProperty(value = "主键")
+    private String id;
+
+    /** 申请号 */
+    @Excel(name = "申请号")
+    @ApiModelProperty(value = "申请号")
+    private String an;
+
+    /** 授权入库日 */
+    @Excel(name = "授权入库日")
+    @ApiModelProperty(value = "授权入库日")
+    private String databaseDate;
+
+    /** 申请日 */
+    @Excel(name = "申请日")
+    @ApiModelProperty(value = "申请日")
+    private String ad;
+
+    /** 发明名称 */
+    @Excel(name = "发明名称")
+    @ApiModelProperty(value = "发明名称")
+    private String patentName;
+
+    /** 代理机构代码 */
+    @Excel(name = "代理机构代码")
+    @ApiModelProperty(value = "代理机构代码")
+    private String agentOrgCode;
+
+    /** 代理机构名称 */
+    @Excel(name = "代理机构名称")
+    @ApiModelProperty(value = "代理机构名称")
+    private String agentOrgName;
+
+    /** 主分类号 */
+    @Excel(name = "主分类号")
+    @ApiModelProperty(value = "主分类号")
+    private String ipc;
+
+    /** 专利权人名称 */
+    @Excel(name = "专利权人名称")
+    @ApiModelProperty(value = "专利权人名称")
+    private String peopleName;
+
+    /** 专利权人邮编 */
+    @Excel(name = "专利权人邮编")
+    @ApiModelProperty(value = "专利权人邮编")
+    private String zipCode;
+
+    /** 统计地址 */
+    @Excel(name = "统计地址")
+    @ApiModelProperty(value = "统计地址")
+    private String address;
+
+    /** 专利类型 */
+    @Excel(name = "专利类型")
+    @ApiModelProperty(value = "专利类型")
+    private String pts;
+
+    /** 专利权人类型 */
+    @Excel(name = "专利权人类型")
+    @ApiModelProperty(value = "专利权人类型")
+    private String ppType;
+
+    /** 省份名称 */
+    @Excel(name = "省份名称")
+    @ApiModelProperty(value = "省份名称")
+    private String provinceName;
+
+    /** 城市名称 */
+    @Excel(name = "城市名称")
+    @ApiModelProperty(value = "城市名称")
+    private String cityName;
+
+    /** 区县名称 */
+    @Excel(name = "区县名称")
+    @ApiModelProperty(value = "区县名称")
+    private String districtName;
+
+    /** 批次号 */
+    //@Excel(name = "批次号")
+    @ApiModelProperty(value = "批次号")
+    private String batch;
+
+    /** 原始数据(1是 0否) */
+    //Excel(name = "原始数据", readConverterExp = "1=是,0=否")
+    @ApiModelProperty(value = "原始数据(1是 0否)")
+    private String ogTag;
+
+    /** 原始数据ID */
+    //@Excel(name = "原始数据ID")
+    @ApiModelProperty(value = "原始数据ID")
+    private String ogId;
+
+    /** 创建人 */
+    //@Excel(name = "创建人")
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    /** 创建时间 */
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("an", getAn())
+            .append("databaseDate", getDatabaseDate())
+            .append("ad", getAd())
+            .append("patentName", getPatentName())
+            .append("agentOrgCode", getAgentOrgCode())
+            .append("agentOrgName", getAgentOrgName())
+            .append("ipc", getIpc())
+            .append("peopleName", getPeopleName())
+            .append("zipCode", getZipCode())
+            .append("address", getAddress())
+            .append("pts", getPts())
+            .append("ppType", getPpType())
+            .append("provinceName", getProvinceName())
+            .append("cityName", getCityName())
+            .append("districtName", getDistrictName())
+            .append("batch", getBatch())
+            .append("ogTag", getOgTag())
+            .append("ogId", getOgId())
+            .append("createUser", getCreateUser())
+            .append("createTime", getCreateTime())
+            .toString();
+    }
+}

+ 77 - 0
yunnan-report-biz/src/main/java/com/ruoyi/biz/mapper/BizPatentValidOgMapper.java

@@ -0,0 +1,77 @@
+package com.ruoyi.biz.mapper;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+import com.ruoyi.biz.domain.BizPatentValidOg;
+
+/**
+ * 专利有效原始Mapper接口
+ * 
+ * @author dm
+ * @date 2023-03-09
+ */
+public interface BizPatentValidOgMapper 
+{
+    /**
+     * 查询专利有效原始
+     * 
+     * @param id 专利有效原始主键
+     * @return 专利有效原始
+     */
+    public BizPatentValidOg selectBizPatentValidOgById(String id);
+
+    /**
+     * 查询专利有效原始列表
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 专利有效原始集合
+     */
+    public List<BizPatentValidOg> selectBizPatentValidOgList(BizPatentValidOg bizPatentValidOg);
+
+    /**
+     * 新增专利有效原始
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 结果
+     */
+    public int insertBizPatentValidOg(BizPatentValidOg bizPatentValidOg);
+
+    /**
+     * 修改专利有效原始
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 结果
+     */
+    public int updateBizPatentValidOg(BizPatentValidOg bizPatentValidOg);
+
+    /**
+     * 删除专利有效原始
+     * 
+     * @param id 专利有效原始主键
+     * @return 结果
+     */
+    public int deleteBizPatentValidOgById(String id);
+
+    /**
+     * 批量删除专利有效原始
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBizPatentValidOgByIds(String[] ids);
+    /**
+     * 删除专利有效原始
+     *
+     * @param id 专利有效原始ID
+     * @return 结果
+     */
+    public int setDeleteById(@Param("id")String id,@Param("operId")Long operId,@Param("operName")String operName);
+
+    /**
+     * 批量删除专利有效原始---逻辑删除
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int setDeleteByIds(@Param("ids")String[] ids,@Param("operId")Long operId,@Param("operName")String operName);
+}

+ 86 - 0
yunnan-report-biz/src/main/java/com/ruoyi/biz/service/IBizPatentValidOgService.java

@@ -0,0 +1,86 @@
+package com.ruoyi.biz.service;
+
+import java.util.List;
+import com.ruoyi.biz.domain.BizPatentValidOg;
+
+/**
+ * 专利有效原始Service接口
+ * 
+ * @author dm
+ * @date 2023-03-09
+ */
+public interface IBizPatentValidOgService 
+{
+    /**
+     * 查询专利有效原始
+     * 
+     * @param id 专利有效原始主键
+     * @return 专利有效原始
+     */
+    public BizPatentValidOg selectBizPatentValidOgById(String id);
+
+    /**
+     * 查询专利有效原始列表
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 专利有效原始集合
+     */
+    public List<BizPatentValidOg> selectBizPatentValidOgList(BizPatentValidOg bizPatentValidOg);
+
+    /**
+     * 新增专利有效原始
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 结果
+     */
+    public int insertBizPatentValidOg(BizPatentValidOg bizPatentValidOg);
+
+    /**
+     * 修改专利有效原始
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 结果
+     */
+    public int updateBizPatentValidOg(BizPatentValidOg bizPatentValidOg);
+
+    /**
+     * 批量删除专利有效原始
+     * 
+     * @param ids 需要删除的专利有效原始主键集合
+     * @return 结果
+     */
+    public int deleteBizPatentValidOgByIds(String[] ids);
+
+    /**
+     * 删除专利有效原始信息
+     * 
+     * @param id 专利有效原始主键
+     * @return 结果
+     */
+    public int deleteBizPatentValidOgById(String id);
+
+    /**
+     * 批量删除---逻辑删除
+     *
+     * @param ids 需要删除的专利有效原始ID
+     * @return 结果
+     */
+    public int setDeleteByIds(String[] ids);
+
+    /**
+     * 删除---逻辑删除
+     *
+     * @param id 专利有效原始ID
+     * @return 结果
+     */
+    public int setDeleteById(String id);
+
+    /**
+     * 导入专利有效原始数据
+     *
+     * @param bizPatentValidOgList 专利有效原始列表
+     * @param operName 操作用户
+     * @return 结果
+     */
+    public String importBizPatentValidOg(List<BizPatentValidOg> bizPatentValidOgList, String operName);
+}

+ 153 - 0
yunnan-report-biz/src/main/java/com/ruoyi/biz/service/impl/BizPatentValidOgServiceImpl.java

@@ -0,0 +1,153 @@
+package com.ruoyi.biz.service.impl;
+
+import java.util.List;
+import java.util.UUID;
+
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SnowFlakeUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.biz.mapper.BizPatentValidOgMapper;
+import com.ruoyi.biz.domain.BizPatentValidOg;
+import com.ruoyi.biz.service.IBizPatentValidOgService;
+
+/**
+ * 专利有效原始Service业务层处理
+ * 
+ * @author dm
+ * @date 2023-03-09
+ */
+@Service
+@Transactional
+public class BizPatentValidOgServiceImpl implements IBizPatentValidOgService 
+{
+    @Autowired
+    private BizPatentValidOgMapper bizPatentValidOgMapper;
+
+    /**
+     * 查询专利有效原始
+     * 
+     * @param id 专利有效原始主键
+     * @return 专利有效原始
+     */
+    @Override
+    public BizPatentValidOg selectBizPatentValidOgById(String id)
+    {
+        return bizPatentValidOgMapper.selectBizPatentValidOgById(id);
+    }
+
+    /**
+     * 查询专利有效原始列表
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 专利有效原始
+     */
+    @Override
+    public List<BizPatentValidOg> selectBizPatentValidOgList(BizPatentValidOg bizPatentValidOg)
+    {
+        return bizPatentValidOgMapper.selectBizPatentValidOgList(bizPatentValidOg);
+    }
+
+    /**
+     * 新增专利有效原始
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 结果
+     */
+    @Override
+    public int insertBizPatentValidOg(BizPatentValidOg bizPatentValidOg)
+    {
+        if(bizPatentValidOg.getId()==null){
+        bizPatentValidOg.setId(UUID.randomUUID().toString().replace("-",""));
+    }
+        bizPatentValidOg.setCreateTime(DateUtils.getNowDate());
+        return bizPatentValidOgMapper.insertBizPatentValidOg(bizPatentValidOg);
+    }
+
+    /**
+     * 修改专利有效原始
+     * 
+     * @param bizPatentValidOg 专利有效原始
+     * @return 结果
+     */
+    @Override
+    public int updateBizPatentValidOg(BizPatentValidOg bizPatentValidOg)
+    {
+        return bizPatentValidOgMapper.updateBizPatentValidOg(bizPatentValidOg);
+    }
+
+    /**
+     * 批量删除专利有效原始
+     * 
+     * @param ids 需要删除的专利有效原始主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBizPatentValidOgByIds(String[] ids)
+    {
+        return bizPatentValidOgMapper.deleteBizPatentValidOgByIds(ids);
+    }
+
+    /**
+     * 删除专利有效原始信息
+     * 
+     * @param id 专利有效原始主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBizPatentValidOgById(String id)
+    {
+        return bizPatentValidOgMapper.deleteBizPatentValidOgById(id);
+    }
+
+    /**
+     * 批量---逻辑删除
+     *
+     * @param ids 需要删除的专利有效原始ID
+     * @return 结果
+     */
+    @Override
+    public int setDeleteByIds(String[] ids)
+    {
+        Long userId = SecurityUtils.getUserId();
+        String userNickName = SecurityUtils.getUserNickName();
+        return bizPatentValidOgMapper.setDeleteByIds(ids,userId,userNickName);
+    }
+
+    /**
+     * 删除---逻辑删除
+     *
+     * @param id 专利有效原始ID
+     * @return 结果
+     */
+    @Override
+    public int setDeleteById(String id)
+    {
+        Long userId = SecurityUtils.getUserId();
+        String userNickName = SecurityUtils.getUserNickName();
+        return bizPatentValidOgMapper.setDeleteById(id,userId,userNickName);
+    }
+
+    /**
+     * 导入专利有效原始数据
+     *
+     * @param bizPatentValidOgList 专利有效原始列表
+     * @param operName 操作用户
+     * @return 结果
+     */
+    public String importBizPatentValidOg(List<BizPatentValidOg> bizPatentValidOgList, String operName) {
+        if (StringUtils.isNull(bizPatentValidOgList) || bizPatentValidOgList.size() == 0)
+        {
+            throw new ServiceException("导入专利有效数据不能为空!");
+        }
+        int successNum = bizPatentValidOgList.size();
+        StringBuilder successMsg = new StringBuilder();
+        successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条");
+        return successMsg.toString();
+    }
+
+}

+ 165 - 0
yunnan-report-biz/src/main/resources/mapper/biz/BizPatentValidOgMapper.xml

@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.biz.mapper.BizPatentValidOgMapper">
+    
+    <resultMap type="com.ruoyi.biz.domain.BizPatentValidOg" id="BizPatentValidOgResult">
+        <result property="id"    column="id"    />
+        <result property="an"    column="an"    />
+        <result property="databaseDate"    column="database_date"    />
+        <result property="ad"    column="ad"    />
+        <result property="patentName"    column="patent_name"    />
+        <result property="agentOrgCode"    column="agent_org_code"    />
+        <result property="agentOrgName"    column="agent_org_name"    />
+        <result property="ipc"    column="ipc"    />
+        <result property="peopleName"    column="people_name"    />
+        <result property="zipCode"    column="zip_code"    />
+        <result property="address"    column="address"    />
+        <result property="pts"    column="pts"    />
+        <result property="ppType"    column="pp_type"    />
+        <result property="provinceName"    column="province_name"    />
+        <result property="cityName"    column="city_name"    />
+        <result property="districtName"    column="district_name"    />
+        <result property="batch"    column="batch"    />
+        <result property="ogTag"    column="og_tag"    />
+        <result property="ogId"    column="og_id"    />
+        <result property="createUser"    column="create_user"    />
+        <result property="createTime"    column="create_time"    />
+    </resultMap>
+
+    <sql id="selectBizPatentValidOgVo">
+        select id, an, database_date, ad, patent_name, agent_org_code, agent_org_name, ipc, people_name, zip_code, address, pts, pp_type, province_name, city_name, district_name, batch, og_tag, og_id, create_user, create_time from biz_patent_valid_og
+    </sql>
+
+    <select id="selectBizPatentValidOgList" parameterType="com.ruoyi.biz.domain.BizPatentValidOg" resultMap="BizPatentValidOgResult">
+        <include refid="selectBizPatentValidOgVo"/>
+        <where>  
+            <if test="an != null  and an != ''"> and an = #{an}</if>
+            <if test="databaseDate != null  and databaseDate != ''"> and database_date = #{databaseDate}</if>
+            <if test="ad != null  and ad != ''"> and ad = #{ad}</if>
+            <if test="patentName != null  and patentName != ''"> and patent_name like concat('%', #{patentName}, '%')</if>
+            <if test="agentOrgCode != null  and agentOrgCode != ''"> and agent_org_code = #{agentOrgCode}</if>
+            <if test="agentOrgName != null  and agentOrgName != ''"> and agent_org_name like concat('%', #{agentOrgName}, '%')</if>
+            <if test="ipc != null  and ipc != ''"> and ipc = #{ipc}</if>
+            <if test="peopleName != null  and peopleName != ''"> and people_name like concat('%', #{peopleName}, '%')</if>
+            <if test="zipCode != null  and zipCode != ''"> and zip_code = #{zipCode}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="pts != null  and pts != ''"> and pts = #{pts}</if>
+            <if test="ppType != null  and ppType != ''"> and pp_type = #{ppType}</if>
+            <if test="provinceName != null  and provinceName != ''"> and province_name like concat('%', #{provinceName}, '%')</if>
+            <if test="cityName != null  and cityName != ''"> and city_name like concat('%', #{cityName}, '%')</if>
+            <if test="districtName != null  and districtName != ''"> and district_name like concat('%', #{districtName}, '%')</if>
+            <if test="batch != null  and batch != ''"> and batch = #{batch}</if>
+            <if test="ogTag != null  and ogTag != ''"> and og_tag = #{ogTag}</if>
+            <if test="ogId != null  and ogId != ''"> and og_id = #{ogId}</if>
+            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
+        </where>
+    </select>
+    
+    <select id="selectBizPatentValidOgById" parameterType="String" resultMap="BizPatentValidOgResult">
+        <include refid="selectBizPatentValidOgVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertBizPatentValidOg" parameterType="com.ruoyi.biz.domain.BizPatentValidOg">
+        insert into biz_patent_valid_og
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="an != null">an,</if>
+            <if test="databaseDate != null">database_date,</if>
+            <if test="ad != null">ad,</if>
+            <if test="patentName != null">patent_name,</if>
+            <if test="agentOrgCode != null">agent_org_code,</if>
+            <if test="agentOrgName != null">agent_org_name,</if>
+            <if test="ipc != null">ipc,</if>
+            <if test="peopleName != null">people_name,</if>
+            <if test="zipCode != null">zip_code,</if>
+            <if test="address != null">address,</if>
+            <if test="pts != null">pts,</if>
+            <if test="ppType != null">pp_type,</if>
+            <if test="provinceName != null">province_name,</if>
+            <if test="cityName != null">city_name,</if>
+            <if test="districtName != null">district_name,</if>
+            <if test="batch != null">batch,</if>
+            <if test="ogTag != null">og_tag,</if>
+            <if test="ogId != null">og_id,</if>
+            <if test="createUser != null">create_user,</if>
+            <if test="createTime != null">create_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="an != null">#{an},</if>
+            <if test="databaseDate != null">#{databaseDate},</if>
+            <if test="ad != null">#{ad},</if>
+            <if test="patentName != null">#{patentName},</if>
+            <if test="agentOrgCode != null">#{agentOrgCode},</if>
+            <if test="agentOrgName != null">#{agentOrgName},</if>
+            <if test="ipc != null">#{ipc},</if>
+            <if test="peopleName != null">#{peopleName},</if>
+            <if test="zipCode != null">#{zipCode},</if>
+            <if test="address != null">#{address},</if>
+            <if test="pts != null">#{pts},</if>
+            <if test="ppType != null">#{ppType},</if>
+            <if test="provinceName != null">#{provinceName},</if>
+            <if test="cityName != null">#{cityName},</if>
+            <if test="districtName != null">#{districtName},</if>
+            <if test="batch != null">#{batch},</if>
+            <if test="ogTag != null">#{ogTag},</if>
+            <if test="ogId != null">#{ogId},</if>
+            <if test="createUser != null">#{createUser},</if>
+            <if test="createTime != null">#{createTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBizPatentValidOg" parameterType="com.ruoyi.biz.domain.BizPatentValidOg">
+        update biz_patent_valid_og
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="an != null">an = #{an},</if>
+            <if test="databaseDate != null">database_date = #{databaseDate},</if>
+            <if test="ad != null">ad = #{ad},</if>
+            <if test="patentName != null">patent_name = #{patentName},</if>
+            <if test="agentOrgCode != null">agent_org_code = #{agentOrgCode},</if>
+            <if test="agentOrgName != null">agent_org_name = #{agentOrgName},</if>
+            <if test="ipc != null">ipc = #{ipc},</if>
+            <if test="peopleName != null">people_name = #{peopleName},</if>
+            <if test="zipCode != null">zip_code = #{zipCode},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="pts != null">pts = #{pts},</if>
+            <if test="ppType != null">pp_type = #{ppType},</if>
+            <if test="provinceName != null">province_name = #{provinceName},</if>
+            <if test="cityName != null">city_name = #{cityName},</if>
+            <if test="districtName != null">district_name = #{districtName},</if>
+            <if test="batch != null">batch = #{batch},</if>
+            <if test="ogTag != null">og_tag = #{ogTag},</if>
+            <if test="ogId != null">og_id = #{ogId},</if>
+            <if test="createUser != null">create_user = #{createUser},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBizPatentValidOgById" parameterType="String">
+        delete from biz_patent_valid_og where id = #{id}
+    </delete>
+
+    <delete id="deleteBizPatentValidOgByIds" parameterType="String">
+        delete from biz_patent_valid_og where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <!-- 逻辑删除 -->
+    <update id="setDeleteById">
+        update biz_patent_valid_og set delete_flag="Y",update_time=sysdate(),update_user_id=#{operId},update_user_name=#{operName} where id = #{id}
+    </update>
+
+    <!-- 逻辑删除 -->
+    <update id="setDeleteByIds">
+        update biz_patent_valid_og set delete_flag="Y",update_time=sysdate(),update_user_id=#{operId},update_user_name=#{operName} where id in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+</mapper>

+ 47 - 0
yunnan-report-common/.gitignore

@@ -0,0 +1,47 @@
+######################################################################
+# Build Tools
+yunnan-report-ui_bak/
+.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
+
+### JRebel ###
+rebel.xml
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

+ 213 - 0
yunnan-report-common/pom.xml

@@ -0,0 +1,213 @@
+<?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>yunnan-report</artifactId>
+        <groupId>com.ruoyi</groupId>
+        <version>3.8.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>yunnan-report-common</artifactId>
+
+    <description>
+        common通用工具
+    </description>
+<properties>
+		<dozer.version>5.5.1</dozer.version>
+	</properties>
+    <dependencies>
+
+        <!-- Spring框架基本的核心工具 -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+
+  <dependency>
+			<groupId>com.google.code.gson</groupId>
+			<artifactId>gson</artifactId>
+		</dependency>
+		
+        <!-- SpringWeb模块 -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+
+        <!-- spring security 安全认证 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-security</artifactId>
+        </dependency>
+
+        <!-- pagehelper 分页插件 -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+
+        <!-- 自定义验证注解 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+
+        <!--常用工具类 -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+
+        <!-- JSON工具类 -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+
+        <!-- 阿里JSON解析器 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            
+        </dependency>
+ <!-- 阿里JSON解析器 -->
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+            <version>2.0.14</version>
+        </dependency>
+        <!-- io常用工具类 -->
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+
+        <!-- 文件上传工具类 -->
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+        </dependency>
+
+        <!-- excel工具 -->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+        </dependency>
+        
+         <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+
+        <!-- yml解析器 -->
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+        </dependency>
+
+        <!-- Token生成与解析-->
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+        </dependency>
+
+        <!-- Jaxb -->
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+
+        <!-- redis 缓存操作 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+
+        <!-- pool 对象池 -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
+
+        <!-- 解析客户端操作系统、浏览器等 -->
+        <dependency>
+            <groupId>eu.bitwalker</groupId>
+            <artifactId>UserAgentUtils</artifactId>
+        </dependency>
+
+        <!-- servlet包 -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+
+        <!-- mybatis-plus 增强CRUD -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>1.6.2</version>
+            <scope>compile</scope>
+        </dependency>
+        
+        
+        
+        <!-- 引入knife4j-->
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-spring-boot-starter</artifactId>
+            <version>3.0.3</version>
+        </dependency>
+        <!-- 引入knife4j结束 -->
+        
+        <!--ureport2 依赖-->
+            <dependency>
+                <groupId>com.bstek.ureport</groupId>
+                <artifactId>ureport2-console</artifactId>
+                <version>2.2.9</version>
+            </dependency>
+
+        <!-- 引入工具jar包 -->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.7.20</version>
+        </dependency>
+
+        <!-- Swagger 依赖配置 -->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+        
+        
+        <dependency>
+			<groupId>net.sf.dozer</groupId>
+			<artifactId>dozer</artifactId>
+			<version>${dozer.version}</version>
+			<exclusions>
+				<exclusion>
+					<artifactId>slf4j-api</artifactId>
+					<groupId>org.slf4j</groupId>
+				</exclusion>
+				<exclusion>
+					<artifactId>jcl-over-slf4j</artifactId>
+					<groupId>org.slf4j</groupId>
+				</exclusion>
+				<exclusion>
+					<artifactId>commons-lang3</artifactId>
+					<groupId>org.apache.commons</groupId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+    </dependencies>
+
+</project>

+ 19 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/annotation/Anonymous.java

@@ -0,0 +1,19 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 匿名访问不鉴权注解
+ * 
+ * @author ruoyi
+ */
+@Target({ ElementType.METHOD, ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Anonymous
+{
+}

+ 28 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/annotation/DataScope.java

@@ -0,0 +1,28 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 数据权限过滤注解
+ * 
+ * @author ruoyi
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface DataScope
+{
+    /**
+     * 部门表的别名
+     */
+    public String deptAlias() default "";
+
+    /**
+     * 用户表的别名
+     */
+    public String userAlias() default "";
+}

+ 28 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/annotation/DataSource.java

@@ -0,0 +1,28 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import com.ruoyi.common.enums.DataSourceType;
+
+/**
+ * 自定义多数据源切换注解
+ *
+ * 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
+ *
+ * @author ruoyi
+ */
+@Target({ ElementType.METHOD, ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+public @interface DataSource
+{
+    /**
+     * 切换数据源名称
+     */
+    public DataSourceType value() default DataSourceType.MASTER;
+}

+ 176 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/annotation/Excel.java

@@ -0,0 +1,176 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.math.BigDecimal;
+import com.ruoyi.common.utils.poi.ExcelHandlerAdapter;
+
+/**
+ * 自定义导出Excel数据注解
+ * 
+ * @author ruoyi
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface Excel
+{
+    /**
+     * 导出时在excel中排序
+     */
+    public int sort() default Integer.MAX_VALUE;
+
+    /**
+     * 导出到Excel中的名字.
+     */
+    public String name() default "";
+
+    /**
+     * 日期格式, 如: yyyy-MM-dd
+     */
+    public String dateFormat() default "";
+
+    /**
+     * 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
+     */
+    public String dictType() default "";
+
+    /**
+     * 读取内容转表达式 (如: 0=男,1=女,2=未知)
+     */
+    public String readConverterExp() default "";
+
+    /**
+     * 分隔符,读取字符串组内容
+     */
+    public String separator() default ",";
+
+    /**
+     * BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
+     */
+    public int scale() default -1;
+
+    /**
+     * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
+     */
+    public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
+
+    /**
+     * 导出类型(0数字 1字符串)
+     */
+    public ColumnType cellType() default ColumnType.STRING;
+
+    /**
+     * 导出时在excel中每个列的高度 单位为字符
+     */
+    public double height() default 14;
+
+    /**
+     * 导出时在excel中每个列的宽 单位为字符
+     */
+    public double width() default 16;
+
+    /**
+     * 文字后缀,如% 90 变成90%
+     */
+    public String suffix() default "";
+
+    /**
+     * 当值为空时,字段的默认值
+     */
+    public String defaultValue() default "";
+
+    /**
+     * 提示信息
+     */
+    public String prompt() default "";
+
+    /**
+     * 设置只能选择不能输入的列内容.
+     */
+    public String[] combo() default {};
+
+    /**
+     * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
+     */
+    public boolean isExport() default true;
+
+    /**
+     * 另一个类中的属性名称,支持多级获取,以小数点隔开
+     */
+    public String targetAttr() default "";
+
+    /**
+     * 是否自动统计数据,在最后追加一行统计数据总和
+     */
+    public boolean isStatistics() default false;
+
+    /**
+     * 导出字段对齐方式(0:默认;1:靠左;2:居中;3:靠右)
+     */
+    public Align align() default Align.AUTO;
+
+    /**
+     * 自定义数据处理器
+     */
+    public Class<?> handler() default ExcelHandlerAdapter.class;
+
+    /**
+     * 自定义数据处理器参数
+     */
+    public String[] args() default {};
+
+    public enum Align
+    {
+        AUTO(0), LEFT(1), CENTER(2), RIGHT(3);
+        private final int value;
+
+        Align(int value)
+        {
+            this.value = value;
+        }
+
+        public int value()
+        {
+            return this.value;
+        }
+    }
+
+    /**
+     * 字段类型(0:导出导入;1:仅导出;2:仅导入)
+     */
+    Type type() default Type.ALL;
+
+    public enum Type
+    {
+        ALL(0), EXPORT(1), IMPORT(2);
+        private final int value;
+
+        Type(int value)
+        {
+            this.value = value;
+        }
+
+        public int value()
+        {
+            return this.value;
+        }
+    }
+
+    public enum ColumnType
+    {
+        NUMERIC(0), STRING(1), IMAGE(2);
+        private final int value;
+
+        ColumnType(int value)
+        {
+            this.value = value;
+        }
+
+        public int value()
+        {
+            return this.value;
+        }
+    }
+}

+ 18 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/annotation/Excels.java

@@ -0,0 +1,18 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Excel注解集
+ * 
+ * @author ruoyi
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Excels
+{
+    public Excel[] value();
+}

+ 46 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/annotation/Log.java

@@ -0,0 +1,46 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.enums.OperatorType;
+
+/**
+ * 自定义操作日志记录注解
+ * 
+ * @author ruoyi
+ *
+ */
+@Target({ ElementType.PARAMETER, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Log
+{
+    /**
+     * 模块 
+     */
+    public String title() default "";
+
+    /**
+     * 功能
+     */
+    public BusinessType businessType() default BusinessType.OTHER;
+
+    /**
+     * 操作人类别
+     */
+    public OperatorType operatorType() default OperatorType.MANAGE;
+
+    /**
+     * 是否保存请求的参数
+     */
+    public boolean isSaveRequestData() default true;
+
+    /**
+     * 是否保存响应的参数
+     */
+    public boolean isSaveResponseData() default true;
+}

+ 40 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/annotation/RateLimiter.java

@@ -0,0 +1,40 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.enums.LimitType;
+
+/**
+ * 限流注解
+ * 
+ * @author ruoyi
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface RateLimiter
+{
+    /**
+     * 限流key
+     */
+    public String key() default Constants.RATE_LIMIT_KEY;
+
+    /**
+     * 限流时间,单位秒
+     */
+    public int time() default 60;
+
+    /**
+     * 限流次数
+     */
+    public int count() default 100;
+
+    /**
+     * 限流类型
+     */
+    public LimitType limitType() default LimitType.DEFAULT;
+}

+ 31 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java

@@ -0,0 +1,31 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 自定义注解防止表单重复提交
+ * 
+ * @author ruoyi
+ *
+ */
+@Inherited
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface RepeatSubmit
+{
+    /**
+     * 间隔时间(ms),小于此时间视为重复提交
+     */
+    public int interval() default 5000;
+
+    /**
+     * 提示消息
+     */
+    public String message() default "不允许重复提交,请稍候再试";
+}

+ 197 - 0
yunnan-report-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java

@@ -0,0 +1,197 @@
+package com.ruoyi.common.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * 读取项目相关配置
+ * 
+ * @author ruoyi
+ */
+@Component
+@ConfigurationProperties(prefix = "ruoyi")
+public class RuoYiConfig {
+	
+	/**
+	 * 出版社
+	 */
+	private String pressApiServer="http://111.198.99.166:20000/";
+	
+	/**
+	 * 是否自动同步报表
+	 */
+	private Boolean autoSync=false;
+	
+	//是否自动同步专利调整数据
+	private Boolean autoSyncAjeuest=false;
+	
+	/** 项目名称 */
+	private String name;
+
+	/** 版本 */
+	private String version;
+
+	/** 版权年份 */
+	private String copyrightYear;
+
+	/** 实例演示开关 */
+	private boolean demoEnabled;
+
+	/** 上传路径 */
+	private static String profile;
+	private String filePath;
+
+	/** 获取地址开关 */
+	private static boolean addressEnabled;
+
+	/** 验证码类型 */
+	private static String captchaType;
+	/** 当前服务所处节点(雪花算法生成id使用) */
+	private Long workerId;
+
+	private Boolean autoImpPub = false;
+	
+	private Boolean loadPub = false;
+	
+	public Boolean getAutoImpPub() {
+		return autoImpPub;
+	}
+
+	public void setAutoImpPub(Boolean autoImpPub) {
+		this.autoImpPub = autoImpPub;
+	}
+
+	public Boolean getAutoSync() {
+		return autoSync;
+	}
+
+	public void setAutoSync(Boolean autoSync) {
+		this.autoSync = autoSync;
+	}
+
+	public Boolean getLoadPub() {
+		return loadPub;
+	}
+
+	public void setLoadPub(Boolean loadPub) {
+		this.loadPub = loadPub;
+	}
+
+	public String getFilePath() {
+		return filePath;
+	}
+
+	public void setFilePath(String filePath) {
+		this.filePath = filePath;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public String getCopyrightYear() {
+		return copyrightYear;
+	}
+
+	public void setCopyrightYear(String copyrightYear) {
+		this.copyrightYear = copyrightYear;
+	}
+
+	public boolean isDemoEnabled() {
+		return demoEnabled;
+	}
+
+	public void setDemoEnabled(boolean demoEnabled) {
+		this.demoEnabled = demoEnabled;
+	}
+
+	public static String getProfile() {
+		return profile;
+	}
+
+	public void setProfile(String profile) {
+		RuoYiConfig.profile = profile;
+	}
+
+	public static boolean isAddressEnabled() {
+		return addressEnabled;
+	}
+
+	public void setAddressEnabled(boolean addressEnabled) {
+		RuoYiConfig.addressEnabled = addressEnabled;
+	}
+
+	public static String getCaptchaType() {
+		return captchaType;
+	}
+
+	public void setCaptchaType(String captchaType) {
+		RuoYiConfig.captchaType = captchaType;
+	}
+
+	/**
+	 * 获取导入上传路径
+	 */
+	public static String getImportPath() {
+		return getProfile() + "/import";
+	}
+
+	/**
+	 * 获取头像上传路径
+	 */
+	public static String getAvatarPath() {
+		return getProfile() + "/avatar";
+	}
+
+	/**
+	 * 获取下载路径
+	 */
+	public static String getDownloadPath() {
+		return getProfile() + "/download/";
+	}
+
+	/**
+	 * 获取上传路径
+	 */
+	public static String getUploadPath() {
+		return getProfile() + "/upload";
+	}
+
+	public Long getWorkerId() {
+		return workerId;
+	}
+
+	public void setWorkerId(Long workerId) {
+		this.workerId = workerId;
+	}
+
+	public String getPressApiServer() {
+		return pressApiServer;
+	}
+
+	public void setPressApiServer(String pressApiServer) {
+		this.pressApiServer = pressApiServer;
+	}
+
+	public Boolean getAutoSyncAjeuest() {
+		return autoSyncAjeuest;
+	}
+
+	public void setAutoSyncAjeuest(Boolean autoSyncAjeuest) {
+		this.autoSyncAjeuest = autoSyncAjeuest;
+	}
+
+
+}

Some files were not shown because too many files changed in this diff