|
@@ -37,7 +37,7 @@ public class HospitalServiceImpl extends ServiceImpl<HospitalMapper, Hospital> i
|
|
|
/**
|
|
|
* 分页查询所有的医院信息
|
|
|
*
|
|
|
- * @param page
|
|
|
+ * @param current
|
|
|
* @param pageSize
|
|
|
* @return
|
|
|
*/
|
|
@@ -126,6 +126,12 @@ public class HospitalServiceImpl extends ServiceImpl<HospitalMapper, Hospital> i
|
|
|
if (Objects.isNull(hospital)) {
|
|
|
throw new CostException("不存在相关医院信息");
|
|
|
}
|
|
|
+ if (NumberConstant.ONE.equals(hospitalDto.getIsHospital())){
|
|
|
+ // 此时修改的是院区 需要传递parent_Id 和 parent__name
|
|
|
+ if (hospitalDto.getParentId()<=0 || StringUtils.isEmpty(hospitalDto.getParentName())){
|
|
|
+ throw new CostException(500,"修改院区的时候需要传递医院的Id和医院名称");
|
|
|
+ }
|
|
|
+ }
|
|
|
baseMapper.deleteById(hospital.getId());
|
|
|
Hospital hospitalRequest = BeanUtil.convertObj(hospitalDto, Hospital.class);
|
|
|
hospitalRequest.setId(null);
|