|
@@ -218,7 +218,7 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
String collegeIds = "";
|
|
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();
|
|
collegeIds = account.getCollegeId();
|
|
|
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);
|
|
@@ -661,8 +661,22 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public void welcomeBedExport(HttpServletResponse response, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, Integer collegeId, Integer majorId, Integer classstrId,Integer retentionState) {
|
|
|
|
|
- List<WelcomeBed> result = welcomeBedService.queryPageWelcomeBeds(schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
|
|
|
|
|
+ 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;
|
|
|
|
|
+ if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
|
|
+ String collegeIds = "";
|
|
|
|
|
+ WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(account)) {
|
|
|
|
|
+ throw new RuntimeException("当前账号不存在,请重新登入");
|
|
|
|
|
+ }
|
|
|
|
|
+ collegeIds = account.getCollegeId();
|
|
|
|
|
+ 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();
|
|
Workbook workbook = new XSSFWorkbook();
|
|
@@ -1055,14 +1069,39 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult studentAccommodationPage(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrId, String name) {
|
|
|
|
|
- PageUtils<WelcomeBed> result = welcomeBedService.studentAccommodationPage(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|
|
|
|
|
|
|
+ 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;
|
|
|
|
|
+ if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
|
|
+ String collegeIds = "";
|
|
|
|
|
+ WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(account)) {
|
|
|
|
|
+ return CommonResult.fail("当前账号不存在,请重新登入");
|
|
|
|
|
+ }
|
|
|
|
|
+ collegeIds = account.getCollegeId();
|
|
|
|
|
+ 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);
|
|
return CommonResult.ok(result);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public void studentAccommodationListExport(HttpServletResponse response, Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrId, String name) {
|
|
|
|
|
- List<WelcomeBed> result=welcomeBedService.studentAccommodationList( schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|
|
|
|
|
|
|
+ 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;
|
|
|
|
|
+ if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
|
|
+ String collegeIds = "";
|
|
|
|
|
+ WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(account)) {
|
|
|
|
|
+ throw new RuntimeException("当前账号不存在,请重新登入");
|
|
|
|
|
+ }
|
|
|
|
|
+ collegeIds = account.getCollegeId();
|
|
|
|
|
+ result =welcomeBedService.studentAccommodationListS( schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ result = welcomeBedService.studentAccommodationList( schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
//导出
|
|
//导出
|
|
|
Workbook workbook = new XSSFWorkbook();
|
|
Workbook workbook = new XSSFWorkbook();
|