|
|
@@ -1,7 +1,9 @@
|
|
|
package com.xjrsoft.module.liteflow.node;
|
|
|
|
|
|
+import cn.dev33.satoken.secure.BCrypt;
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.db.Entity;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import com.xjrsoft.XjrSoftApplication;
|
|
|
import com.xjrsoft.common.enums.ArchivesStatusEnum;
|
|
|
@@ -17,6 +19,7 @@ import com.xjrsoft.module.student.dto.AddBaseStudentFamilyMemberDto;
|
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentSchoolRollDto;
|
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentSubsidizeDto;
|
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
|
|
|
+import com.xjrsoft.module.student.entity.BaseStudentUser;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
|
|
|
import com.xjrsoft.module.student.service.IStudentManagerService;
|
|
|
import com.xjrsoft.module.workflow.service.IWorkflowExecuteService;
|
|
|
@@ -54,7 +57,7 @@ class WfStudentRepeatStudyNodeTest {
|
|
|
|
|
|
@Test
|
|
|
void test(){
|
|
|
- Long formId = 1907636186804998144L;
|
|
|
+ Long formId = 1952276941219917824L;
|
|
|
|
|
|
String tableName = "wf_student_repeat_study";
|
|
|
Entity where = Entity.create(tableName);
|
|
|
@@ -83,7 +86,7 @@ class WfStudentRepeatStudyNodeTest {
|
|
|
List<AddBaseStudentSchoolRollDto> baseStudentSchoolRollList = new ArrayList<>();
|
|
|
AddBaseStudentSchoolRollDto rollDto = new AddBaseStudentSchoolRollDto();
|
|
|
rollDto.setStduyStatus(objectMap.get("stduy_status").toString());
|
|
|
- rollDto.setStduyStatus(ArchivesStatusEnum.FB2901.getCode());
|
|
|
+ rollDto.setArchivesStatus(ArchivesStatusEnum.FB2901.getCode());
|
|
|
rollDto.setMajorSetId(Long.parseLong(objectMap.get("major_set_id").toString()));
|
|
|
rollDto.setStudentType(StudentTypeEnum.FB2801.getCode());
|
|
|
rollDto.setClassId(Long.parseLong(objectMap.get("class_id").toString()));
|
|
|
@@ -115,6 +118,18 @@ class WfStudentRepeatStudyNodeTest {
|
|
|
|
|
|
studentService.add(baseStudentUser);
|
|
|
}else{
|
|
|
+ // 当学生用户已经存在,应该修改用户密码为证件号后六位
|
|
|
+ String lastSixDigits = credentialNumber.length() <= 6
|
|
|
+ ? credentialNumber
|
|
|
+ : credentialNumber.substring(credentialNumber.length() - 6);
|
|
|
+
|
|
|
+ LambdaUpdateWrapper<BaseStudentUser> baseStudentUserLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
|
|
+ baseStudentUserLambdaUpdateWrapper
|
|
|
+ .set(BaseStudentUser::getPassword, BCrypt.hashpw(lastSixDigits, BCrypt.gensalt()))
|
|
|
+ .eq(BaseStudentUser::getCredentialNumber, credentialNumber)
|
|
|
+ ;
|
|
|
+ studentService.update(baseStudentUserLambdaUpdateWrapper);
|
|
|
+
|
|
|
schoolRollService.activateStudent(user.getId(), null);
|
|
|
schoolRollService.updateStudentClassGradeMajorStduyStatus(
|
|
|
Long.parseLong(objectMap.get("class_id").toString()),
|