增加组织架构,人员表,对应关系表,就业表里面增减组织架构公司id。每次同步只支持1l即霖梓公司数据,不删除非霖梓的公司id
This commit is contained in:
parent
f0e7b633b5
commit
57d5a519af
@ -68,9 +68,11 @@ public class StaffRoleController extends AbstractController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DepartmentsStaffRelateService departmentsStaffRelateService;
|
private DepartmentsStaffRelateService departmentsStaffRelateService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService;
|
private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService;
|
||||||
|
|
||||||
|
private static Long COMPANY_ID = 1l;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
*/
|
*/
|
||||||
@ -122,7 +124,7 @@ public class StaffRoleController extends AbstractController {
|
|||||||
@RequestMapping("/info/{id}")
|
@RequestMapping("/info/{id}")
|
||||||
public R info(@PathVariable("id") Long id) {
|
public R info(@PathVariable("id") Long id) {
|
||||||
StaffRole lzStaffRole = staffRoleService.selectStaffRoleById(id);
|
StaffRole lzStaffRole = staffRoleService.selectStaffRoleById(id);
|
||||||
List<StaffEntity> staffEntityList = staffService.selectAll();
|
List<StaffEntity> staffEntityList = staffService.selectAll(COMPANY_ID);
|
||||||
List<StaffEntity> newList = new ArrayList<>();
|
List<StaffEntity> newList = new ArrayList<>();
|
||||||
staffEntityList.forEach(p -> {
|
staffEntityList.forEach(p -> {
|
||||||
StaffEntity staffEntity = new StaffEntity();
|
StaffEntity staffEntity = new StaffEntity();
|
||||||
|
|||||||
@ -144,7 +144,7 @@ public class TestController {
|
|||||||
|
|
||||||
@RequestMapping("/test/relate")
|
@RequestMapping("/test/relate")
|
||||||
public void relate() {
|
public void relate() {
|
||||||
List<DepartmentsStaffRelateEntity> list = departmentsStaffRelateService.selectAll();
|
List<DepartmentsStaffRelateEntity> list = departmentsStaffRelateService.selectAll(1l);
|
||||||
for (DepartmentsStaffRelateEntity l : list) {
|
for (DepartmentsStaffRelateEntity l : list) {
|
||||||
DepartmentsEntity departmentsEntity = departmentsService.selectByDepartmentId(l.getDepartmentId());
|
DepartmentsEntity departmentsEntity = departmentsService.selectByDepartmentId(l.getDepartmentId());
|
||||||
l.setLevel(departmentsEntity.getLevel());
|
l.setLevel(departmentsEntity.getLevel());
|
||||||
@ -242,7 +242,7 @@ public class TestController {
|
|||||||
// http://localhost:8080/lz_management/test/restore
|
// http://localhost:8080/lz_management/test/restore
|
||||||
@RequestMapping("/test/restore")
|
@RequestMapping("/test/restore")
|
||||||
public void restore() throws Exception {
|
public void restore() throws Exception {
|
||||||
List<StaffEntity> staffEntities = staffService.selectAll();
|
List<StaffEntity> staffEntities = staffService.selectAll(1l);
|
||||||
for (StaffEntity staffEntity : staffEntities) {
|
for (StaffEntity staffEntity : staffEntities) {
|
||||||
//doRestore(staffEntity.getId());
|
//doRestore(staffEntity.getId());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ public interface DepartmentsDao extends BaseMapper<DepartmentsEntity> {
|
|||||||
List<DepartmentsDto> getDepartmentsByparentId(@Param("parentId") String parentId);
|
List<DepartmentsDto> getDepartmentsByparentId(@Param("parentId") String parentId);
|
||||||
|
|
||||||
|
|
||||||
List<DepartmentsEntity> selectAll();
|
List<DepartmentsEntity> selectAll(@Param("companyId") Long companyId);
|
||||||
|
|
||||||
List<DepartmentsEntity> selectEntityByParentDepartmentId(@Param("parentId") String parentId);
|
List<DepartmentsEntity> selectEntityByParentDepartmentId(@Param("parentId") String parentId);
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ public interface DepartmentsStaffRelateDao extends BaseMapper<DepartmentsStaffRe
|
|||||||
|
|
||||||
List<DepartmentsStaffRelateEntity> selectByStaffIds(@Param("staffIds") List<Long> staffIds);
|
List<DepartmentsStaffRelateEntity> selectByStaffIds(@Param("staffIds") List<Long> staffIds);
|
||||||
|
|
||||||
List<DepartmentsStaffRelateEntity> selectAll();
|
List<DepartmentsStaffRelateEntity> selectAll(@Param("companyId") Long companyId);
|
||||||
|
|
||||||
DepartmentsStaffRelateEntity selectLastDepartmentByStaffId(@Param("staffId") Long staffId);
|
DepartmentsStaffRelateEntity selectLastDepartmentByStaffId(@Param("staffId") Long staffId);
|
||||||
|
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public interface StaffDao extends BaseMapper<StaffEntity> {
|
|||||||
|
|
||||||
List<StaffEntity> selectBySearchName(@Param("page") IPage page, @Param("model") FindByNameModel nameModel);
|
List<StaffEntity> selectBySearchName(@Param("page") IPage page, @Param("model") FindByNameModel nameModel);
|
||||||
|
|
||||||
List<StaffEntity> selectAll();
|
List<StaffEntity> selectAll(@Param("companyId") Long companyId);
|
||||||
|
|
||||||
List<ReportProgressListDto> getPositionByStaffIds(@Param("req") ReportListReq req, @Param("staffIds") List<String> staffIds, @Param("page") IPage page);
|
List<ReportProgressListDto> getPositionByStaffIds(@Param("req") ReportListReq req, @Param("staffIds") List<String> staffIds, @Param("page") IPage page);
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,6 +37,8 @@ public class DepartmentsStaffRelateEntity implements Serializable {
|
|||||||
private Long staffId;
|
private Long staffId;
|
||||||
//第几级部门
|
//第几级部门
|
||||||
private Integer level;
|
private Integer level;
|
||||||
|
//公司id
|
||||||
|
private Long companyId;
|
||||||
/***
|
/***
|
||||||
* 是否为部门领导
|
* 是否为部门领导
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -125,5 +127,8 @@ public class StaffEntity implements Serializable {
|
|||||||
//盐
|
//盐
|
||||||
private String salt;
|
private String salt;
|
||||||
|
|
||||||
|
//公司id
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -105,6 +107,9 @@ public class StaffOccupationEntity implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String resumeUrl;
|
private String resumeUrl;
|
||||||
|
|
||||||
|
//公司id
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
public String getKey(){
|
public String getKey(){
|
||||||
return staffId + "_" + position;
|
return staffId + "_" + position;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,7 @@ public interface DepartmentsService extends IService<DepartmentsEntity> {
|
|||||||
//查找父级部门
|
//查找父级部门
|
||||||
DepartmentsEntity selectParentDepartmentByDepartmentId(String departmentId);
|
DepartmentsEntity selectParentDepartmentByDepartmentId(String departmentId);
|
||||||
|
|
||||||
List<DepartmentsEntity> selectAll();
|
List<DepartmentsEntity> selectAll(Long companyId);
|
||||||
|
|
||||||
int delDepartments(List<DepartmentsEntity> departmentsEntities);
|
int delDepartments(List<DepartmentsEntity> departmentsEntities);
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ public interface DepartmentsStaffRelateService extends IService<DepartmentsStaff
|
|||||||
void deleteAllRelates();
|
void deleteAllRelates();
|
||||||
|
|
||||||
|
|
||||||
List<DepartmentsStaffRelateEntity> selectAll();
|
List<DepartmentsStaffRelateEntity> selectAll(Long companyId);
|
||||||
|
|
||||||
List<DepartmentsStaffRelateEntity> selectByStaffIds(List<Long> staffIds);
|
List<DepartmentsStaffRelateEntity> selectByStaffIds(List<Long> staffIds);
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public interface StaffService extends IService<StaffEntity> {
|
|||||||
//统计部门下的人
|
//统计部门下的人
|
||||||
List<String> staffsByAllDeparmentIds(List<String> deparmentIds);
|
List<String> staffsByAllDeparmentIds(List<String> deparmentIds);
|
||||||
|
|
||||||
List<StaffEntity> selectAll();
|
List<StaffEntity> selectAll(Long companyId);
|
||||||
|
|
||||||
List<StaffSimpleDto> selectStaffSimpleInfoByIds(List<Long> ids);
|
List<StaffSimpleDto> selectStaffSimpleInfoByIds(List<Long> ids);
|
||||||
|
|
||||||
|
|||||||
@ -298,8 +298,8 @@ public class DepartmentsServiceImpl extends ServiceImpl<DepartmentsDao, Departme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentsEntity> selectAll(){
|
public List<DepartmentsEntity> selectAll(Long companyId){
|
||||||
return departmentsDao.selectAll();
|
return departmentsDao.selectAll(companyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -64,8 +64,8 @@ public class DepartmentsStaffRelateServiceImpl extends ServiceImpl<DepartmentsSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentsStaffRelateEntity> selectAll() {
|
public List<DepartmentsStaffRelateEntity> selectAll(Long companyId) {
|
||||||
return departmentsStaffRelateDao.selectAll();
|
return departmentsStaffRelateDao.selectAll(companyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -426,8 +426,8 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StaffEntity> selectAll() {
|
public List<StaffEntity> selectAll(Long companyId) {
|
||||||
return staffDao.selectAll();
|
return staffDao.selectAll(companyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -53,6 +53,8 @@ public class FlowManagerServiceImpl extends ServiceImpl<FlowManagerMapper, FlowM
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RecordRoleService recordRoleService;
|
private RecordRoleService recordRoleService;
|
||||||
|
|
||||||
|
private static Long COMPANY_ID = 1l;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -107,12 +109,12 @@ public class FlowManagerServiceImpl extends ServiceImpl<FlowManagerMapper, FlowM
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<FlowDto> getFowList() {
|
public List<FlowDto> getFowList() {
|
||||||
List<DepartmentsEntity> tDepartments = departmentsDao.selectAll();
|
List<DepartmentsEntity> tDepartments = departmentsDao.selectAll(COMPANY_ID);
|
||||||
List<DepartmentsEntity> parentDepartments = tDepartments.stream()
|
List<DepartmentsEntity> parentDepartments = tDepartments.stream()
|
||||||
//根据两个属性进行过滤
|
//根据两个属性进行过滤
|
||||||
.filter(s -> s.getDepartmentParentId().equals("1"))
|
.filter(s -> s.getDepartmentParentId().equals("1"))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
List<DepartmentsStaffRelateEntity> departmentsStaffRelateEntities = departmentsStaffRelateService.selectAll();
|
List<DepartmentsStaffRelateEntity> departmentsStaffRelateEntities = departmentsStaffRelateService.selectAll(COMPANY_ID);
|
||||||
Map<String, FlowInfo> departmentsStaffRelateEntityMap = new HashMap<>();
|
Map<String, FlowInfo> departmentsStaffRelateEntityMap = new HashMap<>();
|
||||||
Map<String, DepartmentsStaffRelateEntity> singleRelateMap = new HashMap<>();
|
Map<String, DepartmentsStaffRelateEntity> singleRelateMap = new HashMap<>();
|
||||||
|
|
||||||
@ -132,7 +134,7 @@ public class FlowManagerServiceImpl extends ServiceImpl<FlowManagerMapper, FlowM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<StaffEntity> staffEntities = staffDao.selectAll();
|
List<StaffEntity> staffEntities = staffDao.selectAll(COMPANY_ID);
|
||||||
Map<Long ,StaffEntity> staffMap = new HashMap<>();
|
Map<Long ,StaffEntity> staffMap = new HashMap<>();
|
||||||
for(StaffEntity staffEntity : staffEntities){
|
for(StaffEntity staffEntity : staffEntities){
|
||||||
staffMap.put(staffEntity.getId(),staffEntity);
|
staffMap.put(staffEntity.getId(),staffEntity);
|
||||||
|
|||||||
@ -122,6 +122,8 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
@Autowired
|
@Autowired
|
||||||
private StaffOccupationService staffOccupationService;
|
private StaffOccupationService staffOccupationService;
|
||||||
|
|
||||||
|
private static Long COMPANY_ID = 1l;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StaffRole selectStaffRoleById(Long id) {
|
public StaffRole selectStaffRoleById(Long id) {
|
||||||
return staffRoleMapper.selectStaffRoleById(id);
|
return staffRoleMapper.selectStaffRoleById(id);
|
||||||
@ -222,7 +224,7 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
List<Long> menuIdList1 = new ArrayList<>();
|
List<Long> menuIdList1 = new ArrayList<>();
|
||||||
if (staffRole != null) {
|
if (staffRole != null) {
|
||||||
List<StaffRoleDepartment> staffRoleDepartments = staffRoleDepartmentMapper.selectStaffRoleDepartmentByStaffRoleId(staffRole.getId());
|
List<StaffRoleDepartment> staffRoleDepartments = staffRoleDepartmentMapper.selectStaffRoleDepartmentByStaffRoleId(staffRole.getId());
|
||||||
List<DepartmentsEntity> departmentsEntities = departmentsDao.selectAll();
|
List<DepartmentsEntity> departmentsEntities = departmentsDao.selectAll(COMPANY_ID);
|
||||||
Map<String, List<DepartmentsEntity>> map = resultRecordService.getStringListMap(departmentsEntities);
|
Map<String, List<DepartmentsEntity>> map = resultRecordService.getStringListMap(departmentsEntities);
|
||||||
role.setRoleId(staffRole.getId());
|
role.setRoleId(staffRole.getId());
|
||||||
role.setRoleName(staffRole.getDepartmentLevel());
|
role.setRoleName(staffRole.getDepartmentLevel());
|
||||||
@ -246,12 +248,12 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysMenuEntity> selectMenuList() {
|
public List<SysMenuEntity> selectMenuList() {
|
||||||
List<DepartmentsEntity> tDepartments = departmentsDao.selectAll();
|
List<DepartmentsEntity> tDepartments = departmentsDao.selectAll(COMPANY_ID);
|
||||||
List<DepartmentsEntity> parentDepartments = tDepartments.stream()
|
List<DepartmentsEntity> parentDepartments = tDepartments.stream()
|
||||||
//根据两个属性进行过滤
|
//根据两个属性进行过滤
|
||||||
.filter(s -> s.getDepartmentParentId().equals("1"))
|
.filter(s -> s.getDepartmentParentId().equals("1"))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
List<DepartmentsStaffRelateEntity> departmentsStaffRelateEntities = departmentsStaffRelateService.selectAll();
|
List<DepartmentsStaffRelateEntity> departmentsStaffRelateEntities = departmentsStaffRelateService.selectAll(COMPANY_ID);
|
||||||
Map<String, DepartmentsStaffRelateEntity> departmentsStaffRelateEntityMap = new HashMap<>();
|
Map<String, DepartmentsStaffRelateEntity> departmentsStaffRelateEntityMap = new HashMap<>();
|
||||||
Map<String, DepartmentsStaffRelateEntity> singleDepartmentsStaffRelate = new HashMap<>();
|
Map<String, DepartmentsStaffRelateEntity> singleDepartmentsStaffRelate = new HashMap<>();
|
||||||
for (DepartmentsStaffRelateEntity d : departmentsStaffRelateEntities) {
|
for (DepartmentsStaffRelateEntity d : departmentsStaffRelateEntities) {
|
||||||
@ -260,7 +262,7 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
departmentsStaffRelateEntityMap.put(d.getDepartmentId(), d);
|
departmentsStaffRelateEntityMap.put(d.getDepartmentId(), d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<StaffEntity> staffEntities = staffDao.selectAll();
|
List<StaffEntity> staffEntities = staffDao.selectAll(COMPANY_ID);
|
||||||
Map<Long, StaffEntity> staffMap = new HashMap<>();
|
Map<Long, StaffEntity> staffMap = new HashMap<>();
|
||||||
for (StaffEntity staffEntity : staffEntities) {
|
for (StaffEntity staffEntity : staffEntities) {
|
||||||
staffMap.put(staffEntity.getId(), staffEntity);
|
staffMap.put(staffEntity.getId(), staffEntity);
|
||||||
|
|||||||
@ -121,6 +121,8 @@ public class DingtalkBusiness {
|
|||||||
@Value("${dingtalk.appid}")
|
@Value("${dingtalk.appid}")
|
||||||
private String appid;
|
private String appid;
|
||||||
|
|
||||||
|
private static Long COMPANY_ID = 1l;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取组织架构信息并录入到数据库
|
* 获取组织架构信息并录入到数据库
|
||||||
*/
|
*/
|
||||||
@ -204,7 +206,7 @@ public class DingtalkBusiness {
|
|||||||
List<String> newPositions = new ArrayList<>();//新的职位或者新的人员对应信息
|
List<String> newPositions = new ArrayList<>();//新的职位或者新的人员对应信息
|
||||||
|
|
||||||
//获取所有的部门详情
|
//获取所有的部门详情
|
||||||
List<DepartmentInfosBo> departmentInfosBos = dingTalkUtil.getDepartmentDetailsV2(token, "1");
|
List<DepartmentInfosBo> departmentInfosBos = dingTalkUtil.getDepartmentDetailsV2(token, COMPANY_ID.toString());
|
||||||
|
|
||||||
if(departmentInfosBos.size() > 0){
|
if(departmentInfosBos.size() > 0){
|
||||||
List<String> probationUserIDS = getProbationStaff(token);//获取试用期人员信息
|
List<String> probationUserIDS = getProbationStaff(token);//获取试用期人员信息
|
||||||
@ -216,7 +218,7 @@ public class DingtalkBusiness {
|
|||||||
//获取原有部门信息
|
//获取原有部门信息
|
||||||
Map<String, DepartmentInfosBo> mapDepartmentInfosBos
|
Map<String, DepartmentInfosBo> mapDepartmentInfosBos
|
||||||
= departmentInfosBos.stream().collect(Collectors.toMap(DepartmentInfosBo::getId, Function.identity(), (e, r) -> e));
|
= departmentInfosBos.stream().collect(Collectors.toMap(DepartmentInfosBo::getId, Function.identity(), (e, r) -> e));
|
||||||
List<DepartmentsEntity> departmentsEntities = departmentsService.selectAll();
|
List<DepartmentsEntity> departmentsEntities = departmentsService.selectAll(COMPANY_ID);
|
||||||
Map<String, DepartmentsEntity> mapDeparts = null;
|
Map<String, DepartmentsEntity> mapDeparts = null;
|
||||||
if(departmentsEntities.size() > 0){
|
if(departmentsEntities.size() > 0){
|
||||||
mapDeparts =
|
mapDeparts =
|
||||||
@ -224,7 +226,7 @@ public class DingtalkBusiness {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取原有的部门人员对应关系
|
//获取原有的部门人员对应关系
|
||||||
List<DepartmentsStaffRelateEntity> departmentsStaffRelateEntities = departmentsStaffRelateService.selectAll();
|
List<DepartmentsStaffRelateEntity> departmentsStaffRelateEntities = departmentsStaffRelateService.selectAll(COMPANY_ID);
|
||||||
|
|
||||||
Map<String, DepartmentsStaffRelateEntity> mapDepStaffs = null;
|
Map<String, DepartmentsStaffRelateEntity> mapDepStaffs = null;
|
||||||
if(departmentsStaffRelateEntities.size() > 0){
|
if(departmentsStaffRelateEntities.size() > 0){
|
||||||
@ -235,7 +237,7 @@ public class DingtalkBusiness {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取所有人员信息
|
//获取所有人员信息
|
||||||
List<StaffEntity> staffEntities = staffService.selectAll();
|
List<StaffEntity> staffEntities = staffService.selectAll(COMPANY_ID);
|
||||||
Map<String, StaffEntity> mapStaffs = null;
|
Map<String, StaffEntity> mapStaffs = null;
|
||||||
if(staffEntities.size() > 0){
|
if(staffEntities.size() > 0){
|
||||||
mapStaffs = staffEntities.stream().
|
mapStaffs = staffEntities.stream().
|
||||||
|
|||||||
@ -154,6 +154,8 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ResultTaskService resultTaskService;
|
private ResultTaskService resultTaskService;
|
||||||
|
|
||||||
|
private static Long COMPANY_ID = 1l;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultRecord selectResultRecordById(Long id) {
|
public ResultRecord selectResultRecordById(Long id) {
|
||||||
@ -191,7 +193,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
@Override
|
@Override
|
||||||
public R queryPage(ResultRecordReq params, SysUserEntity user) {
|
public R queryPage(ResultRecordReq params, SysUserEntity user) {
|
||||||
List<String> departmentIds = new ArrayList<>();
|
List<String> departmentIds = new ArrayList<>();
|
||||||
List<DepartmentsEntity> tDepartments = departmentsDao.selectAll();
|
List<DepartmentsEntity> tDepartments = departmentsDao.selectAll(COMPANY_ID);
|
||||||
if (StringUtil.isNotBlank(params.getDepartment1()) || StringUtil.isNotBlank(params.getDepartment2())
|
if (StringUtil.isNotBlank(params.getDepartment1()) || StringUtil.isNotBlank(params.getDepartment2())
|
||||||
|| StringUtil.isNotBlank(params.getDepartment3())) {
|
|| StringUtil.isNotBlank(params.getDepartment3())) {
|
||||||
Map<String, List<DepartmentsEntity>> departmentMap = null;
|
Map<String, List<DepartmentsEntity>> departmentMap = null;
|
||||||
|
|||||||
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectAll" resultType="com.lz.modules.app.entity.DepartmentsEntity">
|
<select id="selectAll" resultType="com.lz.modules.app.entity.DepartmentsEntity">
|
||||||
select * from lz_departments where is_delete=0
|
select * from lz_departments where is_delete=0 and company_id= #{companyId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEntityByParentDepartmentId" resultType="com.lz.modules.app.entity.DepartmentsEntity">
|
<select id="selectEntityByParentDepartmentId" resultType="com.lz.modules.app.entity.DepartmentsEntity">
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
<result property="staffId" column="staff_id"/>
|
<result property="staffId" column="staff_id"/>
|
||||||
<result column="level" property="level"/>
|
<result column="level" property="level"/>
|
||||||
<result column="is_leader" property="isLeader"/>
|
<result column="is_leader" property="isLeader"/>
|
||||||
|
<result column="company_id" property="companyId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@ -58,7 +59,7 @@
|
|||||||
group by staff_id
|
group by staff_id
|
||||||
</select>
|
</select>
|
||||||
<select id="selectAll" resultType="com.lz.modules.app.entity.DepartmentsStaffRelateEntity">
|
<select id="selectAll" resultType="com.lz.modules.app.entity.DepartmentsStaffRelateEntity">
|
||||||
select * from lz_departments_staff_relate where is_delete = 0
|
select * from lz_departments_staff_relate where is_delete = 0 and company_id = #{companyId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectLastDepartmentByStaffId"
|
<select id="selectLastDepartmentByStaffId"
|
||||||
|
|||||||
@ -29,13 +29,14 @@
|
|||||||
<result column="job_number" property="jobNumber"/>
|
<result column="job_number" property="jobNumber"/>
|
||||||
<result column="password" property="password"/>
|
<result column="password" property="password"/>
|
||||||
<result column="salt" property="salt"/>
|
<result column="salt" property="salt"/>
|
||||||
|
<result column="company_id" property="companyId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, create_time AS createTime, update_time AS updateTime, name AS name, gender AS gender, birthday AS birthday, marital_status AS maritalStatus, national AS national, political_landscape AS politicalLandscape, mobile AS mobile, province AS province, emergency_contact AS emergencyContact, emergency_contact_relation AS emergencyContactRelation, emergency_contact_phone AS emergencyContactPhone, email AS email, current_address AS currentAddress, open_id AS openId, employee_id AS employeeId, union_id AS unionId, parent_id AS parentId, is_master AS isMaster
|
id AS id, is_delete AS isDelete, create_time AS createTime, update_time AS updateTime, name AS name, gender AS gender, birthday AS birthday, marital_status AS maritalStatus, national AS national, political_landscape AS politicalLandscape, mobile AS mobile, province AS province, emergency_contact AS emergencyContact, emergency_contact_relation AS emergencyContactRelation, emergency_contact_phone AS emergencyContactPhone, email AS email, current_address AS currentAddress, open_id AS openId, employee_id AS employeeId, union_id AS unionId, parent_id AS parentId, is_master AS isMaster, company_id AS companyId
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@ -446,7 +447,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAll" resultType="com.lz.modules.app.entity.StaffEntity">
|
<select id="selectAll" resultType="com.lz.modules.app.entity.StaffEntity">
|
||||||
select * from lz_staff where is_delete = 0
|
select * from lz_staff where is_delete = 0 and company_id = #{companyId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPositionByStaffIds" resultType="com.lz.modules.app.dto.ReportProgressListDto">
|
<select id="getPositionByStaffIds" resultType="com.lz.modules.app.dto.ReportProgressListDto">
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
<result property="jobSeniority" column="job_seniority"/>
|
<result property="jobSeniority" column="job_seniority"/>
|
||||||
<result property="workExperience" column="work_experience"/>
|
<result property="workExperience" column="work_experience"/>
|
||||||
<result property="resumeUrl" column="resume_url"/>
|
<result property="resumeUrl" column="resume_url"/>
|
||||||
|
<result column="company_id" property="companyId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getStaffOccupationByStaffId" resultType="com.lz.modules.app.entity.StaffOccupationEntity">
|
<select id="getStaffOccupationByStaffId" resultType="com.lz.modules.app.entity.StaffOccupationEntity">
|
||||||
|
|||||||
@ -85,9 +85,8 @@ public class MysqlMain {
|
|||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
|
|
||||||
list.add(new TablesBean("lz_indicator_library"));
|
list.add(new TablesBean("lz_departments_staff_relate"));
|
||||||
list.add(new TablesBean("lz_indicator_type"));
|
list.add(new TablesBean("lz_staff"));
|
||||||
list.add(new TablesBean("lz_task_resp"));
|
|
||||||
|
|
||||||
|
|
||||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user