commit c32ef2b7e8c4e8ce30adbb165d66858bed5b31cf
Author: wxc <191104855@qq.com>
Date: Mon Dec 1 14:48:38 2025 +0800
20251201
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d205c3a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+# 长沙公安政投资审计
+## 技术栈
+- JDK17
+- SpringBoot 3
+- MySQL
\ No newline at end of file
diff --git a/connect.md b/connect.md
new file mode 100644
index 0000000..b76c399
--- /dev/null
+++ b/connect.md
@@ -0,0 +1,179 @@
+# 项目交接文档
+
+## 1. 项目概述
+
+- **项目名称**:InvestBoot 政府投资报审系统
+- **项目描述**:政府投资项目报审管理系统,提供项目审批、预警管理、价格信息管理等功能
+- **项目组**:com.biutag.supervision
+
+## 2. 技术栈
+
+### 2.1 核心框架
+- Spring Boot 3.3.2
+- MyBatis Plus 3.5.7
+- Dynamic Datasource 4.3.1(多数据源)
+- Redis Reactive
+
+### 2.2 数据库
+- MySQL(主要数据库)
+- PostgreSQL(邮箱相关)
+- 支持多种数据库:达梦(DM)、SQL Server、GBase
+
+### 2.3 文件存储
+- FastDFS 分布式文件系统
+
+### 2.4 API文档
+- Knife4j OpenAPI3(基于Swagger)
+
+### 2.5 工具类
+- Hutool 5.8.29
+- EasyExcel 4.0.1
+- Fastjson 2.0.53
+- Aspose.Words 15.8.0(Word文档处理)
+
+### 2.6 其他组件
+- Lombok
+- Druid 连接池
+- Freemarker 模板引擎
+- Logstash 日志编码
+- JIT AuthSDK 3.0.3(数字证书)
+
+## 3. 环境配置
+
+### 3.1 开发环境
+- JDK 17
+- Maven 3.6+
+- IDE:推荐 IntelliJ IDEA
+
+### 3.2 配置文件
+- 主配置文件:`application.yml`
+- 环境配置文件:
+ - `application-local.yml`(本地开发环境)
+ - `application-dev.yml`(开发环境)
+ - `application-prod.yml`(生产环境)
+
+### 3.3 数据库配置
+- 主数据源(master):MySQL
+- 从数据源(多个):用于不同业务模块
+- Redis:缓存,端口6379
+
+### 3.4 文件服务配置
+- FastDFS:分布式文件存储
+- 预览URL配置:`http://172.31.217.20:31664`
+
+## 4. 项目结构
+
+```
+src/main/java/com/biutag/supervision/
+├── InvestBootApplication.java # 应用启动类
+├── common/ # 通用类
+├── config/ # 配置类
+├── constants/ # 常量定义
+├── controller/ # 控制器层
+├── exception/ # 异常处理
+├── flow/ # 流程相关
+├── job/ # 定时任务
+├── mapper/ # 数据访问层
+├── pojo/ # 数据模型
+│ ├── domain/ # 领域模型
+│ ├── dto/ # 数据传输对象
+│ ├── entity/ # 实体类
+│ ├── enums/ # 枚举类
+│ ├── model/ # 模型类
+│ ├── param/ # 参数类
+│ └── vo/ # 视图对象
+├── service/ # 业务逻辑层
+├── support/ # 支持类
+└── util/ # 工具类
+```
+
+## 5. 核心功能模块
+
+### 5.1 认证与授权
+- 登录认证:`LoginController`
+- 用户角色权限管理:基于RBAC模型
+- Token管理:Redis存储,有效期168小时
+
+### 5.2 文件管理
+- 文件上传下载:`FileController`
+- 文件分类管理:`FileClassService`
+- 文件存储:FastDFS分布式存储
+
+### 5.3 项目预警管理
+- 预警信息处理
+- 预警相关接口:`controller/warning/`
+
+### 5.4 价格信息库管理
+- 价格信息录入与查询
+- 相关接口:`controller/price/`
+
+### 5.5 项目报审、报表管理
+- 相关接口:`controller/report/ReportProjectController.java`
+
+### 5.6 工作流管理
+- 相关接口:`controller/report/ReportFlowController.java`
+
+### 5.7 服务单位管理
+- 服务单位信息维护
+- 相关接口:`controller/serviceUnit/`
+
+## 6. API文档
+
+### 6.1 访问地址
+
+
+### 6.2 接口分组
+- plugin:插件相关接口
+- 各功能模块独立接口组
+
+## 7. 关键配置项
+
+### 7.1 服务器配置
+- 端口:8080
+- 时区:Asia/Shanghai
+
+### 7.2 文件上传配置
+- 最大文件大小:100MB
+- 最大请求大小:100MB
+
+### 7.3 缓存配置
+- Redis数据库索引:1
+- 连接超时:10s
+
+### 7.4 FastDFS配置
+- Tracker列表:172.31.217.20:32060, 172.31.217.20:31882
+- 连接超时:10000ms
+
+## 8. 部署说明
+
+### 8.1 打包方式
+- Maven打包:`mvn clean package`
+- 最终生成JAR包:`investBoot.jar`
+
+### 8.2 环境切换
+- 本地:`-Dspring.profiles.active=local`
+- 开发:`-Dspring.profiles.active=dev`
+- 生产:`-Dspring.profiles.active=prod`
+
+### 8.3 运行命令
+```
+java -jar investBoot.jar --spring.profiles.active=环境名称
+```
+
+## 9. 注意事项
+
+### 9.1 数据库配置
+- 首次部署需要执行SQL脚本初始化数据库
+- SQL脚本位置:`sql/`目录
+
+### 9.2 外部依赖
+- 需确保Redis服务正常运行
+- 需确保FastDFS服务正常运行
+- 部分证书相关功能依赖JIT AuthSDK
+
+### 9.3 特殊配置
+- Word文档处理功能依赖Aspose.Words,需注意许可证配置
+- 视频检查相关功能依赖外部服务
+
+## 10. 联系人信息
+
diff --git a/libs/authSDK/authSDK-3.0.3.jar b/libs/authSDK/authSDK-3.0.3.jar
new file mode 100644
index 0000000..21ea0e0
Binary files /dev/null and b/libs/authSDK/authSDK-3.0.3.jar differ
diff --git a/libs/authSDK/installMavenJar.bat b/libs/authSDK/installMavenJar.bat
new file mode 100644
index 0000000..303ecfc
--- /dev/null
+++ b/libs/authSDK/installMavenJar.bat
@@ -0,0 +1 @@
+mvn install:install-file -DgroupId=cn.com.jit -DartifactId=authSDK -Dversion=3.0.3 -Dfile="authSDK-3.0.3.jar" -Dpackaging=jar
\ No newline at end of file
diff --git a/libs/words/installMavenJar.bat b/libs/words/installMavenJar.bat
new file mode 100644
index 0000000..c8c3b53
--- /dev/null
+++ b/libs/words/installMavenJar.bat
@@ -0,0 +1 @@
+mvn install:install-file -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=15.8.0 -Dfile="words-15.8.0.jar" -Dpackaging=jar
\ No newline at end of file
diff --git a/libs/words/words-15.8.0.jar b/libs/words/words-15.8.0.jar
new file mode 100644
index 0000000..c0e699f
Binary files /dev/null and b/libs/words/words-15.8.0.jar differ
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..4b4784c
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,299 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 3.3.2
+
+
+ com.biutag
+ InvestBoot
+ 0.0.1-SNAPSHOT
+ InvestBoot
+ 政府投资报审
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 17
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis-reactive
+
+
+
+
+
+ com.dameng
+ DmJdbcDriver18
+ 8.1.3.140
+
+
+
+
+
+
+
+
+
+
+
+ com.mysql
+ mysql-connector-j
+ runtime
+
+
+
+
+ com.microsoft.sqlserver
+ mssql-jdbc
+ 12.8.1.jre11
+
+
+ javax.xml.bind
+ jaxb-api
+ 2.3.0
+
+
+ com.sun.xml.bind
+ jaxb-impl
+ 2.3.0
+
+
+ com.sun.xml.bind
+ jaxb-core
+ 2.3.0
+
+
+ javax.activation
+ activation
+ 1.1.1
+
+
+
+
+ com.gbase
+ gbase-jdbc
+ system
+ 8.3.81.53-build55.2.1-bin
+ ${project.basedir}/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar
+
+
+
+
+
+ com.dameng
+ DmJdbcDriver18
+ 8.1.3.140
+
+
+
+
+ org.postgresql
+ postgresql
+ 42.7.4
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ 1.2.22
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+ com.baomidou
+ mybatis-plus-spring-boot3-starter
+ 3.5.7
+
+
+
+ com.alibaba
+ easyexcel
+ 4.0.1
+
+
+
+ commons-io
+ commons-io
+ 2.17.0
+
+
+
+ cn.hutool
+ hutool-core
+ 5.8.29
+
+
+ cn.hutool
+ hutool-http
+ 5.8.29
+
+
+
+ com.baomidou
+ dynamic-datasource-spring-boot3-starter
+ 4.3.1
+
+
+
+ org.freemarker
+ freemarker
+ 2.3.32
+
+
+
+ org.springframework.security
+ spring-security-crypto
+
+
+
+ com.github.tobato
+ fastdfs-client
+ 1.27.2
+
+
+
+
+ com.github.xiaoymin
+ knife4j-openapi3-jakarta-spring-boot-starter
+ 4.1.0
+
+
+
+ com.alibaba
+ fastjson
+ 2.0.53
+
+
+
+ net.logstash.logback
+ logstash-logback-encoder
+ 4.9
+
+
+
+
+ com.aspose
+ aspose-words
+ 15.8.0
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ cn.com.jit
+ authSDK
+ 3.0.3
+
+
+ commons-httpclient
+ commons-httpclient
+ 3.0.1
+
+
+
+
+
+
+
+ src/main/resources
+ false
+
+
+
+ src/main/resources
+
+ application.yml
+
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.2.5
+
+ true
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ true
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
+ investBoot
+
+
+
+
+ dev
+
+
+ dev
+
+
+
+ true
+
+
+
+ prod
+
+ prod
+
+
+
+
+
diff --git a/src/.DS_Store b/src/.DS_Store
new file mode 100644
index 0000000..3a57a36
Binary files /dev/null and b/src/.DS_Store differ
diff --git a/src/main/java/com/biutag/supervision/InvestBootApplication.java b/src/main/java/com/biutag/supervision/InvestBootApplication.java
new file mode 100644
index 0000000..a578888
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/InvestBootApplication.java
@@ -0,0 +1,21 @@
+package com.biutag.supervision;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@EnableAsync
+@EnableCaching
+@EnableScheduling
+@SpringBootApplication
+@EnableAspectJAutoProxy
+public class InvestBootApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(InvestBootApplication.class, args);
+ }
+
+}
diff --git a/src/main/java/com/biutag/supervision/common/UserContextHolder.java b/src/main/java/com/biutag/supervision/common/UserContextHolder.java
new file mode 100644
index 0000000..e24e9f5
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/common/UserContextHolder.java
@@ -0,0 +1,34 @@
+package com.biutag.supervision.common;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.Header;
+import com.biutag.supervision.constants.RedisKeyConstants;
+import com.biutag.supervision.exception.AuthException;
+import com.biutag.supervision.pojo.model.UserAuth;
+import com.biutag.supervision.util.SpringUtil;
+import jakarta.servlet.http.HttpServletRequest;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+public class UserContextHolder {
+
+ public static String getCurrentToken() {
+ HttpServletRequest request = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
+ return request.getHeader(Header.AUTHORIZATION.getValue());
+ }
+
+ public static UserAuth getCurrentUser() {
+ String authorization = getCurrentToken();
+ if (StrUtil.isBlank(authorization)) {
+ throw new AuthException();
+ }
+ UserAuth userAuth = (UserAuth) SpringUtil.getBean("redisTemplate", RedisTemplate.class).opsForValue().get(String.format(RedisKeyConstants.LOGIN_USERINFO_KEY, authorization));
+ return userAuth;
+ }
+
+ public static String getCurrentUserId() {
+ return getCurrentUser().getUserId();
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/common/validation/AddGroup.java b/src/main/java/com/biutag/supervision/common/validation/AddGroup.java
new file mode 100644
index 0000000..3be19b8
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/common/validation/AddGroup.java
@@ -0,0 +1,8 @@
+package com.biutag.supervision.common.validation;
+
+/**
+ * @author wxc
+ * @date 2024/11/7
+ */
+public interface AddGroup {
+}
diff --git a/src/main/java/com/biutag/supervision/common/validation/EditGroup.java b/src/main/java/com/biutag/supervision/common/validation/EditGroup.java
new file mode 100644
index 0000000..c1dc093
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/common/validation/EditGroup.java
@@ -0,0 +1,8 @@
+package com.biutag.supervision.common.validation;
+
+/**
+ * @author wxc
+ * @date 2024/11/7
+ */
+public interface EditGroup {
+}
diff --git a/src/main/java/com/biutag/supervision/config/CorsConfig.java b/src/main/java/com/biutag/supervision/config/CorsConfig.java
new file mode 100644
index 0000000..d5d1d13
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/config/CorsConfig.java
@@ -0,0 +1,33 @@
+package com.biutag.supervision.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+/**
+ * @author wxc
+ * @date 2025/4/12
+ */
+@Configuration
+public class CorsConfig {
+
+ private CorsConfiguration corsConfig() {
+ CorsConfiguration corsConfiguration = new CorsConfiguration();
+ corsConfiguration.addAllowedOriginPattern("*"); //允许所有域名访问
+ corsConfiguration.addAllowedHeader("*"); //允许所有请求头
+ corsConfiguration.addAllowedMethod("*"); //允许所有的请求类型
+ corsConfiguration.setMaxAge(3600L);
+ corsConfiguration.setAllowCredentials(true); //允许请求携带验证信息(cookie)
+ return corsConfiguration;
+ }
+
+ @Bean
+ public CorsFilter corsFilter() {
+ //存储request与跨域配置信息的容器,基于url的映射
+ UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+ source.registerCorsConfiguration("/**", corsConfig());
+ return new CorsFilter(source);
+ }
+}
diff --git a/src/main/java/com/biutag/supervision/config/FastDFSConfig.java b/src/main/java/com/biutag/supervision/config/FastDFSConfig.java
new file mode 100644
index 0000000..d3aedd2
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/config/FastDFSConfig.java
@@ -0,0 +1,20 @@
+package com.biutag.supervision.config;
+
+import com.github.tobato.fastdfs.domain.conn.TrackerConnectionManager;
+import jakarta.annotation.PostConstruct;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+@ComponentScan("com.github.tobato.fastdfs")
+@Configuration
+public class FastDFSConfig {
+
+ @Autowired
+ private TrackerConnectionManager trackerConnectionManager;
+
+ @PostConstruct
+ public void init() {
+ trackerConnectionManager.initTracker();
+ }
+}
diff --git a/src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java b/src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java
new file mode 100644
index 0000000..d83bb84
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java
@@ -0,0 +1,62 @@
+package com.biutag.supervision.config;
+
+import com.biutag.supervision.exception.AuthException;
+import com.biutag.supervision.pojo.Result;
+import jakarta.validation.ValidationException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.dao.DataAccessException;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.ResponseStatus;
+
+import java.util.stream.Collectors;
+
+@Slf4j
+@ControllerAdvice
+public class GlobalExceptionHandler {
+
+ @ResponseStatus(HttpStatus.OK)
+ @ExceptionHandler(Exception.class)
+ @ResponseBody
+ public Result