Merge pull request '修复1、测试用例导出时表格章节号不对问题;2、部分章节测试用例没有导出的问题' (#906) from zengweizhang/microservices:master into dev_testCase_export
This commit is contained in:
commit
743cb69663
|
@ -37,4 +37,5 @@ public class PmsProjectTestcaseVo {
|
|||
private String identifier;
|
||||
|
||||
private String testTracking;
|
||||
|
||||
}
|
||||
|
|
|
@ -564,7 +564,9 @@ public class PmsProjectTestcaseServiceImpl implements IPmsProjectTestcaseService
|
|||
List<PmsProjectTestcaseVo> testcases = getTestcase(item);
|
||||
|
||||
for (PmsProjectTestcaseVo testcase : testcases) {
|
||||
if (testcase.getPmsModuleId() == moduleId) {
|
||||
Long pmsModuleId = testcase.getPmsModuleId();
|
||||
boolean isEqual = Objects.equals(pmsModuleId, moduleId);
|
||||
if (isEqual) {
|
||||
List<PmsProjectTestcaseStepVo> steps = getTestcaseStep(testcase.getId());
|
||||
PendingOutputDataVo pendingOutputData = new PendingOutputDataVo();
|
||||
pendingOutputData.setId(testcase.getId());
|
||||
|
@ -1110,25 +1112,29 @@ public class PmsProjectTestcaseServiceImpl implements IPmsProjectTestcaseService
|
|||
}
|
||||
}
|
||||
|
||||
int chapter = 1;
|
||||
int chapter = 0;
|
||||
while (!stack.isEmpty()) {
|
||||
TreeSelect current = stack.pop();
|
||||
|
||||
// 处理当前节点,这里简单打印节点信息,你可以根据需求修改
|
||||
// System.out.println("ID: " + current.getId() + ", 名称: " + current.getLabel() + ", 层级:" + current.getLevel() + ", 父ID: " + current.getParentId() + ", 是否叶子节点: " + current.getIsLeaf() );
|
||||
if (current.getIsLeaf()) {
|
||||
if (current.getLevel() == 1){
|
||||
chapter = chapter + 1;
|
||||
}
|
||||
if(current.getId() > 0){
|
||||
addNumberedHeading(document, current.getLabel(), current.getLevel());
|
||||
List<PendingOutputDataVo> pendingOutputDatas = GetPendingOutputData(projectId, current.getId());
|
||||
insertTable(document, pendingOutputDatas, chapter);
|
||||
chapter = chapter + 1;
|
||||
} else {
|
||||
addNumberedHeading(document, current.getLabel(), current.getLevel());
|
||||
List<PendingOutputDataVo> pendingOutputDatas = GetPendingOutputData(projectId, null);
|
||||
insertTable(document, pendingOutputDatas, chapter);
|
||||
chapter = chapter + 1;
|
||||
}
|
||||
} else{
|
||||
if (current.getLevel() == 1){
|
||||
chapter = chapter + 1;
|
||||
}
|
||||
if(current.getId() > 0){
|
||||
addNumberedHeading(document, current.getLabel(), current.getLevel());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue