微调
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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 = "报告模板名称")
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user