This commit is contained in:
caozehui
2025-03-20 11:15:20 +08:00
parent 051e7fe14a
commit f294cb315f
15 changed files with 113 additions and 97 deletions

View File

@@ -8,14 +8,14 @@
FROM pq_report
WHERE name = #{name}
AND version = #{version}
and enable !=0
and state = 1
</select>
<select id="getPqReportById" resultType="com.njcn.gather.report.pojo.po.PqReport">
SELECT *
FROM pq_report
WHERE id = #{id}
and enable !=0
and state = 1
</select>
</mapper>

View File

@@ -62,6 +62,7 @@ public class AdPlanParam {
private List<String> devIds;
@ApiModelProperty(value = "是否关联报告")
@NotNull(message = DevValidMessage.ASSOCIATE_REPORT_NOT_NULL)
private Integer associateReport;
@ApiModelProperty(value = "报告模板名称")

View File

@@ -193,6 +193,18 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
if (!plan1.getErrorSysId().equals(param.getErrorSysId())) {
throw new BusinessException(PlanResponseEnum.CANNOT_CHANGE_ERROR_SYS_WHEN_CHECKING);
}
if (param.getAssociateReport() != plan1.getAssociateReport()) {
throw new BusinessException(PlanResponseEnum.CANNOT_CHANGE_REPORT_WHEN_CHECKING);
}
if (param.getAssociateReport() != plan1.getAssociateReport()) {
throw new BusinessException(PlanResponseEnum.CANNOT_CHANGE_REPORT_WHEN_CHECKING);
}
if (param.getAssociateReport() == 1) {
String reportId = this.baseMapper.getReportIdByNameAndVersion(param.getReportName(), param.getReportVersion());
if (!reportId.equals(plan1.getReportTemplateId())) {
throw new BusinessException(PlanResponseEnum.CANNOT_CHANGE_REPORT_WHEN_CHECKING);
}
}
}
BeanUtil.copyProperties(param, plan2);