[修改] 报告新增

This commit is contained in:
bupengxiang
2023-05-25 11:12:43 +08:00
parent def9585189
commit 5d392877cf
3 changed files with 4 additions and 4 deletions
@@ -111,5 +111,5 @@ public class ReportEntity {
private List<List<String>> labelList;
@TableField(exist = false)
private List<String> fileList;
private List<ReportFile> fileList;
}
@@ -65,6 +65,7 @@ public class IReportContentServiceImpl extends ServiceImpl<ReportContentDao, Rep
public void insertReportContent(String reportId) throws IOException {
LambdaQueryWrapper<ReportFile> reportFileLambdaQueryWrapper = new LambdaQueryWrapper<>();
reportFileLambdaQueryWrapper.eq(ReportFile::getReportId, reportId);
reportFileLambdaQueryWrapper.eq(ReportFile::getState, 2);
List<ReportFile> reportFiles = reportFileDao.selectList(reportFileLambdaQueryWrapper);
List<String> fileIds = new ArrayList<>();
if (CollectionUtils.isNotEmpty(reportFiles)) {
@@ -154,11 +154,10 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
//文件
reportFileDao.delByReportId(new ReportFile(reportId,2));
List<ReportFile> reportFiles = new ArrayList<>();
for (String s : reportEntity.getFileList()) {
ReportFile reportFile = new ReportFile();
for (ReportFile reportFile : reportEntity.getFileList()) {
reportFile.setId(UUID.randomUUID().replace("-",""));
reportFile.setReportId(reportId);
reportFile.setFileId(s);
// reportFile.setFileId(s);
reportFile.setState(2);
reportFiles.add(reportFile);
}