|
@@ -56,29 +56,23 @@ public class ArchiveExaminingReportImpl extends BaseServiceImpl<ArchiveExamining
|
|
|
@Async
|
|
|
@Override
|
|
|
public void pushStatusBySocket(Long userId,Long id) throws IOException, InterruptedException {
|
|
|
- Integer status=1;
|
|
|
- Date date = new Date();
|
|
|
+ Integer statusR = 1;
|
|
|
+ Integer statusD = 0;
|
|
|
//获取检测状态,如果正在检测,则数据变化时发送
|
|
|
do {
|
|
|
Thread.sleep(4000L);
|
|
|
//判断报告状态
|
|
|
ArchiveExaminingReport report = this.getById(id);
|
|
|
Integer reportStatus = report.getStatus();
|
|
|
+ Integer detailStatus = report.getReportDetailStatus();
|
|
|
//判断详情状态
|
|
|
- ArchiveExaminingReportDetail detail = detailService.getOne(new LambdaQueryWrapper<ArchiveExaminingReportDetail>()
|
|
|
- .eq(ArchiveExaminingReportDetail::getReportId, id)
|
|
|
- .orderByDesc(ArchiveExaminingReportDetail::getCreateTime)
|
|
|
- .last("limit 1"));
|
|
|
- if (detail == null){
|
|
|
- detail = new ArchiveExaminingReportDetail();
|
|
|
- detail.setCreateTime(date);
|
|
|
- }
|
|
|
- if (reportStatus != status || detail.getCreateTime() != date){
|
|
|
+
|
|
|
+ if (reportStatus != statusR || detailStatus != statusD){
|
|
|
webSocketServer.sendMessagesToArchive(userId+"","true");
|
|
|
- status = reportStatus;
|
|
|
- date = detail.getCreateTime();
|
|
|
+ statusR = reportStatus;
|
|
|
+ statusD = detailStatus;
|
|
|
}
|
|
|
- }while (status != 4);
|
|
|
+ }while (statusR != 4);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -121,6 +115,8 @@ public class ArchiveExaminingReportImpl extends BaseServiceImpl<ArchiveExamining
|
|
|
ArchiveConstant.ARCHIVE_EXAMINING_STANDARD + "对电子档案封装包规范性检测", 0, "无", 0));
|
|
|
detailService.save(new ArchiveExaminingReportDetail(vo.getProjectId(), id, ArchiveConstant.ARCHIVE_EXAMINING_AUTHENTICITY,
|
|
|
ArchiveConstant.ARCHIVE_EXAMINING_STANDARD + "对电子档案封装包电子前面有效性检测", 0, "无", 0));
|
|
|
+ report.setReportDetailStatus(1);
|
|
|
+ this.updateById(report);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(vo.getIntegrality()) && "1".equals(vo.getIntegrality())) {
|
|
|
Thread.sleep(5000L);
|
|
@@ -147,6 +143,8 @@ public class ArchiveExaminingReportImpl extends BaseServiceImpl<ArchiveExamining
|
|
|
ArchiveConstant.ARCHIVE_EXAMINING_STANDARD + "对信息包元数据完整性检测", 0, "无", 0));
|
|
|
detailService.save(new ArchiveExaminingReportDetail(vo.getProjectId(), id, ArchiveConstant.ARCHIVE_EXAMINING_INTEGRALITY,
|
|
|
ArchiveConstant.ARCHIVE_EXAMINING_STANDARD + "对信息包内容数据完整性检测", 0, "无", 0));
|
|
|
+ report.setReportDetailStatus(2);
|
|
|
+ this.updateById(report);
|
|
|
}
|
|
|
//可用性
|
|
|
if (StringUtils.isNotBlank(vo.getUsability()) && "1".equals(vo.getUsability())) {
|
|
@@ -167,6 +165,8 @@ public class ArchiveExaminingReportImpl extends BaseServiceImpl<ArchiveExamining
|
|
|
ArchiveConstant.ARCHIVE_EXAMINING_STANDARD + "对信息包中包含的内容数据格式合规性检测", 0, "无", 0));
|
|
|
detailService.save(new ArchiveExaminingReportDetail(vo.getProjectId(), id, ArchiveConstant.ARCHIVE_EXAMINING_USABILITY,
|
|
|
ArchiveConstant.ARCHIVE_EXAMINING_STANDARD + "对备份数据可恢复性检测", 0, "无", 0));
|
|
|
+ report.setReportDetailStatus(3);
|
|
|
+ this.updateById(report);
|
|
|
}
|
|
|
//安全性
|
|
|
if (StringUtils.isNotBlank(vo.getSecurity()) && "1".equals(vo.getSecurity())) {
|
|
@@ -175,12 +175,14 @@ public class ArchiveExaminingReportImpl extends BaseServiceImpl<ArchiveExamining
|
|
|
ArchiveConstant.ARCHIVE_EXAMINING_STANDARD + "对系统环境中是否安装杀毒软件检测", 0, "无", 0));
|
|
|
detailService.save(new ArchiveExaminingReportDetail(vo.getProjectId(), id, ArchiveConstant.ARCHIVE_EXAMINING_SECURITY,
|
|
|
ArchiveConstant.ARCHIVE_EXAMINING_STANDARD + "对病毒感染检测", 0, "无", 0));
|
|
|
+ report.setReportDetailStatus(4);
|
|
|
+ this.updateById(report);
|
|
|
}
|
|
|
//生成报告,生成PDF
|
|
|
report.setStatus(3);
|
|
|
this.updateById(report);
|
|
|
String url = this.generateReportPdf(id);
|
|
|
- Thread.sleep(3000L);
|
|
|
+ Thread.sleep(5000L);
|
|
|
//完成
|
|
|
report.setReportPdfUrl(url);
|
|
|
report.setStatus(4);
|