|
|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
import com.xunmei.common.core.constant.UserConstants;
|
|
|
import com.xunmei.common.core.domain.OrgTreeReq;
|
|
|
import com.xunmei.common.core.domain.OrgTreeResp;
|
|
|
@@ -28,6 +29,7 @@ import com.xunmei.system.domain.vo.SysUserVO;
|
|
|
import com.xunmei.system.api.dto.SysPlanOrgDTO;
|
|
|
import com.xunmei.system.mapper.*;
|
|
|
import com.xunmei.system.service.ISysConfigService;
|
|
|
+import com.xunmei.system.service.ISysDictDataService;
|
|
|
import com.xunmei.system.service.ISysOrgService;
|
|
|
import com.xunmei.system.service.ISysUserService;
|
|
|
import com.xunmei.system.util.SecurityUserExport;
|
|
|
@@ -80,6 +82,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
protected Validator validator;
|
|
|
@Autowired
|
|
|
private SysOrgMapper sysOrgMapper;
|
|
|
+ @Autowired
|
|
|
+ private ISysDictDataService iSysDictDataService;
|
|
|
|
|
|
/**
|
|
|
* 根据条件分页查询用户列表
|
|
|
@@ -695,8 +699,42 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
|
|
|
@Override
|
|
|
public List<SecurityUserExport> downSecurityUser() {
|
|
|
- SysOrg sysOrg = sysOrgMapper.selectById(SecurityUtils.getLoginUser().getOrgId());
|
|
|
- return userMapper.selectSecurityUser();
|
|
|
+ List<SecurityUserExport> securityUserExports = userMapper.selectSecurityUser();
|
|
|
+ securityUserExports.forEach(s -> {
|
|
|
+ s.setCity("福建");
|
|
|
+ SysOrg sysOrg = sysOrgMapper.selectById(s.getOrgId());
|
|
|
+ SysOrg sysOrg1 = new SysOrg();
|
|
|
+ if (sysOrg.getShortName().endsWith("地区行社")) {
|
|
|
+ s.setCity(sysOrg.getShortName().substring(0, 2));
|
|
|
+ } else if (sysOrg.getType() < 3 || sysOrg.getType() == 9) {
|
|
|
+ sysOrg1 = sysOrgMapper.selectSysOrgById(sysOrg.getParentId());
|
|
|
+ } else {
|
|
|
+ sysOrg1 = sysOrgMapper.selectSysOrgById(sysOrgMapper.selectSysOrgById(sysOrg.getParentId()).getParentId());
|
|
|
+ if (-1 == sysOrg1.getShortName().indexOf("地区行社")) {
|
|
|
+ sysOrg1 = sysOrgMapper.selectSysOrgById(sysOrgMapper.selectSysOrgById(sysOrgMapper.selectSysOrgById(sysOrg.getParentId()).getParentId()).getParentId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (null != sysOrg1) {
|
|
|
+ s.setCity(sysOrg1.getShortName().indexOf("地区行社") == -1 ? sysOrg1.getShortName().substring(0, 2) : sysOrg1.getShortName().split("地区行社")[0]);
|
|
|
+ }
|
|
|
+ //部门名称
|
|
|
+ String departmentName = iSysDictDataService.selectDictLabel("department_name", s.getDepartmentName());
|
|
|
+ s.setDepartmentName(departmentName);
|
|
|
+ //现任职务
|
|
|
+ String nowDuties = iSysDictDataService.selectDictLabel("current_position", s.getNowDuties());
|
|
|
+ s.setNowDuties(nowDuties);
|
|
|
+ //用工形式
|
|
|
+ String workType = iSysDictDataService.selectDictLabel("sys_work_type", s.getWorkType());
|
|
|
+ s.setWorkType(workType);
|
|
|
+ //最高学历
|
|
|
+ String sysHighestEducation = iSysDictDataService.selectDictLabel("sys_highest_education", s.getHighestEducation());
|
|
|
+ s.setHighestEducation(sysHighestEducation);
|
|
|
+ //取得方式
|
|
|
+ String sysEducationType = iSysDictDataService.selectDictLabel("sys_education_type", s.getEducationType());
|
|
|
+ s.setEducationType(sysEducationType);
|
|
|
+ String sysDuties = iSysDictDataService.selectDictLabel("sys_duties", s.getResponsibilitiesLeaderDuties());s.setResponsibilitiesLeaderDuties(sysDuties);
|
|
|
+ });
|
|
|
+ return securityUserExports;
|
|
|
}
|
|
|
|
|
|
@Override
|