[修改] 报告新增
This commit is contained in:
@@ -111,5 +111,5 @@ public class ReportEntity {
|
|||||||
private List<List<String>> labelList;
|
private List<List<String>> labelList;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<String> fileList;
|
private List<ReportFile> fileList;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -65,6 +65,7 @@ public class IReportContentServiceImpl extends ServiceImpl<ReportContentDao, Rep
|
|||||||
public void insertReportContent(String reportId) throws IOException {
|
public void insertReportContent(String reportId) throws IOException {
|
||||||
LambdaQueryWrapper<ReportFile> reportFileLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ReportFile> reportFileLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
reportFileLambdaQueryWrapper.eq(ReportFile::getReportId, reportId);
|
reportFileLambdaQueryWrapper.eq(ReportFile::getReportId, reportId);
|
||||||
|
reportFileLambdaQueryWrapper.eq(ReportFile::getState, 2);
|
||||||
List<ReportFile> reportFiles = reportFileDao.selectList(reportFileLambdaQueryWrapper);
|
List<ReportFile> reportFiles = reportFileDao.selectList(reportFileLambdaQueryWrapper);
|
||||||
List<String> fileIds = new ArrayList<>();
|
List<String> fileIds = new ArrayList<>();
|
||||||
if (CollectionUtils.isNotEmpty(reportFiles)) {
|
if (CollectionUtils.isNotEmpty(reportFiles)) {
|
||||||
|
|||||||
@@ -154,11 +154,10 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
|||||||
//文件
|
//文件
|
||||||
reportFileDao.delByReportId(new ReportFile(reportId,2));
|
reportFileDao.delByReportId(new ReportFile(reportId,2));
|
||||||
List<ReportFile> reportFiles = new ArrayList<>();
|
List<ReportFile> reportFiles = new ArrayList<>();
|
||||||
for (String s : reportEntity.getFileList()) {
|
for (ReportFile reportFile : reportEntity.getFileList()) {
|
||||||
ReportFile reportFile = new ReportFile();
|
|
||||||
reportFile.setId(UUID.randomUUID().replace("-",""));
|
reportFile.setId(UUID.randomUUID().replace("-",""));
|
||||||
reportFile.setReportId(reportId);
|
reportFile.setReportId(reportId);
|
||||||
reportFile.setFileId(s);
|
// reportFile.setFileId(s);
|
||||||
reportFile.setState(2);
|
reportFile.setState(2);
|
||||||
reportFiles.add(reportFile);
|
reportFiles.add(reportFile);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user