fix: 导出自定义ID
This commit is contained in:
parent
12f28344d0
commit
0e13fc3883
|
@ -11,6 +11,8 @@ public class TestCaseExcelData {
|
|||
@ExcelIgnore
|
||||
private Integer num;
|
||||
@ExcelIgnore
|
||||
private String customNum;
|
||||
@ExcelIgnore
|
||||
private String name;
|
||||
@ExcelIgnore
|
||||
private String nodePath;
|
||||
|
|
|
@ -17,6 +17,11 @@ public class TestCaseExcelDataCn extends TestCaseExcelData {
|
|||
@NotRequired
|
||||
private Integer num;
|
||||
|
||||
@ColumnWidth(50)
|
||||
@ExcelProperty("自定义ID")
|
||||
@NotRequired
|
||||
private String customNum;
|
||||
|
||||
@NotBlank(message = "{cannot_be_null}")
|
||||
@Length(max = 255)
|
||||
@ExcelProperty("用例名称")
|
||||
|
|
|
@ -17,6 +17,11 @@ public class TestCaseExcelDataTw extends TestCaseExcelData {
|
|||
@NotRequired
|
||||
private Integer num;
|
||||
|
||||
@ColumnWidth(50)
|
||||
@ExcelProperty("自定義ID")
|
||||
@NotRequired
|
||||
private String customNum;
|
||||
|
||||
@NotBlank(message = "{cannot_be_null}")
|
||||
@Length(max = 255)
|
||||
@ExcelProperty("用例名稱")
|
||||
|
|
|
@ -18,6 +18,11 @@ public class TestCaseExcelDataUs extends TestCaseExcelData {
|
|||
@NotRequired
|
||||
private Integer num;
|
||||
|
||||
@ColumnWidth(50)
|
||||
@ExcelProperty("Custom ID")
|
||||
@NotRequired
|
||||
private String customNum;
|
||||
|
||||
@NotBlank(message = "{cannot_be_null}")
|
||||
@Length(max = 255)
|
||||
@ExcelProperty("Name")
|
||||
|
|
|
@ -184,6 +184,7 @@ public class TestCaseDataListener extends EasyExcelListener<TestCaseExcelData> {
|
|||
testCase.setProjectId(this.projectId);
|
||||
testCase.setCreateTime(System.currentTimeMillis());
|
||||
testCase.setUpdateTime(System.currentTimeMillis());
|
||||
testCase.setCustomNum(data.getCustomNum());
|
||||
String nodePath = data.getNodePath();
|
||||
|
||||
if (!nodePath.startsWith("/")) {
|
||||
|
|
|
@ -483,7 +483,7 @@ public class TestCaseService {
|
|||
testcase.setSort(sort.getAndIncrement());
|
||||
int number = num.decrementAndGet();
|
||||
testcase.setNum(number);
|
||||
if (project.getCustomNum()) {
|
||||
if (project.getCustomNum() && StringUtils.isBlank(testcase.getCustomNum())) {
|
||||
testcase.setCustomNum(String.valueOf(number));
|
||||
}
|
||||
testcase.setReviewStatus(TestCaseReviewStatus.Prepare.name());
|
||||
|
@ -667,6 +667,7 @@ public class TestCaseService {
|
|||
data.setNodePath(t.getNodePath());
|
||||
data.setPriority(t.getPriority());
|
||||
data.setType(t.getType());
|
||||
data.setCustomNum(t.getCustomNum());
|
||||
if (StringUtils.isBlank(t.getStepModel())) {
|
||||
data.setStepModel(TestCaseConstants.StepModel.STEP.name());
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue