|
@@ -16,7 +16,9 @@ import com.xjrsoft.module.room.dto.DistributeRoomBedPageDto;
|
|
|
import com.xjrsoft.module.room.dto.RoomBedPageDto;
|
|
|
import com.xjrsoft.module.room.entity.Room;
|
|
|
import com.xjrsoft.module.room.entity.RoomBed;
|
|
|
+import com.xjrsoft.module.room.entity.RoomBedRecord;
|
|
|
import com.xjrsoft.module.room.mapper.RoomBedMapper;
|
|
|
+import com.xjrsoft.module.room.mapper.RoomBedRecordMapper;
|
|
|
import com.xjrsoft.module.room.mapper.RoomMapper;
|
|
|
import com.xjrsoft.module.room.service.IRoomBedService;
|
|
|
import com.xjrsoft.module.room.vo.DistributeClassPageVo;
|
|
@@ -52,6 +54,7 @@ public class RoomBedServiceImpl extends MPJBaseServiceImpl<RoomBedMapper, RoomBe
|
|
|
private final RoomBedMapper roomBedMapper;
|
|
|
private final BaseStudentMapper baseStudentMapper;
|
|
|
private final BaseClassMapper baseClassMapper;
|
|
|
+ private final RoomBedRecordMapper roomBedRecordMapper;
|
|
|
@Override
|
|
|
public Page<RoomBedPageVo> getPage(Page<RoomBedPageVo> page, RoomBedPageDto dto) {
|
|
|
Page<RoomBedPageVo> result = roomBedMapper.getPage(page, dto);
|
|
@@ -115,7 +118,7 @@ public class RoomBedServiceImpl extends MPJBaseServiceImpl<RoomBedMapper, RoomBe
|
|
|
//已分配床位数
|
|
|
int distributeBedNumber = 0;
|
|
|
for (BaseStudent studentInfoVo : studentList) {
|
|
|
- if(i > bedInfoList.size()){
|
|
|
+ if(i >= bedInfoList.size()){
|
|
|
continue;
|
|
|
}
|
|
|
RoomBedVo roomBedVo = bedInfoList.get(i);
|
|
@@ -133,7 +136,9 @@ public class RoomBedServiceImpl extends MPJBaseServiceImpl<RoomBedMapper, RoomBe
|
|
|
}
|
|
|
//插入记录表 room_bed_record
|
|
|
classStudent.forEach((classId, studentCount)->{
|
|
|
-
|
|
|
+ RoomBedRecord record = new RoomBedRecord();
|
|
|
+// record.setClassId();
|
|
|
+// roomBedRecordMapper.insert();
|
|
|
});
|
|
|
|
|
|
//查询每个寝室住入的班级数量,大于2的设置为混合寝室
|