This commit is contained in:
ls
2025-02-24 11:25:51 +08:00
parent 2214e66881
commit dc681c5d8d
5 changed files with 13 additions and 4 deletions

View File

@@ -106,6 +106,9 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
if (ObjUtil.isNull(experiment)) { if (ObjUtil.isNull(experiment)) {
return Result.error("试验数据不存在!"); return Result.error("试验数据不存在!");
} }
if (!StringUtils.equals(experiment.getStatus(), ExperimentStatus.COMPLETED)) {
return Result.error("试验状态不正确,请先完成试验!");
}
//ExperimentReport report = experimentReportService.getByExperimentId(experimentId); //ExperimentReport report = experimentReportService.getByExperimentId(experimentId);
//if (ObjUtil.isNotNull(report)) { //if (ObjUtil.isNotNull(report)) {
// return Result.error("试验报告已存在!"); // return Result.error("试验报告已存在!");

View File

@@ -164,6 +164,7 @@ public class HistoricalDatabaseController extends JeecgController<HistoricalData
return super.importExcel(request, response, HistoricalDatabase.class); return super.importExcel(request, response, HistoricalDatabase.class);
} }
@Operation(summary = "历史数据统计")
@GetMapping(value = "/statistics") @GetMapping(value = "/statistics")
public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) { public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) {
NasaDataRecordPage result = new NasaDataRecordPage(); NasaDataRecordPage result = new NasaDataRecordPage();

View File

@@ -164,6 +164,7 @@ public class LocalDatabaseController extends JeecgController<LocalDatabase, ILoc
return super.importExcel(request, response, LocalDatabase.class); return super.importExcel(request, response, LocalDatabase.class);
} }
@Operation(summary = "当期数据统计")
@GetMapping(value = "/statistics") @GetMapping(value = "/statistics")
public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) { public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) {
NasaDataRecordPage result = new NasaDataRecordPage(); NasaDataRecordPage result = new NasaDataRecordPage();

View File

@@ -75,6 +75,7 @@ public class NasaDataRecordController extends JeecgController<NasaDataRecord, IN
return Result.OK(pageList); return Result.OK(pageList);
} }
@Operation(summary = "外网数据统计")
@GetMapping(value = "/statistics") @GetMapping(value = "/statistics")
public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) { public Result<NasaDataRecordPage> queryPageList(NasaDataRecord nasaDataRecord) {
NasaDataRecordPage result = new NasaDataRecordPage(); NasaDataRecordPage result = new NasaDataRecordPage();

View File

@@ -69,13 +69,13 @@ public class ExperimentDocServiceImpl extends ServiceImpl<ExperimentDocMapper, E
@Autowired @Autowired
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Autowired @Autowired
private IClientService clientService; private IClientService clientService;
@Autowired @Autowired
private IExperimentTestProcessService experimentTestProcessService; private IExperimentTestProcessService experimentTestProcessService;
@Autowired @Autowired
private IExperimentRadiationProcessService experimentRadiationProcessService; private IExperimentRadiationProcessService experimentRadiationProcessService;
@Autowired @Autowired
private ITestStandardsService testStandardsService; private ITestStandardsService testStandardsService;
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
//The core API uses a minimalist design, only one line of code is required //The core API uses a minimalist design, only one line of code is required
@@ -283,6 +283,9 @@ public class ExperimentDocServiceImpl extends ServiceImpl<ExperimentDocMapper, E
return new HashMap<>(); return new HashMap<>();
} }
ExperimentReport latestReport = experimentReportService.getLatestReport(experimentId); ExperimentReport latestReport = experimentReportService.getLatestReport(experimentId);
if (Objects.isNull(latestReport)) {
return new HashMap<>();
}
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
if (Objects.nonNull(latestReport)) { if (Objects.nonNull(latestReport)) {
params.put("审核人员姓名", Optional.ofNullable(sysUserService.getById(latestReport.getAuditor())).map(SysUser::getRealname) params.put("审核人员姓名", Optional.ofNullable(sysUserService.getById(latestReport.getAuditor())).map(SysUser::getRealname)