|
@@ -176,6 +176,8 @@ public class PatrolInspectionAreaServiceImpl extends AbstractCrudService<PatrolI
|
|
|
siteNum = patrolInspectionSiteMapper.selectSiteCount(areaIdList);
|
|
siteNum = patrolInspectionSiteMapper.selectSiteCount(areaIdList);
|
|
|
}
|
|
}
|
|
|
if (siteNum>0){
|
|
if (siteNum>0){
|
|
|
|
|
+ throw new BusinessException("区域下有绑定的点位,请解绑后再删除!");
|
|
|
|
|
+ }else {
|
|
|
for (int i = 0; i < patrolInspectionArealist.size(); i++) {
|
|
for (int i = 0; i < patrolInspectionArealist.size(); i++) {
|
|
|
PatrolInspectionArea patrolInspectionAreaz = new PatrolInspectionArea();
|
|
PatrolInspectionArea patrolInspectionAreaz = new PatrolInspectionArea();
|
|
|
patrolInspectionAreaz.setId(patrolInspectionArealist.get(i).getId());
|
|
patrolInspectionAreaz.setId(patrolInspectionArealist.get(i).getId());
|
|
@@ -186,8 +188,6 @@ public class PatrolInspectionAreaServiceImpl extends AbstractCrudService<PatrolI
|
|
|
patrolInspectionArea.setId(id);
|
|
patrolInspectionArea.setId(id);
|
|
|
patrolInspectionArea.setEnable(0);
|
|
patrolInspectionArea.setEnable(0);
|
|
|
this.updateById(patrolInspectionArea);
|
|
this.updateById(patrolInspectionArea);
|
|
|
- }else {
|
|
|
|
|
- throw new BusinessException("区域下有绑定的点位,请解绑后再删除!");
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|