[修改] 从草稿编辑已删除得报告,加校验
This commit is contained in:
@@ -152,7 +152,13 @@ public class ReportManageConroller {
|
||||
if (count1 > 0){
|
||||
return Result.error("报告名称已流程中存在");
|
||||
}
|
||||
|
||||
//有报告id说明不是新增报告 走得不是新增流程
|
||||
if(StringUtils.isNotEmpty(vo.getId())){
|
||||
long count2 = reportDao.selectByReportId(vo.getId());
|
||||
if (count2==0){
|
||||
return Result.error("报告已经不存在");
|
||||
}
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -77,4 +77,5 @@ public interface ReportDao extends BaseMapper<ReportEntity> {
|
||||
List<ReportEntity> selectDDL();
|
||||
|
||||
|
||||
long selectByReportId(String id);
|
||||
}
|
||||
|
||||
@@ -298,4 +298,11 @@
|
||||
<select id="selectDDL" resultType="com.adc.da.report.eo.ReportEntity">
|
||||
SELECT * FROM tt_report_manage WHERE secrecy_last <= NOW()
|
||||
</select>
|
||||
<select id="selectByReportId" resultType="java.lang.Long">
|
||||
select count(1) from tt_report_manage rep
|
||||
<where>
|
||||
rep.del_flag = 0
|
||||
and rep.id = #{id}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user