实验报告

This commit is contained in:
ls
2025-05-04 13:17:42 +08:00
parent a8d0a4bc64
commit 62dc2c8fae
2 changed files with 10 additions and 9 deletions

View File

@@ -128,6 +128,7 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
}
experimentReport.setReportName("试验报告-" + fileName);
experimentReportService.save(experimentReport);
experimentDocService.generate(experimentId, ExperimentDocType.sybg.getType());
return Result.OK("添加成功!");
}
@@ -151,9 +152,9 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
if (!(StringUtils.equals(report.getStatus(), "INIT") || StringUtils.equals(report.getStatus(), "REJECT"))) {
return Result.error("该报告状态无法进行编辑!");
}
if (StringUtils.equals(report.getStatus(), "REJECT") && StringUtils.isNotBlank(experimentReport.getLastStatus())) {
experimentReport.setStatus(experimentReport.getLastStatus());
}
//if (StringUtils.equals(report.getStatus(), "REJECT") && StringUtils.isNotBlank(experimentReport.getLastStatus())) {
// experimentReport.setStatus(experimentReport.getLastStatus());
//}
experimentReportService.updateById(experimentReport);
experimentDocService.generate(report.getExperimentId(), ExperimentDocType.sybg.getType());
return Result.OK("编辑成功!");
@@ -285,7 +286,7 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
}
if (!StringUtils.equals(requestStatus, ExperimentReportStatus.PROOFREAD_PASS)) {
report.setStatus(ExperimentReportStatus.REJECT);
report.setLastStatus(ExperimentReportStatus.INIT);
//report.setLastStatus(ExperimentReportStatus.INIT);
}
report.setProofreaderMemo(experimentReport.getMemo());
report.setProofreaderTime(DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm"));
@@ -298,7 +299,7 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
}
if (!StringUtils.equals(requestStatus, ExperimentReportStatus.AUDIT_PASS)) {
report.setStatus(ExperimentReportStatus.REJECT);
report.setLastStatus(ExperimentReportStatus.PROOFREAD_PASS);
//report.setLastStatus(ExperimentReportStatus.INIT);
}
report.setAuditorMemo(experimentReport.getMemo());
@@ -313,7 +314,7 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
}
if (!StringUtils.equals(requestStatus, ExperimentReportStatus.PASSED)) {
report.setStatus(ExperimentReportStatus.REJECT);
report.setLastStatus(ExperimentReportStatus.AUDIT_PASS);
//report.setLastStatus(ExperimentReportStatus.PROOFREAD_PASS);
}
report.setConfirmerMemo(experimentReport.getMemo());
report.setConfirmerTime(DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm"));

View File

@@ -130,9 +130,9 @@ public class ExperimentReport implements Serializable {
"状态(申请中待校对:INIT,不合格:REJECT ,校对通过待审核PROOFREAD_PASS,审核通过待批准AUDIT_PASS批准通过PASSED)")
private String status;
@Excel(name = "上一个状态", width = 15)
@Schema(description = "上一个状态")
private String lastStatus;
//@Excel(name = "上一个状态", width = 15)
//@Schema(description = "上一个状态")
//private String lastStatus;
@Excel(name = "审批意见", width = 15)
@Schema(description = "审批意见")