update
This commit is contained in:
parent
557ddadcac
commit
4a7126bf57
@ -185,6 +185,16 @@ class SupervisionInspectionLogic extends BaseLogic
|
||||
*/
|
||||
public static function delete(array $params): bool
|
||||
{
|
||||
$inspection_result = SupervisionInspectionResult::where('inspection_id',$params['id'])->findOrEmpty();
|
||||
if(!$inspection_result->isEmpty()){
|
||||
self::setError('该巡视内容下存在巡视结果数据,请先删除巡视结果数据');
|
||||
return false;
|
||||
}
|
||||
$inspection_problem = SupervisionInspectionProblem::where('inspection_id',$params['id'])->findOrEmpty();
|
||||
if(!$inspection_problem->isEmpty()){
|
||||
self::setError('该巡视内容下存在巡视问题数据,请先删除巡视问题数据');
|
||||
return false;
|
||||
}
|
||||
return SupervisionInspection::destroy($params['id']);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user