From bd33075e148872afa28a7c132196b469c9f4a23e Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 30 Nov 2022 16:06:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=AE=A1=E7=90=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/JobBrowserService.java | 24 ++++----- .../bo/{CompanyBO.java => CompBO.java} | 52 +++++++++---------- .../{CompanyListDTO.java => CompListDTO.java} | 4 +- .../{CompanyParam.java => CompParam.java} | 2 +- .../po/{CompanyPO.java => CompPO.java} | 2 +- .../entity/department/bo/DepartmentBO.java | 4 +- .../{CompanyMapper.java => CompMapper.java} | 16 +++--- .../{CompanyMapper.xml => CompMapper.xml} | 4 +- .../organization/service/CompService.java | 6 +-- .../service/impl/CompServiceImpl.java | 52 +++++++++---------- .../service/impl/DepartmentServiceImpl.java | 28 +++++----- .../service/impl/HrmResourceServiceImpl.java | 32 ++++++------ .../service/impl/ImportCommonServiceImpl.java | 14 ++--- .../service/impl/JobServiceImpl.java | 34 ++++++------ .../thread/StaffTriggerRunnable.java | 10 ++-- .../transmethod/CompTransMethod.java | 10 ++-- .../transmethod/HrmResourceTransMethod.java | 4 +- .../organization/util/detach/DetachUtil.java | 4 +- .../util/relation/EcHrmRelationUtil.java | 10 ++-- .../util/saveimport/StaffInfoImportUtil.java | 4 +- .../organization/web/CompController.java | 6 +-- .../organization/wrapper/CompWrapper.java | 30 +++++------ 22 files changed, 176 insertions(+), 176 deletions(-) rename src/com/engine/organization/entity/company/bo/{CompanyBO.java => CompBO.java} (70%) rename src/com/engine/organization/entity/company/dto/{CompanyListDTO.java => CompListDTO.java} (95%) rename src/com/engine/organization/entity/company/param/{CompanyParam.java => CompParam.java} (93%) rename src/com/engine/organization/entity/company/po/{CompanyPO.java => CompPO.java} (97%) rename src/com/engine/organization/mapper/comp/{CompanyMapper.java => CompMapper.java} (71%) rename src/com/engine/organization/mapper/comp/{CompanyMapper.xml => CompMapper.xml} (98%) diff --git a/src/com/api/browser/service/impl/JobBrowserService.java b/src/com/api/browser/service/impl/JobBrowserService.java index 80b79b22..b7b4a7e5 100644 --- a/src/com/api/browser/service/impl/JobBrowserService.java +++ b/src/com/api/browser/service/impl/JobBrowserService.java @@ -9,12 +9,12 @@ import com.engine.organization.component.OrganizationWeaTable; import com.engine.organization.entity.browser.bo.CusBowserTreeBO; import com.engine.organization.entity.browser.enums.TreeNodeTypeEnum; import com.engine.organization.entity.browser.po.CusBrowserTree; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.job.vo.JobBrowserVO; import com.engine.organization.entity.searchtree.SearchTree; import com.engine.organization.entity.searchtree.SearchTreeParams; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.util.OrganizationFormItemUtil; import com.engine.organization.util.db.DBType; @@ -165,37 +165,37 @@ public class JobBrowserService extends BrowserService { List compHasSubs; if (detachUtil.isDETACH()) { if (CollectionUtils.isNotEmpty(jclRoleLevelList)) { - compHasSubs = MapperProxyFactory.getProxy(CompanyMapper.class).hasDetachSubs(jclRoleLevelList); + compHasSubs = MapperProxyFactory.getProxy(CompMapper.class).hasDetachSubs(jclRoleLevelList); } else { compHasSubs = new ArrayList<>(); } } else { - compHasSubs = MapperProxyFactory.getProxy(CompanyMapper.class).hasSubs(); + compHasSubs = MapperProxyFactory.getProxy(CompMapper.class).hasSubs(); } // 部门存在下级的ID List hasSubDepartment = MapperProxyFactory.getProxy(DepartmentMapper.class).hasSubs(); if ("0".equals(params.getId())) { - List compList; + List compList; if (detachUtil.isDETACH()) { if (CollectionUtils.isNotEmpty(jclRoleLevelList)) { - compList = MapperProxyFactory.getProxy(CompanyMapper.class).getCompsByIds(jclRoleLevelList); + compList = MapperProxyFactory.getProxy(CompMapper.class).getCompsByIds(jclRoleLevelList); // 处理上下级关系 - Set collectIds = compList.stream().map(CompanyPO::getId).collect(Collectors.toSet()); + Set collectIds = compList.stream().map(CompPO::getId).collect(Collectors.toSet()); compList.removeIf(item -> collectIds.contains(item.getSupSubComId())); } else { compList = new ArrayList<>(); } } else { - compList = MapperProxyFactory.getProxy(CompanyMapper.class).listParent(); + compList = MapperProxyFactory.getProxy(CompMapper.class).listParent(); } // 获取顶层分部 - compList.stream().sorted(Comparator.comparing(CompanyPO::getShowOrder)).forEach(item -> buildCompNodes(treeNodes, compHasSubs, item)); + compList.stream().sorted(Comparator.comparing(CompPO::getShowOrder)).forEach(item -> buildCompNodes(treeNodes, compHasSubs, item)); } else if ("1".equals(params.getType())) { // 当前节点下的元素 - CompanyPO compBuild = CompanyPO.builder().supSubComId(Integer.parseInt(params.getId())).canceled(0).build(); - List compList = MapperProxyFactory.getProxy(CompanyMapper.class).listByFilter(compBuild, "showorder"); + CompPO compBuild = CompPO.builder().supSubComId(Integer.parseInt(params.getId())).canceled(0).build(); + List compList = MapperProxyFactory.getProxy(CompMapper.class).listByFilter(compBuild, "showorder"); if (detachUtil.isDETACH()) { detachUtil.filterCompanyList(compList); } @@ -222,7 +222,7 @@ public class JobBrowserService extends BrowserService { * @param compHasSubs * @param company */ - private void buildCompNodes(List treeNodes, List compHasSubs, CompanyPO company) { + private void buildCompNodes(List treeNodes, List compHasSubs, CompPO company) { SearchTree searchTree = new SearchTree(); searchTree.setId(company.getId().toString()); searchTree.setType(TreeNodeTypeEnum.TYPE_COMP.getValue()); diff --git a/src/com/engine/organization/entity/company/bo/CompanyBO.java b/src/com/engine/organization/entity/company/bo/CompBO.java similarity index 70% rename from src/com/engine/organization/entity/company/bo/CompanyBO.java rename to src/com/engine/organization/entity/company/bo/CompBO.java index 588b5a08..bc1ce485 100644 --- a/src/com/engine/organization/entity/company/bo/CompanyBO.java +++ b/src/com/engine/organization/entity/company/bo/CompBO.java @@ -1,10 +1,10 @@ package com.engine.organization.entity.company.bo; -import com.engine.organization.entity.company.dto.CompanyListDTO; -import com.engine.organization.entity.company.param.CompanyParam; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.dto.CompListDTO; +import com.engine.organization.entity.company.param.CompParam; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.searchtree.SearchTree; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.util.db.MapperProxyFactory; import org.apache.commons.collections.CollectionUtils; import weaver.general.Util; @@ -17,14 +17,14 @@ import java.util.stream.Collectors; * @createTime: 2022/11/24 * @version: 1.0 */ -public class CompanyBO { +public class CompBO { - private static CompanyMapper getCompanyMapper() { - return MapperProxyFactory.getProxy(CompanyMapper.class); + private static CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); } - public static List buildSetToSearchTree(Set comps) { - return comps.stream().sorted(Comparator.comparing(CompanyPO::getShowOrder)).map(item -> { + public static List buildSetToSearchTree(Set comps) { + return comps.stream().sorted(Comparator.comparing(CompPO::getShowOrder)).map(item -> { SearchTree tree = new SearchTree(); tree.setCanClick(true); tree.setCanceled(item.getCanceled() != null && item.getCanceled() != 0); @@ -48,11 +48,11 @@ public class CompanyBO { * @param userId * @return */ - public static CompanyPO convertParamToPO(CompanyParam param, Integer userId) { + public static CompPO convertParamToPO(CompParam param, Integer userId) { if (null == param) { return null; } - return CompanyPO + return CompPO .builder() .id(param.getId() == null ? 0 : param.getId()) .subCompanyName(param.getSubCompanyName()) @@ -75,27 +75,27 @@ public class CompanyBO { .build(); } - public static List buildCompDTOList(Collection list, List filterList) { + public static List buildCompDTOList(Collection list, List filterList) { // 搜索结果为空,直接返回空 if (CollectionUtils.isEmpty(filterList)) { return Collections.emptyList(); } // 递归添加父级数据 - Map poMaps = list.stream().collect(Collectors.toMap(CompanyPO::getId, item -> item)); - List addedList = new ArrayList<>(); - for (CompanyPO po : filterList) { + Map poMaps = list.stream().collect(Collectors.toMap(CompPO::getId, item -> item)); + List addedList = new ArrayList<>(); + for (CompPO po : filterList) { dealParentData(addedList, po, poMaps); } return buildCompDTOList(addedList); } - public static List buildCompDTOList(List list) { + public static List buildCompDTOList(List list) { - Map poMaps = list.stream().collect(Collectors.toMap(CompanyPO::getId, item -> item)); + Map poMaps = list.stream().collect(Collectors.toMap(CompPO::getId, item -> item)); - List dtoList = list.stream().map(e -> - CompanyListDTO + List dtoList = list.stream().map(e -> + CompListDTO .builder() .id(e.getId()) .subCompanyCode(e.getSubCompanyCode()) @@ -106,15 +106,15 @@ public class CompanyBO { .showOrder(e.getShowOrder()) .canceled(null == e.getCanceled() ? 0 : e.getCanceled()) .build()).collect(Collectors.toList()); - Map> collects = dtoList.stream().filter(item -> 0 != item.getSupSubComId()).collect(Collectors.groupingBy(CompanyListDTO::getSupSubComId)); + Map> collects = dtoList.stream().filter(item -> 0 != item.getSupSubComId()).collect(Collectors.groupingBy(CompListDTO::getSupSubComId)); // 处理被引用数据 - List usedIds = getCompanyMapper().listUsedId(); + List usedIds = getCompMapper().listUsedId(); // 兼容MySQL - usedIds.addAll(getCompanyMapper().listUsedIds()); + usedIds.addAll(getCompMapper().listUsedIds()); List collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList()); Set leafs = new HashSet<>(); - List collectTree = dtoList.stream().peek(e -> { - List childList = collects.get(e.getId()); + List collectTree = dtoList.stream().peek(e -> { + List childList = collects.get(e.getId()); leafs.add(e.getId()); if (CollectionUtils.isNotEmpty(childList)) { e.setChildren(childList); @@ -137,11 +137,11 @@ public class CompanyBO { * @param po * @param poMaps */ - private static void dealParentData(List addedList, CompanyPO po, Map poMaps) { + private static void dealParentData(List addedList, CompPO po, Map poMaps) { if (!addedList.contains(po)) { addedList.add(po); } - CompanyPO parentCompPO = poMaps.get(po.getSupSubComId()); + CompPO parentCompPO = poMaps.get(po.getSupSubComId()); if (null != parentCompPO) { dealParentData(addedList, parentCompPO, poMaps); } diff --git a/src/com/engine/organization/entity/company/dto/CompanyListDTO.java b/src/com/engine/organization/entity/company/dto/CompListDTO.java similarity index 95% rename from src/com/engine/organization/entity/company/dto/CompanyListDTO.java rename to src/com/engine/organization/entity/company/dto/CompListDTO.java index 3b634598..4e429498 100644 --- a/src/com/engine/organization/entity/company/dto/CompanyListDTO.java +++ b/src/com/engine/organization/entity/company/dto/CompListDTO.java @@ -19,7 +19,7 @@ import java.util.List; @NoArgsConstructor @AllArgsConstructor @OrganizationTable(pageId = "dcfd9d27-6ba2-11ed-996a-00ffcbed7508") -public class CompanyListDTO { +public class CompListDTO { /** * 主键id */ @@ -73,5 +73,5 @@ public class CompanyListDTO { /** * 子节点 */ - private List children; + private List children; } diff --git a/src/com/engine/organization/entity/company/param/CompanyParam.java b/src/com/engine/organization/entity/company/param/CompParam.java similarity index 93% rename from src/com/engine/organization/entity/company/param/CompanyParam.java rename to src/com/engine/organization/entity/company/param/CompParam.java index a720477f..1b409c23 100644 --- a/src/com/engine/organization/entity/company/param/CompanyParam.java +++ b/src/com/engine/organization/entity/company/param/CompParam.java @@ -15,7 +15,7 @@ import lombok.NoArgsConstructor; @Builder @AllArgsConstructor @NoArgsConstructor -public class CompanyParam extends BaseQueryParam { +public class CompParam extends BaseQueryParam { private Integer Id; private String subCompanyName; private String subCompanyDesc; diff --git a/src/com/engine/organization/entity/company/po/CompanyPO.java b/src/com/engine/organization/entity/company/po/CompPO.java similarity index 97% rename from src/com/engine/organization/entity/company/po/CompanyPO.java rename to src/com/engine/organization/entity/company/po/CompPO.java index f95f8fdc..ae80432d 100644 --- a/src/com/engine/organization/entity/company/po/CompanyPO.java +++ b/src/com/engine/organization/entity/company/po/CompPO.java @@ -16,7 +16,7 @@ import java.util.Date; @Builder @AllArgsConstructor @NoArgsConstructor -public class CompanyPO { +public class CompPO { private Integer id; private String subCompanyName; private String subCompanyDesc; diff --git a/src/com/engine/organization/entity/department/bo/DepartmentBO.java b/src/com/engine/organization/entity/department/bo/DepartmentBO.java index 124cf22b..bddbb5a3 100644 --- a/src/com/engine/organization/entity/department/bo/DepartmentBO.java +++ b/src/com/engine/organization/entity/department/bo/DepartmentBO.java @@ -5,7 +5,7 @@ import com.engine.organization.entity.department.param.DeptSearchParam; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.department.vo.SingleDeptTreeVO; import com.engine.organization.entity.searchtree.SearchTree; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.employee.EmployeeMapper; import com.engine.organization.util.db.MapperProxyFactory; @@ -35,7 +35,7 @@ public class DepartmentBO { .departmentName(e.getDepartmentName()) .departmentCode(e.getDepartmentCode()) .subCompanyId1(e.getSubCompanyId1()) - .subCompanyName(0 == e.getSubCompanyId1() ? "" : MapperProxyFactory.getProxy(CompanyMapper.class).listById(e.getSubCompanyId1()).getSubCompanyName()) + .subCompanyName(0 == e.getSubCompanyId1() ? "" : MapperProxyFactory.getProxy(CompMapper.class).listById(e.getSubCompanyId1()).getSubCompanyName()) .supDepId(e.getSupDepId()) .supDepName(null == poMaps.get(e.getSupDepId()) ? "" : poMaps.get(e.getSupDepId()).getDepartmentName()) // .deptPrincipal(getEmployeeNameById(e.getDeptPrincipal())) diff --git a/src/com/engine/organization/mapper/comp/CompanyMapper.java b/src/com/engine/organization/mapper/comp/CompMapper.java similarity index 71% rename from src/com/engine/organization/mapper/comp/CompanyMapper.java rename to src/com/engine/organization/mapper/comp/CompMapper.java index ba71a66f..5c89268d 100644 --- a/src/com/engine/organization/mapper/comp/CompanyMapper.java +++ b/src/com/engine/organization/mapper/comp/CompMapper.java @@ -1,6 +1,6 @@ package com.engine.organization.mapper.comp; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.po.CompPO; import org.apache.ibatis.annotations.Param; import java.util.Collection; @@ -12,15 +12,15 @@ import java.util.List; * @createTime: 2022/05/16 * @version: 1.0 */ -public interface CompanyMapper { +public interface CompMapper { /** * 列表查询 * * @return */ - List listAll(@Param("orderSql") String orderSql); + List listAll(@Param("orderSql") String orderSql); - List listByFilter(@Param("CompanyPO") CompanyPO CompanyPO, @Param("orderSql") String orderSql); + List listByFilter(@Param("CompanyPO") CompPO CompanyPO, @Param("orderSql") String orderSql); /** * 查询所有被引用的ID @@ -37,7 +37,7 @@ public interface CompanyMapper { * @param ids * @return */ - List listChild(@Param("ids") Collection ids); + List listChild(@Param("ids") Collection ids); /** * 根据ID查询数据 @@ -45,7 +45,7 @@ public interface CompanyMapper { * @param id * @return */ - CompanyPO listById(@Param("id") Integer id); + CompPO listById(@Param("id") Integer id); /** * 根据ID批量查询数据 @@ -53,14 +53,14 @@ public interface CompanyMapper { * @param ids * @return */ - List getCompsByIds(@Param("ids") Collection ids); + List getCompsByIds(@Param("ids") Collection ids); /** * 获取顶级数据 * * @return */ - List listParent(); + List listParent(); List hasSubs(); diff --git a/src/com/engine/organization/mapper/comp/CompanyMapper.xml b/src/com/engine/organization/mapper/comp/CompMapper.xml similarity index 98% rename from src/com/engine/organization/mapper/comp/CompanyMapper.xml rename to src/com/engine/organization/mapper/comp/CompMapper.xml index 41085e82..7ac63afe 100644 --- a/src/com/engine/organization/mapper/comp/CompanyMapper.xml +++ b/src/com/engine/organization/mapper/comp/CompMapper.xml @@ -1,7 +1,7 @@ - - + + diff --git a/src/com/engine/organization/service/CompService.java b/src/com/engine/organization/service/CompService.java index fe9f7398..f4517480 100644 --- a/src/com/engine/organization/service/CompService.java +++ b/src/com/engine/organization/service/CompService.java @@ -1,7 +1,7 @@ package com.engine.organization.service; import com.api.browser.bean.SearchConditionGroup; -import com.engine.organization.entity.company.param.CompanyParam; +import com.engine.organization.entity.company.param.CompParam; import com.engine.organization.entity.department.param.DepartmentMoveParam; import com.engine.organization.util.MenuBtn; @@ -22,7 +22,7 @@ public interface CompService { * @param params * @return */ - Map listPage(CompanyParam params); + Map listPage(CompParam params); /** * 保存公司/分部基础信息 @@ -37,7 +37,7 @@ public interface CompService { * * @param params */ - int updateForbiddenTagById(CompanyParam params); + int updateForbiddenTagById(CompParam params); /** diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java index a1c08d7c..bd82cb55 100644 --- a/src/com/engine/organization/service/impl/CompServiceImpl.java +++ b/src/com/engine/organization/service/impl/CompServiceImpl.java @@ -12,16 +12,16 @@ import com.engine.core.impl.Service; import com.engine.hrm.service.impl.OrganizationServiceImpl; import com.engine.organization.component.OrganizationWeaTable; import com.engine.organization.entity.DeleteParam; -import com.engine.organization.entity.company.bo.CompanyBO; -import com.engine.organization.entity.company.dto.CompanyListDTO; -import com.engine.organization.entity.company.param.CompanyParam; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.bo.CompBO; +import com.engine.organization.entity.company.dto.CompListDTO; +import com.engine.organization.entity.company.param.CompParam; +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.exception.OrganizationRunTimeException; -import com.engine.organization.mapper.comp.CompanyMapper; +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; @@ -81,8 +81,8 @@ public class CompServiceImpl extends Service implements CompService { */ private static final Long GROUP_ID = 1L; - private static CompanyMapper getCompanyMapper() { - return MapperProxyFactory.getProxy(CompanyMapper.class); + private static CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); } private ExtendTitleMapper getExtendTitleMapper() { @@ -95,44 +95,44 @@ public class CompServiceImpl extends Service implements CompService { @Override - public Map listPage(CompanyParam params) { + public Map listPage(CompParam params) { Map datas = new HashMap<>(); boolean hasRight = HasRightUtil.hasRight(user, RIGHT_NAME, true); datas.put("hasRight", hasRight); if (!hasRight) { return datas; } - CompanyPO companyPO = CompanyBO.convertParamToPO(params, user.getUID()); + CompPO companyPO = CompBO.convertParamToPO(params, user.getUID()); boolean filter = isFilter(companyPO); - PageInfo pageInfos; + PageInfo pageInfos; String orderSql = PageInfoSortUtil.getSortSql(params.getSortParams()," showorder "); - List allList = getCompanyMapper().listAll(orderSql); + List allList = getCompMapper().listAll(orderSql); new DetachUtil(user.getUID()).filterCompanyList(allList); // 通过子级遍历父级元素 if (filter) { // 根据条件获取元素 - List filterCompPOs = getCompanyMapper().listByFilter(companyPO, orderSql); + List filterCompPOs = getCompMapper().listByFilter(companyPO, orderSql); new DetachUtil(user.getUID()).filterCompanyList(filterCompPOs); // 添加父级元素 - List compListDTOS = CompanyBO.buildCompDTOList(allList, filterCompPOs); - List subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS); - pageInfos = new PageInfo<>(subList, CompanyListDTO.class); + 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 = CompanyBO.buildCompDTOList(allList); - List subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS); - pageInfos = new PageInfo<>(subList, CompanyListDTO.class); + List compListDTOS = CompBO.buildCompDTOList(allList); + List subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS); + pageInfos = new PageInfo<>(subList, CompListDTO.class); pageInfos.setTotal(compListDTOS.size()); } pageInfos.setPageNum(params.getCurrent()); pageInfos.setPageSize(params.getPageSize()); - OrganizationWeaTable table = new OrganizationWeaTable<>(user, CompanyListDTO.class); + OrganizationWeaTable table = new OrganizationWeaTable<>(user, CompListDTO.class); List columns = pageInfos.getColumns(); List weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", v.getTitle(), v.getKey())).collect(Collectors.toList()); table.setColumns(weaTableColumn); @@ -156,9 +156,9 @@ public class CompServiceImpl extends Service implements CompService { } @Override - public int updateForbiddenTagById(CompanyParam params) { + public int updateForbiddenTagById(CompParam params) { HasRightUtil.hasRight(user, RIGHT_NAME, false); - CompanyPO compPO = CompanyPO.builder().id(params.getId()).canceled(params.getCanceled() ? 0 : 1).build(); + CompPO compPO = CompPO.builder().id(params.getId()).canceled(params.getCanceled() ? 0 : 1).build(); Map map = new HashMap<>(); map.put("id", compPO.getId().toString()); map.put("forbiddenTag", compPO.getCanceled()); @@ -415,7 +415,7 @@ public class CompServiceImpl extends Service implements CompService { // 判断目标分部是否为它本身以及子元素 Set disableIds = new HashSet<>(); disableIds.add(companyId); - List compPOS = getCompanyMapper().listChild(DeleteParam.builder().ids(companyId.toString()).build().getIds()); + List compPOS = getCompMapper().listChild(DeleteParam.builder().ids(companyId.toString()).build().getIds()); if (CollectionUtils.isNotEmpty(compPOS)) { addDisableIds(disableIds, compPOS); } @@ -435,7 +435,7 @@ public class CompServiceImpl extends Service implements CompService { * @param companyPO * @return */ - private boolean isFilter(CompanyPO companyPO) { + private boolean isFilter(CompPO companyPO) { return StringUtils.isNotBlank(companyPO.getSubCompanyCode()) || StringUtils.isNotBlank(companyPO.getSubCompanyDesc()) || StringUtils.isNotBlank(companyPO.getSubCompanyName()) || null != companyPO.getSupSubComId(); } @@ -479,10 +479,10 @@ public class CompServiceImpl extends Service implements CompService { * @param disableIds * @param compPOS */ - private void addDisableIds(Set disableIds, List compPOS) { - for (CompanyPO compPO : compPOS) { + private void addDisableIds(Set disableIds, List compPOS) { + for (CompPO compPO : compPOS) { disableIds.add(compPO.getId()); - List childCompPOS = getCompanyMapper().listChild(DeleteParam.builder().ids(compPO.getId().toString()).build().getIds()); + List childCompPOS = getCompMapper().listChild(DeleteParam.builder().ids(compPO.getId().toString()).build().getIds()); addDisableIds(disableIds, childCompPOS); } } diff --git a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java index c0b0e382..5d8ba83a 100644 --- a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java +++ b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java @@ -13,8 +13,8 @@ import com.engine.hrm.entity.RuleCodeType; import com.engine.hrm.service.impl.OrganizationServiceImpl; import com.engine.organization.component.OrganizationWeaTable; import com.engine.organization.entity.codesetting.po.CodeRulePO; -import com.engine.organization.entity.company.bo.CompanyBO; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.bo.CompBO; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.department.bo.DepartmentBO; import com.engine.organization.entity.department.dto.DepartmentListDTO; import com.engine.organization.entity.department.param.*; @@ -30,7 +30,7 @@ import com.engine.organization.enums.LogModuleNameEnum; import com.engine.organization.enums.OperateTypeEnum; import com.engine.organization.exception.OrganizationRunTimeException; import com.engine.organization.mapper.codesetting.CodeRuleMapper; -import com.engine.organization.mapper.comp.CompanyMapper; +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.job.JobMapper; @@ -106,8 +106,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService return MapperProxyFactory.getProxy(JobMapper.class); } - private CompanyMapper getCompanyMapper() { - return MapperProxyFactory.getProxy(CompanyMapper.class); + private CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); } private ExtendTitleMapper getExtendTitleMapper() { @@ -774,19 +774,19 @@ public class DepartmentServiceImpl extends Service implements DepartmentService private List getFilterCompany(String id, String keyword) { // 查询部门信息 Integer parentCompId = StringUtil.isEmpty(id) ? null : Integer.parseInt(id); - CompanyPO compBuild = CompanyPO.builder().subCompanyName(keyword).supSubComId(parentCompId).canceled(0).build(); - List allCompanys = getCompanyMapper().listAll("showOrder"); + CompPO compBuild = CompPO.builder().subCompanyName(keyword).supSubComId(parentCompId).canceled(0).build(); + List allCompanys = getCompMapper().listAll("showOrder"); new DetachUtil(user.getUID()).filterCompanyList(allCompanys); - List filterComps = getCompanyMapper().listByFilter(compBuild, "showOrder"); + List filterComps = getCompMapper().listByFilter(compBuild, "showOrder"); new DetachUtil(user.getUID()).filterCompanyList(filterComps); - Map allMaps = allCompanys.stream().collect(Collectors.toMap(CompanyPO::getId, item -> item, (k1, k2) -> k1)); + Map allMaps = allCompanys.stream().collect(Collectors.toMap(CompPO::getId, item -> item, (k1, k2) -> k1)); - Set builderComps = new HashSet<>(); - for (CompanyPO companyPO : filterComps) { + Set builderComps = new HashSet<>(); + for (CompPO companyPO : filterComps) { buildParentComps(companyPO, builderComps, allMaps); } - return SearchTreeUtil.builderTreeMode(CompanyBO.buildSetToSearchTree(builderComps)); + return SearchTreeUtil.builderTreeMode(CompBO.buildSetToSearchTree(builderComps)); } @@ -796,9 +796,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService * @param compPO * @param builderComps */ - private void buildParentComps(CompanyPO compPO, Set builderComps, Map allMaps) { + private void buildParentComps(CompPO compPO, Set builderComps, Map allMaps) { builderComps.add(compPO); - CompanyPO parentComp = allMaps.get(compPO.getSupSubComId()); + CompPO parentComp = allMaps.get(compPO.getSupSubComId()); if (null != parentComp && (null == parentComp.getCanceled() || 0 == parentComp.getCanceled())) { buildParentComps(parentComp, builderComps, allMaps); } diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java index f4c9a28c..0d91ef86 100644 --- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java +++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java @@ -14,8 +14,8 @@ 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.CompanyBO; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.bo.CompBO; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.department.bo.DepartmentBO; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.extend.po.ExtendTitlePO; @@ -32,7 +32,7 @@ import com.engine.organization.entity.searchtree.SearchTreeParams; 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.CompanyMapper; +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; @@ -149,8 +149,8 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic return MapperProxyFactory.getProxy(DepartmentMapper.class); } - private CompanyMapper getCompanyMapper() { - return MapperProxyFactory.getProxy(CompanyMapper.class); + private CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); } private JobMapper getJobMapper() { @@ -543,7 +543,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic if (StringUtil.isEmpty(id) || TYPE_COMP.equals(type)) { Integer parentCompId = StringUtil.isEmpty(id) ? null : Integer.parseInt(id); DepartmentPO departmentBuild = DepartmentPO.builder().departmentName(keyword).subCompanyId1(parentCompId).build(); - CompanyPO compBuild = CompanyPO.builder().subCompanyName(keyword).supSubComId(parentCompId).build(); + CompPO compBuild = CompPO.builder().subCompanyName(keyword).supSubComId(parentCompId).build(); // 所属分部下的岗位 JobPO jobBuild = JobPO.builder().jobName(keyword).parentComp(parentCompId).build(); searchTree = buildTreeByCompAndDept(departmentBuild, compBuild, jobBuild); @@ -574,7 +574,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic * @param jobBuild * @return */ - private List buildTreeByCompAndDept(DepartmentPO departmentBuild, CompanyPO compBuild, JobPO jobBuild) { + private List buildTreeByCompAndDept(DepartmentPO departmentBuild, CompPO compBuild, JobPO jobBuild) { List jobPOS = getJobMapper().listPOsByFilter(jobBuild); new DetachUtil(user.getUID()).filterJobList(jobPOS); List filterDeparts = getDepartmentMapper().listByFilter(departmentBuild, "showorder"); @@ -607,7 +607,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic } // 查询分部信息 - List filterComps = getCompanyMapper().listByFilter(compBuild, "showorder"); + List filterComps = getCompMapper().listByFilter(compBuild, "showorder"); new DetachUtil(user.getUID()).filterCompanyList(filterComps); Set builderDeparts = new HashSet<>(); for (DepartmentPO departmentPO : filterDeparts) { @@ -619,19 +619,19 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic // 添加部门的上级分部 String parentCompS = deptTrees.stream().map(SearchTree::getParentComp).collect(Collectors.joining(",")); if (!StringUtil.isEmpty(parentCompS)) { - List compsByIds = getCompanyMapper().getCompsByIds(DeleteParam.builder().ids(parentCompS).build().getIds()); + List compsByIds = getCompMapper().getCompsByIds(DeleteParam.builder().ids(parentCompS).build().getIds()); if (CollectionUtils.isNotEmpty(compsByIds)) { filterComps.addAll(compsByIds); } } - List allCompanys = getCompanyMapper().listAll("showorder"); + List allCompanys = getCompMapper().listAll("showorder"); new DetachUtil(user.getUID()).filterCompanyList(allCompanys); - Map allMaps = allCompanys.stream().collect(Collectors.toMap(CompanyPO::getId, item -> item, (k1, k2) -> k1)); - Set builderComps = new HashSet<>(); - for (CompanyPO compPO : filterComps) { + Map allMaps = allCompanys.stream().collect(Collectors.toMap(CompPO::getId, item -> item, (k1, k2) -> k1)); + Set builderComps = new HashSet<>(); + for (CompPO compPO : filterComps) { buildParentComps(compPO, builderComps, allMaps); } - return SearchTreeUtil.builderTreeMode(CompanyBO.buildSetToSearchTree(builderComps), searchTrees); + return SearchTreeUtil.builderTreeMode(CompBO.buildSetToSearchTree(builderComps), searchTrees); } private List buildTreeByDeptAndJob(DepartmentPO departmentBuild, JobPO jobBuild) { @@ -704,9 +704,9 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic * @param compPO * @param builderComps */ - private void buildParentComps(CompanyPO compPO, Set builderComps, Map allMaps) { + private void buildParentComps(CompPO compPO, Set builderComps, Map allMaps) { builderComps.add(compPO); - CompanyPO parentComp = allMaps.get(compPO.getSupSubComId()); + CompPO parentComp = allMaps.get(compPO.getSupSubComId()); if (null != parentComp) { buildParentComps(parentComp, builderComps, allMaps); } diff --git a/src/com/engine/organization/service/impl/ImportCommonServiceImpl.java b/src/com/engine/organization/service/impl/ImportCommonServiceImpl.java index ac69a4c7..3f9c86a1 100644 --- a/src/com/engine/organization/service/impl/ImportCommonServiceImpl.java +++ b/src/com/engine/organization/service/impl/ImportCommonServiceImpl.java @@ -22,7 +22,7 @@ import com.engine.organization.enums.LogModuleNameEnum; import com.engine.organization.enums.OperateTypeEnum; import com.engine.organization.enums.OrgImportEnum; import com.engine.organization.exception.OrganizationRunTimeException; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.employee.EmployeeMapper; import com.engine.organization.mapper.extend.ExtMapper; @@ -715,7 +715,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ continue nextRow; } for (int index = 0; index < split.length - 1; index++) { - parentCompanyId = MapperProxyFactory.getProxy(CompanyMapper.class).getIdByNameAndPid(split[index], parentCompanyId == null ? 0 : parentCompanyId); + parentCompanyId = MapperProxyFactory.getProxy(CompMapper.class).getIdByNameAndPid(split[index], parentCompanyId == null ? 0 : parentCompanyId); if (null == parentCompanyId) { historyDetailPO.setOperateDetail(split[index] + "分部未找到对应数据"); historyDetailPO.setStatus("0"); @@ -745,7 +745,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ continue; } String compNo = (String) map.get("comp_no"); - Integer companyId = MapperProxyFactory.getProxy(CompanyMapper.class).getIdByNameAndPid(companyName, parentCompanyId == null ? 0 : parentCompanyId); + Integer companyId = MapperProxyFactory.getProxy(CompMapper.class).getIdByNameAndPid(companyName, parentCompanyId == null ? 0 : parentCompanyId); if ("add".equals(operateType)) { if (companyId != null) { historyDetailPO.setOperateDetail("数据已存在"); @@ -772,7 +772,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ } String showOrder = Util.null2String(map.get("show_order")); if (StringUtils.isBlank(showOrder)) { - Integer maxShowOrder = MapperProxyFactory.getProxy(CompanyMapper.class).getMaxShowOrder(); + Integer maxShowOrder = MapperProxyFactory.getProxy(CompMapper.class).getMaxShowOrder(); if (null == maxShowOrder) { maxShowOrder = 0; } @@ -924,7 +924,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ continue nextRow; } for (String s : split) { - parentCompanyId = MapperProxyFactory.getProxy(CompanyMapper.class).getIdByNameAndPid(s, parentCompanyId == null ? 0 : parentCompanyId); + parentCompanyId = MapperProxyFactory.getProxy(CompMapper.class).getIdByNameAndPid(s, parentCompanyId == null ? 0 : parentCompanyId); if (null == parentCompanyId) { historyDetailPO.setOperateDetail(cellValue + "分部未找到对应数据"); historyDetailPO.setStatus("0"); @@ -1162,7 +1162,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ continue nextRow; } for (String s : split) { - parentCompanyId = MapperProxyFactory.getProxy(CompanyMapper.class).getIdByNameAndPid(s, parentCompanyId == null ? 0 : parentCompanyId); + parentCompanyId = MapperProxyFactory.getProxy(CompMapper.class).getIdByNameAndPid(s, parentCompanyId == null ? 0 : parentCompanyId); if (null == parentCompanyId) { historyDetailPO.setOperateDetail(cellValue + "分部未找到对应数据"); historyDetailPO.setStatus("0"); @@ -1426,7 +1426,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ continue nextRow; } for (String s : split) { - parentCompanyId = MapperProxyFactory.getProxy(CompanyMapper.class).getIdByNameAndPid(s, parentCompanyId == null ? 0 : parentCompanyId); + parentCompanyId = MapperProxyFactory.getProxy(CompMapper.class).getIdByNameAndPid(s, parentCompanyId == null ? 0 : parentCompanyId); if (null == parentCompanyId) { historyDetailPO.setOperateDetail(cellValue + "分部未找到对应数据"); historyDetailPO.setStatus("0"); diff --git a/src/com/engine/organization/service/impl/JobServiceImpl.java b/src/com/engine/organization/service/impl/JobServiceImpl.java index 7757a721..39de4c66 100644 --- a/src/com/engine/organization/service/impl/JobServiceImpl.java +++ b/src/com/engine/organization/service/impl/JobServiceImpl.java @@ -15,8 +15,8 @@ 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.CompanyBO; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.bo.CompBO; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.department.bo.DepartmentBO; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.employee.vo.EmployeeTableVO; @@ -33,7 +33,7 @@ import com.engine.organization.entity.searchtree.SearchTreeParams; 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.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.extend.ExtDTMapper; import com.engine.organization.mapper.extend.ExtMapper; @@ -117,8 +117,8 @@ public class JobServiceImpl extends Service implements JobService { return MapperProxyFactory.getProxy(JobMapper.class); } - private CompanyMapper getCompanyMapper() { - return MapperProxyFactory.getProxy(CompanyMapper.class); + private CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); } private DepartmentMapper getDepartmentMapper() { @@ -275,7 +275,7 @@ public class JobServiceImpl extends Service implements JobService { Map params = new HashMap<>(); // 分部 if (StringUtils.isNotBlank(Util.null2String(param.getSubcompanyid1()))) { - CompanyPO compPO = getCompanyMapper().listById(param.getSubcompanyid1()); + CompPO compPO = getCompMapper().listById(param.getSubcompanyid1()); if (null != compPO) { params.put("parent_comp", compPO.getId()); params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(compPO.getId().toString())); @@ -642,9 +642,9 @@ public class JobServiceImpl extends Service implements JobService { * @param compPO * @param builderComps */ - private void buildParentComps(CompanyPO compPO, Set builderComps, Map allMaps) { + private void buildParentComps(CompPO compPO, Set builderComps, Map allMaps) { builderComps.add(compPO); - CompanyPO parentComp = allMaps.get(compPO.getSupSubComId()); + CompPO parentComp = allMaps.get(compPO.getSupSubComId()); if (null != parentComp && (null == parentComp.getCanceled() || 0 == parentComp.getCanceled())) { buildParentComps(parentComp, builderComps, allMaps); } @@ -664,7 +664,7 @@ public class JobServiceImpl extends Service implements JobService { if (StringUtil.isEmpty(id) || TYPE_COMP.equals(type)) { Integer parentCompId = StringUtil.isEmpty(id) ? null : Integer.parseInt(id); DepartmentPO departmentBuild = DepartmentPO.builder().departmentName(keyword).subCompanyId1(parentCompId).canceled(0).build(); - CompanyPO compBuild = CompanyPO.builder().subCompanyName(keyword).supSubComId(parentCompId).canceled(0).build(); + CompPO compBuild = CompPO.builder().subCompanyName(keyword).supSubComId(parentCompId).canceled(0).build(); searchTree = buildTreeByCompAndDept(departmentBuild, compBuild); } else if (TYPE_DEPT.equals(type)) { // @@ -687,11 +687,11 @@ public class JobServiceImpl extends Service implements JobService { * @param compBuild * @return */ - private List buildTreeByCompAndDept(DepartmentPO departmentBuild, CompanyPO compBuild) { + private List buildTreeByCompAndDept(DepartmentPO departmentBuild, CompPO compBuild) { List filterDeparts = getDepartmentMapper().listByFilter(departmentBuild, "showorder"); new DetachUtil(user.getUID()).filterDepartmentList(filterDeparts); // 查询分部信息 - List filterComps = getCompanyMapper().listByFilter(compBuild, "showorder"); + List filterComps = getCompMapper().listByFilter(compBuild, "showorder"); new DetachUtil(user.getUID()).filterCompanyList(filterComps); Set builderDeparts = new HashSet<>(); for (DepartmentPO departmentPO : filterDeparts) { @@ -701,19 +701,19 @@ public class JobServiceImpl extends Service implements JobService { // 添加部门的上级分部 String parentCompS = deptTrees.stream().map(SearchTree::getParentComp).collect(Collectors.joining(",")); if (!StringUtil.isEmpty(parentCompS)) { - List compsByIds = getCompanyMapper().getCompsByIds(DeleteParam.builder().ids(parentCompS).build().getIds()); + List compsByIds = getCompMapper().getCompsByIds(DeleteParam.builder().ids(parentCompS).build().getIds()); if (CollectionUtils.isNotEmpty(compsByIds)) { filterComps.addAll(compsByIds); } } - List allCompanys = getCompanyMapper().listAll("showorder"); + List allCompanys = getCompMapper().listAll("showorder"); new DetachUtil(user.getUID()).filterCompanyList(allCompanys); - Map allMaps = allCompanys.stream().collect(Collectors.toMap(CompanyPO::getId, item -> item, (k1, k2) -> k1)); - Set builderComps = new HashSet<>(); - for (CompanyPO compPO : filterComps) { + Map allMaps = allCompanys.stream().collect(Collectors.toMap(CompPO::getId, item -> item, (k1, k2) -> k1)); + Set builderComps = new HashSet<>(); + for (CompPO compPO : filterComps) { buildParentComps(compPO, builderComps, allMaps); } - return SearchTreeUtil.builderTreeMode(CompanyBO.buildSetToSearchTree(builderComps), deptTrees); + return SearchTreeUtil.builderTreeMode(CompBO.buildSetToSearchTree(builderComps), deptTrees); } diff --git a/src/com/engine/organization/thread/StaffTriggerRunnable.java b/src/com/engine/organization/thread/StaffTriggerRunnable.java index 0b129f2e..f67d412f 100644 --- a/src/com/engine/organization/thread/StaffTriggerRunnable.java +++ b/src/com/engine/organization/thread/StaffTriggerRunnable.java @@ -1,13 +1,13 @@ package com.engine.organization.thread; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.job.po.JobPO; import com.engine.organization.entity.map.JclOrgMap; import com.engine.organization.entity.staff.po.StaffPO; import com.engine.organization.entity.staff.po.StaffPlanPO; import com.engine.organization.enums.ModuleTypeEnum; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.jclorgmap.JclOrgMapper; import com.engine.organization.mapper.job.JobMapper; @@ -37,8 +37,8 @@ public class StaffTriggerRunnable implements Runnable { return MapperProxyFactory.getProxy(StaffTriggerMapper.class); } - private CompanyMapper getCompanyMapper() { - return MapperProxyFactory.getProxy(CompanyMapper.class); + private CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); } private DepartmentMapper getDepartmentMapper() { @@ -108,7 +108,7 @@ public class StaffTriggerRunnable implements Runnable { if (null == companyId) { return; } - CompanyPO compPO = getCompanyMapper().listById(companyId); + CompPO compPO = getCompMapper().listById(companyId); if (null != compPO) { updateOrgMap(ModuleTypeEnum.subcompanyfielddefined.getValue().toString(), companyId.toString()); if (null != compPO.getSupSubComId() && 0 != compPO.getSupSubComId()) { diff --git a/src/com/engine/organization/transmethod/CompTransMethod.java b/src/com/engine/organization/transmethod/CompTransMethod.java index 05a2b2ed..8fd63132 100644 --- a/src/com/engine/organization/transmethod/CompTransMethod.java +++ b/src/com/engine/organization/transmethod/CompTransMethod.java @@ -1,8 +1,8 @@ package com.engine.organization.transmethod; import com.engine.organization.entity.DeleteParam; -import com.engine.organization.entity.company.po.CompanyPO; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.entity.company.po.CompPO; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.util.db.MapperProxyFactory; import java.util.List; @@ -17,8 +17,8 @@ import java.util.stream.Collectors; public class CompTransMethod { public static String getSpanById(String planId) { - CompanyMapper compMapper = MapperProxyFactory.getProxy(CompanyMapper.class); - List maps = compMapper.getCompsByIds(DeleteParam.builder().ids(planId).build().getIds()); - return maps.stream().map(CompanyPO::getSubCompanyName).collect(Collectors.joining(",")); + CompMapper compMapper = MapperProxyFactory.getProxy(CompMapper.class); + List maps = compMapper.getCompsByIds(DeleteParam.builder().ids(planId).build().getIds()); + return maps.stream().map(CompPO::getSubCompanyName).collect(Collectors.joining(",")); } } diff --git a/src/com/engine/organization/transmethod/HrmResourceTransMethod.java b/src/com/engine/organization/transmethod/HrmResourceTransMethod.java index 188cd51e..23a5069b 100644 --- a/src/com/engine/organization/transmethod/HrmResourceTransMethod.java +++ b/src/com/engine/organization/transmethod/HrmResourceTransMethod.java @@ -1,6 +1,6 @@ package com.engine.organization.transmethod; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.hrmresource.SystemDataMapper; import com.engine.organization.mapper.job.JobMapper; @@ -19,7 +19,7 @@ public class HrmResourceTransMethod { } public static String getCompanyName(String companyId) { - return MapperProxyFactory.getProxy(CompanyMapper.class).listById(Integer.parseInt(companyId)).getSubCompanyName(); + return MapperProxyFactory.getProxy(CompMapper.class).listById(Integer.parseInt(companyId)).getSubCompanyName(); } public static String getJobName(String jobTitle) { return MapperProxyFactory.getProxy(JobMapper.class).getJobById(Long.parseLong(jobTitle)).getJobName(); diff --git a/src/com/engine/organization/util/detach/DetachUtil.java b/src/com/engine/organization/util/detach/DetachUtil.java index f67a5b97..5ad83ce5 100644 --- a/src/com/engine/organization/util/detach/DetachUtil.java +++ b/src/com/engine/organization/util/detach/DetachUtil.java @@ -1,6 +1,6 @@ package com.engine.organization.util.detach; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.job.dto.JobListDTO; import com.engine.organization.entity.job.po.JobPO; @@ -36,7 +36,7 @@ public class DetachUtil { /** * 根据分权配置过滤分部 */ - public void filterCompanyList(List companyList) { + public void filterCompanyList(List companyList) { if (DETACH && CollectionUtils.isNotEmpty(companyList)) { companyList.removeIf(item -> !jclRoleLevels.contains(item.getId())); } diff --git a/src/com/engine/organization/util/relation/EcHrmRelationUtil.java b/src/com/engine/organization/util/relation/EcHrmRelationUtil.java index 777d127b..ea0e135e 100644 --- a/src/com/engine/organization/util/relation/EcHrmRelationUtil.java +++ b/src/com/engine/organization/util/relation/EcHrmRelationUtil.java @@ -1,10 +1,10 @@ package com.engine.organization.util.relation; import com.engine.organization.entity.commom.RecordInfo; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.job.po.JobPO; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.hrmresource.SystemDataMapper; import com.engine.organization.mapper.job.JobMapper; @@ -28,8 +28,8 @@ public class EcHrmRelationUtil { return MapperProxyFactory.getProxy(SystemDataMapper.class); } - private static CompanyMapper getCompanyMapper() { - return MapperProxyFactory.getProxy(CompanyMapper.class); + private static CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); } private static DepartmentMapper getDepartmentMapper() { @@ -47,7 +47,7 @@ public class EcHrmRelationUtil { * @return */ public static String getEcCompanyId(String companyId) { - CompanyPO compPO = getCompanyMapper().listById(Integer.parseInt(companyId)); + CompPO compPO = getCompMapper().listById(Integer.parseInt(companyId)); RecordInfo supSubCompany = getSystemDataMapper().getHrmObjectByUUID(HRM_COMPANY, compPO.getUuid()); if (null == supSubCompany) { return "0"; diff --git a/src/com/engine/organization/util/saveimport/StaffInfoImportUtil.java b/src/com/engine/organization/util/saveimport/StaffInfoImportUtil.java index e096ba6b..0ed022b5 100644 --- a/src/com/engine/organization/util/saveimport/StaffInfoImportUtil.java +++ b/src/com/engine/organization/util/saveimport/StaffInfoImportUtil.java @@ -10,7 +10,7 @@ import com.engine.organization.entity.staff.bo.StaffBO; import com.engine.organization.entity.staff.param.StaffSearchParam; import com.engine.organization.entity.staff.po.StaffPO; import com.engine.organization.entity.staff.po.StaffPlanPO; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.job.JobMapper; import com.engine.organization.mapper.staff.StaffMapper; @@ -151,7 +151,7 @@ public class StaffInfoImportUtil { continue nextRow; } for (String s : split) { - parentCompanyId = MapperProxyFactory.getProxy(CompanyMapper.class).getIdByNameAndPid(s, parentCompanyId == null ? 0 : parentCompanyId); + parentCompanyId = MapperProxyFactory.getProxy(CompMapper.class).getIdByNameAndPid(s, parentCompanyId == null ? 0 : parentCompanyId); if (null == parentCompanyId) { historyDetailPO.setOperateDetail(cellValue + "分部未找到对应数据"); historyDetailPO.setStatus("0"); diff --git a/src/com/engine/organization/web/CompController.java b/src/com/engine/organization/web/CompController.java index a63a1e49..0792c28d 100644 --- a/src/com/engine/organization/web/CompController.java +++ b/src/com/engine/organization/web/CompController.java @@ -3,7 +3,7 @@ package com.engine.organization.web; import com.engine.common.util.ParamUtil; import com.engine.common.util.ServiceUtil; import com.engine.organization.entity.DeleteParam; -import com.engine.organization.entity.company.param.CompanyParam; +import com.engine.organization.entity.company.param.CompParam; import com.engine.organization.entity.department.param.DepartmentMoveParam; import com.engine.organization.util.response.ReturnResult; import com.engine.organization.wrapper.CompWrapper; @@ -43,7 +43,7 @@ public class CompController { @POST @Path("/listComp") @Produces(MediaType.APPLICATION_JSON) - public ReturnResult listComp(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody CompanyParam params) { + public ReturnResult listComp(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody CompParam params) { try { User user = HrmUserVarify.getUser(request, response); return ReturnResult.successed(getCompWrapper(user).listPage(params)); @@ -83,7 +83,7 @@ public class CompController { @POST @Path("/updateForbiddenTagById") @Produces(MediaType.APPLICATION_JSON) - public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody CompanyParam param) { + public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody CompParam param) { try { User user = HrmUserVarify.getUser(request, response); return ReturnResult.successed(getCompWrapper(user).updateForbiddenTagById(param)); diff --git a/src/com/engine/organization/wrapper/CompWrapper.java b/src/com/engine/organization/wrapper/CompWrapper.java index f9e7a7f8..05709f46 100644 --- a/src/com/engine/organization/wrapper/CompWrapper.java +++ b/src/com/engine/organization/wrapper/CompWrapper.java @@ -4,12 +4,12 @@ import com.alibaba.fastjson.JSON; import com.api.browser.bean.SearchConditionGroup; import com.engine.common.util.ServiceUtil; import com.engine.organization.annotation.Log; -import com.engine.organization.entity.company.param.CompanyParam; -import com.engine.organization.entity.company.po.CompanyPO; +import com.engine.organization.entity.company.param.CompParam; +import com.engine.organization.entity.company.po.CompPO; import com.engine.organization.entity.department.param.DepartmentMoveParam; import com.engine.organization.enums.LogModuleNameEnum; import com.engine.organization.enums.OperateTypeEnum; -import com.engine.organization.mapper.comp.CompanyMapper; +import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.service.CompService; import com.engine.organization.service.impl.CompServiceImpl; import com.engine.organization.util.MenuBtn; @@ -33,8 +33,8 @@ public class CompWrapper extends OrganizationWrapper { return ServiceUtil.getService(CompServiceImpl.class, user); } - private CompanyMapper getCompanyMapper() { - return MapperProxyFactory.getProxy(CompanyMapper.class); + private CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); } /** @@ -43,7 +43,7 @@ public class CompWrapper extends OrganizationWrapper { * @param params * @return */ - public Map listPage(CompanyParam params) { + public Map listPage(CompParam params) { return getCompService(user).listPage(params); } @@ -69,10 +69,10 @@ public class CompWrapper extends OrganizationWrapper { * @param params */ @Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新分部禁用标识", operateModule = LogModuleNameEnum.COMPANY) - public int updateForbiddenTagById(CompanyParam params) { - CompanyPO compPO = getCompanyMapper().listById(params.getId()); + public int updateForbiddenTagById(CompParam params) { + CompPO compPO = getCompMapper().listById(params.getId()); int updateForbiddenTagById = getCompService(user).updateForbiddenTagById(params); - CompanyPO newCompPO = getCompanyMapper().listById(params.getId()); + CompPO newCompPO = getCompMapper().listById(params.getId()); writeOperateLog(new Object() { }.getClass(), compPO.getSubCompanyName(), JSON.toJSONString(params), compPO, newCompPO); //TODO new Thread(new CompanyTriggerRunnable(compPO, newCompPO)).start(); @@ -88,9 +88,9 @@ public class CompWrapper extends OrganizationWrapper { @Log(operateType = OperateTypeEnum.UPDATE, operateDesc = "更新分部信息", operateModule = LogModuleNameEnum.COMPANY) public Long updateComp(Map params) { Integer id = Integer.parseInt(params.get("id").toString()); - CompanyPO compPO = getCompanyMapper().listById(id); + CompPO compPO = getCompMapper().listById(id); Long companyId = getCompService(user).updateComp(params); - CompanyPO newCompPO = getCompanyMapper().listById(id); + CompPO newCompPO = getCompMapper().listById(id); writeOperateLog(new Object() { }.getClass(), compPO.getSubCompanyName(), JSON.toJSONString(params), compPO, newCompPO); //TODO new Thread(new CompanyTriggerRunnable(compPO, newCompPO)).start(); @@ -106,9 +106,9 @@ public class CompWrapper extends OrganizationWrapper { public Map deleteByIds(List ids) { Map params = new HashMap<>(); params.put("id", StringUtils.join(ids, ",")); - List compsByIds = getCompanyMapper().getCompsByIds(ids); + List compsByIds = getCompMapper().getCompsByIds(ids); Map map = getCompService(user).deleteByIds(params); - for (CompanyPO compsById : compsByIds) { + for (CompPO compsById : compsByIds) { writeOperateLog(new Object() { }.getClass(), compsById.getSubCompanyName(), JSON.toJSONString(ids), "删除分部信息"); //TODO new CompanyTriggerRunnable(compsById).run(); @@ -124,9 +124,9 @@ public class CompWrapper extends OrganizationWrapper { */ @Log(operateType = OperateTypeEnum.MOVE, operateDesc = "转移分部", operateModule = LogModuleNameEnum.COMPANY) public int moveCompany(DepartmentMoveParam moveParam) { - CompanyPO compPO = getCompanyMapper().listById(moveParam.getId().intValue()); + CompPO compPO = getCompMapper().listById(moveParam.getId().intValue()); int moveCompany = getCompService(user).moveCompany(moveParam); - CompanyPO newCompPO = getCompanyMapper().listById(moveParam.getId().intValue()); + CompPO newCompPO = getCompMapper().listById(moveParam.getId().intValue()); writeOperateLog(new Object() { }.getClass(), compPO.getSubCompanyName(), JSON.toJSONString(moveParam), compPO, newCompPO); //TODO new Thread(new CompanyTriggerRunnable(compPO, newCompPO)).start();