fix: 人员数据治理迁移功能优化2

This commit is contained in:
2026-11-12 11:34:53 +08:00
parent d64018d5a2
commit 671f586737
3 changed files with 158 additions and 92 deletions
+3 -3
View File
@@ -3,7 +3,7 @@
/*
* 人员数据治理 API 配置测试服务,仅使用 Node.js 内置模块。
* 启动此文件后默认监听 http://127.0.0.1:18080,可通过 HOST、PORT 环境变量修改。
* 所有人员信息均为模拟数据,每次启动生成相同的 100 条记录,不连接数据库。
* 所有人员信息均为模拟数据,每次启动生成相同的 240 条记录,不连接数据库。
*
* API 配置示例(地址中的主机需保证 Java 服务能够访问):
* Token 地址:http://127.0.0.1:18080/api/token,POST,JSON 请求体 {}
@@ -20,7 +20,7 @@
* 人员配置:bmmz→unitId,值与机构接口的 dwdm 相同。
* 分页 Query 参数:pageNumber=${页码}、pageSize=${数量},例如起始页码 1、数量 20。
* POST JSON 也可使用 {"pageNumber":"${页码}","pageSize":"${数量}"}。
* 也支持 page 和 pagesize。不配置分页参数时返回全部 100 条人员或 5 条机构。
* 也支持 page 和 pagesize。不配置分页参数时默认返回第 1 页,每页 100 条。
* 默认不要求认证;MOCK_REQUIRE_TOKEN=1 时,数据接口要求以下任意一种凭证:
* Header Authorization: Bearer ${Access_Token}
* Query 或 JSON 参数 access_token: ${Access_Token}
@@ -43,7 +43,7 @@ const units = [
{ dwdm: 'MOCK-D5', dwmc: '教务处', bmflmc: '行政单位' }
];
const persons = Array.from({ length: 100 }, (_, index) => {
const persons = Array.from({ length: 240 }, (_, index) => {
const number = index + 1;
const suffix = String(number).padStart(3, '0');
const { dwdm: departmentCode, dwmc: departmentName } = units[index % units.length];