feat: 修复测试跟踪用例导出没ID的问题

修复测试跟踪用例导出没ID的问题
This commit is contained in:
song-tianyang 2021-05-26 14:56:27 +08:00 committed by 刘瑞斌
parent 78237dfb0e
commit 75cf54aaab
1 changed files with 6 additions and 1 deletions

View File

@ -782,6 +782,7 @@ public class TestCaseService {
private List<TestCaseExcelData> generateTestCaseExcel(TestCaseBatchRequest request) {
ServiceUtils.getSelectAllIds(request, request.getCondition(),
(query) -> extTestCaseMapper.selectIds(query));
boolean isUseCustomId = projectService.useCustomNum(request.getProjectId());
QueryTestCaseRequest condition = request.getCondition();
List<OrderRequest> orderList = new ArrayList<>();
if (condition != null) {
@ -802,7 +803,11 @@ public class TestCaseService {
data.setName(t.getName());
data.setNodePath(t.getNodePath());
data.setPriority(t.getPriority());
data.setCustomNum(t.getCustomNum());
if(isUseCustomId){
data.setCustomNum(t.getCustomNum());
}else{
data.setCustomNum(String.valueOf(t.getNum()));
}
if (StringUtils.isBlank(t.getStepModel())) {
data.setStepModel(TestCaseConstants.StepModel.STEP.name());
} else {