|
@@ -161,6 +161,9 @@ public class TTaskInspectionPlanController extends BaseController {
|
|
|
pointTypes.add(lawitem.getPointType());
|
|
|
}
|
|
|
}
|
|
|
+ if (CollectionUtils.isEmpty(pointTypes)){
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
points.in("point_type", pointTypes);
|
|
|
}
|
|
|
Integer count = tBasePointMapper.selectCount(points);
|
|
@@ -396,6 +399,13 @@ public class TTaskInspectionPlanController extends BaseController {
|
|
|
@Log(title = "检测计划", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{ids}")
|
|
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
+ for (Long id : ids) {
|
|
|
+ TTaskInspection tTaskInspection = new TTaskInspection();
|
|
|
+ tTaskInspection.setPlanId(id);
|
|
|
+ if (CollectionUtils.isNotEmpty(tTaskInspectionService.selectTTaskInspectionList(tTaskInspection))) {
|
|
|
+ return AjaxResult.error("不可删除已存在检测任务的计划!");
|
|
|
+ }
|
|
|
+ }
|
|
|
return toAjax(tTaskInspectionPlanService.deleteTTaskInspectionPlanByIds(ids));
|
|
|
}
|
|
|
}
|