| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package com.xjrsoft.module.student.service.impl;
- import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
- import com.github.yulichang.base.MPJBaseServiceImpl;
- import com.xjrsoft.common.enums.ScoreTypeEnum;
- import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto;
- import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
- import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
- import com.xjrsoft.module.student.mapper.BaseStudentAssessmentInspectionMapper;
- import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
- import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo;
- import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
- import lombok.AllArgsConstructor;
- import org.springframework.stereotype.Service;
- /**
- * @title: 学生班级巡查考核
- * @Author dzx
- * @Date: 2023-11-16
- * @Version 1.0
- */
- @Service
- @AllArgsConstructor
- public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceImpl<BaseStudentAssessmentInspectionMapper, BaseStudentAssessmentInspection> implements IBaseStudentAssessmentInspectionService {
- private final BaseStudentAssessmentInspectionMapper assessmentInspectionMapper;
- @Override
- public Page<BaseStudentAssessmentInspectionPageVo> getPage(Page<BaseStudentAssessmentInspectionPageDto> page, BaseStudentAssessmentInspectionPageDto dto) {
- Page<BaseStudentAssessmentInspectionPageVo> result = assessmentInspectionMapper.getPage(page, dto);
- // 处理加减分
- result.getRecords().forEach((node) -> {
- if (node.getScoreType().equals(ScoreTypeEnum.ScoreMinus.getCode())) {
- node.setScore(node.getScore() * -1);
- }
- });
- return result;
- }
- @Override
- public Page<BaseStudentAssessmentInspectionMobilePageVo> getMobilePage(Page<BaseStudentAssessmentInspectionMobilePageDto> page, BaseStudentAssessmentInspectionMobilePageDto dto) {
- Page<BaseStudentAssessmentInspectionMobilePageVo> result = assessmentInspectionMapper.getMobilePage(page, dto);
- // 处理加减分
- result.getRecords().forEach((node) -> {
- if (node.getScoreType().equals(ScoreTypeEnum.ScoreMinus.getCode())) {
- node.setScore(node.getScore() * -1);
- }
- });
- return result;
- }
- }
|