岗位按钮、组织架构图 BUG修复
This commit is contained in:
parent
b9ff329ceb
commit
c03a7c599a
|
|
@ -147,26 +147,26 @@ public class JobBrowserService extends BrowserService {
|
|||
List<Long> jclRoleLevelList;
|
||||
if (StringUtils.isNotBlank(detachUtil.getJclRoleLevels())) {
|
||||
jclRoleLevelList = Arrays.stream(detachUtil.getJclRoleLevels().split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||
}else{
|
||||
} else {
|
||||
jclRoleLevelList = new ArrayList<>();
|
||||
}
|
||||
List<TreeNode> treeNodes = new ArrayList<>();
|
||||
if (StringUtils.isBlank(params.getId())) {
|
||||
// 集团总部
|
||||
SearchTree topGroup = SearchTreeUtil.getTopGroup();
|
||||
if(detachUtil.isDETACH()&& StringUtils.isNotBlank(detachUtil.getJclRoleLevels())) {
|
||||
if (detachUtil.isDETACH()) {
|
||||
topGroup.setIsParent(StringUtils.isNotBlank(detachUtil.getJclRoleLevels()));
|
||||
} else {
|
||||
topGroup.setIsParent(true);
|
||||
}else{
|
||||
topGroup.setIsParent(false);
|
||||
}
|
||||
treeNodes.add(topGroup);
|
||||
} else {
|
||||
// 分部存在下级的ID
|
||||
List<String> compHasSubs;
|
||||
if (detachUtil.isDETACH()) {
|
||||
if(CollectionUtils.isNotEmpty(jclRoleLevelList)) {
|
||||
if (CollectionUtils.isNotEmpty(jclRoleLevelList)) {
|
||||
compHasSubs = MapperProxyFactory.getProxy(CompMapper.class).hasDetachSubs(jclRoleLevelList);
|
||||
}else{
|
||||
} else {
|
||||
compHasSubs = new ArrayList<>();
|
||||
}
|
||||
} else {
|
||||
|
|
@ -178,13 +178,13 @@ public class JobBrowserService extends BrowserService {
|
|||
if ("0".equals(params.getId())) {
|
||||
List<CompPO> compList;
|
||||
if (detachUtil.isDETACH()) {
|
||||
if(CollectionUtils.isNotEmpty(jclRoleLevelList)) {
|
||||
if (CollectionUtils.isNotEmpty(jclRoleLevelList)) {
|
||||
compList = MapperProxyFactory.getProxy(CompMapper.class).getCompsByIds(jclRoleLevelList);
|
||||
detachUtil.filterCompanyList(compList);
|
||||
}else{
|
||||
} else {
|
||||
compList = new ArrayList<>();
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
compList = MapperProxyFactory.getProxy(CompMapper.class).listParent();
|
||||
}
|
||||
// 获取顶层分部
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ public class JobBO {
|
|||
SearchTree tree = new SearchTree();
|
||||
tree.setCanClick(true);
|
||||
tree.setCanceled(false);
|
||||
tree.setIcon("icon-coms-Branch");
|
||||
tree.setIcon("icon-coms-content-o");
|
||||
tree.setId(item.getId().toString());
|
||||
tree.setIsParent(false);
|
||||
tree.setIsVirtual("0");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.api.browser.bean.BrowserBean;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
|
|
@ -10,6 +11,7 @@ import com.engine.hrm.entity.RuleCodeType;
|
|||
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
import com.engine.organization.entity.DeleteParam;
|
||||
import com.engine.organization.entity.browser.po.CustomBrowserBean;
|
||||
import com.engine.organization.entity.codesetting.po.CodeRulePO;
|
||||
import com.engine.organization.entity.commom.RecordInfo;
|
||||
import com.engine.organization.entity.company.bo.CompBO;
|
||||
|
|
@ -320,6 +322,12 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
SearchConditionItem lastNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "姓名", "lastName");
|
||||
SearchConditionItem jobTitleItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位", "666", "jobTitle", "");
|
||||
BrowserBean browserBean = jobTitleItem.getBrowserConditionParam();
|
||||
String s = JSONObject.toJSONString(browserBean);
|
||||
CustomBrowserBean customBrowserBean = JSONObject.parseObject(s, CustomBrowserBean.class);
|
||||
customBrowserBean.setHasLeftTree(true);
|
||||
customBrowserBean.setLeftToSearchKey("treeKey");
|
||||
jobTitleItem.setBrowserConditionParam(customBrowserBean);
|
||||
SearchConditionItem companyIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "分部", "164", "ecCompany", "");
|
||||
SearchConditionItem departmentIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "部门", "4", "ecDepartment", "");
|
||||
SearchConditionItem telephoneItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "办公电话", "telephone");
|
||||
|
|
@ -607,7 +615,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
for (DepartmentPO departmentPO : filterDeparts) {
|
||||
buildParentDepts(departmentPO, builderDeparts);
|
||||
}
|
||||
List<SearchTree> departmentList = DepartmentBO.buildSetToSearchTree(builderDeparts, false);
|
||||
List<SearchTree> departmentList = DepartmentBO.buildSetToSearchTree(builderDeparts);
|
||||
List<SearchTree> deptTrees = SearchTreeUtil.builderTreeMode(departmentList);
|
||||
List<SearchTree> searchTrees = SearchTreeUtil.builderTreeMode(departmentList, jobTrees);
|
||||
// 添加部门的上级分部
|
||||
|
|
@ -661,7 +669,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
for (DepartmentPO departmentPO : filterDeparts) {
|
||||
buildParentDepts(departmentPO, builderDeparts);
|
||||
}
|
||||
return SearchTreeUtil.builderTreeMode(DepartmentBO.buildSetToSearchTree(builderDeparts, false), jobTrees);
|
||||
return SearchTreeUtil.builderTreeMode(DepartmentBO.buildSetToSearchTree(builderDeparts), jobTrees);
|
||||
}
|
||||
|
||||
private void buildParentJobs(JobPO jobPO, Set<JobPO> builderJobs) {
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|||
findCompanyItemByParantId(id, currentLevel + 1, level, rs, list, whereSql, currentLevel + 1 <= Integer.parseInt(level));
|
||||
|
||||
// 分部数据,构建层级关系
|
||||
reBuildTreeList(list);
|
||||
reBuildTreeList(list, root);
|
||||
|
||||
result.put("api_status", true);
|
||||
result.put("data", list);
|
||||
|
|
@ -289,7 +289,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|||
findUserItemByParantId(id, currentLevel + 1, level, rs, list, whereSql, currentLevel + 1 <= Integer.parseInt(level));
|
||||
|
||||
// 分部数据,构建层级关系
|
||||
reBuildTreeList(list);
|
||||
reBuildTreeList(list, root);
|
||||
|
||||
result.put("api_status", true);
|
||||
result.put("data", list);
|
||||
|
|
@ -327,20 +327,6 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|||
currentList.add(item);
|
||||
}
|
||||
|
||||
//for (Map<String, Object> stringObjectMap : currentList) {
|
||||
// if ("4".equals(stringObjectMap.get("ftype"))) { // 员工信息
|
||||
// rs.executeQuery("select id, mobile, home_address from jcl_org_hrmresource where id = ? ", stringObjectMap.get("fobjid"));
|
||||
// if (rs.next()) {
|
||||
// stringObjectMap.put("mobile", rs.getString("mobile"));
|
||||
// stringObjectMap.put("address", rs.getString("home_address"));
|
||||
// }
|
||||
// rs.executeQuery("select dept_name from jcl_org_hrmresource hrm left join jcl_org_dept d on hrm.department_id = d.id where hrm.id =? ", stringObjectMap.get("fobjid"));
|
||||
// if (rs.next()) {
|
||||
// stringObjectMap.put("department", rs.getString("dept_name"));
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("api_status", true);
|
||||
|
|
@ -493,13 +479,13 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|||
}
|
||||
|
||||
|
||||
private void reBuildTreeList(List<Map<String, Object>> list) {
|
||||
private void reBuildTreeList(List<Map<String, Object>> list, String root) {
|
||||
// 分部数据,构建层级关系
|
||||
Set<String> idSet = list.stream().filter(item -> "1".equals(Util.null2String(item.get("ftype")))).map(item -> Util.null2String(item.get("id"))).collect(Collectors.toSet());
|
||||
list.forEach(item -> {
|
||||
if ("1".equals(Util.null2String(item.get("ftype"))) && !idSet.contains(Util.null2String(item.get("parentId")))) {
|
||||
item.put("parentId", "0");
|
||||
item.put("fobjparentId", "0");
|
||||
if (!root.equals(Util.null2String(item.get("id"))) && "1".equals(Util.null2String(item.get("ftype"))) && !idSet.contains(Util.null2String(item.get("parentId")))) {
|
||||
item.put("parentId", root);
|
||||
item.put("fobjparentId", root);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1059,6 +1059,9 @@ public class ResourceSyncUtil {
|
|||
convertParams.put("telephone",params.get("telephone"));
|
||||
convertParams.put("email",params.get("email"));
|
||||
|
||||
// 直接上级
|
||||
convertParams.put("managerid", params.get("manager_id"));
|
||||
|
||||
|
||||
return convertParams;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue