fix(测试计划): 修复手动生成报告问题
This commit is contained in:
parent
026b8a9786
commit
53293f50e6
|
@ -256,6 +256,7 @@ public class TestPlanReportService {
|
||||||
TestPlanReport record = new TestPlanReport();
|
TestPlanReport record = new TestPlanReport();
|
||||||
record.setId(genReportId);
|
record.setId(genReportId);
|
||||||
record.setDefaultLayout(false);
|
record.setDefaultLayout(false);
|
||||||
|
record.setName(request.getReportName());
|
||||||
testPlanReportMapper.updateByPrimaryKeySelective(record);
|
testPlanReportMapper.updateByPrimaryKeySelective(record);
|
||||||
// 处理富文本文件
|
// 处理富文本文件
|
||||||
transferRichTextTmpFile(genReportId, request.getProjectId(), request.getRichTextTmpFileIds(), currentUser, TestPlanReportAttachmentSourceType.RICH_TEXT.name());
|
transferRichTextTmpFile(genReportId, request.getProjectId(), request.getRichTextTmpFileIds(), currentUser, TestPlanReportAttachmentSourceType.RICH_TEXT.name());
|
||||||
|
@ -602,7 +603,7 @@ public class TestPlanReportService {
|
||||||
public List<TestPlanReportComponent> getLayout(String reportId) {
|
public List<TestPlanReportComponent> getLayout(String reportId) {
|
||||||
TestPlanReportComponentExample example = new TestPlanReportComponentExample();
|
TestPlanReportComponentExample example = new TestPlanReportComponentExample();
|
||||||
example.createCriteria().andTestPlanReportIdEqualTo(reportId);
|
example.createCriteria().andTestPlanReportIdEqualTo(reportId);
|
||||||
return componentMapper.selectByExample(example);
|
return componentMapper.selectByExampleWithBLOBs(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -622,11 +623,10 @@ public class TestPlanReportService {
|
||||||
testPlanReportSummaryMapper.updateByExampleSelective(reportSummary, example);
|
testPlanReportSummaryMapper.updateByExampleSelective(reportSummary, example);
|
||||||
} else {
|
} else {
|
||||||
// 手动生成的布局, 只更新富文本组件的内容
|
// 手动生成的布局, 只更新富文本组件的内容
|
||||||
TestPlanReportComponentExample componentExample = new TestPlanReportComponentExample();
|
|
||||||
componentExample.createCriteria().andIdEqualTo(request.getComponentId());
|
|
||||||
TestPlanReportComponent record = new TestPlanReportComponent();
|
TestPlanReportComponent record = new TestPlanReportComponent();
|
||||||
|
record.setId(request.getComponentId());
|
||||||
record.setValue(request.getComponentValue());
|
record.setValue(request.getComponentValue());
|
||||||
componentMapper.updateByExample(record, componentExample);
|
componentMapper.updateByPrimaryKeySelective(record);
|
||||||
}
|
}
|
||||||
// 处理富文本文件
|
// 处理富文本文件
|
||||||
transferRichTextTmpFile(request.getId(), planReport.getProjectId(), request.getRichTextTmpFileIds(), currentUser, TestPlanReportAttachmentSourceType.RICH_TEXT.name());
|
transferRichTextTmpFile(request.getId(), planReport.getProjectId(), request.getRichTextTmpFileIds(), currentUser, TestPlanReportAttachmentSourceType.RICH_TEXT.name());
|
||||||
|
|
|
@ -575,7 +575,7 @@
|
||||||
try {
|
try {
|
||||||
const params: UpdateReportDetailParams = {
|
const params: UpdateReportDetailParams = {
|
||||||
id: detail.value.id,
|
id: detail.value.id,
|
||||||
componentId: currentItem.type,
|
componentId: currentItem.id,
|
||||||
componentValue: currentItem.content,
|
componentValue: currentItem.content,
|
||||||
richTextTmpFileIds: currentItem.richTextTmpFileIds,
|
richTextTmpFileIds: currentItem.richTextTmpFileIds,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue