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

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
* @param sysDepartment
*
* @return
*/
@ApiOperation(value = "根据sysDepartment查询所有符合条件的部门信息")
List<SysDepartment> findAllByBaseBean(SysDepartment sysDepartment);
@ApiOperation(value = "查询默认条件的部门信息")
List<SysDepartment> findAllByBaseBean();
}

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

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

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

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

Loading…
Cancel
Save