|
@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.xjrsoft.common.enums.DeleteMark;
|
|
|
import com.xjrsoft.common.enums.GenderDictionaryEnum;
|
|
|
+import com.xjrsoft.common.enums.RollModalityEnum;
|
|
|
+import com.xjrsoft.common.enums.StudentChangeTypeEnum;
|
|
|
import com.xjrsoft.common.enums.StudyStatusEnum;
|
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
import com.xjrsoft.module.base.mapper.BaseClassMapper;
|
|
@@ -23,6 +25,7 @@ import com.xjrsoft.module.student.mapper.BaseStudentSchoolRollMapper;
|
|
|
import com.xjrsoft.module.student.mapper.PbSemesterConfigMapper;
|
|
|
import com.xjrsoft.module.student.mapper.PbVXsxxsfytbMapper;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
|
|
|
+import com.xjrsoft.module.student.service.IStudentChangeRecordService;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentInfoCategoryVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentInfoPageDataVo;
|
|
@@ -54,6 +57,7 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
|
|
|
private final PbSemesterConfigMapper pbSemesterConfigMapper;
|
|
|
private final PbVXsxxsfytbMapper pbVXsxxsfytbMapper;
|
|
|
private final UserMapper userMapper;
|
|
|
+ private final IStudentChangeRecordService recordService;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -102,6 +106,32 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
|
|
|
@Override
|
|
|
public Boolean updateInfo(UpdateBaseStudentInfoDto dto) {
|
|
|
for (Long id : dto.getUserIds()) {
|
|
|
+ BaseStudentSchoolRoll schoolRoll = this.getOne(new QueryWrapper<BaseStudentSchoolRoll>().lambda().eq(BaseStudentSchoolRoll::getUserId, id));
|
|
|
+ if(!dto.getStduyStatus().equals(schoolRoll.getStduyStatus())){
|
|
|
+ recordService.insertData(
|
|
|
+ StudyStatusEnum.fromCode(schoolRoll.getStduyStatus()),
|
|
|
+ schoolRoll.getStduyStatus(),
|
|
|
+ StudyStatusEnum.fromCode(dto.getStduyStatus()),
|
|
|
+ dto.getStduyStatus(),
|
|
|
+ id,
|
|
|
+ StpUtil.getLoginIdAsLong(),
|
|
|
+ StudentChangeTypeEnum.StduyStatus.getCode(),
|
|
|
+ 2
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if(!dto.getRollModality().equals(schoolRoll.getLearnStatus())){
|
|
|
+ recordService.insertData(
|
|
|
+ RollModalityEnum.fromCode(schoolRoll.getLearnStatus()),
|
|
|
+ schoolRoll.getLearnStatus(),
|
|
|
+ RollModalityEnum.fromCode(dto.getRollModality()),
|
|
|
+ dto.getRollModality(),
|
|
|
+ id,
|
|
|
+ StpUtil.getLoginIdAsLong(),
|
|
|
+ StudentChangeTypeEnum.LearnStatus.getCode(),
|
|
|
+ 2
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
baseStudentSchoolRollMapper.updateInfoByUserId(dto, id);
|
|
|
}
|
|
|
return true;
|