|
|
@@ -89,11 +89,11 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
|
Integer bedNumber = byId.getBedNumber();
|
|
|
// 查询该寝室下有多少床位
|
|
|
- LambdaQueryWrapper<WelcomeBed> wrapper=new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(WelcomeBed::getDormitoryId,iwbr.getDormitoryId());
|
|
|
+ LambdaQueryWrapper<WelcomeBed> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(WelcomeBed::getDormitoryId, iwbr.getDormitoryId());
|
|
|
List<WelcomeBed> list = welcomeBedService.list(wrapper);
|
|
|
|
|
|
- if (list.size()>=bedNumber) {
|
|
|
+ if (list.size() >= bedNumber) {
|
|
|
return CommonResult.fail("该寝室的床位号已满");
|
|
|
}
|
|
|
|
|
|
@@ -103,8 +103,6 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
WelcomeBed wb = new WelcomeBed();
|
|
|
|
|
|
if (StringUtils.hasText(iwbr.getCardNum())) {
|
|
|
@@ -210,9 +208,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public CommonResult queryPageBeds(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, Integer collegeId, Integer majorId, Integer classstrId,Integer retentionState,Integer accountId) {
|
|
|
+ public CommonResult queryPageBeds(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, Integer collegeId, Integer majorId, Integer classstrId, Integer retentionState, Integer accountId) {
|
|
|
// 当学院为空
|
|
|
- PageUtils<WelcomeBed> result=null;
|
|
|
+ PageUtils<WelcomeBed> result = null;
|
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
|
@@ -225,9 +223,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
for (String s : split) {
|
|
|
collegeIds.add(s);
|
|
|
}
|
|
|
- result = welcomeBedService.queryPageWelcomeBedsC(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
|
|
|
- }else {
|
|
|
- result = welcomeBedService.queryPageWelcomeBeds(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
|
+ result = welcomeBedService.queryPageWelcomeBedsC(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId, retentionState);
|
|
|
+ } else {
|
|
|
+ result = welcomeBedService.queryPageWelcomeBeds(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId, retentionState);
|
|
|
}
|
|
|
|
|
|
return CommonResult.ok(result);
|
|
|
@@ -391,8 +389,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setSchoolId(wsl.get().getId());
|
|
|
bedData.setSchool(school);
|
|
|
} else {
|
|
|
- int h=rowNum+1;
|
|
|
- return CommonResult.fail("第" +h+ "行,不存在该校区");
|
|
|
+ int h = rowNum + 1;
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该校区");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -402,30 +400,30 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (oBuild != null && oBuild.isPresent()) {
|
|
|
bedData.setBuild(build);
|
|
|
bedData.setBuildId(oBuild.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该楼栋");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//寝室
|
|
|
if (wds != null && wds.size() > 0) {
|
|
|
- Optional<WelcomeDormitory> oDormitory = wds.stream().filter(e ->e.getSchool().equals(school) && e.getBuild().equals(build)
|
|
|
+ Optional<WelcomeDormitory> oDormitory = wds.stream().filter(e -> e.getSchool().equals(school) && e.getBuild().equals(build)
|
|
|
&& e.getDormitory().equals(dormitory)).findFirst();
|
|
|
if (oDormitory != null && oDormitory.isPresent()) {
|
|
|
if (!oDormitory.get().getSex().equals(sex)) {
|
|
|
- int h=rowNum+1;
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,床位性别和寝室性别不一致");
|
|
|
}
|
|
|
if (!oDormitory.get().getCollege().equals(college)) {
|
|
|
- int h=rowNum+1;
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,床位院系和寝室院系不一致");
|
|
|
}
|
|
|
|
|
|
bedData.setDormitory(dormitory);
|
|
|
bedData.setDormitoryId(oDormitory.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该寝室号");
|
|
|
}
|
|
|
}
|
|
|
@@ -438,8 +436,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (owo != null && owo.isPresent()) {
|
|
|
bedData.setCollege(college);
|
|
|
bedData.setCollegeId(owo.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该院系");
|
|
|
}
|
|
|
|
|
|
@@ -448,18 +446,18 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (omwo != null && omwo.isPresent()) {
|
|
|
bedData.setMajor(major);
|
|
|
bedData.setMajorId(omwo.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该专业");
|
|
|
}
|
|
|
|
|
|
// 班级
|
|
|
- Optional<WelcomeOrg> ocwo = wos.stream().filter(e -> e.getName().equals(classstr) && e.getParentId().equals(omwo.get().getId())).findFirst();
|
|
|
+ Optional<WelcomeOrg> ocwo = wos.stream().filter(e -> e.getName().equals(classstr) && e.getParentId().equals(omwo.get().getId())).findFirst();
|
|
|
if (ocwo != null && ocwo.isPresent()) {
|
|
|
bedData.setClassstr(classstr);
|
|
|
bedData.setClassstrId(ocwo.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该班级");
|
|
|
}
|
|
|
//endregion
|
|
|
@@ -586,8 +584,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setSchoolId(wsl.get().getId());
|
|
|
bedData.setSchool(school);
|
|
|
} else {
|
|
|
- int h=rowNum+1;
|
|
|
- return CommonResult.fail("第" +h+ "行,不存在该校区");
|
|
|
+ int h = rowNum + 1;
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该校区");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -597,30 +595,30 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (oBuild != null && oBuild.isPresent()) {
|
|
|
bedData.setBuild(build);
|
|
|
bedData.setBuildId(oBuild.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该楼栋");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//寝室
|
|
|
if (wds != null && wds.size() > 0) {
|
|
|
- Optional<WelcomeDormitory> oDormitory = wds.stream().filter(e ->e.getSchool().equals(school) && e.getBuild().equals(build)
|
|
|
+ Optional<WelcomeDormitory> oDormitory = wds.stream().filter(e -> e.getSchool().equals(school) && e.getBuild().equals(build)
|
|
|
&& e.getDormitory().equals(dormitory)).findFirst();
|
|
|
if (oDormitory != null && oDormitory.isPresent()) {
|
|
|
if (!oDormitory.get().getSex().equals(sex)) {
|
|
|
- int h=rowNum+1;
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,床位性别和寝室性别不一致");
|
|
|
}
|
|
|
if (!oDormitory.get().getCollege().equals(college)) {
|
|
|
- int h=rowNum+1;
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,床位院系和寝室院系不一致");
|
|
|
}
|
|
|
|
|
|
bedData.setDormitory(dormitory);
|
|
|
bedData.setDormitoryId(oDormitory.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该寝室号");
|
|
|
}
|
|
|
}
|
|
|
@@ -633,8 +631,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (owo != null && owo.isPresent()) {
|
|
|
bedData.setCollege(college);
|
|
|
bedData.setCollegeId(owo.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该院系");
|
|
|
}
|
|
|
|
|
|
@@ -643,18 +641,18 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (omwo != null && omwo.isPresent()) {
|
|
|
bedData.setMajor(major);
|
|
|
bedData.setMajorId(omwo.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该专业");
|
|
|
}
|
|
|
|
|
|
// 班级
|
|
|
- Optional<WelcomeOrg> ocwo = wos.stream().filter(e -> e.getName().equals(classstr) && e.getParentId().equals(omwo.get().getId())).findFirst();
|
|
|
+ Optional<WelcomeOrg> ocwo = wos.stream().filter(e -> e.getName().equals(classstr) && e.getParentId().equals(omwo.get().getId())).findFirst();
|
|
|
if (ocwo != null && ocwo.isPresent()) {
|
|
|
bedData.setClassstr(classstr);
|
|
|
bedData.setClassstrId(ocwo.get().getId());
|
|
|
- }else {
|
|
|
- int h=rowNum+1;
|
|
|
+ } else {
|
|
|
+ int h = rowNum + 1;
|
|
|
return CommonResult.fail("第" + h + "行,不存在该班级");
|
|
|
}
|
|
|
//endregion
|
|
|
@@ -682,9 +680,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void welcomeBedExport(HttpServletResponse response, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, Integer collegeId, Integer majorId, Integer classstrId,Integer retentionState,Integer accountId) {
|
|
|
+ public void welcomeBedExport(HttpServletResponse response, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, Integer collegeId, Integer majorId, Integer classstrId, Integer retentionState, Integer accountId) {
|
|
|
// 当学院为空
|
|
|
- List<WelcomeBed> result=null;
|
|
|
+ List<WelcomeBed> result = null;
|
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
|
@@ -697,13 +695,12 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
for (String s : split) {
|
|
|
collegeIds.add(s);
|
|
|
}
|
|
|
- result = welcomeBedService.queryPageWelcomeBedsS(schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
|
|
|
- }else {
|
|
|
- result = welcomeBedService.queryPageWelcomeBeds(schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
|
+ result = welcomeBedService.queryPageWelcomeBedsS(schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId, retentionState);
|
|
|
+ } else {
|
|
|
+ result = welcomeBedService.queryPageWelcomeBeds(schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId, retentionState);
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
//导出
|
|
|
Workbook workbook = new XSSFWorkbook();
|
|
|
Sheet sheet = workbook.createSheet("床位信息");
|
|
|
@@ -736,7 +733,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
dataRow.createCell(5).setCellValue(bed.getSex());
|
|
|
if (ObjectUtils.isEmpty(bed.getGrade())) {
|
|
|
dataRow.createCell(6).setCellValue("");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
dataRow.createCell(6).setCellValue(bed.getGrade());
|
|
|
}
|
|
|
|
|
|
@@ -745,22 +742,22 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
dataRow.createCell(9).setCellValue(bed.getClassstr());
|
|
|
dataRow.createCell(10).setCellValue(bed.getInstructor());
|
|
|
Integer isCheck1 = bed.getIsCheck();
|
|
|
- String rz="";
|
|
|
- if (isCheck1==1) {
|
|
|
- rz="是";
|
|
|
- }else {
|
|
|
- rz="否";
|
|
|
+ String rz = "";
|
|
|
+ if (isCheck1 == 1) {
|
|
|
+ rz = "是";
|
|
|
+ } else {
|
|
|
+ rz = "否";
|
|
|
}
|
|
|
dataRow.createCell(11).setCellValue(rz);
|
|
|
dataRow.createCell(12).setCellValue(bed.getCardNum());
|
|
|
dataRow.createCell(13).setCellValue(bed.getName());
|
|
|
dataRow.createCell(14).setCellValue(bed.getRemark());
|
|
|
Integer retentionState1 = bed.getRetentionState();
|
|
|
- String bl="";
|
|
|
- if (1==retentionState1) {
|
|
|
- bl="否";
|
|
|
- }else {
|
|
|
- bl="是";
|
|
|
+ String bl = "";
|
|
|
+ if (1 == retentionState1) {
|
|
|
+ bl = "否";
|
|
|
+ } else {
|
|
|
+ bl = "是";
|
|
|
}
|
|
|
dataRow.createCell(15).setCellValue(bl);
|
|
|
|
|
|
@@ -770,7 +767,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public CommonResult submit(String studentCard,WelcomeBed welcomeBed) {
|
|
|
+ public CommonResult submit(String studentCard, WelcomeBed welcomeBed) {
|
|
|
welcomeBed.setStudentCard(studentCard);
|
|
|
// 先判断是否已经提交
|
|
|
LambdaQueryWrapper<WelcomeBed> wrapper = new LambdaQueryWrapper<>();
|
|
|
@@ -785,7 +782,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (wb == null) {
|
|
|
return CommonResult.fail("床位已失效,选择失败!");
|
|
|
}
|
|
|
- if (wb.getIsCheck()==1) {
|
|
|
+ if (wb.getIsCheck() == 1) {
|
|
|
return CommonResult.fail("该床位已被其他人入住");
|
|
|
}
|
|
|
|
|
|
@@ -808,7 +805,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
welcomeDormitory.setStatus(1);
|
|
|
}
|
|
|
boolean updateResult = welcomeDormitoryService.updateById(welcomeDormitory);
|
|
|
- if(!updateResult){
|
|
|
+ if (!updateResult) {
|
|
|
return CommonResult.fail("更新失败");
|
|
|
}
|
|
|
}
|
|
|
@@ -823,15 +820,15 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
public CommonResult bedDetails(String studentCard) {
|
|
|
List<BedDetailsVo> result = new ArrayList<>();
|
|
|
WelcomeStudent student = welcomeStudentService.getDataByIdcard(studentCard);
|
|
|
- if(student == null){
|
|
|
- return CommonResult.fail("558","当前学生信息已失效,查看失败");
|
|
|
+ if (student == null) {
|
|
|
+ return CommonResult.fail("558", "当前学生信息已失效,查看失败");
|
|
|
}
|
|
|
// 获取未入住的床位
|
|
|
List<BedInfosVo> beds = welcomeBedService.queryBedList(studentCard);
|
|
|
|
|
|
- for (BedInfosVo bed:beds) {
|
|
|
+ for (BedInfosVo bed : beds) {
|
|
|
BedDetailsVo data = new BedDetailsVo();
|
|
|
- if(bed.getStudentCard() != null && bed.getStudentCard().equals(studentCard)){
|
|
|
+ if (bed.getStudentCard() != null && bed.getStudentCard().equals(studentCard)) {
|
|
|
data.setPicture(student.getPicture());
|
|
|
data.setCardNum(student.getAdmissNum());
|
|
|
data.setAdmissNum(student.getAdmissNum());
|
|
|
@@ -910,7 +907,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
if (ObjectUtils.isEmpty(bed)) {
|
|
|
return CommonResult.fail("不存在该床铺");
|
|
|
}
|
|
|
- if (bed.getIsCheck()==1) {
|
|
|
+ if (bed.getIsCheck() == 1) {
|
|
|
return CommonResult.fail("该床位已被其他人入住");
|
|
|
}
|
|
|
|
|
|
@@ -1050,9 +1047,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public CommonResult checkInBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId,Integer bedId,Integer collegeId) {
|
|
|
+ public CommonResult checkInBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId, Integer bedId, Integer collegeId) {
|
|
|
// 获取已入住的床位
|
|
|
- List<WelcomeBed> beds = welcomeBedService.checkInBedGroup(schoolId, buildId, dormitoryId,bedId,collegeId);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.checkInBedGroup(schoolId, buildId, dormitoryId, bedId, collegeId);
|
|
|
|
|
|
return CommonResult.ok(beds);
|
|
|
}
|
|
|
@@ -1077,9 +1074,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
|
|
|
// 源数据
|
|
|
WelcomeBed welcomeBed = new WelcomeBed();
|
|
|
- BeanUtil.copyProperties(sourceBed,welcomeBed);
|
|
|
+ BeanUtil.copyProperties(sourceBed, welcomeBed);
|
|
|
WelcomeBed welcomeBed2 = new WelcomeBed();
|
|
|
- BeanUtil.copyProperties(changeBed,welcomeBed2);
|
|
|
+ BeanUtil.copyProperties(changeBed, welcomeBed2);
|
|
|
|
|
|
String studentCard = sourceBed.getStudentCard();
|
|
|
String cardNum = sourceBed.getCardNum();
|
|
|
@@ -1128,9 +1125,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public CommonResult studentAccommodationPage(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrId, String name,Integer accountId) {
|
|
|
+ public CommonResult studentAccommodationPage(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrId, String name, Integer accountId) {
|
|
|
// 当学院为空
|
|
|
- PageUtils<WelcomeBed> result=null;
|
|
|
+ PageUtils<WelcomeBed> result = null;
|
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
|
@@ -1143,17 +1140,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
for (String s : split) {
|
|
|
collegeIds.add(s);
|
|
|
}
|
|
|
- result = welcomeBedService.studentAccommodationPageS(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
|
|
|
- }else {
|
|
|
- result = welcomeBedService.studentAccommodationPage(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|
|
|
+ result = welcomeBedService.studentAccommodationPageS(currentPage, pageCount, schoolId, buildId, dormitoryId, collegeIds, majorId, classstrId, name);
|
|
|
+ } else {
|
|
|
+ result = welcomeBedService.studentAccommodationPage(currentPage, pageCount, schoolId, buildId, dormitoryId, collegeId, majorId, classstrId, name);
|
|
|
}
|
|
|
return CommonResult.ok(result);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void studentAccommodationListExport(HttpServletResponse response, Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrId, String name,Integer accountId) {
|
|
|
+ public void studentAccommodationListExport(HttpServletResponse response, Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrId, String name, Integer accountId) {
|
|
|
// 当学院为空
|
|
|
- List<WelcomeBed> result=null;
|
|
|
+ List<WelcomeBed> result = null;
|
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
|
@@ -1166,9 +1163,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
for (String s : split) {
|
|
|
collegeIds.add(s);
|
|
|
}
|
|
|
- result =welcomeBedService.studentAccommodationListS( schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
|
|
|
- }else {
|
|
|
- result = welcomeBedService.studentAccommodationList( schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|
|
|
+ result = welcomeBedService.studentAccommodationListS(schoolId, buildId, dormitoryId, collegeIds, majorId, classstrId, name);
|
|
|
+ } else {
|
|
|
+ result = welcomeBedService.studentAccommodationList(schoolId, buildId, dormitoryId, collegeId, majorId, classstrId, name);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1214,7 +1211,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult changeBuildGroup(Integer schoolId, Integer collegeId, String sex) {
|
|
|
// 获取未入住的楼栋
|
|
|
- List<WelcomeBed> beds = welcomeBedService.changeBuildGroup(schoolId,collegeId,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.changeBuildGroup(schoolId, collegeId, sex);
|
|
|
ArrayList<ChangeBuildGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeBuildGroupVo vo = new ChangeBuildGroupVo();
|
|
|
@@ -1229,7 +1226,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult changeDormitoryGroup(Integer schoolId, Integer buildId, Integer collegeId, String sex) {
|
|
|
// 获取未入住的寝室
|
|
|
- List<WelcomeBed> beds = welcomeBedService.changeDormitoryGroup(schoolId,buildId,collegeId,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.changeDormitoryGroup(schoolId, buildId, collegeId, sex);
|
|
|
ArrayList<ChangeDormitoryGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeDormitoryGroupVo vo = new ChangeDormitoryGroupVo();
|
|
|
@@ -1243,9 +1240,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public CommonResult changeBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId,String sex) {
|
|
|
+ public CommonResult changeBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, String sex) {
|
|
|
// 获取未入住的床位
|
|
|
- List<WelcomeBed> beds = welcomeBedService.changeBedGroup(schoolId, buildId, dormitoryId,collegeId,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.changeBedGroup(schoolId, buildId, dormitoryId, collegeId, sex);
|
|
|
ArrayList<ChangeBedGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeBedGroupVo vo = new ChangeBedGroupVo();
|
|
|
@@ -1259,7 +1256,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult replaceBuildGroup(Integer schoolId, Integer collegeId, String sex) {
|
|
|
// 获取已入住的楼栋
|
|
|
- List<WelcomeBed> beds = welcomeBedService.replaceBuildGroup(schoolId,collegeId,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.replaceBuildGroup(schoolId, collegeId, sex);
|
|
|
ArrayList<ChangeBuildGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeBuildGroupVo vo = new ChangeBuildGroupVo();
|
|
|
@@ -1274,7 +1271,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult replaceDormitoryGroup(Integer schoolId, Integer buildId, Integer collegeId, String sex) {
|
|
|
// 获取已入住的寝室
|
|
|
- List<WelcomeBed> beds = welcomeBedService.replaceDormitoryGroup(schoolId,buildId,collegeId,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.replaceDormitoryGroup(schoolId, buildId, collegeId, sex);
|
|
|
ArrayList<ChangeDormitoryGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeDormitoryGroupVo vo = new ChangeDormitoryGroupVo();
|
|
|
@@ -1289,7 +1286,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult replaceBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, String sex) {
|
|
|
// 获取已入住的床位
|
|
|
- List<WelcomeBed> beds = welcomeBedService.replaceBedGroup(schoolId, buildId, dormitoryId,collegeId,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.replaceBedGroup(schoolId, buildId, dormitoryId, collegeId, sex);
|
|
|
ArrayList<ChangeBedGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeBedGroupVo vo = new ChangeBedGroupVo();
|
|
|
@@ -1303,7 +1300,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult hBuildGroup(Integer schoolId, Integer collegeId, Integer majorId, Integer classstrid, String sex) {
|
|
|
// 获取未入住的楼栋
|
|
|
- List<WelcomeBed> beds = welcomeBedService.hBuildGroup(schoolId,collegeId,majorId,classstrid,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.hBuildGroup(schoolId, collegeId, majorId, classstrid, sex);
|
|
|
ArrayList<ChangeBuildGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeBuildGroupVo vo = new ChangeBuildGroupVo();
|
|
|
@@ -1318,7 +1315,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult hDormitoryGroup(Integer schoolId, Integer buildId, Integer collegeId, Integer majorId, Integer classstrid, String sex) {
|
|
|
// 获取未入住的寝室
|
|
|
- List<WelcomeBed> beds = welcomeBedService.hDormitoryGroup(schoolId,buildId,collegeId,majorId,classstrid,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.hDormitoryGroup(schoolId, buildId, collegeId, majorId, classstrid, sex);
|
|
|
ArrayList<ChangeDormitoryGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeDormitoryGroupVo vo = new ChangeDormitoryGroupVo();
|
|
|
@@ -1333,10 +1330,33 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Override
|
|
|
public CommonResult hBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrid, String sex) {
|
|
|
// 获取未入住的床位
|
|
|
- List<WelcomeBed> beds = welcomeBedService.hBedGroup(schoolId, buildId, dormitoryId,collegeId,majorId,classstrid,sex);
|
|
|
+ List<WelcomeBed> beds = welcomeBedService.hBedGroup(schoolId, buildId, dormitoryId, collegeId, majorId, classstrid, sex);
|
|
|
ArrayList<ChangeBedGroupVo> vos = new ArrayList<>();
|
|
|
for (WelcomeBed bed : beds) {
|
|
|
ChangeBedGroupVo vo = new ChangeBedGroupVo();
|
|
|
+ if (bed.getSchoolId() == 1) {
|
|
|
+// 墨轩湖布局都是一样的
|
|
|
+ vo.setLayoutNumber(1);
|
|
|
+ } else {
|
|
|
+ String build = bed.getBuild();
|
|
|
+ String dormitory = bed.getDormitory();
|
|
|
+ if ("16栋".equals(build) || "28栋".equals(build) || "29栋".equals(build)) {
|
|
|
+ vo.setLayoutNumber(2);
|
|
|
+ }else if ("9栋".equals(build)){
|
|
|
+ if ("105".equals(dormitory)) {
|
|
|
+ vo.setLayoutNumber(3);
|
|
|
+ }else {
|
|
|
+ vo.setLayoutNumber(2);
|
|
|
+ }
|
|
|
+ }else if ("12栋".equals(build)){
|
|
|
+ if ("219".equals(dormitory) || "319".equals(dormitory) || "419".equals(dormitory) || "519".equals(dormitory) || "619".equals(dormitory)){
|
|
|
+ vo.setLayoutNumber(5);
|
|
|
+ }else {
|
|
|
+ vo.setLayoutNumber(4);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
vo.setBedId(bed.getId());
|
|
|
vo.setNumber(bed.getNumber());
|
|
|
vos.add(vo);
|
|
|
@@ -1345,7 +1365,5 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|