|
@@ -3,6 +3,7 @@ package com.ym.mec.web.controller;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
+import com.ym.mec.biz.dal.enums.*;
|
|
|
import com.ym.mec.biz.dal.page.*;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -38,17 +39,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
-import com.ym.mec.biz.dal.enums.AccountType;
|
|
|
-import com.ym.mec.biz.dal.enums.CourseStatusEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
-import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.OrderTypeEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.PaymentChannelEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.StudentMusicGroupStatusEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.YesOrNoEnum;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.page.PageInfo;
|
|
@@ -137,6 +127,70 @@ public class ExportController extends BaseController {
|
|
|
private VipGroupActivityService vipGroupActivityService;
|
|
|
@Autowired
|
|
|
private GoodsService goodsService;
|
|
|
+ @Autowired
|
|
|
+ private ClassGroupService classGroupService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "班级列表导出")
|
|
|
+ @PostMapping("export/classGroup")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/classGroup')")
|
|
|
+ public void exportClassGroup(HttpServletResponse response, ClassGroupQueryInfo queryInfo) throws IOException {
|
|
|
+ queryInfo.setPage(1);
|
|
|
+ queryInfo.setRows(49999);
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ throw new BizException("用户信息获取失败");
|
|
|
+ }
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isEmpty(queryInfo.getOrganIdList())) {
|
|
|
+ queryInfo.setOrganIdList(employee.getOrganIdList());
|
|
|
+ }else if(org.apache.commons.lang3.StringUtils.isEmpty(employee.getOrganIdList())){
|
|
|
+ throw new BizException("用户所在分部异常");
|
|
|
+ }else {
|
|
|
+ List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
|
|
|
+ if(!list.containsAll(Arrays.asList(queryInfo.getOrganIdList().split(",")))){
|
|
|
+ throw new BizException("非法请求");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<ClassGroupTeachersDto> rows = classGroupService.queryClassGroupPage(queryInfo).getRows();
|
|
|
+ for (ClassGroupTeachersDto row : rows) {
|
|
|
+ List<ClassGroupTeacherMapper> classGroupTeacherMapperList = row.getClassGroupTeacherMapperList();
|
|
|
+ if(classGroupTeacherMapperList.size() > 0){
|
|
|
+ List<ClassGroupTeacherMapper> teachingTeachers = classGroupTeacherMapperList.stream().filter(e -> e.getTeacherRole() == TeachTypeEnum.TEACHING).collect(Collectors.toList());
|
|
|
+ if(teachingTeachers.size() > 0){
|
|
|
+ row.setTeachingTeacherName(StringUtils.join(teachingTeachers.stream().map(e->e.getUserName()).collect(Collectors.toList()), ","));
|
|
|
+ }
|
|
|
+ List<ClassGroupTeacherMapper> bishopTeachers = classGroupTeacherMapperList.stream().filter(e -> e.getTeacherRole() == TeachTypeEnum.BISHOP).collect(Collectors.toList());
|
|
|
+ if(bishopTeachers.size() > 0){
|
|
|
+ row.setBishopTeacherName(StringUtils.join(bishopTeachers.stream().map(e->e.getUserName()).collect(Collectors.toList()),","));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ OutputStream outputStream = response.getOutputStream();
|
|
|
+ try {
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"课程组编号", "课程组名称", "分部名称", "班级名称",
|
|
|
+ "班级类型", "班级人数", "主教老师", "助教老师", "已上课时", "总课数"}, new String[]{
|
|
|
+ "musicGroupId", "musicGroupName", "organName", "name",
|
|
|
+ "type.msg", "studentNum == NUll?0:studentNum", "bishopTeacherName", "teachingTeacherName", "currentClassTimes",
|
|
|
+ "totalClassTimes"}, rows);
|
|
|
+ response.setContentType("application/octet-stream");
|
|
|
+ response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
+ "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
+ response.flushBuffer();
|
|
|
+ outputStream = response.getOutputStream();
|
|
|
+ workbook.write(outputStream);
|
|
|
+ outputStream.flush();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ } finally {
|
|
|
+ if (outputStream != null) {
|
|
|
+ try {
|
|
|
+ outputStream.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
@ApiOperation(value = "商品列表导出")
|
|
|
@PostMapping("export/goods")
|
|
@@ -185,17 +239,15 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
- Employee employee = employeeDao.get(sysUser.getId());
|
|
|
- if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
- queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
- } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
|
|
|
- throw new BizException("用户所在分部异常");
|
|
|
- } else {
|
|
|
- List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
|
|
|
- if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
|
|
|
- throw new BizException("非法请求");
|
|
|
- }
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
+ queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
+ } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
|
|
|
+ throw new BizException("用户所在分部异常");
|
|
|
+ } else {
|
|
|
+ List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
|
|
|
+ if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
|
|
|
+ throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
List<ExportVipGroupActivityDto> rows = vipGroupActivityService.exportVipGroupActivity(queryInfo);
|
|
@@ -236,7 +288,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -248,7 +299,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<ExportStudentAttendanceDto> rows = studentAttendanceService.exportStudentAttendancesQueryPage(queryInfo).getRows();
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
@@ -317,7 +367,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -329,7 +378,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
queryInfo.setPage(1);
|
|
|
queryInfo.setRows(49999);
|
|
|
List<MusicGroupPaymentCalenderAuditDto> rows = musicGroupPaymentCalenderService.auditList(queryInfo).getRows();
|
|
@@ -368,7 +416,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -380,7 +427,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List rows = teacherAttendanceService.queryTeacherAttendances(queryInfo).getRows();
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
@@ -450,7 +496,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -462,7 +507,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<StudentBuyPracticeDto> rows = practiceGroupService.studentBuys(queryInfo).getRows();
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
@@ -577,7 +621,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -589,7 +632,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
Date endTime = queryInfo.getEndTime();
|
|
|
if (endTime != null) {
|
|
|
queryInfo.setEndTime(DateUtil.addDays(endTime, 1));
|
|
@@ -630,7 +672,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -642,7 +683,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
queryInfo.setIsExport(true);
|
|
|
List<StudentManageListDto> rows = studentManageService.findStudentsByOrganId(queryInfo).getRows();
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
@@ -684,7 +724,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -696,7 +735,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<PracticeGroupDto> rows = practiceGroupService.findPracticeGroups(queryInfo).getRows();
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
if (rows != null && rows.size() > 0) {
|
|
@@ -749,7 +787,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -761,7 +798,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<VipGroup> rows = vipGroupService.findVipGroups(queryInfo).getRows();
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
if (rows != null && rows.size() > 0) {
|
|
@@ -805,7 +841,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (org.apache.commons.lang3.StringUtils.isEmpty(queryInfo.getOrganIdList())) {
|
|
|
queryInfo.setOrganIdList(employee.getOrganIdList());
|
|
@@ -817,7 +852,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<CourseScheduleEndDto> rows = scheduleService.endFindCourseSchedules(queryInfo).getRows();
|
|
|
for (CourseScheduleEndDto row : rows) {
|
|
|
row.setIsComplaints(StringUtils.equals(row.getIsComplaints(), "1") ? "有" : "无");
|
|
@@ -859,7 +893,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -871,7 +904,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<SporadicChargeInfo> rows = sporadicChargeInfoService.queryDetailPage(queryInfo).getRows();
|
|
|
for (SporadicChargeInfo row : rows) {
|
|
|
row.setOpenFlagStr(row.getOpenFlag().equals(0) ? "开启" : "关闭");
|
|
@@ -1033,14 +1065,12 @@ public class ExportController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/orderList')")
|
|
|
public void orderList(StudentPaymentOrderQueryInfo queryInfo, HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getRoutingOrganId()) && "3".equals(queryInfo.getOrderType())) {
|
|
|
queryInfo.setRoutingOrganId(employee.getOrganIdList());
|
|
|
} else if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
}
|
|
|
- }
|
|
|
if (StringUtils.isNotBlank(queryInfo.getSearch())) {
|
|
|
List<BasicUserDto> users = studentPaymentOrderDao.getUsers(queryInfo.getSearch());
|
|
|
List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
|
|
@@ -1320,10 +1350,8 @@ public class ExportController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/courseReviews')")
|
|
|
public void courseReviews(CourseReviewQueryInfo queryInfo, HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
- Employee employee = employeeDao.get(sysUser.getId());
|
|
|
- queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
- }
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
queryInfo.setIsExport(1);
|
|
|
queryInfo.setPage(1);
|
|
|
queryInfo.setRows(49999);
|
|
@@ -1409,10 +1437,8 @@ public class ExportController extends BaseController {
|
|
|
public void practiceGroup(HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
String organIds = null;
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
- Employee employee = employeeDao.get(sysUser.getId());
|
|
|
- organIds = employee.getOrganIdList();
|
|
|
- }
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ organIds = employee.getOrganIdList();
|
|
|
|
|
|
List<CourseGroupExportDto> practiceGroupExports = practiceGroupDao.getPracticeGroupExport(organIds);
|
|
|
if (practiceGroupExports == null || practiceGroupExports.size() == 0) {
|
|
@@ -1481,10 +1507,8 @@ public class ExportController extends BaseController {
|
|
|
public void vipGroup(HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
String organIds = null;
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
- Employee employee = employeeDao.get(sysUser.getId());
|
|
|
- organIds = employee.getOrganIdList();
|
|
|
- }
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ organIds = employee.getOrganIdList();
|
|
|
|
|
|
List<CourseGroupExportDto> vipGroupExports = courseScheduleDao.getVipGroupExport(organIds);
|
|
|
if (vipGroupExports == null || vipGroupExports.size() == 0) {
|
|
@@ -1567,7 +1591,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (org.apache.commons.lang3.StringUtils.isEmpty(queryInfo.getOrganIdList())) {
|
|
|
queryInfo.setOrganIdList(employee.getOrganIdList());
|
|
@@ -1579,7 +1602,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<ExtraExerciseStudentsDto> rows = extracurricularExercisesReplyService.findExtraExercises(queryInfo).getRows();
|
|
|
if (CollectionUtils.isEmpty(rows)) {
|
|
|
response.setStatus(500);
|
|
@@ -1628,7 +1650,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (org.apache.commons.lang3.StringUtils.isEmpty(queryInfo.getOrganIdList())) {
|
|
|
queryInfo.setOrganIdList(employee.getOrganIdList());
|
|
@@ -1640,7 +1661,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<StudentExercisesSituationDto> rows = studentExtracurricularExercisesSituationService.findStudentExtracurricularExercisesSituations(queryInfo).getRows();
|
|
|
if (CollectionUtils.isEmpty(rows)) {
|
|
|
response.setStatus(500);
|
|
@@ -1683,7 +1703,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (org.apache.commons.lang3.StringUtils.isEmpty(queryInfo.getOrganIdList())) {
|
|
|
queryInfo.setOrganIdList(employee.getOrganIdList());
|
|
@@ -1695,7 +1714,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
List<TeacherCourseSalaryDetail4WebDto> rows = courseScheduleTeacherSalaryService.findIsSettlementCourseSalarys(queryInfo).getRows();
|
|
|
if (CollectionUtils.isEmpty(rows)) {
|
|
|
response.setStatus(500);
|
|
@@ -1768,7 +1786,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -1780,7 +1797,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
PageInfo<Student4operating> PageOperatingStudents = studentManageService.getOperatingStudents(queryInfo);
|
|
|
|
|
|
if (PageOperatingStudents.getTotal() <= 0) {
|
|
@@ -1843,10 +1859,8 @@ public class ExportController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/vipCourseReviews')")
|
|
|
public void vipCourseReviews(CourseReviewQueryInfo queryInfo, HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
- }
|
|
|
queryInfo.setIsExport(1);
|
|
|
queryInfo.setPage(1);
|
|
|
queryInfo.setRows(49999);
|
|
@@ -1987,7 +2001,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new IOException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
@@ -1999,7 +2012,6 @@ public class ExportController extends BaseController {
|
|
|
throw new IOException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
queryInfo.setRows(65000);
|
|
|
PageInfo<CooperationOrgan> pageList = cooperationOrganService.queryPage(queryInfo);
|
|
|
if (pageList.getTotal() <= 0) {
|
|
@@ -2039,12 +2051,10 @@ public class ExportController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/musicGroupRegister')")
|
|
|
public void musicGroupRegister(String organIds, HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isBlank(organIds)) {
|
|
|
organIds = employee.getOrganIdList();
|
|
|
}
|
|
|
- }
|
|
|
List<MusicGroupStatusEnum> musicGroupStatusList = new ArrayList<>();
|
|
|
musicGroupStatusList.add(MusicGroupStatusEnum.APPLY);
|
|
|
musicGroupStatusList.add(MusicGroupStatusEnum.PAY);
|
|
@@ -2166,14 +2176,12 @@ public class ExportController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/routeOrderList')")
|
|
|
public void routeOrderList(StudentPaymentOrderQueryInfo queryInfo, HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getRoutingOrganId()) && queryInfo.getOrderType().equals("3")) {
|
|
|
queryInfo.setRoutingOrganId(employee.getOrganIdList());
|
|
|
} else if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
}
|
|
|
- }
|
|
|
if (StringUtils.isNotBlank(queryInfo.getSearch())) {
|
|
|
List<BasicUserDto> users = studentPaymentOrderDao.getUsers(queryInfo.getSearch());
|
|
|
List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
|
|
@@ -2446,12 +2454,10 @@ public class ExportController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/musicGroupNormalStudentNum')")
|
|
|
public void musicGroupNormalStudentNum(String organIds, HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isBlank(organIds)) {
|
|
|
organIds = employee.getOrganIdList();
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
List<MusicGroupStatusEnum> musicGroupStatusList = new ArrayList<>();
|
|
|
musicGroupStatusList.add(MusicGroupStatusEnum.PAY);
|
|
@@ -2542,12 +2548,10 @@ public class ExportController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/studentOrder')")
|
|
|
public void studentOrder(String organIds, Date date, HttpServletResponse response) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isBlank(organIds)) {
|
|
|
organIds = employee.getOrganIdList();
|
|
|
}
|
|
|
- }
|
|
|
Date startTime = DateUtil.getFirstDayOfMonth(date);
|
|
|
Date EndTime = DateUtil.getLastSecondWithDay(DateUtil.getLastDayOfMonth(date));
|
|
|
|
|
@@ -2640,7 +2644,6 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- if (!sysUser.getIsSuperAdmin()) {
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganIdList())) {
|
|
|
queryInfo.setOrganIdList(employee.getOrganIdList());
|
|
@@ -2652,7 +2655,6 @@ public class ExportController extends BaseController {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
if (queryInfo.getEndTime() != null) {
|
|
|
queryInfo.setEndTime(DateUtil.getLastTimeWithDay(queryInfo.getEndTime()));
|
|
|
}
|