修改人员导入岗位和部门字段的映射关系

yun-zuoyi
nies 4 years ago
parent 082bcf994a
commit e4aa9c48f2

@ -110,11 +110,10 @@ public interface ISysDepartmentService extends ICrudService<SysDepartment> {
SysDepartment findSysDepartmentByDepartCodeAndOrganizedId(String departmentCode,Long organizeId); SysDepartment findSysDepartmentByDepartCodeAndOrganizedId(String departmentCode,Long organizeId);
/** /**
* sysDepartment *
* @param sysDepartment
* @return * @return
*/ */
@ApiOperation(value = "根据sysDepartment查询所有符合条件的部门信息") @ApiOperation(value = "查询默认条件的部门信息")
List<SysDepartment> findAllByBaseBean(SysDepartment sysDepartment); List<SysDepartment> findAllByBaseBean();
} }

@ -105,12 +105,11 @@ public interface ISysPositionService extends ICrudService<SysPosition> {
SysPosition findPositionByPositionCodeAndOrganizeId(String positionCode,String organizeCode); SysPosition findPositionByPositionCodeAndOrganizeId(String positionCode,String organizeCode);
/** /**
* *
* @param sysPosition bean
* @return * @return
*/ */
@ApiOperation(value = "查询符合条件的岗位信息", notes = "根据SysPosition查询所有符合条件的岗位") @ApiOperation(value = "查询默认条件条件的岗位信息", notes = "查询默认条件条件的岗位信息")
List<SysPosition> findAllByBaseBean(SysPosition sysPosition); List<SysPosition> findAllByBaseBean();
/** /**
* *

@ -488,9 +488,9 @@ public class SysUserInfoController extends CoreBaseController {
ExcelTool excelTool = new ExcelTool(entityManager, redisRes); ExcelTool excelTool = new ExcelTool(entityManager, redisRes);
try { try {
String filename = "userImportTemplate.xls"; String filename = "userImportTemplate.xls";
SysPosition positionBean = new SysPosition(); // SysPosition positionBean = new SysPosition();
positionBean.setOrganizeCode(AuthUtil.getOrganizeCode()); // positionBean.setOrganizeCode(AuthUtil.getOrganizeCode());
List<SysPosition> positionList = positionService.findAllByBaseBean(positionBean); List<SysPosition> positionList = positionService.findAllByBaseBean();
Map<String, String> positionMap = positionList.stream().collect(Collectors.toMap(position -> position.getPositionCode(), position -> position.getName(), (oldKey, newkey) -> oldKey)); Map<String, String> positionMap = positionList.stream().collect(Collectors.toMap(position -> position.getPositionCode(), position -> position.getName(), (oldKey, newkey) -> oldKey));
Map<String, Map<String, String>> relatefildMap = new HashMap<>(); Map<String, Map<String, String>> relatefildMap = new HashMap<>();
@ -538,16 +538,17 @@ public class SysUserInfoController extends CoreBaseController {
List<UserInfoImportModel> userInfoList = validateAndDistinc(importModelList, faildList); List<UserInfoImportModel> userInfoList = validateAndDistinc(importModelList, faildList);
//3.某些数据字段转换 //3.某些数据字段转换
SysPosition positionBean = new SysPosition(); // SysPosition positionBean = new SysPosition();
String organizationCode = AuthUtil.getOrganizeCode(); // String organizationCode = AuthUtil.getOrganizeCode();
positionBean.setOrganizeCode(organizationCode); // positionBean.setOrganizeCode(organizationCode);
List<SysPosition> positionList = positionService.findAllByBaseBean(positionBean); List<SysPosition> positionList = positionService.findAllByBaseBean();
Map<String, String> positionMap = positionList.stream().collect(Collectors.toMap(position -> position.getPositionCode(), position -> String.valueOf(position.getId()), (oldKey, newkey) -> oldKey)); Map<String, String> positionMap = positionList.stream().collect(Collectors.toMap(position -> position.getPositionCode(), position -> String.valueOf(position.getId()), (oldKey, newkey) -> oldKey));
SysDepartment departmentBean = new SysDepartment(); // SysDepartment departmentBean = new SysDepartment();
departmentBean.setOrganizeCode(organizationCode); // departmentBean.setOrganizeCode(organizationCode);
List<SysDepartment> departmentList = departmentService.findAllByBaseBean(departmentBean); // List<SysDepartment> departmentList = departmentService.findAllByBaseBean(departmentBean);
List<SysDepartment> departmentList = departmentService.findAllByBaseBean();
//部门树 //部门树
List<SysDepartment> departmentTree = new ArrayList<>(); List<SysDepartment> departmentTree = new ArrayList<>();
//部门id的映射 //部门id的映射

@ -328,9 +328,10 @@ public class SysDepartmentService extends CrudService<SysDepartment> implements
} }
@Override @Override
public List<SysDepartment> findAllByBaseBean(SysDepartment sysDepartment) { public List<SysDepartment> findAllByBaseBean() {
Example example = Example.of(sysDepartment); // Example example = Example.of(sysDepartment);
return this.departmentRDao.findAll(example); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
return this.departmentRDao.findByHqlWhere(ddlPackBean);
} }

@ -127,9 +127,10 @@ public class SysPositionService extends CrudService<SysPosition> implements ISys
} }
@Override @Override
public List<SysPosition> findAllByBaseBean(SysPosition sysPosition) { public List<SysPosition> findAllByBaseBean() {
Example example = Example.of(sysPosition); // Example example = Example.of(sysPosition);
return this.positionRDao.findAll(example); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
return this.positionRDao.findByHqlWhere(ddlPackBean);
} }
@Override @Override

Loading…
Cancel
Save