|
@@ -101,6 +101,13 @@ public class PtAreaServiceImpl implements IPtAreaService {
|
|
|
if (baseMapper.selectCount(lqw) > 0) {
|
|
if (baseMapper.selectCount(lqw) > 0) {
|
|
|
throw new ServiceException("区域名称重复");
|
|
throw new ServiceException("区域名称重复");
|
|
|
}
|
|
}
|
|
|
|
|
+ //父节点不能是楼层 04
|
|
|
|
|
+ if(entity.getParentId()!=null){
|
|
|
|
|
+ PtArea ptArea = baseMapper.selectById(entity.getParentId());
|
|
|
|
|
+ if(ptArea!=null && "04".equals(ptArea.getAreaType())){
|
|
|
|
|
+ throw new ServiceException("楼层不能作为父节点");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|