|
|
@ -11,12 +11,13 @@ import com.cloudstore.eccom.result.WeaResultMsg;
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
import com.engine.organization.component.OrganizationWeaTable;
|
|
|
|
import com.engine.organization.component.OrganizationWeaTable;
|
|
|
|
import com.engine.organization.entity.QueryParam;
|
|
|
|
import com.engine.organization.entity.DeleteParam;
|
|
|
|
import com.engine.organization.entity.company.bo.CompBO;
|
|
|
|
import com.engine.organization.entity.company.bo.CompBO;
|
|
|
|
import com.engine.organization.entity.company.po.CompPO;
|
|
|
|
import com.engine.organization.entity.company.po.CompPO;
|
|
|
|
import com.engine.organization.entity.department.bo.DepartmentBO;
|
|
|
|
import com.engine.organization.entity.department.bo.DepartmentBO;
|
|
|
|
import com.engine.organization.entity.department.dto.DepartmentListDTO;
|
|
|
|
import com.engine.organization.entity.department.dto.DepartmentListDTO;
|
|
|
|
import com.engine.organization.entity.department.po.DepartmentPO;
|
|
|
|
import com.engine.organization.entity.department.po.DepartmentPO;
|
|
|
|
|
|
|
|
import com.engine.organization.entity.employee.vo.EmployeeTableVO;
|
|
|
|
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
|
|
|
|
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
|
|
|
import com.engine.organization.entity.job.bo.JobBO;
|
|
|
|
import com.engine.organization.entity.job.bo.JobBO;
|
|
|
@ -387,7 +388,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
// 根据等级方案查询职等、职级
|
|
|
|
// 根据等级方案查询职等、职级
|
|
|
|
List<GradePO> gradePOS = MapperProxyFactory.getProxy(GradeMapper.class).listGradesBySchemeId(jobPO.getSchemeId());
|
|
|
|
List<GradePO> gradePOS = MapperProxyFactory.getProxy(GradeMapper.class).listGradesBySchemeId(jobPO.getSchemeId());
|
|
|
|
for (GradePO gradePO : gradePOS) {
|
|
|
|
for (GradePO gradePO : gradePOS) {
|
|
|
|
List<Map<String, Object>> maps = MapperProxyFactory.getProxy(LevelMapper.class).listLevelsByIds(QueryParam.builder().ids(gradePO.getLevelId()).build().getIds());
|
|
|
|
List<Map<String, Object>> maps = MapperProxyFactory.getProxy(LevelMapper.class).listLevelsByIds(DeleteParam.builder().ids(gradePO.getLevelId()).build().getIds());
|
|
|
|
String levelNames = maps.stream().map(item -> (String) item.get("name")).collect(Collectors.joining(","));
|
|
|
|
String levelNames = maps.stream().map(item -> (String) item.get("name")).collect(Collectors.joining(","));
|
|
|
|
insertCount += getJobDTMapper().insertIgnoreNull(JobDTPO.builder().levelId(gradePO.getLevelId()).gradeId(gradePO.getId() + "").levelIdspan(levelNames).gradeIdspan(gradePO.getGradeName()).mainId(jobPO.getId()).creator((long) user.getUID()).deleteType(0).createTime(new Date()).updateTime(new Date()).build());
|
|
|
|
insertCount += getJobDTMapper().insertIgnoreNull(JobDTPO.builder().levelId(gradePO.getLevelId()).gradeId(gradePO.getId() + "").levelIdspan(levelNames).gradeIdspan(gradePO.getGradeName()).mainId(jobPO.getId()).creator((long) user.getUID()).deleteType(0).createTime(new Date()).updateTime(new Date()).build());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -444,6 +445,15 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
return getJobMapper().deleteByIds(deleteIds);
|
|
|
|
return getJobMapper().deleteByIds(deleteIds);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Map<String, Object> getHrmListByJobId(Long jobId) {
|
|
|
|
|
|
|
|
OrganizationWeaTable<EmployeeTableVO> table = new OrganizationWeaTable<>(user, EmployeeTableVO.class);
|
|
|
|
|
|
|
|
WeaResultMsg result = new WeaResultMsg(false);
|
|
|
|
|
|
|
|
result.putAll(table.makeDataResult());
|
|
|
|
|
|
|
|
result.success();
|
|
|
|
|
|
|
|
return result.getResultMap();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 添加查询元素的父级元素
|
|
|
|
* 添加查询元素的父级元素
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -557,7 +567,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
// 添加部门的上级分部
|
|
|
|
// 添加部门的上级分部
|
|
|
|
String parentCompS = deptTrees.stream().map(SearchTree::getParentComp).collect(Collectors.joining(","));
|
|
|
|
String parentCompS = deptTrees.stream().map(SearchTree::getParentComp).collect(Collectors.joining(","));
|
|
|
|
if (!StringUtil.isEmpty(parentCompS)) {
|
|
|
|
if (!StringUtil.isEmpty(parentCompS)) {
|
|
|
|
List<CompPO> compsByIds = getCompMapper().getCompsByIds(QueryParam.builder().ids(parentCompS).build().getIds());
|
|
|
|
List<CompPO> compsByIds = getCompMapper().getCompsByIds(DeleteParam.builder().ids(parentCompS).build().getIds());
|
|
|
|
if (CollectionUtils.isNotEmpty(compsByIds)) {
|
|
|
|
if (CollectionUtils.isNotEmpty(compsByIds)) {
|
|
|
|
filterComps.addAll(compsByIds);
|
|
|
|
filterComps.addAll(compsByIds);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -730,31 +740,31 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
|
|
|
|
|
|
|
|
if (null != jobPO.getParentComp()) {
|
|
|
|
if (null != jobPO.getParentComp()) {
|
|
|
|
BrowserBean browserBean = parentCompBrowserItem.getBrowserConditionParam();
|
|
|
|
BrowserBean browserBean = parentCompBrowserItem.getBrowserConditionParam();
|
|
|
|
List<Map<String, Object>> compMaps = getCompMapper().listCompsByIds(QueryParam.builder().ids(jobPO.getParentComp().toString()).build().getIds());
|
|
|
|
List<Map<String, Object>> compMaps = getCompMapper().listCompsByIds(DeleteParam.builder().ids(jobPO.getParentComp().toString()).build().getIds());
|
|
|
|
browserBean.setReplaceDatas(compMaps);
|
|
|
|
browserBean.setReplaceDatas(compMaps);
|
|
|
|
parentCompBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
parentCompBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (null != jobPO.getParentDept()) {
|
|
|
|
if (null != jobPO.getParentDept()) {
|
|
|
|
BrowserBean browserBean = parentDeptBrowserItem.getBrowserConditionParam();
|
|
|
|
BrowserBean browserBean = parentDeptBrowserItem.getBrowserConditionParam();
|
|
|
|
List<Map<String, Object>> deptMaps = getDepartmentMapper().listDeptsByIds(QueryParam.builder().ids(jobPO.getParentDept().toString()).build().getIds());
|
|
|
|
List<Map<String, Object>> deptMaps = getDepartmentMapper().listDeptsByIds(DeleteParam.builder().ids(jobPO.getParentDept().toString()).build().getIds());
|
|
|
|
browserBean.setReplaceDatas(deptMaps);
|
|
|
|
browserBean.setReplaceDatas(deptMaps);
|
|
|
|
parentDeptBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
parentDeptBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (null != jobPO.getSequenceId()) {
|
|
|
|
if (null != jobPO.getSequenceId()) {
|
|
|
|
BrowserBean browserBean = sequenceBrowserItem.getBrowserConditionParam();
|
|
|
|
BrowserBean browserBean = sequenceBrowserItem.getBrowserConditionParam();
|
|
|
|
List<Map<String, Object>> deptMaps = getSequenceMapper().listSequencesByIds(QueryParam.builder().ids(jobPO.getSequenceId().toString()).build().getIds());
|
|
|
|
List<Map<String, Object>> deptMaps = getSequenceMapper().listSequencesByIds(DeleteParam.builder().ids(jobPO.getSequenceId().toString()).build().getIds());
|
|
|
|
browserBean.setReplaceDatas(deptMaps);
|
|
|
|
browserBean.setReplaceDatas(deptMaps);
|
|
|
|
sequenceBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
sequenceBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (null != jobPO.getSchemeId()) {
|
|
|
|
if (null != jobPO.getSchemeId()) {
|
|
|
|
BrowserBean browserBean = schemeBrowserItem.getBrowserConditionParam();
|
|
|
|
BrowserBean browserBean = schemeBrowserItem.getBrowserConditionParam();
|
|
|
|
List<Map<String, Object>> deptMaps = getSchemeMapper().listSchemesByIds(QueryParam.builder().ids(jobPO.getSchemeId().toString()).build().getIds());
|
|
|
|
List<Map<String, Object>> deptMaps = getSchemeMapper().listSchemesByIds(DeleteParam.builder().ids(jobPO.getSchemeId().toString()).build().getIds());
|
|
|
|
browserBean.setReplaceDatas(deptMaps);
|
|
|
|
browserBean.setReplaceDatas(deptMaps);
|
|
|
|
schemeBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
schemeBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (null != jobPO.getParentJob()) {
|
|
|
|
if (null != jobPO.getParentJob()) {
|
|
|
|
BrowserBean browserBean = parentJobBrowserItem.getBrowserConditionParam();
|
|
|
|
BrowserBean browserBean = parentJobBrowserItem.getBrowserConditionParam();
|
|
|
|
List<Map<String, Object>> deptMaps = getJobMapper().listJobsByIds(QueryParam.builder().ids(jobPO.getParentJob().toString()).build().getIds());
|
|
|
|
List<Map<String, Object>> deptMaps = getJobMapper().listJobsByIds(DeleteParam.builder().ids(jobPO.getParentJob().toString()).build().getIds());
|
|
|
|
browserBean.setReplaceDatas(deptMaps);
|
|
|
|
browserBean.setReplaceDatas(deptMaps);
|
|
|
|
schemeBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
schemeBrowserItem.setBrowserConditionParam(browserBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|