|
|
@@ -1,7 +1,6 @@
|
|
|
package com.xjrsoft.module.student.controller;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
-import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
@@ -16,6 +15,7 @@ import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
import com.xjrsoft.module.base.mapper.BaseClassMapper;
|
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentAssessmentInspectionDto;
|
|
|
+import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto;
|
|
|
import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
|
|
|
import com.xjrsoft.module.student.dto.UpdateBaseStudentAssessmentInspectionDto;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentAssessmentCategory;
|
|
|
@@ -28,10 +28,7 @@ import com.xjrsoft.module.student.mapper.BaseStudentAssessmentProjectMapper;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentAssessmentClassRelationService;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentAssessmentStudentRelationService;
|
|
|
-import com.xjrsoft.module.student.vo.BaseStudentAssessmentClassRelationListVo;
|
|
|
-import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
|
|
|
-import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionVo;
|
|
|
-import com.xjrsoft.module.student.vo.BaseStudentAssessmentStudentRelationVo;
|
|
|
+import com.xjrsoft.module.student.vo.*;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import com.xjrsoft.module.teacher.mapper.XjrUserMapper;
|
|
|
import io.swagger.annotations.Api;
|
|
|
@@ -47,7 +44,6 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -79,21 +75,24 @@ public class BaseStudentAssessmentInspectionController {
|
|
|
return RT.ok(ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionPageVo.class));
|
|
|
}
|
|
|
|
|
|
- @GetMapping(value = "/mibliePage")
|
|
|
+ @GetMapping(value = "/mobile-page")
|
|
|
@ApiOperation(value = "学生操行分记录管理列表(移动端分页)")
|
|
|
@SaCheckPermission("basestudentbehaviormanage:detail")
|
|
|
- public RT<PageOutput<BaseStudentAssessmentInspectionPageVo>> mibliePage(@Valid BaseStudentAssessmentInspectionPageDto dto) {
|
|
|
- List<BaseClass> classList = baseClassMapper.selectList(
|
|
|
- MPJWrappers.<BaseClass>lambdaJoin()
|
|
|
- .eq(BaseClass::getTeacherId, StpUtil.getLoginIdAsLong())
|
|
|
- .select(BaseClass.class, x -> VoToColumnUtil.fieldsToColumns(BaseClass.class).contains(x.getProperty()))
|
|
|
- );
|
|
|
- List<Long> classIds = new ArrayList<>();
|
|
|
- for (BaseClass baseClass : classList) {
|
|
|
- classIds.add(baseClass.getId());
|
|
|
- }
|
|
|
- dto.setClassIds(classIds);
|
|
|
- return RT.ok(getData(dto));
|
|
|
+ public RT<PageOutput<BaseStudentAssessmentInspectionMobilePageVo>> mobilePage(@Valid BaseStudentAssessmentInspectionMobilePageDto dto) {
|
|
|
+// List<BaseClass> classList = baseClassMapper.selectList(
|
|
|
+// MPJWrappers.<BaseClass>lambdaJoin()
|
|
|
+// .eq(BaseClass::getTeacherId, StpUtil.getLoginIdAsLong())
|
|
|
+// .select(BaseClass.class, x -> VoToColumnUtil.fieldsToColumns(BaseClass.class).contains(x.getProperty()))
|
|
|
+// );
|
|
|
+// List<Long> classIds = new ArrayList<>();
|
|
|
+// for (BaseClass baseClass : classList) {
|
|
|
+// classIds.add(baseClass.getId());
|
|
|
+// }
|
|
|
+// dto.setClassIds(classIds);
|
|
|
+// return RT.ok(getData(dto));
|
|
|
+
|
|
|
+ Page<BaseStudentAssessmentInspectionMobilePageVo> page = baseStudentAssessmentInspectionService.getMobilePage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
+ return RT.ok(ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionMobilePageVo.class));
|
|
|
}
|
|
|
|
|
|
PageOutput<BaseStudentAssessmentInspectionPageVo> getData(BaseStudentAssessmentInspectionPageDto dto) {
|