|
|
@@ -14,16 +14,30 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import com.xjrsoft.common.constant.GlobalConstant;
|
|
|
-import com.xjrsoft.common.enums.*;
|
|
|
+import com.xjrsoft.common.enums.DeleteMark;
|
|
|
+import com.xjrsoft.common.enums.EnabledMark;
|
|
|
+import com.xjrsoft.common.enums.GenderDictionaryEnum;
|
|
|
+import com.xjrsoft.common.enums.JobStateEnum;
|
|
|
+import com.xjrsoft.common.enums.RoleEnum;
|
|
|
+import com.xjrsoft.common.enums.TeaChangeTypeEnum;
|
|
|
import com.xjrsoft.common.exception.MyException;
|
|
|
import com.xjrsoft.common.utils.RedisUtil;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.config.CommonPropertiesConfig;
|
|
|
import com.xjrsoft.module.hikvision.util.DataUtil;
|
|
|
-import com.xjrsoft.module.organization.entity.*;
|
|
|
+import com.xjrsoft.module.organization.entity.Department;
|
|
|
+import com.xjrsoft.module.organization.entity.Post;
|
|
|
+import com.xjrsoft.module.organization.entity.User;
|
|
|
+import com.xjrsoft.module.organization.entity.UserDeptRelation;
|
|
|
+import com.xjrsoft.module.organization.entity.UserPostRelation;
|
|
|
+import com.xjrsoft.module.organization.entity.UserRoleRelation;
|
|
|
import com.xjrsoft.module.organization.mapper.UserDeptRelationMapper;
|
|
|
import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
|
|
|
-import com.xjrsoft.module.organization.service.*;
|
|
|
+import com.xjrsoft.module.organization.service.IDepartmentService;
|
|
|
+import com.xjrsoft.module.organization.service.IPostService;
|
|
|
+import com.xjrsoft.module.organization.service.IUserDeptRelationService;
|
|
|
+import com.xjrsoft.module.organization.service.IUserPostRelationService;
|
|
|
+import com.xjrsoft.module.organization.service.IUserService;
|
|
|
import com.xjrsoft.module.personnel.entity.CarMessageApply;
|
|
|
import com.xjrsoft.module.personnel.mapper.CarMessageApplyMapper;
|
|
|
import com.xjrsoft.module.personnel.service.ITeacherFaceProcessService;
|
|
|
@@ -33,10 +47,55 @@ import com.xjrsoft.module.system.service.IDictionarydetailService;
|
|
|
import com.xjrsoft.module.teacher.dto.AddXjrUserDto;
|
|
|
import com.xjrsoft.module.teacher.dto.BaseTeacherPageDto;
|
|
|
import com.xjrsoft.module.teacher.dto.UpdateXjrUserDto;
|
|
|
-import com.xjrsoft.module.teacher.entity.*;
|
|
|
-import com.xjrsoft.module.teacher.mapper.*;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacherChangeRecord;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacherContact;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacherEducation;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacherEmploy;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacherFamily;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacherFamilyMember;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacherRegular;
|
|
|
+import com.xjrsoft.module.teacher.entity.CoreTeacher;
|
|
|
+import com.xjrsoft.module.teacher.entity.EvaluatorInformation;
|
|
|
+import com.xjrsoft.module.teacher.entity.FacultyContract;
|
|
|
+import com.xjrsoft.module.teacher.entity.JobInformation;
|
|
|
+import com.xjrsoft.module.teacher.entity.LanguageCompetence;
|
|
|
+import com.xjrsoft.module.teacher.entity.OutsideAssociations;
|
|
|
+import com.xjrsoft.module.teacher.entity.ProfessionalTitle;
|
|
|
+import com.xjrsoft.module.teacher.entity.ScientificResearch;
|
|
|
+import com.xjrsoft.module.teacher.entity.TeacherCertification;
|
|
|
+import com.xjrsoft.module.teacher.entity.WfTeacherDepart;
|
|
|
+import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
+import com.xjrsoft.module.teacher.mapper.BaseTeacherChangeRecordMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.BaseTeacherContactMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.BaseTeacherEducationMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.BaseTeacherEmployMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.BaseTeacherFamilyMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.BaseTeacherFamilyMemberMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.BaseTeacherMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.BaseTeacherRegularMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.CoreTeacherMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.EvaluatorInformationMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.FacultyContractMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.JobInformationMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.LanguageCompetenceMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.OutsideAssociationsMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.ProfessionalTitleMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.ScientificResearchMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.TeacherCertificationMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.WfTeacherDepartMapper;
|
|
|
+import com.xjrsoft.module.teacher.mapper.XjrUserMapper;
|
|
|
import com.xjrsoft.module.teacher.service.ITeacherbaseManagerService;
|
|
|
-import com.xjrsoft.module.teacher.vo.*;
|
|
|
+import com.xjrsoft.module.teacher.vo.CoreTeacherImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.EvaluatorInformationImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.FacultyContractImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.JobInformationImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.LanguageCompetenceImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.OutsideAssociationsImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.ProfessionalTitleImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.ScientificResearchImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.TeacherCertificationImportVo;
|
|
|
+import com.xjrsoft.module.teacher.vo.XjrUserPageVo;
|
|
|
import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
|
|
|
import com.xjrsoft.module.workflow.mapper.WorkflowFormRelationMapper;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
@@ -55,7 +114,13 @@ import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.util.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -580,6 +645,7 @@ public class TeacherbaseManagerServiceImpl extends MPJBaseServiceImpl<XjrUserMap
|
|
|
.select(User::getId)
|
|
|
.select(User.class, x -> VoToColumnUtil.fieldsToColumns(User.class).contains(x.getProperty()))
|
|
|
.innerJoin(BaseTeacher.class, BaseTeacher::getUserId, User::getId)
|
|
|
+ .eq(User::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
);
|
|
|
Map<String, User> userMap = userList.stream().collect(Collectors.toMap(User::getCredentialNumber, x -> x));
|
|
|
|
|
|
@@ -588,6 +654,7 @@ public class TeacherbaseManagerServiceImpl extends MPJBaseServiceImpl<XjrUserMap
|
|
|
.select(BaseTeacher::getId)
|
|
|
.select(BaseTeacher.class, x -> VoToColumnUtil.fieldsToColumns(BaseTeacher.class).contains(x.getProperty()))
|
|
|
.innerJoin(User.class, User::getId, BaseTeacher::getUserId)
|
|
|
+ .eq(User::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
);
|
|
|
Map<Long, BaseTeacher> teacherMap = teacherList.stream().collect(Collectors.toMap(BaseTeacher::getUserId, x -> x));
|
|
|
|
|
|
@@ -602,7 +669,7 @@ public class TeacherbaseManagerServiceImpl extends MPJBaseServiceImpl<XjrUserMap
|
|
|
.in(DictionaryDetail::getItemId, itemList)
|
|
|
.eq(DictionaryDetail::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
);
|
|
|
- Map<String, String> dictionaryMap = dictionaryList.stream().collect(Collectors.toMap(DictionaryDetail::getName, DictionaryDetail::getCode));
|
|
|
+ Map<Long, Map<String, String>> dictionaryMap = dictionaryList.stream().collect(Collectors.groupingBy(DictionaryDetail::getItemId, Collectors.toMap(DictionaryDetail::getName, DictionaryDetail::getCode)));
|
|
|
|
|
|
List<Department> departmentList = departmentService.list(
|
|
|
new QueryWrapper<Department>().lambda()
|
|
|
@@ -671,15 +738,15 @@ public class TeacherbaseManagerServiceImpl extends MPJBaseServiceImpl<XjrUserMap
|
|
|
User user = userMap.get(credentialNumber);
|
|
|
user.setName(rowData.get(1).toString());
|
|
|
user.setGender(GenderDictionaryEnum.getCode(rowData.get(2).toString()));
|
|
|
- user.setCredentialType(dictionaryMap.get(rowData.get(3).toString()));
|
|
|
+ user.setCredentialType(dictionaryMap.get(2023000000000000006L).get(rowData.get(3).toString()));
|
|
|
user.setCredentialNumber(rowData.get(4).toString());
|
|
|
user.setMobile(rowData.get(5).toString());
|
|
|
updateUserList.add(user);
|
|
|
|
|
|
BaseTeacher teacher = teacherMap.get(user.getId());
|
|
|
- teacher.setEmployType(dictionaryMap.get(rowData.get(6).toString()));
|
|
|
+ teacher.setEmployType(dictionaryMap.get(2023000000000000016L).get(rowData.get(6).toString()));
|
|
|
if(rowData.get(9) != null && StrUtil.isNotEmpty(rowData.get(9).toString())){
|
|
|
- teacher.setJobState(dictionaryMap.get(rowData.get(9).toString()));
|
|
|
+ teacher.setJobState(dictionaryMap.get(2023000000000000005L).get(rowData.get(9).toString()));
|
|
|
}
|
|
|
if(rowData.get(10) != null && StrUtil.isNotEmpty(rowData.get(10).toString())){
|
|
|
teacher.setJoinTime(sdf.parse(rowData.get(10).toString()));
|
|
|
@@ -690,7 +757,7 @@ public class TeacherbaseManagerServiceImpl extends MPJBaseServiceImpl<XjrUserMap
|
|
|
if(rowData.get(11) != null && StrUtil.isNotEmpty(rowData.get(11).toString())){
|
|
|
BaseTeacherRegular teacherRegular = regularMap.get(user.getId());
|
|
|
JSONArray teachingStatus = teacherRegular.getTeachingStatus();
|
|
|
- teachingStatus.add(dictionaryMap.get(rowData.get(11).toString()));
|
|
|
+ teachingStatus.add(dictionaryMap.get(2023000000000000020L).get(rowData.get(11).toString()));
|
|
|
teacherRegular.setTeachingStatus(teachingStatus);
|
|
|
updateBaseTeacherRegularList.add(teacherRegular);
|
|
|
}
|
|
|
@@ -720,18 +787,18 @@ public class TeacherbaseManagerServiceImpl extends MPJBaseServiceImpl<XjrUserMap
|
|
|
user.setIsChangePassword(1);
|
|
|
user.setName(rowData.get(1).toString());
|
|
|
user.setGender(GenderDictionaryEnum.getCode(rowData.get(2).toString()));
|
|
|
- user.setCredentialType(dictionaryMap.get(rowData.get(3).toString()));
|
|
|
+ user.setCredentialType(dictionaryMap.get(2023000000000000006L).get(rowData.get(3).toString()));
|
|
|
user.setCredentialNumber(rowData.get(4).toString());
|
|
|
user.setMobile(rowData.get(5).toString());
|
|
|
user.setCreateDate(LocalDateTime.now());
|
|
|
userService.save(user);
|
|
|
|
|
|
BaseTeacher teacher = new BaseTeacher();
|
|
|
- teacher.setEmployType(dictionaryMap.get(rowData.get(6).toString()));
|
|
|
+ teacher.setEmployType(dictionaryMap.get(2023000000000000016L).get(rowData.get(6).toString()));
|
|
|
teacher.setUserId(user.getId());
|
|
|
teacher.setCreateDate(LocalDateTime.now());
|
|
|
if(rowData.get(9) != null && StrUtil.isNotEmpty(rowData.get(9).toString())){
|
|
|
- teacher.setJobState(dictionaryMap.get(rowData.get(9).toString()));
|
|
|
+ teacher.setJobState(dictionaryMap.get(2023000000000000005L).get(rowData.get(9).toString()));
|
|
|
}
|
|
|
|
|
|
if(rowData.get(10) != null && StrUtil.isNotEmpty(rowData.get(10).toString())){
|
|
|
@@ -743,7 +810,7 @@ public class TeacherbaseManagerServiceImpl extends MPJBaseServiceImpl<XjrUserMap
|
|
|
if(rowData.get(11) != null && StrUtil.isNotEmpty(rowData.get(11).toString())){
|
|
|
BaseTeacherRegular teacherRegular = new BaseTeacherRegular();
|
|
|
JSONArray teachingStatus = new JSONArray();
|
|
|
- teachingStatus.add(dictionaryMap.get(rowData.get(11).toString()));
|
|
|
+ teachingStatus.add(dictionaryMap.get(2023000000000000020L).get(rowData.get(11).toString()));
|
|
|
teacherRegular.setTeachingStatus(teachingStatus);
|
|
|
teacherRegular.setCreateDate(LocalDateTime.now());
|
|
|
teacherRegular.setCreateUserId(StpUtil.getLoginIdAsLong());
|