package com.engine.organization.service.impl; import com.engine.core.impl.Service; import com.engine.organization.entity.extend.ExtendInfoOperateType; import com.engine.organization.entity.extend.bo.ExtendGroupBO; import com.engine.organization.entity.extend.param.ExtendInfoParams; import com.engine.organization.entity.extend.po.ExtendGroupPO; import com.engine.organization.entity.extend.po.ExtendInfoPO; import com.engine.organization.entity.extend.po.ExtendTitlePO; import com.engine.organization.entity.personnelcard.*; import com.engine.organization.mapper.extend.ExtMapper; import com.engine.organization.mapper.extend.ExtendGroupMapper; import com.engine.organization.mapper.extend.ExtendInfoMapper; import com.engine.organization.mapper.extend.ExtendTitleMapper; import com.engine.organization.mapper.hrmresource.HrmResourceMapper; import com.engine.organization.mapper.personnelcard.PersonnelCardMapper; import com.engine.organization.service.HrmPersonnelCardService; import com.engine.organization.util.OrganizationAssert; import com.engine.organization.util.db.MapperProxyFactory; import com.engine.organization.util.field.FieldDefinedValueUtil; import com.engine.portal.biz.constants.ModuleConstants; import com.engine.portal.biz.nonstandardfunction.SysModuleInfoBiz; import weaver.blog.BlogShareManager; import weaver.cowork.CoworkShareManager; import weaver.crm.CrmShareBase; import weaver.docs.search.DocSearchComInfo; import weaver.general.Util; import weaver.workflow.search.WorkflowRequestUtil; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; /** * @author:dxfeng * @createTime: 2022/10/08 * @version: 1.0 */ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnelCardService { private static final String IS_SHOW = "1"; private PersonnelCardMapper getPersonnelCardMapper() { return MapperProxyFactory.getProxy(PersonnelCardMapper.class); } private ExtendGroupMapper getExtendGroupMapper() { return MapperProxyFactory.getProxy(ExtendGroupMapper.class); } private ExtendTitleMapper getExtendTitleMapper() { return MapperProxyFactory.getProxy(ExtendTitleMapper.class); } private ExtendInfoMapper getExtendInfoMapper() { return MapperProxyFactory.getProxy(ExtendInfoMapper.class); } private ExtMapper getExtMapper() { return MapperProxyFactory.getProxy(ExtMapper.class); } private HrmResourceMapper getHrmResourceMapper() { return MapperProxyFactory.getProxy(HrmResourceMapper.class); } @Override public Map getPersonnelCard(Long uId) { Map resultMap = new HashMap<>(); User userInfo; //TODO 人员表之前关联关系,处理UID if (null == uId) { uId = getHrmResourceMapper().getJclResourceId(Util.null2String(user.getUID())); } userInfo = getPersonnelCardMapper().getUserById(uId); OrganizationAssert.notNull(uId, "未找到对应数据"); // 人员基本信息 // 统计报表 Statistical statistical = getStatistical(uId.toString()); List extendGroupList = getExtendGroupMapper().listByType(4, IS_SHOW); // 获取前三个模块的信息 List formItemList = new ArrayList<>(); for (ExtendGroupPO groupPO : extendGroupList) { FormItem formItem = getFormItem(groupPO, uId); formItemList.add(formItem); } // 所有锚点 List anchorList = new ArrayList<>(); // 添加字段分组信息 for (ExtendGroupPO extendGroupPO : extendGroupList) { anchorList.add(Anchor.builder().id("group_" + extendGroupPO.getId()).title(extendGroupPO.getGroupName()).build()); } // 添加拓展页面信息 List resourceBaseTabList = getPersonnelCardMapper().getResourceBaseTabList(); for (ResourceBaseTab resourceBaseTab : resourceBaseTabList) { anchorList.add(Anchor.builder().id("tab_" + resourceBaseTab.getId()).title(resourceBaseTab.getGroupName()).build()); } resultMap.put("user", userInfo); resultMap.put("statistical", statistical); resultMap.put("formItems", formItemList); resultMap.put("anchorList", anchorList); resultMap.put("iframeList", getIframeList()); return resultMap; } @Override public List