|
@@ -100,7 +100,7 @@ public class HospitalServiceImpl extends ServiceImpl<HospitalMapper, Hospital> i
|
|
|
throw new CostException(500, "新增院区请选择医院");
|
|
|
}else {
|
|
|
Hospital hospital = baseMapper.selectById(parentId);
|
|
|
- if (Objects.nonNull(hospital)){
|
|
|
+ if (Objects.isNull(hospital)){
|
|
|
throw new CostException(500, "选择的住院不存在");
|
|
|
}else {
|
|
|
hospitalSaveDto.setParentName(hospital.getName());
|