Revert "报告生成、检测结果查询调整"

This reverts commit 282f9cf4eb.
This commit is contained in:
caozehui
2026-05-25 18:41:15 +08:00
parent 599edde008
commit b113788e54
4 changed files with 2 additions and 25 deletions

View File

@@ -39,9 +39,4 @@ public class DevReportParam implements Serializable {
* 批量下载时传递的被检设备id列表
*/
private List<String> devIdList;
/**
* 检测报告模板
*/
private String reportTemplateName;
}

View File

@@ -41,7 +41,6 @@ import com.njcn.gather.err.pojo.po.PqErrSys;
import com.njcn.gather.err.service.IPqErrSysService;
import com.njcn.gather.monitor.pojo.po.PqMonitor;
import com.njcn.gather.monitor.service.IPqMonitorService;
import com.njcn.gather.plan.mapper.AdPlanMapper;
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
import com.njcn.gather.plan.pojo.enums.PlanReportStateEnum;
import com.njcn.gather.plan.pojo.po.AdPlan;
@@ -176,7 +175,6 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
private final IPqDevSubService iPqDevSubService;
private final IDictDataService dictDataService;
private final IAdPlanService adPlanService;
private final AdPlanMapper pqPlanMapper;
private final IPqScriptDtlsService pqScriptDtlsService;
private final SimAndDigNonHarmonicService adNonHarmonicService;
private final SimAndDigHarmonicService adHarmonicService;
@@ -790,9 +788,6 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
* @param devReportParam 设备信息
*/
private void generateReportByPlanContrast(AdPlan plan, DevReportParam devReportParam) {
String reportTemplateName = devReportParam.getReportTemplateName();
String[] split = reportTemplateName.split("_");
String reportTemplateId = pqPlanMapper.getReportIdByNameAndVersion(split[0], split[1]);
// 支持批量生成报告
devReportParam.getDevIdList().forEach(devId -> {
// 准备被检设备的基础信息
@@ -807,7 +802,7 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
if (Objects.isNull(devType)) {
throw new BusinessException(ReportResponseEnum.DEVICE_TYPE_NOT_EXIST);
}
PqReport report = this.lambdaQuery().eq(PqReport::getId, reportTemplateId).eq(PqReport::getState, DataStateEnum.ENABLE.getCode()).one();
PqReport report = this.lambdaQuery().eq(PqReport::getId, plan.getReportTemplateId()).eq(PqReport::getState, DataStateEnum.ENABLE.getCode()).one();
if (Objects.isNull(report)) {
throw new BusinessException(ReportResponseEnum.REPORT_TEMPLATE_NOT_EXIST);
}
@@ -871,9 +866,6 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
* @param devReportParam 设备信息
*/
private void generateReportByPlan(AdPlan plan, DevReportParam devReportParam) {
String reportTemplateName = devReportParam.getReportTemplateName();
String[] split = reportTemplateName.split("_");
String reportTemplateId = pqPlanMapper.getReportIdByNameAndVersion(split[0], split[1]);
// 支持批量生成报告
devReportParam.getDevIdList().forEach(devId -> {
// 准备被检设备的基础信息
@@ -887,7 +879,7 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
if (Objects.isNull(devType)) {
throw new BusinessException(ReportResponseEnum.DEVICE_TYPE_NOT_EXIST);
}
PqReport report = this.lambdaQuery().eq(PqReport::getId, reportTemplateId).eq(PqReport::getState, DataStateEnum.ENABLE.getCode()).one();
PqReport report = this.lambdaQuery().eq(PqReport::getId, plan.getReportTemplateId()).eq(PqReport::getState, DataStateEnum.ENABLE.getCode()).one();
if (Objects.isNull(report)) {
throw new BusinessException(ReportResponseEnum.REPORT_TEMPLATE_NOT_EXIST);
}

View File

@@ -31,9 +31,4 @@ public class FormContentVO {
* 有多少次波形录制
*/
private Integer waveNumTotal;
/**
* 报表模板
*/
private String reportTemplateName;
}

View File

@@ -41,7 +41,6 @@ import com.njcn.gather.device.service.IPqStandardDevService;
import com.njcn.gather.err.service.IPqErrSysService;
import com.njcn.gather.monitor.pojo.po.PqMonitor;
import com.njcn.gather.monitor.service.IPqMonitorService;
import com.njcn.gather.plan.mapper.AdPlanMapper;
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
import com.njcn.gather.plan.pojo.po.AdPlan;
import com.njcn.gather.plan.pojo.po.AdPlanTestConfig;
@@ -53,7 +52,6 @@ import com.njcn.gather.report.pojo.constant.PowerConstant;
import com.njcn.gather.report.pojo.enums.AffectEnum;
import com.njcn.gather.report.pojo.enums.ItemReportKeyEnum;
import com.njcn.gather.report.pojo.enums.PowerIndexEnum;
import com.njcn.gather.report.pojo.po.PqReport;
import com.njcn.gather.report.pojo.result.ContrastTestResult;
import com.njcn.gather.report.pojo.result.SingleTestResult;
import com.njcn.gather.result.pojo.enums.ResultUnitEnum;
@@ -114,7 +112,6 @@ import static com.njcn.gather.plan.pojo.enums.DataSourceEnum.*;
public class ResultServiceImpl implements IResultService {
private final IAdPlanService adPlanService;
private final AdPlanMapper adPlanMapper;
private final IAdPlanTestConfigService adPlanTestConfigService;
private final IPqDevService pqDevService;
private final IPqStandardDevService pqStandardDevService;
@@ -147,8 +144,6 @@ public class ResultServiceImpl implements IResultService {
FormContentVO formContentVO = new FormContentVO();
AdPlan plan = adPlanService.getById(queryParam.getPlanId());
formContentVO.setErrorSysId(plan.getErrorSysId());
PqReport report = adPlanMapper.getPqReportById(plan.getReportTemplateId());
formContentVO.setReportTemplateName(report.getName() + "_" + report.getVersion());
String scriptId = null;
if (ObjectUtil.isNotNull(plan)) {
formContentVO.setDataRule(plan.getDataRule());