Commit 19739748 authored by chenhao's avatar chenhao

同步代码

parent 4514aac2
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
...@@ -11,19 +14,56 @@ import java.util.stream.Collectors; ...@@ -11,19 +14,56 @@ import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.CheckObjectDto;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyDto;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.dto.ESOrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto; import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto; import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrzhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.dto.UserUnitDto;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
import com.yeejoin.amos.boot.module.common.api.enums.UserRolesEnum;
import com.yeejoin.amos.boot.module.common.api.enums.UserUnitTypeEnum;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper; import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService; import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService; import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
/** /**
* 机构/部门/人员表 服务实现类 * 机构/部门/人员表 服务实现类
...@@ -153,13 +193,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -153,13 +193,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return resultList; return resultList;
} }
@SuppressWarnings("unchecked")
@Override @Override
public List<OrgMenuDto> getSub(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL, public List<OrgMenuDto> getSub(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL,
String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName, String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName,
String OrgTypeMethodName) throws Exception { String OrgTypeMethodName) throws Exception {
List<OrgMenuDto> childList = new ArrayList<>(); List<OrgMenuDto> childList = new ArrayList<>();
@SuppressWarnings("rawtypes")
Class clazz = Class.forName(packageURL); Class clazz = Class.forName(packageURL);
Method IDMethodNameme = null; Method IDMethodNameme = null;
switch (IDHierarchy) { switch (IDHierarchy) {
...@@ -397,13 +435,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -397,13 +435,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
private void updateChildOrgCode(String oriOrgCode, String targetOrgCode) { private void updateChildOrgCode(String oriOrgCode, String targetOrgCode) {
List<OrgUsr> list = queryOrgUsrList(oriOrgCode); List<OrgUsr> list = queryOrgUsrList(oriOrgCode);
if (ObjectUtils.isEmpty(list)) { if (!ObjectUtils.isEmpty(list)) {
return;
}
list.forEach(action -> { list.forEach(action -> {
action.setBizOrgCode(action.getBizOrgCode().replace(oriOrgCode, targetOrgCode)); action.setBizOrgCode(action.getBizOrgCode().replace(oriOrgCode, targetOrgCode));
updateById(action); updateById(action);
}); });
}
} }
public List<OrgUsr> queryOrgUsrList(String bizOrgCode) { public List<OrgUsr> queryOrgUsrList(String bizOrgCode) {
...@@ -977,6 +1014,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -977,6 +1014,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// BUG 2736 人员导出过滤已经删除的数据by kongfm // BUG 2736 人员导出过滤已经删除的数据by kongfm
public List<OrgUsrDto> queryForListByParentIdAndOrgType(Long parentId, String bizOrgType, Boolean isDelete) { public List<OrgUsrDto> queryForListByParentIdAndOrgType(Long parentId, String bizOrgType, Boolean isDelete) {
return this.queryForList(null, false, parentId, bizOrgType, isDelete); return this.queryForList(null, false, parentId, bizOrgType, isDelete);
}
public List<OrgUsrDto> queryForListByParentIdAndOrgType(Long parentId, String bizOrgType) { public List<OrgUsrDto> queryForListByParentIdAndOrgType(Long parentId, String bizOrgType) {
return Bean.toModels(this.list(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getIsDelete,false).eq(OrgUsr::getParentId,parentId).eq(OrgUsr::getBizOrgType,bizOrgType)), this.getModelClass()); return Bean.toModels(this.list(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getIsDelete,false).eq(OrgUsr::getParentId,parentId).eq(OrgUsr::getBizOrgType,bizOrgType)), this.getModelClass());
...@@ -1386,7 +1424,6 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1386,7 +1424,6 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
List<OrgUsr> orgUsrList = this.baseMapper.selectList(wrapper); List<OrgUsr> orgUsrList = this.baseMapper.selectList(wrapper);
return orgUsrList; return orgUsrList;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment