|
@@ -20,6 +20,7 @@ import com.xjrsoft.common.enums.RoleEnum;
|
|
import com.xjrsoft.common.enums.YesOrNoEnum;
|
|
import com.xjrsoft.common.enums.YesOrNoEnum;
|
|
import com.xjrsoft.common.exception.MyException;
|
|
import com.xjrsoft.common.exception.MyException;
|
|
import com.xjrsoft.common.utils.RedisUtil;
|
|
import com.xjrsoft.common.utils.RedisUtil;
|
|
|
|
+import com.xjrsoft.common.utils.TreeUtil;
|
|
import com.xjrsoft.config.CommonPropertiesConfig;
|
|
import com.xjrsoft.config.CommonPropertiesConfig;
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
import com.xjrsoft.module.base.entity.BaseGrade;
|
|
import com.xjrsoft.module.base.entity.BaseGrade;
|
|
@@ -27,37 +28,27 @@ import com.xjrsoft.module.base.entity.BaseMajorSet;
|
|
import com.xjrsoft.module.base.mapper.BaseClassMapper;
|
|
import com.xjrsoft.module.base.mapper.BaseClassMapper;
|
|
import com.xjrsoft.module.base.mapper.BaseGradeMapper;
|
|
import com.xjrsoft.module.base.mapper.BaseGradeMapper;
|
|
import com.xjrsoft.module.base.mapper.BaseMajorSetMapper;
|
|
import com.xjrsoft.module.base.mapper.BaseMajorSetMapper;
|
|
|
|
+import com.xjrsoft.module.base.service.IBaseClassService;
|
|
|
|
+import com.xjrsoft.module.base.service.IBaseGradeService;
|
|
|
|
+import com.xjrsoft.module.organization.entity.Department;
|
|
import com.xjrsoft.module.organization.entity.User;
|
|
import com.xjrsoft.module.organization.entity.User;
|
|
import com.xjrsoft.module.organization.entity.UserDeptRelation;
|
|
import com.xjrsoft.module.organization.entity.UserDeptRelation;
|
|
import com.xjrsoft.module.organization.entity.UserRoleRelation;
|
|
import com.xjrsoft.module.organization.entity.UserRoleRelation;
|
|
import com.xjrsoft.module.organization.mapper.UserDeptRelationMapper;
|
|
import com.xjrsoft.module.organization.mapper.UserDeptRelationMapper;
|
|
import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
|
|
import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
|
|
|
|
+import com.xjrsoft.module.organization.service.IDepartmentService;
|
|
import com.xjrsoft.module.organization.service.IUserDeptRelationService;
|
|
import com.xjrsoft.module.organization.service.IUserDeptRelationService;
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
|
|
import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
|
|
import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
|
|
import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
|
|
import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
|
|
-import com.xjrsoft.module.student.entity.BaseStudent;
|
|
|
|
-import com.xjrsoft.module.student.entity.BaseStudentContact;
|
|
|
|
-import com.xjrsoft.module.student.entity.BaseStudentFamily;
|
|
|
|
-import com.xjrsoft.module.student.entity.BaseStudentFamilyMember;
|
|
|
|
-import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
|
|
|
|
-import com.xjrsoft.module.student.entity.BaseStudentSubsidize;
|
|
|
|
-import com.xjrsoft.module.student.entity.BaseStudentUser;
|
|
|
|
|
|
+import com.xjrsoft.module.student.entity.*;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentFamilyMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentFamilyMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentFamilyMemberMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentFamilyMemberMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentUserMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentUserMapper;
|
|
-import com.xjrsoft.module.student.service.IBaseStudentContactService;
|
|
|
|
-import com.xjrsoft.module.student.service.IBaseStudentFamilyService;
|
|
|
|
-import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
|
|
|
|
-import com.xjrsoft.module.student.service.IBaseStudentService;
|
|
|
|
-import com.xjrsoft.module.student.service.IBaseStudentSubsidizeService;
|
|
|
|
-import com.xjrsoft.module.student.service.IStudentManagerService;
|
|
|
|
-import com.xjrsoft.module.student.vo.BaseStudentClassVo;
|
|
|
|
-import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
|
|
|
|
-import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
|
|
|
|
-import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
|
|
|
|
|
|
+import com.xjrsoft.module.student.service.*;
|
|
|
|
+import com.xjrsoft.module.student.vo.*;
|
|
import com.xjrsoft.module.system.entity.Area;
|
|
import com.xjrsoft.module.system.entity.Area;
|
|
import com.xjrsoft.module.system.entity.DictionaryDetail;
|
|
import com.xjrsoft.module.system.entity.DictionaryDetail;
|
|
import com.xjrsoft.module.system.entity.DictionaryItem;
|
|
import com.xjrsoft.module.system.entity.DictionaryItem;
|
|
@@ -118,6 +109,14 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
|
|
private final IUserService userService;
|
|
private final IUserService userService;
|
|
private final CommonPropertiesConfig propertiesConfig;
|
|
private final CommonPropertiesConfig propertiesConfig;
|
|
|
|
|
|
|
|
+ private final IDepartmentService baseDeparmentService;
|
|
|
|
+ private final IBaseMajorService baseMajorService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ private final IBaseClassService baseClassService;
|
|
|
|
+
|
|
|
|
+ private final IBaseGradeService baseGradeService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public Long add(AddBaseStudentUserDto dto){
|
|
public Long add(AddBaseStudentUserDto dto){
|
|
@@ -990,6 +989,68 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public List<BaseDepMajorGradeClassStudenTreeVo> tree2() {
|
|
|
|
+ List<BaseDepMajorGradeClassStudenTreeVo> voList = new ArrayList<>();
|
|
|
|
+ MPJLambdaWrapper<BaseClass> baseClassMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
|
+ baseClassMPJLambdaWrapper
|
|
|
|
+ .selectAs(BaseClass::getId, BaseClassMajorSetVo::getClassId)
|
|
|
|
+ .selectAs(BaseMajorSet::getMajorId, BaseClassMajorSetVo::getMajorId)
|
|
|
|
+ .selectAs(BaseClass::getName, BaseClassMajorSetVo::getClassName)
|
|
|
|
+ .selectAs(BaseClass::getGradeId, BaseClassMajorSetVo::getGradeId)
|
|
|
|
+ .leftJoin(BaseClassMajorSet.class, BaseClassMajorSet::getClassId, BaseClass::getId)
|
|
|
|
+ .leftJoin(BaseMajorSet.class, BaseMajorSet::getId, BaseClassMajorSet::getMajorSetId)
|
|
|
|
+ ;
|
|
|
|
+
|
|
|
|
+ List<BaseClassMajorSetVo> majorSetList = baseClassService.selectJoinList(BaseClassMajorSetVo.class, baseClassMPJLambdaWrapper);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ List<BaseGrade> gradeList = baseGradeService.list(
|
|
|
|
+ new QueryWrapper<BaseGrade>().lambda().eq(BaseGrade::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
|
+ );
|
|
|
|
+ List<BaseMajor> majorList = baseMajorService.list(
|
|
|
|
+ new QueryWrapper<BaseMajor>().lambda().eq(BaseMajor::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
|
+ );
|
|
|
|
+ List<Department> departmentList =baseDeparmentService.list(
|
|
|
|
+ new QueryWrapper<Department>().lambda().eq(Department::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
|
+ .eq(Department::getParentId,"1684107782861680008")
|
|
|
|
+ );
|
|
|
|
+ departmentList.forEach((node) -> {
|
|
|
|
+ voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
|
|
|
|
+ setId(node.getId().toString());
|
|
|
|
+ setTreeType(1);
|
|
|
|
+ setName(node.getName());
|
|
|
|
+ setParentId("0");
|
|
|
|
+ }});
|
|
|
|
+ });
|
|
|
|
+ majorList.forEach((node)->{
|
|
|
|
+ voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
|
|
|
|
+ setId(node.getId().toString());
|
|
|
|
+ setName(node.getName());
|
|
|
|
+ setTreeType(2);
|
|
|
|
+ setParentId(node.getDepartmentId().toString());
|
|
|
|
+ }});
|
|
|
|
+ gradeList.forEach((DDD)->{
|
|
|
|
+ voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
|
|
|
|
+ setId(node.getId().toString()+"_"+DDD.getId().toString());
|
|
|
|
+ setName(DDD.getName());
|
|
|
|
+ setTreeType(3);
|
|
|
|
+ setParentId(node.getId().toString());
|
|
|
|
+ }});
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ majorSetList.forEach((node)->{
|
|
|
|
+ voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
|
|
|
|
+ setId(node.getClassId().toString());
|
|
|
|
+ setName(node.getClassName());
|
|
|
|
+ setTreeType(4);
|
|
|
|
+ setParentId(node.getMajorId().toString()+"_"+node.getGradeId());
|
|
|
|
+ }});
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return TreeUtil.build(voList);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 初始化字典信息
|
|
* 初始化字典信息
|
|
* 身份证类型、
|
|
* 身份证类型、
|