用「WCF + 通用存储过程网关」接口替代 Selenium(D://Learning//Python//工单自动化)导入工单: 单 Sprint 12 个项目 175s 跑完(旧方案 25~35 分钟),失败可断点续跑且不重复建单。 - 分层:transport(HTTP/协议)/ api(存储过程语义)/ domain(纯规则)/ workflow(阶段编排)/ store(SQLite 台账)/ report / CLI - 幂等:台账驱动断点续跑;dry-run 与跳过行不污染进度;--rollback-on-fail 清理半成品 - 命令:plan / apply / report / status,真实写入需 --yes - tools:只读探针、存储过程源码导出(sp_helptext)、导入诊断 - docs:调研与设计文档(含联调踩到的 5 个坑)+ 6 个关键存储过程源码 实测:Sprint 2026 Sprint 10 的 12 个项目全部完成建单→导入→确认→推送 TFS, 工单 225134–225145,35 个功能模块,重跑 plan 全部 skip-pushed。69 个单测通过。
12 lines
514 B
SQL
12 lines
514 B
SQL
CREATE PROCEDURE [QuickTeam].[usp_BatchImportWorkFeaturesByFeatureIds]
|
|
|
|
@FeatureIds nvarchar(max)
|
|
|
|
AS
|
|
|
|
BEGIN
|
|
|
|
select FeatureCode AS N'模块代码',FeatureName as N'服务模块' , FeatureContent as N'服务内容',FeatureCode+'('+FeatureName+':'+FeatureContent+')' as BackLogItemCode FROM QuickTeam.Feature WHERE FeatureId in (select Data from [QuickTeam].[StringSplit]
|
|
|
|
(@FeatureIds,',')
|
|
|
|
) and FeatureCode!=''
|
|
|
|
END
|
|
|
|
|
|
|
|
--test
|
|
|
|
--exec [QuickTeam].[usp_BatchGetWorkFeaturesByWorkSheetIds] '1,5'
|
|
|