fix(测试跟踪): 功能用例导出缺少步骤等信息

--bug=1015638 --user=陈建星 【测试跟踪】【2.0分支】功能用例导出,步骤、期望、前置条件、备注都没有了 https://www.tapd.cn/55049933/s/1217893
This commit is contained in:
chenjianxing 2022-08-02 21:04:23 +08:00 committed by f2c-ci-robot[bot]
parent 08578e7a85
commit 84df53f115
1 changed files with 14 additions and 1 deletions

View File

@ -1554,9 +1554,22 @@ public class TestCaseService {
return listTestCase(request.getCondition(), true); return listTestCase(request.getCondition(), true);
} }
public List<TestCaseDTO> getExportData(TestCaseBatchRequest request) {
ServiceUtils.getSelectAllIds(request, request.getCondition(),
(query) -> extTestCaseMapper.selectIds(query));
this.initRequest(request.getCondition(), true);
setDefaultOrder(request.getCondition());
Map<String, List<String>> filters = request.getCondition().getFilters();
if (filters != null && !filters.containsKey("status")) {
filters.put("status", new ArrayList<>(0));
}
List<TestCaseDTO> testCaseList = extTestCaseMapper.listByTestCaseIds(request);
return testCaseList;
}
private List<TestCaseExcelData> generateTestCaseExcel(TestCaseBatchRequest request) { private List<TestCaseExcelData> generateTestCaseExcel(TestCaseBatchRequest request) {
request.getCondition().setStatusIsNot("Trash"); request.getCondition().setStatusIsNot("Trash");
List<TestCaseDTO> testCaseList = this.findByBatchRequest(request); List<TestCaseDTO> testCaseList = this.getExportData(request);
boolean isUseCustomId = projectService.useCustomNum(request.getProjectId()); boolean isUseCustomId = projectService.useCustomNum(request.getProjectId());
List<TestCaseExcelData> list = new ArrayList<>(); List<TestCaseExcelData> list = new ArrayList<>();
StringBuilder step = new StringBuilder(""); StringBuilder step = new StringBuilder("");