优化
This commit is contained in:
@@ -94,14 +94,23 @@ Assert-MarkdownTableUnique $businessIndexPath '## 业务快速路由表' 0 '详
|
||||
Assert-MarkdownTableUnique $businessIndexPath '## 常用说法与歧义分流' 0 '业务歧义分流表'
|
||||
Assert-Contains $businessIndex '## 业务快速路由表' '详细业务表存在'
|
||||
Assert-Contains $businessIndex '## 常用说法与歧义分流' '业务歧义分流存在'
|
||||
$adminAgents = Read-RequiredText $adminAgentsPath
|
||||
$adminEntry = Read-RequiredText $adminAgentsPath
|
||||
$adminIndexPath = Join-Path $workspaceRoot 'apps/admin-web/docs/business-index.md'
|
||||
$adminIndex = Read-RequiredText $adminIndexPath
|
||||
$adminAgents = $adminEntry + "`n" + $adminIndex
|
||||
$adminOverseasAgentsPath = Join-Path $workspaceRoot 'apps/admin-web/src/modules/overseas-warehouse/AGENTS.md'
|
||||
$adminOverseasAgents = Read-RequiredText $adminOverseasAgentsPath
|
||||
Assert-Contains $adminAgents 'src/modules/overseas-warehouse/AGENTS.md' 'Admin 海外仓按需指引入口'
|
||||
Assert-MarkdownTableUnique $adminOverseasAgentsPath '## 页面与业务快速索引' 0 'Admin 海外仓模块表'
|
||||
$clientAgents = Read-RequiredText $clientAgentsPath
|
||||
$clientEntry = Read-RequiredText $clientAgentsPath
|
||||
$clientIndexPath = Join-Path $workspaceRoot 'apps/client-web/docs/business-index.md'
|
||||
$clientIndex = Read-RequiredText $clientIndexPath
|
||||
$clientAgents = $clientEntry + "`n" + $clientIndex
|
||||
$pdaAgents = Read-RequiredText $pdaAgentsPath
|
||||
$overseasPdaAgents = Read-RequiredText $overseasPdaAgentsPath
|
||||
$overseasPdaEntry = Read-RequiredText $overseasPdaAgentsPath
|
||||
$overseasPdaIndexPath = Join-Path $workspaceRoot 'apps/pda-overseas-uniapp/docs/business-index.md'
|
||||
$overseasPdaIndex = Read-RequiredText $overseasPdaIndexPath
|
||||
$overseasPdaAgents = $overseasPdaEntry + "`n" + $overseasPdaIndex
|
||||
$backendAgents = Read-RequiredText $backendAgentsPath
|
||||
$backendIndexPath = Join-Path $backendRoot 'docs/backend-business-index.md'
|
||||
$lastlegIndexPath = Join-Path $backendRoot 'lastleg-service/docs/business-index.md'
|
||||
@@ -110,30 +119,64 @@ $lastlegIndex = Read-RequiredText $lastlegIndexPath
|
||||
Assert-Contains $backendAgents 'docs/backend-business-index.md' '后端按需索引入口'
|
||||
$lastlegEntry = Read-RequiredText (Join-Path $backendRoot 'lastleg-service/AGENTS.md')
|
||||
Assert-Contains $lastlegEntry 'docs/business-index.md' 'Lastleg 按需索引入口'
|
||||
$firstlegEntryPath = Join-Path $backendRoot 'firstleg/AGENTS.md'
|
||||
$firstlegIndexPath = Join-Path $backendRoot 'firstleg/docs/business-index.md'
|
||||
$firstlegEntry = Read-RequiredText $firstlegEntryPath
|
||||
$firstlegIndex = Read-RequiredText $firstlegIndexPath
|
||||
Assert-Contains $firstlegEntry 'docs/business-index.md' 'Firstleg 按需索引入口'
|
||||
Assert-Contains $firstlegEntry '修改前必须核对该索引对应入口' 'Firstleg 业务变更细则读取边界'
|
||||
Assert-Contains $firstlegIndex '以 `firstleg/` 服务目录起算' 'Firstleg 详细索引路径起点'
|
||||
Assert-Contains $adminEntry 'docs/business-index.md' 'Admin 按需索引入口'
|
||||
Assert-Contains $clientEntry 'docs/business-index.md' 'Client 按需索引入口'
|
||||
Assert-Contains $overseasPdaEntry 'docs/business-index.md' '海外 PDA 按需索引入口'
|
||||
foreach ($applicationDetailIndex in @(
|
||||
@{ Name = 'Admin'; Text = $adminIndex; Base = 'apps/admin-web' },
|
||||
@{ Name = 'Client'; Text = $clientIndex; Base = 'apps/client-web' },
|
||||
@{ Name = '海外 PDA'; Text = $overseasPdaIndex; Base = 'apps/pda-overseas-uniapp' }
|
||||
)) {
|
||||
Assert-Matches $applicationDetailIndex.Text '\[[^\]]+\]\(\.\./AGENTS\.md\)' "$($applicationDetailIndex.Name) 详细索引链接应用主指引"
|
||||
Assert-Path "$($applicationDetailIndex.Base)/docs/../AGENTS.md"
|
||||
}
|
||||
Assert-MarkdownTableUnique $adminAgentsPath '## 模块快速路由' 0 'Admin 短入口表'
|
||||
Assert-MarkdownTableUnique $adminIndexPath '## 模块快速路由' 0 'Admin 详细索引表'
|
||||
Assert-MarkdownTableUnique $clientAgentsPath '## 模块快速查询' 0 'Client 短入口表'
|
||||
Assert-MarkdownTableUnique $clientIndexPath '## 模块快速查询' 0 'Client 详细索引表'
|
||||
Assert-MarkdownTableUnique $overseasPdaAgentsPath '## 页面与能力快速索引' 0 '海外 PDA 短入口表'
|
||||
Assert-MarkdownTableUnique $overseasPdaIndexPath '## 页面与能力快速索引' 0 '海外 PDA 详细索引表'
|
||||
foreach ($readingBoundary in @($adminEntry, $clientEntry, $overseasPdaEntry)) {
|
||||
Assert-Contains $readingBoundary '涉及业务行为变更时必须核对对应细则' '终端业务细则读取边界'
|
||||
}
|
||||
foreach ($budget in @(
|
||||
@{ Name = '后端根'; Text = $backendAgents; Limit = 13000 },
|
||||
@{ Name = 'Lastleg'; Text = $lastlegEntry; Limit = 18000 }
|
||||
@{ Name = 'Firstleg'; Text = $firstlegEntry; Limit = 8000 },
|
||||
@{ Name = 'Lastleg'; Text = $lastlegEntry; Limit = 9000 },
|
||||
@{ Name = 'Admin'; Text = $adminEntry; Limit = 8000 },
|
||||
@{ Name = 'Client'; Text = $clientEntry; Limit = 8000 },
|
||||
@{ Name = '海外 PDA'; Text = $overseasPdaEntry; Limit = 8000 }
|
||||
)) {
|
||||
$script:checked++
|
||||
if ($budget.Text.Length -gt $budget.Limit) { Add-Failure "$($budget.Name) 指引超出字符预算 $($budget.Limit),请将细节按需下沉" }
|
||||
$normalizedLength = ($budget.Text -replace "`r`n", "`n").Length
|
||||
if ($normalizedLength -gt $budget.Limit) { Add-Failure "$($budget.Name) 指引超出字符预算 $($budget.Limit),请将细节按需下沉" }
|
||||
}
|
||||
Assert-MarkdownTableUnique $backendIndexPath '## 服务路由(按关键词定位)' 0 '后端详细索引'
|
||||
Assert-MarkdownTableUnique $lastlegIndexPath '## 快速索引' 0 'Lastleg 详细索引'
|
||||
Assert-MarkdownTableUnique $firstlegEntryPath '## 模块入口' 0 'Firstleg 首个代码入口'
|
||||
Assert-MarkdownTableUnique $firstlegIndexPath '## 模块入口' 0 'Firstleg 详细索引'
|
||||
# 保留全部业务语义断言,只将事实读取范围扩展到明确链接的按需文档。
|
||||
$backendAgents += "`n" + $backendIndex
|
||||
|
||||
# 固定样本只检查目标索引行和真实文件,不递归搜索;字符数是读取量指标,不是耗时或 Token 实测。
|
||||
$lookupSamples = @(
|
||||
@{ Key = '客户专属价格簿'; Text = $adminAgents; Entry = 'modules/fba-pricing/carrier-rates/pages/CarrierRateDetailView.vue'; Base = 'apps/admin-web/src' },
|
||||
@{ Key = '入库扣货、解除与凭证历史'; Text = $adminAgents; Entry = 'modules/unified-orders/pages/UnifiedOrdersView.vue'; Base = 'apps/admin-web/src' },
|
||||
@{ Key = '国内/海外 PDA 独立人员'; Text = $adminAgents; Entry = 'modules/iam/pages/InternalUsersView.vue'; Base = 'apps/admin-web/src' },
|
||||
@{ Key = '客户专属价格簿'; Text = $adminEntry; Entry = 'modules/fba-pricing/carrier-rates/pages/CarrierRateDetailView.vue'; Base = 'apps/admin-web/src' },
|
||||
@{ Key = '入库扣货、解除与凭证历史'; Text = $adminEntry; Entry = 'modules/unified-orders/pages/UnifiedOrdersView.vue'; Base = 'apps/admin-web/src' },
|
||||
@{ Key = '国内/海外 PDA 独立人员'; Text = $adminEntry; Entry = 'modules/iam/pages/InternalUsersView.vue'; Base = 'apps/admin-web/src' },
|
||||
@{ Key = '尾程订单控制'; Text = $adminOverseasAgents; Entry = 'pages/LastMileOrdersView.vue'; Base = 'apps/admin-web/src/modules/overseas-warehouse' },
|
||||
@{ Key = '排车查询'; Text = $adminOverseasAgents; Entry = 'pages/DispatchesView.vue'; Base = 'apps/admin-web/src/modules/overseas-warehouse' },
|
||||
@{ Key = '海外出库与派送'; Text = $adminOverseasAgents; Entry = 'pages/OutboundsView.vue'; Base = 'apps/admin-web/src/modules/overseas-warehouse' },
|
||||
@{ Key = '异常退回与客户回访'; Text = $adminOverseasAgents; Entry = 'pages/ExceptionOrdersView.vue'; Base = 'apps/admin-web/src/modules/overseas-warehouse' },
|
||||
@{ Key = '库存余额'; Text = $adminOverseasAgents; Entry = 'pages/InventoryView.vue'; Base = 'apps/admin-web/src/modules/overseas-warehouse' },
|
||||
@{ Key = '退货入库签收与合箱'; Text = $overseasPdaAgents; Entry = 'src/pages/return-receipt/return-receipt.vue'; Base = 'apps/pda-overseas-uniapp' },
|
||||
@{ Key = '退货入库签收与合箱'; Text = $overseasPdaAgents; Entry = 'src/pages/return-packing/return-packing.vue'; Base = 'apps/pda-overseas-uniapp' }
|
||||
@{ Key = '退货入库签收与合箱'; Text = $overseasPdaEntry; Entry = 'src/pages/return-receipt/return-receipt.vue'; Base = 'apps/pda-overseas-uniapp' },
|
||||
@{ Key = '退货入库签收与合箱'; Text = $overseasPdaEntry; Entry = 'src/pages/return-packing/return-packing.vue'; Base = 'apps/pda-overseas-uniapp' }
|
||||
)
|
||||
$lookupCharacters = 0
|
||||
foreach ($alias in @(
|
||||
@@ -278,7 +321,7 @@ Assert-Path 'baiyue-firstleg/scripts/README.md'
|
||||
Assert-Path 'baiyue-firstleg/scripts/script-documentation-contract.test.mjs'
|
||||
Assert-Contains $mapperScanContract 'annotationClass = Mapper.class' 'Mapper 根包注解过滤合同'
|
||||
Assert-Contains $mapperScanContract '禁止分散维护 MapperScan' 'Mapper 单一扫描入口合同'
|
||||
$firstlegAgents = Read-RequiredText (Join-Path $backendRoot 'firstleg/AGENTS.md')
|
||||
$firstlegAgents = $firstlegEntry + "`n" + $firstlegIndex
|
||||
$lastlegAgents = $lastlegEntry + "`n" + $lastlegIndex
|
||||
$warehouseAgents = Read-RequiredText (Join-Path $backendRoot 'warehouse/AGENTS.md')
|
||||
$coloadOpenApi = Read-RequiredText (Join-Path $backendRoot 'firstleg/src/main/resources/openapi/coload-groups-v1.yaml')
|
||||
@@ -382,7 +425,9 @@ Assert-Path 'baiyue-firstleg/firstleg/src/main/java/com/baiyue/firstleg/pricing/
|
||||
# 海外异常处理必须贯通证据、原出库来源和库存恢复,不能退化为仅修改派送状态。
|
||||
$exceptionOrderService = Read-RequiredText (Join-Path $backendRoot 'lastleg-service/src/main/java/com/baiyue/lastleg/exceptionorder/service/ExceptionOrderService.java')
|
||||
$inventoryCommandService = Read-RequiredText (Join-Path $backendRoot 'lastleg-service/src/main/java/com/baiyue/lastleg/inventory/command/service/InventoryCommandService.java')
|
||||
Assert-Contains $businessIndex '退回海外仓时先把实收恢复到指定真实托盘/库位' '根海外异常库存恢复路由'
|
||||
Assert-Contains $businessIndex '海外出库、排车、派送、异常与回访' '根海外异常库存恢复路由'
|
||||
Assert-Contains $businessIndex 'exceptionorder/' '根海外异常服务入口'
|
||||
Assert-Contains $lastlegIndex '退回海外仓须把实收按原出库来源恢复到服务端校验的真实托盘/库位' 'Lastleg 海外异常库存恢复规则'
|
||||
Assert-Contains $adminOverseasAgents '库存恢复、异常完成与派送 `RETURNED` 由服务端原子推进' 'Admin 海外异常原子边界'
|
||||
Assert-Contains $backendAgents '海外异常退回、库存恢复与客户回访' '后端海外异常库存恢复路由'
|
||||
Assert-Contains $lastlegAgents 'ExceptionEvidenceFileGateway.java' 'Lastleg 异常证据入口'
|
||||
@@ -719,6 +764,30 @@ Assert-Contains $lastlegAgents '海外仓全流程连续覆盖' 'Lastleg 海外
|
||||
Assert-Contains $overseasPdaAgents '排车拣货与发车' '海外 PDA 排车入口'
|
||||
Assert-Contains $overseasPdaAgents '普通/一件代发出库' '海外 PDA 出库入口'
|
||||
|
||||
# 排车新主流程按单号、公开版本和动作资格定位,不再指向独立车次发车请求。
|
||||
Assert-Contains $overseasPdaEntry 'departDispatch' '海外 PDA 当前发车调用入口'
|
||||
Assert-Contains $overseasPdaIndex 'actions.PICK/LOADING_COMPLETE/DEPART' '海外 PDA 服务端动作资格'
|
||||
Assert-Contains $overseasPdaIndex 'recordVersion' '海外 PDA 排车公开版本'
|
||||
Assert-Contains $lastlegIndex 'docs/海外仓业务/排车列表统一作业改造契约.md' 'Lastleg 当前排车主契约'
|
||||
Assert-NotContains $overseasPdaAgents 'tripDepartureRequest' '海外 PDA 旧车次发车入口退出'
|
||||
Assert-NotContains $overseasPdaAgents 'tripRecordVersion' '海外 PDA 旧车次版本退出'
|
||||
Assert-Contains $lastlegEntry 'dispatch/controller/DispatchAggregateController.java' 'Lastleg 主指引平台整车入口'
|
||||
Assert-Contains $lastlegEntry 'dispatch/pda/controller/DispatchPdaController.java' 'Lastleg 主指引 PDA 整车入口'
|
||||
Assert-Contains $lastlegEntry 'DispatchDepartureService.java' 'Lastleg 主指引共用发车服务'
|
||||
foreach ($lastlegDispatchGuide in @(
|
||||
@{ Name = 'Lastleg 主指引'; Text = $lastlegEntry },
|
||||
@{ Name = 'Lastleg 详细索引'; Text = $lastlegIndex }
|
||||
)) {
|
||||
Assert-Contains $lastlegDispatchGuide.Text 'recordVersion' "$($lastlegDispatchGuide.Name) 排车公开版本"
|
||||
foreach ($obsoleteDispatchRule in @('提交车次版本', 'tripRecordVersion', 'READY_TO_DEPART')) {
|
||||
Assert-NotContains $lastlegDispatchGuide.Text $obsoleteDispatchRule "$($lastlegDispatchGuide.Name) 旧排车规则退出"
|
||||
}
|
||||
}
|
||||
$lastlegPdaPublicController = Read-RequiredText (Join-Path $backendRoot 'lastleg-service/src/main/java/com/baiyue/lastleg/dispatch/pda/controller/DispatchPdaController.java')
|
||||
Assert-Contains $lastlegPdaPublicController 'DispatchDepartureService' 'Lastleg PDA 真实入口使用共用发车服务'
|
||||
Assert-Contains $lastlegPdaPublicController 'DispatchCommands.Depart' 'Lastleg PDA 真实入口使用公开发车命令'
|
||||
Assert-Path 'baiyue-firstleg/lastleg-service/src/main/java/com/baiyue/lastleg/dispatch/service/DispatchDepartureService.java'
|
||||
|
||||
# Admin 仅对静态资源过期做一次受控恢复,不能吞掉普通路由错误或覆盖未保存编辑。
|
||||
$navigationRecovery = Read-RequiredText (Join-Path $workspaceRoot 'apps/admin-web/src/core/routing/navigationRecovery.ts')
|
||||
Assert-Contains $navigationRecovery 'const RECOVERY_WINDOW_MS = 30_000' 'Admin 路由恢复窗口'
|
||||
@@ -796,7 +865,7 @@ Assert-Contains $carrierScheduleOpenApi 'estimated facts never advance actual pr
|
||||
Assert-Contains $adminContainerDetail 'confirmDeparture' 'Admin 货柜详情确认离仓'
|
||||
|
||||
# 装柜完成后的整柜报关必须保持客户退税资料、平台冻结/完成与 File 二进制边界一致。
|
||||
$firstlegAgents = Read-RequiredText (Join-Path $backendRoot 'firstleg/AGENTS.md')
|
||||
$firstlegAgents = $firstlegEntry + "`n" + $firstlegIndex
|
||||
$containerCustomsOpenApi = Read-RequiredText (Join-Path $backendRoot 'firstleg/src/main/resources/openapi/customs-v1.yaml')
|
||||
$adminContainerCustomsApi = Read-RequiredText (Join-Path $workspaceRoot 'apps/admin-web/src/modules/container-loading/api/platformContainerCustoms.ts')
|
||||
$clientContainerCustomsApi = Read-RequiredText (Join-Path $workspaceRoot 'apps/client-web/src/modules/first-leg/api/customs.ts')
|
||||
@@ -1242,6 +1311,10 @@ $indexedAgentFiles = @(
|
||||
$backendAgentsPath,
|
||||
$backendIndexPath,
|
||||
$lastlegIndexPath,
|
||||
$firstlegIndexPath,
|
||||
$adminIndexPath,
|
||||
$clientIndexPath,
|
||||
$overseasPdaIndexPath,
|
||||
(Join-Path $backendRoot 'firstleg/AGENTS.md'),
|
||||
(Join-Path $backendRoot 'finance/AGENTS.md'),
|
||||
(Join-Path $backendRoot 'lastleg-service/AGENTS.md'),
|
||||
|
||||
Reference in New Issue
Block a user