|
@@ -282,43 +282,48 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (!number.equals("床位号")) {
|
|
if (!number.equals("床位号")) {
|
|
|
return CommonResult.fail("导入数据第四列为床位号");
|
|
return CommonResult.fail("导入数据第四列为床位号");
|
|
|
}
|
|
}
|
|
|
- String sex = dataFormatter.formatCellValue(row.getCell(5));//楼栋层数
|
|
|
|
|
|
|
+ String sex = dataFormatter.formatCellValue(row.getCell(5));//床位性别
|
|
|
if (!sex.equals("床位性别")) {
|
|
if (!sex.equals("床位性别")) {
|
|
|
return CommonResult.fail("导入数据第五列为床位性别");
|
|
return CommonResult.fail("导入数据第五列为床位性别");
|
|
|
}
|
|
}
|
|
|
- String college = dataFormatter.formatCellValue(row.getCell(6));//起始层数
|
|
|
|
|
|
|
+
|
|
|
|
|
+ String grade = dataFormatter.formatCellValue(row.getCell(6));//所属年级
|
|
|
|
|
+ if (!grade.equals("所属年级")) {
|
|
|
|
|
+ return CommonResult.fail("导入数据第五列为所属年级");
|
|
|
|
|
+ }
|
|
|
|
|
+ String college = dataFormatter.formatCellValue(row.getCell(7));//所属学院
|
|
|
if (!college.equals("所属学院")) {
|
|
if (!college.equals("所属学院")) {
|
|
|
return CommonResult.fail("导入数据第六列为所属学院");
|
|
return CommonResult.fail("导入数据第六列为所属学院");
|
|
|
}
|
|
}
|
|
|
- String major = dataFormatter.formatCellValue(row.getCell(7));//备注
|
|
|
|
|
|
|
+ String major = dataFormatter.formatCellValue(row.getCell(8));//所属专业
|
|
|
if (!major.equals("所属专业")) {
|
|
if (!major.equals("所属专业")) {
|
|
|
return CommonResult.fail("导入数据第七列为所属专业");
|
|
return CommonResult.fail("导入数据第七列为所属专业");
|
|
|
}
|
|
}
|
|
|
- String classstr = dataFormatter.formatCellValue(row.getCell(8));//备注
|
|
|
|
|
|
|
+ String classstr = dataFormatter.formatCellValue(row.getCell(9));//备注
|
|
|
if (!classstr.equals("所属班级")) {
|
|
if (!classstr.equals("所属班级")) {
|
|
|
return CommonResult.fail("导入数据第八列为所属班级");
|
|
return CommonResult.fail("导入数据第八列为所属班级");
|
|
|
}
|
|
}
|
|
|
- String instructor = dataFormatter.formatCellValue(row.getCell(9));//备注
|
|
|
|
|
|
|
+ String instructor = dataFormatter.formatCellValue(row.getCell(10));//备注
|
|
|
if (!instructor.equals("辅导员")) {
|
|
if (!instructor.equals("辅导员")) {
|
|
|
return CommonResult.fail("导入数据第九列为辅导员");
|
|
return CommonResult.fail("导入数据第九列为辅导员");
|
|
|
}
|
|
}
|
|
|
- String isCheck = dataFormatter.formatCellValue(row.getCell(10));//备注
|
|
|
|
|
|
|
+ String isCheck = dataFormatter.formatCellValue(row.getCell(11));//备注
|
|
|
if (!isCheck.equals("是否入住")) {
|
|
if (!isCheck.equals("是否入住")) {
|
|
|
return CommonResult.fail("导入数据第十列为是否入住");
|
|
return CommonResult.fail("导入数据第十列为是否入住");
|
|
|
}
|
|
}
|
|
|
- String admissNum = dataFormatter.formatCellValue(row.getCell(11));//备注
|
|
|
|
|
|
|
+ String admissNum = dataFormatter.formatCellValue(row.getCell(12));//备注
|
|
|
if (!admissNum.equals("录取号")) {
|
|
if (!admissNum.equals("录取号")) {
|
|
|
return CommonResult.fail("导入数据第十一列为录取号");
|
|
return CommonResult.fail("导入数据第十一列为录取号");
|
|
|
}
|
|
}
|
|
|
- String name = dataFormatter.formatCellValue(row.getCell(12));//备注
|
|
|
|
|
|
|
+ String name = dataFormatter.formatCellValue(row.getCell(13));//备注
|
|
|
if (!name.equals("姓名")) {
|
|
if (!name.equals("姓名")) {
|
|
|
return CommonResult.fail("导入数据第十二列为姓名");
|
|
return CommonResult.fail("导入数据第十二列为姓名");
|
|
|
}
|
|
}
|
|
|
- String remark = dataFormatter.formatCellValue(row.getCell(13));//备注
|
|
|
|
|
|
|
+ String remark = dataFormatter.formatCellValue(row.getCell(14));//备注
|
|
|
if (!remark.equals("备注")) {
|
|
if (!remark.equals("备注")) {
|
|
|
return CommonResult.fail("导入数据第十三列为备注");
|
|
return CommonResult.fail("导入数据第十三列为备注");
|
|
|
}
|
|
}
|
|
|
- String retentionState = dataFormatter.formatCellValue(row.getCell(14));//是否保留
|
|
|
|
|
|
|
+ String retentionState = dataFormatter.formatCellValue(row.getCell(15));//是否保留
|
|
|
if (!retentionState.equals("是否保留")) {
|
|
if (!retentionState.equals("是否保留")) {
|
|
|
return CommonResult.fail("导入数据第十四列为是否保留");
|
|
return CommonResult.fail("导入数据第十四列为是否保留");
|
|
|
}
|
|
}
|
|
@@ -337,15 +342,16 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String sex = dataFormatter.formatCellValue(row.getCell(5));//楼栋层数
|
|
String sex = dataFormatter.formatCellValue(row.getCell(5));//楼栋层数
|
|
|
- String college = dataFormatter.formatCellValue(row.getCell(6));//起始层数
|
|
|
|
|
- String major = dataFormatter.formatCellValue(row.getCell(7));//备注
|
|
|
|
|
- String classstr = dataFormatter.formatCellValue(row.getCell(8));//备注
|
|
|
|
|
- String instructor = dataFormatter.formatCellValue(row.getCell(9));//辅导员
|
|
|
|
|
- String isCheck = dataFormatter.formatCellValue(row.getCell(10));//备注
|
|
|
|
|
- String admissNum = dataFormatter.formatCellValue(row.getCell(11));//备注
|
|
|
|
|
- String name = dataFormatter.formatCellValue(row.getCell(12));//备注
|
|
|
|
|
- String remark = dataFormatter.formatCellValue(row.getCell(13));//备注
|
|
|
|
|
- String retentionState = dataFormatter.formatCellValue(row.getCell(14));//是否保留
|
|
|
|
|
|
|
+ String grade = dataFormatter.formatCellValue(row.getCell(6));//起始层数
|
|
|
|
|
+ String college = dataFormatter.formatCellValue(row.getCell(7));//起始层数
|
|
|
|
|
+ String major = dataFormatter.formatCellValue(row.getCell(8));//备注
|
|
|
|
|
+ String classstr = dataFormatter.formatCellValue(row.getCell(9));//备注
|
|
|
|
|
+ String instructor = dataFormatter.formatCellValue(row.getCell(10));//辅导员
|
|
|
|
|
+ String isCheck = dataFormatter.formatCellValue(row.getCell(11));//备注
|
|
|
|
|
+ String admissNum = dataFormatter.formatCellValue(row.getCell(12));//备注
|
|
|
|
|
+ String name = dataFormatter.formatCellValue(row.getCell(13));//备注
|
|
|
|
|
+ String remark = dataFormatter.formatCellValue(row.getCell(14));//备注
|
|
|
|
|
+ String retentionState = dataFormatter.formatCellValue(row.getCell(15));//是否保留
|
|
|
|
|
|
|
|
|
|
|
|
|
bedData.setSchool(school);
|
|
bedData.setSchool(school);
|
|
@@ -397,6 +403,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setRemark(remark);
|
|
bedData.setRemark(remark);
|
|
|
bedData.setRetentionState(Integer.valueOf(retentionState));
|
|
bedData.setRetentionState(Integer.valueOf(retentionState));
|
|
|
bedData.setInstructor(instructor);
|
|
bedData.setInstructor(instructor);
|
|
|
|
|
+ bedData.setGrade(Integer.valueOf(grade));
|
|
|
result.add(bedData);
|
|
result.add(bedData);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -465,39 +472,44 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (!sex.equals("床位性别")) {
|
|
if (!sex.equals("床位性别")) {
|
|
|
return CommonResult.fail("导入数据第五列为床位性别");
|
|
return CommonResult.fail("导入数据第五列为床位性别");
|
|
|
}
|
|
}
|
|
|
- String college = dataFormatter.formatCellValue(row.getCell(6));//起始层数
|
|
|
|
|
|
|
+ String grade = dataFormatter.formatCellValue(row.getCell(6));//起始层数
|
|
|
|
|
+ if (!grade.equals("所属年级")) {
|
|
|
|
|
+ return CommonResult.fail("导入数据第六列为所属年级");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String college = dataFormatter.formatCellValue(row.getCell(7));//起始层数
|
|
|
if (!college.equals("所属学院")) {
|
|
if (!college.equals("所属学院")) {
|
|
|
return CommonResult.fail("导入数据第六列为所属学院");
|
|
return CommonResult.fail("导入数据第六列为所属学院");
|
|
|
}
|
|
}
|
|
|
- String major = dataFormatter.formatCellValue(row.getCell(7));//备注
|
|
|
|
|
|
|
+ String major = dataFormatter.formatCellValue(row.getCell(8));//备注
|
|
|
if (!major.equals("所属专业")) {
|
|
if (!major.equals("所属专业")) {
|
|
|
return CommonResult.fail("导入数据第七列为所属专业");
|
|
return CommonResult.fail("导入数据第七列为所属专业");
|
|
|
}
|
|
}
|
|
|
- String classstr = dataFormatter.formatCellValue(row.getCell(8));//备注
|
|
|
|
|
|
|
+ String classstr = dataFormatter.formatCellValue(row.getCell(9));//备注
|
|
|
if (!classstr.equals("所属班级")) {
|
|
if (!classstr.equals("所属班级")) {
|
|
|
return CommonResult.fail("导入数据第八列为所属班级");
|
|
return CommonResult.fail("导入数据第八列为所属班级");
|
|
|
}
|
|
}
|
|
|
- String instructor = dataFormatter.formatCellValue(row.getCell(9));//备注
|
|
|
|
|
|
|
+ String instructor = dataFormatter.formatCellValue(row.getCell(10));//备注
|
|
|
if (!instructor.equals("辅导员")) {
|
|
if (!instructor.equals("辅导员")) {
|
|
|
return CommonResult.fail("导入数据第九列为辅导员");
|
|
return CommonResult.fail("导入数据第九列为辅导员");
|
|
|
}
|
|
}
|
|
|
- String isCheck = dataFormatter.formatCellValue(row.getCell(10));//备注
|
|
|
|
|
|
|
+ String isCheck = dataFormatter.formatCellValue(row.getCell(11));//备注
|
|
|
if (!isCheck.equals("是否入住")) {
|
|
if (!isCheck.equals("是否入住")) {
|
|
|
return CommonResult.fail("导入数据第十列为是否入住");
|
|
return CommonResult.fail("导入数据第十列为是否入住");
|
|
|
}
|
|
}
|
|
|
- String admissNum = dataFormatter.formatCellValue(row.getCell(11));//备注
|
|
|
|
|
|
|
+ String admissNum = dataFormatter.formatCellValue(row.getCell(12));//备注
|
|
|
if (!admissNum.equals("录取号")) {
|
|
if (!admissNum.equals("录取号")) {
|
|
|
return CommonResult.fail("导入数据第十一列为录取号");
|
|
return CommonResult.fail("导入数据第十一列为录取号");
|
|
|
}
|
|
}
|
|
|
- String name = dataFormatter.formatCellValue(row.getCell(12));//备注
|
|
|
|
|
|
|
+ String name = dataFormatter.formatCellValue(row.getCell(13));//备注
|
|
|
if (!name.equals("姓名")) {
|
|
if (!name.equals("姓名")) {
|
|
|
return CommonResult.fail("导入数据第十二列为姓名");
|
|
return CommonResult.fail("导入数据第十二列为姓名");
|
|
|
}
|
|
}
|
|
|
- String remark = dataFormatter.formatCellValue(row.getCell(13));//备注
|
|
|
|
|
|
|
+ String remark = dataFormatter.formatCellValue(row.getCell(14));//备注
|
|
|
if (!remark.equals("备注")) {
|
|
if (!remark.equals("备注")) {
|
|
|
return CommonResult.fail("导入数据第十三列为备注");
|
|
return CommonResult.fail("导入数据第十三列为备注");
|
|
|
}
|
|
}
|
|
|
- String retentionState = dataFormatter.formatCellValue(row.getCell(14));//是否保留
|
|
|
|
|
|
|
+ String retentionState = dataFormatter.formatCellValue(row.getCell(15));//是否保留
|
|
|
if (!retentionState.equals("是否保留")) {
|
|
if (!retentionState.equals("是否保留")) {
|
|
|
return CommonResult.fail("导入数据第十四列为是否保留");
|
|
return CommonResult.fail("导入数据第十四列为是否保留");
|
|
|
}
|
|
}
|
|
@@ -515,15 +527,16 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String sex = dataFormatter.formatCellValue(row.getCell(5));//楼栋层数
|
|
String sex = dataFormatter.formatCellValue(row.getCell(5));//楼栋层数
|
|
|
- String college = dataFormatter.formatCellValue(row.getCell(6));//起始层数
|
|
|
|
|
- String major = dataFormatter.formatCellValue(row.getCell(7));//备注
|
|
|
|
|
- String classstr = dataFormatter.formatCellValue(row.getCell(8));//备注
|
|
|
|
|
- String instructor = dataFormatter.formatCellValue(row.getCell(9));//辅导员
|
|
|
|
|
- String isCheck = dataFormatter.formatCellValue(row.getCell(10));//备注
|
|
|
|
|
- String admissNum = dataFormatter.formatCellValue(row.getCell(11));//备注
|
|
|
|
|
- String name = dataFormatter.formatCellValue(row.getCell(12));//备注
|
|
|
|
|
- String remark = dataFormatter.formatCellValue(row.getCell(13));//备注
|
|
|
|
|
- String retentionState = dataFormatter.formatCellValue(row.getCell(14));//是否保留
|
|
|
|
|
|
|
+ String grade = dataFormatter.formatCellValue(row.getCell(6));//起始层数
|
|
|
|
|
+ String college = dataFormatter.formatCellValue(row.getCell(7));//起始层数
|
|
|
|
|
+ String major = dataFormatter.formatCellValue(row.getCell(8));//备注
|
|
|
|
|
+ String classstr = dataFormatter.formatCellValue(row.getCell(9));//备注
|
|
|
|
|
+ String instructor = dataFormatter.formatCellValue(row.getCell(10));//辅导员
|
|
|
|
|
+ String isCheck = dataFormatter.formatCellValue(row.getCell(11));//备注
|
|
|
|
|
+ String admissNum = dataFormatter.formatCellValue(row.getCell(12));//备注
|
|
|
|
|
+ String name = dataFormatter.formatCellValue(row.getCell(13));//备注
|
|
|
|
|
+ String remark = dataFormatter.formatCellValue(row.getCell(14));//备注
|
|
|
|
|
+ String retentionState = dataFormatter.formatCellValue(row.getCell(15));//是否保留
|
|
|
|
|
|
|
|
bedData.setSchool(school);
|
|
bedData.setSchool(school);
|
|
|
|
|
|
|
@@ -574,6 +587,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setRemark(remark);
|
|
bedData.setRemark(remark);
|
|
|
bedData.setRetentionState(Integer.valueOf(retentionState));
|
|
bedData.setRetentionState(Integer.valueOf(retentionState));
|
|
|
bedData.setInstructor(instructor);
|
|
bedData.setInstructor(instructor);
|
|
|
|
|
+ bedData.setGrade(Integer.valueOf(grade));
|
|
|
result.add(bedData);
|
|
result.add(bedData);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -606,15 +620,16 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
headerRow.createCell(3).setCellValue("寝室号");
|
|
headerRow.createCell(3).setCellValue("寝室号");
|
|
|
headerRow.createCell(4).setCellValue("床位号");
|
|
headerRow.createCell(4).setCellValue("床位号");
|
|
|
headerRow.createCell(5).setCellValue("床位性别");
|
|
headerRow.createCell(5).setCellValue("床位性别");
|
|
|
- headerRow.createCell(6).setCellValue("所属学院");
|
|
|
|
|
- headerRow.createCell(7).setCellValue("所属专业");
|
|
|
|
|
- headerRow.createCell(8).setCellValue("所属班级");
|
|
|
|
|
- headerRow.createCell(9).setCellValue("辅导员");
|
|
|
|
|
- headerRow.createCell(10).setCellValue("是否入住");
|
|
|
|
|
- headerRow.createCell(11).setCellValue("录取号");
|
|
|
|
|
- headerRow.createCell(12).setCellValue("姓名");
|
|
|
|
|
- headerRow.createCell(13).setCellValue("备注");
|
|
|
|
|
- headerRow.createCell(14).setCellValue("是否保留");
|
|
|
|
|
|
|
+ headerRow.createCell(6).setCellValue("所属年级");
|
|
|
|
|
+ headerRow.createCell(7).setCellValue("所属学院");
|
|
|
|
|
+ headerRow.createCell(8).setCellValue("所属专业");
|
|
|
|
|
+ headerRow.createCell(9).setCellValue("所属班级");
|
|
|
|
|
+ headerRow.createCell(10).setCellValue("辅导员");
|
|
|
|
|
+ headerRow.createCell(11).setCellValue("是否入住");
|
|
|
|
|
+ headerRow.createCell(12).setCellValue("录取号");
|
|
|
|
|
+ headerRow.createCell(13).setCellValue("姓名");
|
|
|
|
|
+ headerRow.createCell(14).setCellValue("备注");
|
|
|
|
|
+ headerRow.createCell(15).setCellValue("是否保留");
|
|
|
for (int i = 0; i < result.size(); i++) {
|
|
for (int i = 0; i < result.size(); i++) {
|
|
|
WelcomeBed bed = result.get(i);
|
|
WelcomeBed bed = result.get(i);
|
|
|
Row dataRow = sheet.createRow(i + 1);
|
|
Row dataRow = sheet.createRow(i + 1);
|
|
@@ -624,15 +639,16 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
dataRow.createCell(3).setCellValue(bed.getDormitory());
|
|
dataRow.createCell(3).setCellValue(bed.getDormitory());
|
|
|
dataRow.createCell(4).setCellValue(bed.getNumber());
|
|
dataRow.createCell(4).setCellValue(bed.getNumber());
|
|
|
dataRow.createCell(5).setCellValue(bed.getSex());
|
|
dataRow.createCell(5).setCellValue(bed.getSex());
|
|
|
- dataRow.createCell(6).setCellValue(bed.getCollege());
|
|
|
|
|
- dataRow.createCell(7).setCellValue(bed.getMajor());
|
|
|
|
|
- dataRow.createCell(8).setCellValue(bed.getClassstr());
|
|
|
|
|
- dataRow.createCell(9).setCellValue(bed.getInstructor());
|
|
|
|
|
- dataRow.createCell(10).setCellValue(bed.getIsCheck());
|
|
|
|
|
- dataRow.createCell(11).setCellValue(bed.getCardNum());
|
|
|
|
|
- dataRow.createCell(12).setCellValue(bed.getName());
|
|
|
|
|
- dataRow.createCell(13).setCellValue(bed.getRemark());
|
|
|
|
|
- dataRow.createCell(14).setCellValue(bed.getRetentionState());
|
|
|
|
|
|
|
+ dataRow.createCell(6).setCellValue(bed.getGrade());
|
|
|
|
|
+ dataRow.createCell(7).setCellValue(bed.getCollege());
|
|
|
|
|
+ dataRow.createCell(8).setCellValue(bed.getMajor());
|
|
|
|
|
+ dataRow.createCell(9).setCellValue(bed.getClassstr());
|
|
|
|
|
+ dataRow.createCell(10).setCellValue(bed.getInstructor());
|
|
|
|
|
+ dataRow.createCell(11).setCellValue(bed.getIsCheck());
|
|
|
|
|
+ dataRow.createCell(12).setCellValue(bed.getCardNum());
|
|
|
|
|
+ dataRow.createCell(13).setCellValue(bed.getName());
|
|
|
|
|
+ dataRow.createCell(14).setCellValue(bed.getRemark());
|
|
|
|
|
+ dataRow.createCell(15).setCellValue(bed.getRetentionState());
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
// 将工作簿写入文件
|
|
// 将工作簿写入文件
|
|
@@ -749,6 +765,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bed.setClassstrId(welcomeStudent.getClassstrId());
|
|
bed.setClassstrId(welcomeStudent.getClassstrId());
|
|
|
bed.setClassstr(welcomeStudent.getClassstr());
|
|
bed.setClassstr(welcomeStudent.getClassstr());
|
|
|
bed.setName(welcomeStudent.getName());
|
|
bed.setName(welcomeStudent.getName());
|
|
|
|
|
+ bed.setMajorId(welcomeStudent.getMajorId());
|
|
|
|
|
+ bed.setMajor(welcomeStudent.getMajor());
|
|
|
welcomeBedService.updateWelcomeBed(bed);
|
|
welcomeBedService.updateWelcomeBed(bed);
|
|
|
|
|
|
|
|
// 修改寝室信息
|
|
// 修改寝室信息
|
|
@@ -819,6 +837,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
changeBed.setClassstrId(sourceBed.getClassstrId());
|
|
changeBed.setClassstrId(sourceBed.getClassstrId());
|
|
|
changeBed.setClassstr(sourceBed.getClassstr());
|
|
changeBed.setClassstr(sourceBed.getClassstr());
|
|
|
changeBed.setName(sourceBed.getName());
|
|
changeBed.setName(sourceBed.getName());
|
|
|
|
|
+ changeBed.setMajorId(sourceBed.getMajorId());
|
|
|
|
|
+ changeBed.setMajor(sourceBed.getMajor());
|
|
|
welcomeBeds.add(changeBed);
|
|
welcomeBeds.add(changeBed);
|
|
|
|
|
|
|
|
sourceBed.setIsCheck(0);
|
|
sourceBed.setIsCheck(0);
|
|
@@ -827,6 +847,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
sourceBed.setClassstrId(null);
|
|
sourceBed.setClassstrId(null);
|
|
|
sourceBed.setClassstr(null);
|
|
sourceBed.setClassstr(null);
|
|
|
sourceBed.setName(null);
|
|
sourceBed.setName(null);
|
|
|
|
|
+ sourceBed.setMajorId(null);
|
|
|
|
|
+ sourceBed.setMajor(null);
|
|
|
welcomeBeds.add(sourceBed);
|
|
welcomeBeds.add(sourceBed);
|
|
|
|
|
|
|
|
// 修改寝室信息
|
|
// 修改寝室信息
|
|
@@ -843,7 +865,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
}
|
|
|
welcomeDormitoryService.updateById(welcomeDormitoryC);
|
|
welcomeDormitoryService.updateById(welcomeDormitoryC);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 修改寝室信息
|
|
// 修改寝室信息
|
|
|
WelcomeDormitory welcomeDormitory = welcomeDormitoryService.getById(sourceBed.getDormitoryId());
|
|
WelcomeDormitory welcomeDormitory = welcomeDormitoryService.getById(sourceBed.getDormitoryId());
|
|
|
if (ObjectUtils.isNotEmpty(welcomeDormitory)) {
|
|
if (ObjectUtils.isNotEmpty(welcomeDormitory)) {
|
|
@@ -866,7 +888,22 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult replaceBed(Integer bedId) {
|
|
|
|
|
|
|
+ public CommonResult checkInBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId) {
|
|
|
|
|
+ // 获取已入住的床位
|
|
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.checkInBedGroup(schoolId, buildId, dormitoryId);
|
|
|
|
|
+
|
|
|
|
|
+ return CommonResult.ok(beds);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public CommonResult replaceBed(ReplaceBedVo replaceBedVo) {
|
|
|
|
|
+ Integer sourceBedId = replaceBedVo.getSourceBedId();
|
|
|
|
|
+ Integer changeBedId = replaceBedVo.getChangeBedId();
|
|
|
|
|
+ WelcomeBed sourceBed = welcomeBedService.getBedById(sourceBedId);
|
|
|
|
|
+ WelcomeBed changeBed = welcomeBedService.getBedById(changeBedId);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(sourceBed) || ObjectUtils.isEmpty(changeBed)) {
|
|
|
|
|
+ return CommonResult.fail("床位不存在");
|
|
|
|
|
+ }
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|