|
@@ -91,11 +91,13 @@ public class FormPeriodServiceImpl extends BaseServiceImpl<FormPeriodMapper, For
|
|
|
|
|
|
@Override
|
|
|
public void deleteById(Long formPeriodId) {
|
|
|
- //校验当前资金预算期是否被引用
|
|
|
- Integer status = baseMapper.checkCiteStatusById(formPeriodId);
|
|
|
- if (status == 1){
|
|
|
- throw new ServiceException("删除失败:当前资金预算期已经被引用");
|
|
|
+ if (formPeriodId != null) {
|
|
|
+ //校验当前资金预算期是否被引用
|
|
|
+ Integer status = baseMapper.checkCiteStatusById(formPeriodId);
|
|
|
+ if (status == 1) {
|
|
|
+ throw new ServiceException("删除失败:当前资金预算期已经被引用");
|
|
|
+ }
|
|
|
+ baseMapper.removeById(formPeriodId);
|
|
|
}
|
|
|
- baseMapper.removeById(formPeriodId);
|
|
|
}
|
|
|
}
|