|
@@ -11,6 +11,7 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.github.yulichang.toolkit.MPJWrappers;
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import com.xjrsoft.common.enums.DeleteMark;
|
|
|
+import com.xjrsoft.common.exception.MyException;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
import com.xjrsoft.module.base.mapper.BaseClassMapper;
|
|
@@ -440,8 +441,17 @@ public class RoomBedServiceImpl extends MPJBaseServiceImpl<RoomBedMapper, RoomBe
|
|
|
}
|
|
|
RoomBed roomBedInfo = roomBedMapper.selectById(dto.getBedId());
|
|
|
Room room = roomMapper.selectById(roomBedInfo.getRoomId());
|
|
|
+ if(room == null){
|
|
|
+ throw new MyException("为查询到该床位");
|
|
|
+ }
|
|
|
if(!room.getGender().equals(studentGender)){
|
|
|
- return true;
|
|
|
+ String genderStr = "";
|
|
|
+ if(1 == xjrUser.getGender()){
|
|
|
+ genderStr = "男";
|
|
|
+ }else if(2 == xjrUser.getGender()){
|
|
|
+ genderStr = "女";
|
|
|
+ }
|
|
|
+ throw new MyException("该学生无法入住" + genderStr + "寝室");
|
|
|
}
|
|
|
|
|
|
//先清空学生原来的床位
|