feat(server): 后端从原型 fms-api 迁入并重整包结构

迁移:包名 cn.g3soft.fmsapi → cn.g3soft.erp;artifactId/name fms-api → erp-api;启动类 FmsApiApplication → ErpApiApplication;配置前缀 fms.* → erp.*;FMS_JWT_SECRET → ERP_JWT_SECRET;未带入流程引擎(service/workflow、WorkflowController*)、数据库迁移脚本(config/migrations、tools/migration)与 data/files;一并迁入 Maven Wrapper、config/dbconfigs、config/legacy-tls.security、start.cmd。

重构:拆解 utils.DbUtils(1470 行)为 common.util.SqlText + database.{MetadataReader,RowReader,RowWriter} + database.model(5 个 record);认证专用账号查询移出访问层到 service.auth.UserAccountReader;新建 common/(ApiResponse + exception 6 + util 5 + util/snowflake 9);database/ 分 org/(多机构连接)与 model/(纯数据载体);JwtUtils 与客户端信息采集簇归入 service.auth。

清理:删除迁移带入的空目录、HELP.md,及 pom 中 Initializr 留下的空 url/licenses/developers/scm;修正 OrgDataSourceFactoryTests 的陈旧断言(停留在 2026-07 的旧策略,实现已于 2026-08 反转为继续重试、不停建连线程、不 failFast)。

验证:mvn test 80/80 通过;另有 2 个 @SpringBootTest 需真实 SQL Server。本次仅提交 server/;根 .gitignore、根 .gitattributes 与 docs/ 的同步改动不在本次范围内。
This commit is contained in:
oneao committed 2026-10-12 20:04:52 +08:00
1 parent 97fe2ff306
commit ae3ca3cfa1
103 files changed
+13567 -6

No files matched your search

+102
View File
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.1.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>cn.g3soft</groupId>
<artifactId>erp-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>erp-api</name>
<description>erp-api</description>
<properties>
<java.version>21</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.2.18</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.12.6</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
<version>3.3.7</version>
</dependency>
<dependency>
<groupId>com.github.ua-parser</groupId>
<artifactId>uap-java</artifactId>
<version>1.6.1</version>
</dependency>
<!-- Excel 导出:Apache Fesod (Incubating)(EasyExcel 的 Apache 续作),
自带 POI 5.5.1 / Commons CSV / Ehcache,不要再单独引 POI 以免版本冲突 -->
<dependency>
<groupId>org.apache.fesod</groupId>
<artifactId>fesod-sheet</artifactId>
<version>2.0.2-incubating</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>