diff --git a/src/com/engine/organization/entity/company/po/CompPO.java b/src/com/engine/organization/entity/company/po/CompPO.java
index c4c61fce..1ab9fd96 100644
--- a/src/com/engine/organization/entity/company/po/CompPO.java
+++ b/src/com/engine/organization/entity/company/po/CompPO.java
@@ -74,6 +74,8 @@ public class CompPO {
*/
private Integer showOrder;
+ private String uuid;
+
private Long creator;
private int deleteType;
private Date createTime;
diff --git a/src/com/engine/organization/enums/OperateTypeEnum.java b/src/com/engine/organization/enums/OperateTypeEnum.java
index 1d2c8952..5a255222 100644
--- a/src/com/engine/organization/enums/OperateTypeEnum.java
+++ b/src/com/engine/organization/enums/OperateTypeEnum.java
@@ -13,7 +13,8 @@ public enum OperateTypeEnum {
DELETE("4", "删除"),
MOVE("5", "转移"),
MERGE("6", "合并"),
- COPY("7", "复制");
+ COPY("7", "复制"),
+ CANCELED("8", "封存");
private String value;
diff --git a/src/com/engine/organization/mapper/comp/CompMapper.xml b/src/com/engine/organization/mapper/comp/CompMapper.xml
index 8a119700..77a1aad8 100644
--- a/src/com/engine/organization/mapper/comp/CompMapper.xml
+++ b/src/com/engine/organization/mapper/comp/CompMapper.xml
@@ -17,6 +17,8 @@
+
+
@@ -38,6 +40,7 @@
, t.delete_type
, t.create_time
, t.update_time
+ , t.uuid
diff --git a/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.java b/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.java
index 7031517e..dfc879bd 100644
--- a/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.java
+++ b/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.java
@@ -30,4 +30,9 @@ public interface SystemDataMapper {
String getScDepartmentNameById(@Param("departmentId") String departmentId);
String getScHrmResourceNameById(@Param("managerId") String managerId);
+
+ JSONObject getHrmSubCompanyByID(@Param("id") String id);
+
+ JSONObject getHrmSubCompanyByUUID(@Param("uuid") String uuid);
+
}
diff --git a/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.xml b/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.xml
index 75014d9d..d43ec140 100644
--- a/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.xml
+++ b/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.xml
@@ -48,4 +48,14 @@
from hrmresource
where id = #{managerId}
+
+
\ No newline at end of file
diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java
index 32c400e3..363fde67 100644
--- a/src/com/engine/organization/service/impl/CompServiceImpl.java
+++ b/src/com/engine/organization/service/impl/CompServiceImpl.java
@@ -19,11 +19,14 @@ import com.engine.organization.entity.company.param.CompSearchParam;
import com.engine.organization.entity.company.po.CompPO;
import com.engine.organization.entity.department.param.DepartmentMoveParam;
import com.engine.organization.entity.extend.po.ExtendTitlePO;
+import com.engine.organization.enums.LogModuleNameEnum;
+import com.engine.organization.enums.OperateTypeEnum;
import com.engine.organization.mapper.codesetting.CodeRuleMapper;
import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.extend.ExtendTitleMapper;
import com.engine.organization.service.CompService;
import com.engine.organization.service.ExtService;
+import com.engine.organization.thread.OrganizationRunable;
import com.engine.organization.util.*;
import com.engine.organization.util.coderule.CodeRuleUtil;
import com.engine.organization.util.db.MapperProxyFactory;
@@ -98,19 +101,19 @@ public class CompServiceImpl extends Service implements CompService {
boolean filter = isFilter(compPO);
PageInfo pageInfos;
String orderSql = PageInfoSortUtil.getSortSql(params.getSortParams());
- List alltList = getCompMapper().list(orderSql);
+ List allList = getCompMapper().list(orderSql);
// 通过子级遍历父级元素
if (filter) {
// 根据条件获取元素
List filterCompPOs = getCompMapper().listByFilter(compPO, orderSql);
// 添加父级元素
- List compListDTOS = CompBO.buildCompDTOList(alltList, filterCompPOs);
+ List compListDTOS = CompBO.buildCompDTOList(allList, filterCompPOs);
List subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
pageInfos = new PageInfo<>(subList, CompListDTO.class);
pageInfos.setTotal(compListDTOS.size());
} else {
// 组合list
- List compListDTOS = CompBO.buildCompDTOList(alltList);
+ List compListDTOS = CompBO.buildCompDTOList(allList);
List subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
pageInfos = new PageInfo<>(subList, CompListDTO.class);
pageInfos.setTotal(compListDTOS.size());
@@ -145,13 +148,20 @@ public class CompServiceImpl extends Service implements CompService {
int maxShowOrder = getCompMapper().getMaxShowOrder();
params.put("show_order", maxShowOrder + 1);
}
- return getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_COMP, params, "", null);
+ Long id = getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_COMP, params, "", null);
+ params.put("companyId", id);
+ new Thread(new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.ADD, params)).start();
+ return id;
}
@Override
public int updateForbiddenTagById(CompSearchParam params) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
CompPO compPO = CompPO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
+ Map map = new HashMap<>();
+ map.put("id", compPO.getId());
+ map.put("forbiddenTag", compPO.getForbiddenTag());
+ new Thread(new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.CANCELED, map)).start();
return getCompMapper().updateForbiddenTagById(compPO);
}
@@ -169,6 +179,7 @@ public class CompServiceImpl extends Service implements CompService {
compNo = repeatDetermine(compNo);
params.put("comp_no", compNo);
}
+ new Thread(new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params)).start();
// 更新主表数据
getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_COMP, params, "", searchParam.getId());
// 更新主表拓展表
@@ -183,6 +194,9 @@ public class CompServiceImpl extends Service implements CompService {
public int deleteByIds(Collection ids) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
+ Map map = new HashMap<>();
+ map.put("id", StringUtils.join(ids, ","));
+ new Thread(new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.CANCELED, map)).start();
return getCompMapper().deleteByIds(ids);
}
@@ -320,6 +334,14 @@ public class CompServiceImpl extends Service implements CompService {
OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), "请勿选择当前分部本身及其子分部");
CompPO compPO = getCompMapper().listById(companyId);
compPO.setParentCompany(targetCompanyId);
+ Map map = new HashMap<>();
+ map.put("id", compPO.getId());
+ map.put("parent_company", compPO.getParentCompany());
+ map.put("comp_no", compPO.getCompNo());
+ map.put("comp_name_short", compPO.getCompNameShort());
+ map.put("comp_name", compPO.getCompName());
+ map.put("show_order", compPO.getShowOrder());
+ new Thread(new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, map)).start();
return getCompMapper().updateBaseComp(compPO);
}
diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java
index 026ec1ac..b9852c8a 100644
--- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java
+++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java
@@ -6,6 +6,7 @@ import com.api.browser.bean.SearchConditionItem;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
+import com.engine.hrm.util.face.HrmFaceCheckManager;
import com.engine.organization.component.OrganizationWeaTable;
import com.engine.organization.entity.DeleteParam;
import com.engine.organization.entity.company.bo.CompBO;
@@ -26,6 +27,7 @@ import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.extend.ExtendTitleMapper;
import com.engine.organization.mapper.hrmresource.HrmRelationMapper;
+import com.engine.organization.mapper.hrmresource.SystemDataMapper;
import com.engine.organization.mapper.job.JobMapper;
import com.engine.organization.mapper.post.PostInfoMapper;
import com.engine.organization.mapper.post.PostMapper;
@@ -292,7 +294,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
OrganizationAssert.notBlank(id, "数据有误,请确认");
int viewAttr = Integer.parseInt(viewAttrStr);
Map apiDatas = new HashMap<>();
- List selectItems = new ArrayList<>();
+
List addGroups = new ArrayList<>();
SearchConditionItem schemeId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "等级方案", "161", "schemeId", "schemeBrowser");
schemeId.setRules("required");
@@ -306,9 +308,9 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
postId.setRules("required");
SearchConditionItem postInfoId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职务信息", "161", "postInfoId", "postInfoBrowser");
postInfoId.setRules("required");
- SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "分部", "161", "companyId", "compBrowser");
+ SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "分部", "164", "companyId", "");
companyId.setRules("required");
- SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "部门", "161", "departmentId", "deptBrowser");
+ SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "部门", "4", "departmentId", "");
departmentId.setRules("required");
SearchConditionItem jobId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "岗位", "161", "jobId", "jobBrowser");
jobId.setRules("required");
@@ -323,21 +325,26 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
setBrowserValue(sequenceId, relationPO.getSequenceId(), getSequenceMapper().listSequencesByIds(Stream.of(relationPO.getSequenceId()).collect(Collectors.toList())), "scheme_id", relationPO.getSchemeId());
setBrowserValue(postId, relationPO.getPostId(), getPostMapper().listPostsByIds(Stream.of(relationPO.getPostId()).collect(Collectors.toList())), null, null);
setBrowserValue(postInfoId, relationPO.getPostInfoId(), getPostInfoMapper().listPostInfosByIds(Stream.of(relationPO.getPostInfoId()).collect(Collectors.toList())), "post_id", relationPO.getPostId());
- setBrowserValue(companyId, relationPO.getCompanyId(), getCompMapper().listCompsByIds(Stream.of(relationPO.getCompanyId()).collect(Collectors.toList())), null, null);
- setBrowserValue(departmentId, relationPO.getDepartmentId(), getDepartmentMapper().listDeptsByIds(Stream.of(relationPO.getDepartmentId()).collect(Collectors.toList())), "comp_id", relationPO.getCompanyId());
- setBrowserValue(jobId, relationPO.getJobId(), getJobMapper().listJobsByIds(Stream.of(relationPO.getJobId()).collect(Collectors.toList())), "dept_id", relationPO.getDepartmentId());
+
+ List