|
@@ -215,12 +215,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
// 当学院为空
|
|
// 当学院为空
|
|
|
PageUtils<WelcomeBed> result=null;
|
|
PageUtils<WelcomeBed> result=null;
|
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
- String collegeIds = "";
|
|
|
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
|
return CommonResult.fail("当前账号不存在,请重新登入");
|
|
return CommonResult.fail("当前账号不存在,请重新登入");
|
|
|
}
|
|
}
|
|
|
- collegeIds = account.getCollegeId();
|
|
|
|
|
|
|
+ String aClassstrId = account.getCollegeId();
|
|
|
|
|
+ String[] split = aClassstrId.split(",");
|
|
|
|
|
+ List<String> collegeIds = new ArrayList<>();
|
|
|
|
|
+
|
|
|
|
|
+ for (String s : split) {
|
|
|
|
|
+ collegeIds.add(s);
|
|
|
|
|
+ }
|
|
|
result = welcomeBedService.queryPageWelcomeBedsC(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
|
|
result = welcomeBedService.queryPageWelcomeBedsC(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
|
|
|
}else {
|
|
}else {
|
|
|
result = welcomeBedService.queryPageWelcomeBeds(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
result = welcomeBedService.queryPageWelcomeBeds(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
@@ -392,7 +397,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setSchoolId(wsl.get().getId());
|
|
bedData.setSchoolId(wsl.get().getId());
|
|
|
bedData.setSchool(school);
|
|
bedData.setSchool(school);
|
|
|
} else {
|
|
} else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该校区");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" +h+ "行,不存在该校区");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -403,7 +409,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setBuild(build);
|
|
bedData.setBuild(build);
|
|
|
bedData.setBuildId(oBuild.get().getId());
|
|
bedData.setBuildId(oBuild.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该楼栋");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该楼栋");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -412,16 +419,19 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
Optional<WelcomeDormitory> oDormitory = wds.stream().filter(e -> e.getDormitory().equals(dormitory)).findFirst();
|
|
Optional<WelcomeDormitory> oDormitory = wds.stream().filter(e -> e.getDormitory().equals(dormitory)).findFirst();
|
|
|
if (oDormitory != null && oDormitory.isPresent()) {
|
|
if (oDormitory != null && oDormitory.isPresent()) {
|
|
|
if (!oDormitory.get().getSex().equals(sex)) {
|
|
if (!oDormitory.get().getSex().equals(sex)) {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,床位性别和寝室性别不一致");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,床位性别和寝室性别不一致");
|
|
|
}
|
|
}
|
|
|
if (!oDormitory.get().getCollege().equals(college)) {
|
|
if (!oDormitory.get().getCollege().equals(college)) {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,床位院系和寝室院系不一致");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,床位院系和寝室院系不一致");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bedData.setDormitory(dormitory);
|
|
bedData.setDormitory(dormitory);
|
|
|
bedData.setDormitoryId(oDormitory.get().getId());
|
|
bedData.setDormitoryId(oDormitory.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该寝室号");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该寝室号");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -434,7 +444,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setCollege(college);
|
|
bedData.setCollege(college);
|
|
|
bedData.setCollegeId(owo.get().getId());
|
|
bedData.setCollegeId(owo.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该院系");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该院系");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Optional<WelcomeOrg> omwo = wos.stream().filter(e -> e.getName().equals(major)).findFirst();
|
|
Optional<WelcomeOrg> omwo = wos.stream().filter(e -> e.getName().equals(major)).findFirst();
|
|
@@ -442,7 +453,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setMajor(major);
|
|
bedData.setMajor(major);
|
|
|
bedData.setMajorId(omwo.get().getId());
|
|
bedData.setMajorId(omwo.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该专业");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该专业");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Optional<WelcomeOrg> ocwo = wos.stream().filter(e -> e.getName().equals(classstr)).findFirst();
|
|
Optional<WelcomeOrg> ocwo = wos.stream().filter(e -> e.getName().equals(classstr)).findFirst();
|
|
@@ -450,7 +462,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setClassstr(classstr);
|
|
bedData.setClassstr(classstr);
|
|
|
bedData.setClassstrId(ocwo.get().getId());
|
|
bedData.setClassstrId(ocwo.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该班级");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该班级");
|
|
|
}
|
|
}
|
|
|
//endregion
|
|
//endregion
|
|
|
|
|
|
|
@@ -576,7 +589,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setSchoolId(wsl.get().getId());
|
|
bedData.setSchoolId(wsl.get().getId());
|
|
|
bedData.setSchool(school);
|
|
bedData.setSchool(school);
|
|
|
} else {
|
|
} else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该校区");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该校区");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -587,7 +601,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setBuild(build);
|
|
bedData.setBuild(build);
|
|
|
bedData.setBuildId(oBuild.get().getId());
|
|
bedData.setBuildId(oBuild.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该楼栋");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该楼栋");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -596,16 +611,19 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
Optional<WelcomeDormitory> oDormitory = wds.stream().filter(e -> e.getDormitory().equals(dormitory)).findFirst();
|
|
Optional<WelcomeDormitory> oDormitory = wds.stream().filter(e -> e.getDormitory().equals(dormitory)).findFirst();
|
|
|
if (oDormitory != null && oDormitory.isPresent()) {
|
|
if (oDormitory != null && oDormitory.isPresent()) {
|
|
|
if (!oDormitory.get().getSex().equals(sex)) {
|
|
if (!oDormitory.get().getSex().equals(sex)) {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,床位性别和寝室性别不一致");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,床位性别和寝室性别不一致");
|
|
|
}
|
|
}
|
|
|
if (!oDormitory.get().getCollege().equals(college)) {
|
|
if (!oDormitory.get().getCollege().equals(college)) {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,床位院系和寝室院系不一致");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,床位院系和寝室院系不一致");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bedData.setDormitory(dormitory);
|
|
bedData.setDormitory(dormitory);
|
|
|
bedData.setDormitoryId(oDormitory.get().getId());
|
|
bedData.setDormitoryId(oDormitory.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该寝室号");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该寝室号");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -618,7 +636,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setCollege(college);
|
|
bedData.setCollege(college);
|
|
|
bedData.setCollegeId(owo.get().getId());
|
|
bedData.setCollegeId(owo.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该院系");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该院系");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Optional<WelcomeOrg> omwo = wos.stream().filter(e -> e.getName().equals(major)).findFirst();
|
|
Optional<WelcomeOrg> omwo = wos.stream().filter(e -> e.getName().equals(major)).findFirst();
|
|
@@ -626,7 +645,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setMajor(major);
|
|
bedData.setMajor(major);
|
|
|
bedData.setMajorId(omwo.get().getId());
|
|
bedData.setMajorId(omwo.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该专业");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该专业");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Optional<WelcomeOrg> ocwo = wos.stream().filter(e -> e.getName().equals(classstr)).findFirst();
|
|
Optional<WelcomeOrg> ocwo = wos.stream().filter(e -> e.getName().equals(classstr)).findFirst();
|
|
@@ -634,7 +654,8 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
bedData.setClassstr(classstr);
|
|
bedData.setClassstr(classstr);
|
|
|
bedData.setClassstrId(ocwo.get().getId());
|
|
bedData.setClassstrId(ocwo.get().getId());
|
|
|
}else {
|
|
}else {
|
|
|
- return CommonResult.fail("第" + rowNum + 1 + "行,不存在该班级");
|
|
|
|
|
|
|
+ int h=rowNum+1;
|
|
|
|
|
+ return CommonResult.fail("第" + h + "行,不存在该班级");
|
|
|
}
|
|
}
|
|
|
//endregion
|
|
//endregion
|
|
|
|
|
|
|
@@ -665,12 +686,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
// 当学院为空
|
|
// 当学院为空
|
|
|
List<WelcomeBed> result=null;
|
|
List<WelcomeBed> result=null;
|
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
- String collegeIds = "";
|
|
|
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
|
throw new RuntimeException("当前账号不存在,请重新登入");
|
|
throw new RuntimeException("当前账号不存在,请重新登入");
|
|
|
}
|
|
}
|
|
|
- collegeIds = account.getCollegeId();
|
|
|
|
|
|
|
+ String aClassstrId = account.getCollegeId();
|
|
|
|
|
+ String[] split = aClassstrId.split(",");
|
|
|
|
|
+ List<String> collegeIds = new ArrayList<>();
|
|
|
|
|
+
|
|
|
|
|
+ for (String s : split) {
|
|
|
|
|
+ collegeIds.add(s);
|
|
|
|
|
+ }
|
|
|
result = welcomeBedService.queryPageWelcomeBedsS(schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
|
|
result = welcomeBedService.queryPageWelcomeBedsS(schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
|
|
|
}else {
|
|
}else {
|
|
|
result = welcomeBedService.queryPageWelcomeBeds(schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
result = welcomeBedService.queryPageWelcomeBeds(schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
@@ -1073,12 +1099,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
// 当学院为空
|
|
// 当学院为空
|
|
|
PageUtils<WelcomeBed> result=null;
|
|
PageUtils<WelcomeBed> result=null;
|
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
- String collegeIds = "";
|
|
|
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
|
return CommonResult.fail("当前账号不存在,请重新登入");
|
|
return CommonResult.fail("当前账号不存在,请重新登入");
|
|
|
}
|
|
}
|
|
|
- collegeIds = account.getCollegeId();
|
|
|
|
|
|
|
+ String aClassstrId = account.getCollegeId();
|
|
|
|
|
+ String[] split = aClassstrId.split(",");
|
|
|
|
|
+ List<String> collegeIds = new ArrayList<>();
|
|
|
|
|
+
|
|
|
|
|
+ for (String s : split) {
|
|
|
|
|
+ collegeIds.add(s);
|
|
|
|
|
+ }
|
|
|
result = welcomeBedService.studentAccommodationPageS(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
|
|
result = welcomeBedService.studentAccommodationPageS(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
|
|
|
}else {
|
|
}else {
|
|
|
result = welcomeBedService.studentAccommodationPage(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|
|
result = welcomeBedService.studentAccommodationPage(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|
|
@@ -1091,12 +1122,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
// 当学院为空
|
|
// 当学院为空
|
|
|
List<WelcomeBed> result=null;
|
|
List<WelcomeBed> result=null;
|
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
- String collegeIds = "";
|
|
|
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
if (ObjectUtils.isEmpty(account)) {
|
|
|
throw new RuntimeException("当前账号不存在,请重新登入");
|
|
throw new RuntimeException("当前账号不存在,请重新登入");
|
|
|
}
|
|
}
|
|
|
- collegeIds = account.getCollegeId();
|
|
|
|
|
|
|
+ String aClassstrId = account.getCollegeId();
|
|
|
|
|
+ String[] split = aClassstrId.split(",");
|
|
|
|
|
+ List<String> collegeIds = new ArrayList<>();
|
|
|
|
|
+
|
|
|
|
|
+ for (String s : split) {
|
|
|
|
|
+ collegeIds.add(s);
|
|
|
|
|
+ }
|
|
|
result =welcomeBedService.studentAccommodationListS( schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
|
|
result =welcomeBedService.studentAccommodationListS( schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
|
|
|
}else {
|
|
}else {
|
|
|
result = welcomeBedService.studentAccommodationList( schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|
|
result = welcomeBedService.studentAccommodationList( schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|