|
@@ -1,10 +1,12 @@
|
|
|
package com.xjrsoft.module.student.service.impl;
|
|
|
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.github.yulichang.toolkit.MPJWrappers;
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
@@ -16,8 +18,8 @@ import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobilePageDto;
|
|
|
import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoPageDto;
|
|
|
import com.xjrsoft.module.student.entity.BasePunishmentStudentRelation;
|
|
|
import com.xjrsoft.module.student.entity.BasePunishmentType;
|
|
|
-import com.xjrsoft.module.student.mapper.BasePunishmentStudentRelationMapper;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentPunishmentInfo;
|
|
|
+import com.xjrsoft.module.student.mapper.BasePunishmentStudentRelationMapper;
|
|
|
import com.xjrsoft.module.student.mapper.BaseStudentPunishmentInfoMapper;
|
|
|
import com.xjrsoft.module.student.service.IBasePunishStudentRelationService;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentPunishmentInfoService;
|
|
@@ -25,14 +27,13 @@ import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoDetailVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobileDetailVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobilePageVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
|
|
|
-import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
import java.util.stream.Collectors;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
|
/**
|
|
|
* @title: 学生处分信息管理
|
|
@@ -77,31 +78,10 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public IPage<BaseStudentPunishmentInfoMobilePageVo> selectJoinListPageMobile(BaseStudentPunishmentInfoMobilePageDto dto) {
|
|
|
-
|
|
|
- MPJLambdaWrapper<BaseStudentPunishmentInfo> wrapper = MPJWrappers.<BaseStudentPunishmentInfo>lambdaJoin()
|
|
|
- .select(BaseStudentPunishmentInfo::getId)
|
|
|
- .select(BasePunishmentStudentRelation::getStudentId)
|
|
|
- .select(BasePunishmentStudentRelation::getUserId)
|
|
|
- .selectAs(BasePunishmentType::getPunishmentType, BaseStudentPunishmentInfoMobilePageVo::getPunishmentType)
|
|
|
- .select(BaseStudentPunishmentInfo::getStartTime)
|
|
|
- .selectAs(BasePunishmentStudentRelation::getName, BaseStudentPunishmentInfoMobilePageVo::getStudentName)
|
|
|
- .select(BasePunishmentStudentRelation::getGender)
|
|
|
- .select(BaseStudentPunishmentInfo::getReason)
|
|
|
- .innerJoin(BasePunishmentStudentRelation.class, BasePunishmentStudentRelation::getPunishmentInfoId, BaseStudentPunishmentInfo::getId)
|
|
|
- .innerJoin(BasePunishmentType.class, BasePunishmentType::getId, BaseStudentPunishmentInfo::getPunishmentTypeId)
|
|
|
- .eq(ObjectUtil.isNotNull(dto.getIsPublicity()), BaseStudentPunishmentInfo::getIsPublicity, dto.getIsPublicity())
|
|
|
- .eq(ObjectUtil.isNotNull(dto.getPunishmentTypeId()) && dto.getPunishmentTypeId() > 0, BaseStudentPunishmentInfo::getPunishmentTypeId, dto.getPunishmentTypeId())
|
|
|
- .eq(ObjectUtil.isNotNull(dto.getClassId()) && dto.getClassId() > 0, BaseStudentPunishmentInfo::getClassId, dto.getClassId())
|
|
|
- .eq(StrUtil.isNotBlank(dto.getStartTime()), BaseStudentPunishmentInfo::getStartTime, dto.getStartTime())
|
|
|
- .eq(StrUtil.isNotBlank(dto.getEndTime()), BaseStudentPunishmentInfo::getEndTime, dto.getEndTime())
|
|
|
- .like(StrUtil.isNotBlank(dto.getStudentName()), BasePunishmentStudentRelation::getName, dto.getStudentName())
|
|
|
- .eq(BaseStudentPunishmentInfo::getDeleteMark, 0)
|
|
|
- .orderByDesc(BaseStudentPunishmentInfo::getId);
|
|
|
+ public IPage<BaseStudentPunishmentInfoMobilePageVo> getMobilePage(BaseStudentPunishmentInfoMobilePageDto dto) {
|
|
|
|
|
|
- IPage<BaseStudentPunishmentInfoMobilePageVo> pageList = this.selectJoinListPage(ConventPage.getPage(dto), BaseStudentPunishmentInfoMobilePageVo.class, wrapper);
|
|
|
|
|
|
- return pageList;
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -141,43 +121,12 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
|
|
|
|
|
|
/**
|
|
|
* 学生处分信息详情
|
|
|
- * @param dto 学生处分信息管理详情入参(移动端)
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public BaseStudentPunishmentInfoMobileDetailVo getDetailById(BaseStudentPunishmentInfoMobileDetailDto dto) {
|
|
|
- MPJLambdaWrapper<BaseStudentPunishmentInfo> wrapper = MPJWrappers.<BaseStudentPunishmentInfo>lambdaJoin()
|
|
|
- .select(BaseStudentPunishmentInfo::getId)
|
|
|
- .selectAs(BaseSemester::getName, BaseStudentPunishmentInfoPageVo::getBaseSemesterName)
|
|
|
- .selectAs(BasePunishmentType::getPunishmentType, BaseStudentPunishmentInfoPageVo::getPunishmentType)
|
|
|
- .selectAs(BaseClass::getName, BaseStudentPunishmentInfoPageVo::getClassName)
|
|
|
- .select(BaseStudentPunishmentInfo::getStartTime)
|
|
|
- .select(BaseStudentPunishmentInfo::getEndTime)
|
|
|
- .select(BaseStudentPunishmentInfo::getIsPublicity)
|
|
|
- .select(BaseStudentPunishmentInfo::getPushMessageObject)
|
|
|
- .select(BaseStudentPunishmentInfo::getReason)
|
|
|
- .selectAs(BasePunishmentStudentRelation::getName, BaseStudentPunishmentInfoMobileDetailVo::getStudentName)
|
|
|
- .select(BasePunishmentStudentRelation::getGender)
|
|
|
- .select(BasePunishmentStudentRelation::getStudentId)
|
|
|
- .select(BasePunishmentStudentRelation::getStudentId)
|
|
|
- .select(XjrUser::getCredentialNumber)
|
|
|
- .select(BasePunishmentStudentRelation::getMajor)
|
|
|
- .select(BasePunishmentStudentRelation::getAdjustType)
|
|
|
- .select(BasePunishmentStudentRelation::getAdjustDate)
|
|
|
- .select(BasePunishmentStudentRelation::getAdjustReason)
|
|
|
- .select(BasePunishmentStudentRelation::getModifyDate)
|
|
|
- .innerJoin(BaseSemester.class, BaseSemester::getId, BaseStudentPunishmentInfo::getBaseSemesterId)
|
|
|
- .innerJoin(BasePunishmentType.class, BasePunishmentType::getId, BaseStudentPunishmentInfo::getPunishmentTypeId)
|
|
|
- .innerJoin(BaseClass.class, BaseClass::getId, BaseStudentPunishmentInfo::getClassId)
|
|
|
- .innerJoin(BasePunishmentStudentRelation.class, BasePunishmentStudentRelation::getPunishmentInfoId, BaseStudentPunishmentInfo::getId)
|
|
|
- .innerJoin(XjrUser.class, XjrUser::getId, BasePunishmentStudentRelation::getUserId)
|
|
|
- .eq(BaseStudentPunishmentInfo::getId, dto.getId())
|
|
|
- .eq(BasePunishmentStudentRelation::getUserId, dto.getUserId())
|
|
|
- .eq(BaseStudentPunishmentInfo::getDeleteMark, 0);
|
|
|
+ public BaseStudentPunishmentInfoMobileDetailVo getMobileInfo(Long id) {
|
|
|
|
|
|
- BaseStudentPunishmentInfoMobileDetailVo baseStudentPunishmentInfoMobileDetailVo = this.selectJoinOne(BaseStudentPunishmentInfoMobileDetailVo.class, wrapper);
|
|
|
-
|
|
|
- return baseStudentPunishmentInfoMobileDetailVo;
|
|
|
+ return baseStudentPunishmentInfoBaseStudentPunishmentInfoMapper.getMobileInfo(id);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -237,4 +186,11 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<BaseStudentPunishmentInfoMobilePageVo> getMobilePage(Page<BaseStudentPunishmentInfoMobilePageDto> page, BaseStudentPunishmentInfoMobilePageDto dto) {
|
|
|
+ dto.setTeacherId(StpUtil.getLoginIdAsLong());
|
|
|
+ Page<BaseStudentPunishmentInfoMobilePageVo> result = baseStudentPunishmentInfoBaseStudentPunishmentInfoMapper.getMobilePage(page, dto);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|