Merge pull request '岗位按钮 人员字段权限 人员卡片权限' (#45) from feature/dxf into develop

Reviewed-on: #45
pull/47/head
dxfeng 2 years ago
commit 2b317e3d67

@ -180,7 +180,10 @@ public class JobBrowserService extends BrowserService {
if (detachUtil.isDETACH()) {
if (CollectionUtils.isNotEmpty(jclRoleLevelList)) {
compList = MapperProxyFactory.getProxy(CompMapper.class).getCompsByIds(jclRoleLevelList);
detachUtil.filterCompanyList(compList);
// 处理上下级关系
Set<Long> collectIds = compList.stream().map(CompPO::getId).collect(Collectors.toSet());
compList.removeIf(item->collectIds.contains(item.getParentCompany()));
} else {
compList = new ArrayList<>();
}

@ -102,8 +102,8 @@ public class ExtendInfoBO {
.extendGroupId(extendGroupId)
.isenable("1".equals(infoFieldParam.getEnable()) ? 1 : 0)
.isrequired("1".equals(infoFieldParam.getRequired()) ? 1 : 0)
.isModify("1".equals(infoFieldParam.getIsModify()) ? 1 : 0)
.listShow(1)
// .editShow("0".equals(infoFieldParam.getIsModify()) ? 0 : 1)
.editShow(1)
.addShow(1)
.browserShow(1)

@ -111,6 +111,22 @@ public class ExtendInfoPO {
private Integer isSystemDefault;
/**
*
*/
private Integer isModify;
/**
*
*/
private Integer modifyProps;
/**
* check
*/
private Integer checkProps;
private Long creator;
private int deleteType;
private Date createTime;

@ -18,7 +18,7 @@ import org.apache.commons.lang3.StringUtils;
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class User {
public class UserCard {
private Integer id;
private String ecId;
private String image;

@ -21,6 +21,9 @@
<result column="custom_value" property="customValue"/>
<result column="show_order" property="showOrder"/>
<result column="is_system_default" property="isSystemDefault"/>
<result column="ismodify" property="isModify"/>
<result column="modify_props" property="modifyProps"/>
<result column="check_props" property="checkProps"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="create_time" property="createTime"/>
@ -50,6 +53,9 @@
, t.custom_value
, t.show_order
, t.is_system_default
, t.ismodify
, t.modify_props
, t.check_props
, t.creator
, t.delete_type
, t.create_time
@ -126,6 +132,11 @@
<if test="isSystemDefault != null ">
is_system_default,
</if>
<if test="isModify != null ">
ismodify,
</if>
check_props,
modify_props,
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="creator != null">
@ -194,6 +205,11 @@
<if test="isSystemDefault != null ">
#{isSystemDefault},
</if>
<if test="isModify != null ">
#{isModify},
</if>
2,
2,
</trim>
</insert>
@ -270,6 +286,11 @@
<if test="isSystemDefault != null ">
is_system_default,
</if>
<if test="isModify != null ">
ismodify,
</if>
check_props,
modify_props,
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="creator != null">
@ -338,6 +359,11 @@
<if test="isSystemDefault != null ">
#{isSystemDefault},
</if>
<if test="isModify != null ">
#{isModify},
</if>
2,
2,
</trim>
</insert>
<update id="addTableColumn">
@ -351,6 +377,7 @@
field_name_desc=#{fieldNameDesc},
isenable=#{isenable},
isrequired=#{isrequired},
ismodify=#{isModify},
show_order=#{showOrder},
custom_value=#{customValue},
</set>

@ -1,13 +1,11 @@
package com.engine.organization.mapper.personnelcard;
import com.engine.organization.entity.detach.po.ManagerDetachPO;
import com.engine.organization.entity.personnelcard.po.CardAccessPO;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author weaver_cl
@ -23,7 +21,7 @@ public interface CardAccessMapper {
int deleteByIds(@Param("ids") Collection<Long> ids);
ManagerDetachPO selectById(@Param("id") Integer id);
CardAccessPO selectById(@Param("id") Integer id);
int updateTabName(@Param("name")String name,@Param("id") Integer id);
}

@ -1,7 +1,7 @@
package com.engine.organization.mapper.personnelcard;
import com.engine.organization.entity.personnelcard.ResourceBaseTab;
import com.engine.organization.entity.personnelcard.User;
import com.engine.organization.entity.personnelcard.UserCard;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -18,7 +18,7 @@ public interface PersonnelCardMapper {
* @param id
* @return
*/
User getUserById(@Param("id") Long id);
UserCard getUserById(@Param("id") Long id);
/**
*

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.organization.mapper.personnelcard.PersonnelCardMapper">
<resultMap id="UserMap" type="com.engine.organization.entity.personnelcard.User">
<resultMap id="UserMap" type="com.engine.organization.entity.personnelcard.UserCard">
<result column="id" property="id"/>
<result column="resource_image_id" property="image"/>
<result column="last_name" property="name"/>

@ -1,17 +1,23 @@
package com.engine.organization.service.impl;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.common.service.HrmCommonService;
import com.engine.common.service.impl.HrmCommonServiceImpl;
import com.engine.core.impl.Service;
import com.engine.organization.component.OrganizationWeaTable;
import com.engine.organization.entity.detach.vo.ManagerDetachVO;
import com.engine.organization.entity.personnelcard.po.CardAccessPO;
import com.engine.organization.entity.personnelcard.vo.CardAccessVO;
import com.engine.organization.exception.OrganizationRunTimeException;
import com.engine.organization.mapper.personnelcard.CardAccessMapper;
import com.engine.organization.service.CardAccessService;
import com.engine.organization.util.HasRightUtil;
import com.engine.organization.util.OrganizationAssert;
import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.lang.StringUtils;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.hrm.resource.ResourceComInfo;
import java.util.*;
@ -25,10 +31,15 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
private static final String RIGHT_NAME = "CardAccess:All";
private CardAccessMapper getCardAccessMapper() {
private static CardAccessMapper getCardAccessMapper() {
return MapperProxyFactory.getProxy(CardAccessMapper.class);
}
public CardAccessServiceImpl(User user) {
super();
this.user = user;
}
@Override
public Map<String, Object> tablePage() {
Map<String, Object> resultMap = new HashMap<>();
@ -57,13 +68,13 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
List<HashMap<String, Object>> dataList = new ArrayList<>();
for (int i = 0; i < rowNum; i++) {
HashMap<String, Object> data = new HashMap<>();
data.put("id",params.get("id_"+i));
data.put("status",params.get("status_"+i));
data.put("allPeople",params.get("all_people_"+i));
data.put("superior",params.get("superior_"+i));
data.put("allSuperior",params.get("all_superior_"+i));
data.put("custom",params.get("custom"+i));
data.put("updateTime",new Date());
data.put("id", params.get("id_" + i));
data.put("status", params.get("status_" + i));
data.put("allPeople", params.get("all_people_" + i));
data.put("superior", params.get("superior_" + i));
data.put("allSuperior", params.get("all_superior_" + i));
data.put("custom", params.get("custom" + i));
data.put("updateTime", new Date());
dataList.add(data);
}
return getCardAccessMapper().saveCardAccess(dataList);
@ -80,9 +91,64 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
}
@Override
public int updateTabName(String name,Integer id) {
return getCardAccessMapper().updateTabName(name,id);
public int updateTabName(String name, Integer id) {
return getCardAccessMapper().updateTabName(name, id);
}
/**
*
*
* @param typeId ID
* @param userId EcId
* @return
*/
public boolean hasGroupAccess(Integer typeId, String userId) {
// 人员信息有误,返回false
OrganizationAssert.notBlank(userId, "未获取到对应人员");
// 系统管理员、查看本人卡片直接返回true
if (user.isAdmin() || userId.equals(String.valueOf(user.getUID()))) {
return true;
}
boolean hasAccess = false;
CardAccessPO cardAccessPO = getCardAccessMapper().selectById(typeId);
OrganizationAssert.notNull(cardAccessPO, "未查询到对应卡片权限,");
// 所有人返回true
if (1 == cardAccessPO.getAllPeople()) {
return true;
}
try {
ResourceComInfo resourceComInfo = new ResourceComInfo();
// 上级
if ("1".equals(Util.null2String(cardAccessPO.getSuperior()))) {
String managerID = resourceComInfo.getManagerID(userId);
hasAccess = Arrays.asList(managerID.split(",")).contains(Util.null2String(user.getUID()));
}
// 所有上级
if (!hasAccess || "1".equals(Util.null2String(cardAccessPO.getAllSuperior()))) {
String managersIDs = resourceComInfo.getManagersIDs(userId);
hasAccess = hasAccess || Arrays.asList(managersIDs.split(",")).contains(Util.null2String(user.getUID()));
}
} catch (Exception e) {
new BaseBean().writeLog(e);
throw new OrganizationRunTimeException("人员卡片权限");
}
// 角色判断
if (!hasAccess || StringUtils.isNotBlank(cardAccessPO.getCustom())) {
List<String> accessRoleIds = Arrays.asList(cardAccessPO.getCustom().split(","));
HrmCommonService hrmCommonService = new HrmCommonServiceImpl();
List<Object> roleInfo = hrmCommonService.getRoleInfo(user.getUID());
for (Object o : roleInfo) {
Map<String, String> roleDetailMap = (Map<String, String>) o;
int roleid = Util.getIntValue(roleDetailMap.get("roleid"), -1);
// 判断角色是否满足,角色等级是否满足
hasAccess = hasAccess || accessRoleIds.contains(Util.null2String(roleid));
}
}
return hasAccess;
}
}

@ -61,7 +61,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
}
private CardAccessService getCardAccessService(User user) {
return ServiceUtil.getService(CardAccessServiceImpl.class,user);
return ServiceUtil.getService(CardAccessServiceImpl.class, user);
}
@ -217,22 +217,26 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
//默认新增title
ExtendTitlePO extendTitlePO = buildExtendTitleType(extendGroupPO, 1);
MapperProxyFactory.getProxy(ExtendTitleMapper.class).insertIgnoreNull(extendTitlePO);
CardAccessPO cardAccessPO = CardAccessPO.builder()
.typeId(extendGroupPO.getId().intValue())
.typeName(fieldTypeTreeParam.getName())
.status(1)
.allPeople(0)
.superior(0)
.allSuperior(0)
.creator((long)user.getUID())
.deleteType(0)
.createTime(new Date())
.updateTime(new Date())
.build();
getCardAccessService(user).addData(cardAccessPO);
if (4 == moduleTypeEnum.getValue()) {
CardAccessPO cardAccessPO = CardAccessPO.builder()
.typeId(extendGroupPO.getId().intValue())
.typeName(fieldTypeTreeParam.getName())
.status(1)
.allPeople(0)
.superior(0)
.allSuperior(0)
.creator((long) user.getUID())
.deleteType(0)
.createTime(new Date())
.updateTime(new Date())
.build();
getCardAccessService(user).addData(cardAccessPO);
}
} else {
MapperProxyFactory.getProxy(ExtendGroupMapper.class).update(fieldTypeTreeParam.getId(), fieldTypeTreeParam.getName());
getCardAccessService(user).updateTabName(fieldTypeTreeParam.getName(),fieldTypeTreeParam.getId().intValue());
if (4 == moduleTypeEnum.getValue()) {
getCardAccessService(user).updateTabName(fieldTypeTreeParam.getName(), fieldTypeTreeParam.getId().intValue());
}
}
}
@ -245,7 +249,9 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
if (CollectionUtils.isEmpty(titlesByGroupID)) {
// 删除整个分组
getExtendGroupMapper().delete(param.getGroupType());
getCardAccessService(user).deleteByIds(DeleteParam.builder().ids(param.getGroupType().toString()).build().getIds());
if (4 == param.getGroupType()) {
getCardAccessService(user).deleteByIds(DeleteParam.builder().ids(param.getGroupType().toString()).build().getIds());
}
return 1;
}
return 0;
@ -371,9 +377,13 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
recordInfo.put("fieldname", fieldName);
recordInfo.put("fieldType", fieldType);
recordInfo.put("fieldTypeObj", fieldTypeObj);
// 启用是否勾选
recordInfo.put("enable", Util.null2String(extendInfoPO.getIsenable()));
// 必填是否勾选
recordInfo.put("required", Util.null2String(extendInfoPO.getIsrequired()));
recordInfo.put("isModify", Util.null2String(extendInfoPO.getEditShow()));
// 允许修改是否勾选
recordInfo.put("isModify", Util.null2String(extendInfoPO.getIsModify()));
// 勾选框是否可选
recordInfo.put("viewAttr", isUsed || isSysField ? 1 : 2);
recordInfo.put("key", "" + showOrder);
recordInfo.put("fieldidrowKey", fieldIdRowKey);
@ -387,9 +397,23 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
//允许个人修改字段check框属性
Map<String, Object> checkPropsModifyInfo = new HashMap<>();
checkPropsEnableInfo.put("viewAttr", !isSysField ? 2 : 1);
checkPropsModifyInfo.put("viewAttr", !isSysField ? 2 : 1);
checkPropsRequiredInfo.put("viewAttr", !isSysField ? 2 : 1);
// 1:只读2可编辑,
Integer checkProps = extendInfoPO.getCheckProps();
if (null == checkProps) {
checkProps = 1;
}
// 1:只读2可编辑,
Integer modifyProps = extendInfoPO.getModifyProps();
if (null == modifyProps) {
modifyProps = 1;
}
// 启用列是否可编辑
checkPropsEnableInfo.put("viewAttr", checkProps);
// 必填列是否可编辑
checkPropsRequiredInfo.put("viewAttr", checkProps);
//允许个人修改列是否可编辑
checkPropsModifyInfo.put("viewAttr", modifyProps);
checkPropsInfo.put("enable", checkPropsEnableInfo);
checkPropsInfo.put("required", checkPropsRequiredInfo);

@ -73,8 +73,7 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
@Override
public Map<String, Object> getPersonnelCard(Long uId) {
Map<String, Object> resultMap = new HashMap<>();
User userInfo;
//TODO 人员表之前关联关系处理UID
UserCard userInfo;
if (null == uId) {
uId = getHrmResourceMapper().getJclResourceId(Util.null2String(user.getUID()));
}
@ -88,7 +87,11 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
// 统计报表
Statistical statistical = getStatistical(ecResourceId);
List<ExtendGroupPO> extendGroupList = getExtendGroupMapper().listByType(4, IS_SHOW);
// 获取前三个模块的信息
// 过滤卡片权限
CardAccessServiceImpl cardAccessService = new CardAccessServiceImpl(user);
extendGroupList.removeIf(item -> !cardAccessService.hasGroupAccess(item.getId().intValue(), ecResourceId));
// 获取所有模块的信息
List<FormItem> formItemList = new ArrayList<>();
for (ExtendGroupPO groupPO : extendGroupList) {
FormItem formItem = getFormItem(groupPO, uId);

@ -348,15 +348,17 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
@Override
public Map<String, Object> getHasRight() {
Map<String, Object> btnDatas = new HashMap<>();
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
btnDatas.put("topMenu", topMenuList);
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("custom").menuIcon("icon-coms-task-list").menuName("显示列定制").type("BTN_COLUMN").build());
rightMenuList.add(MenuBtn.rightMenu_btnLog());
btnDatas.put("rightMenu", rightMenuList);
btnDatas.put("hasRight", HasRightUtil.hasRight(user, RIGHT_NAME, true));
if (HasRightUtil.hasRight(user, RIGHT_NAME, true)) {
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
btnDatas.put("topMenu", topMenuList);
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("custom").menuIcon("icon-coms-task-list").menuName("显示列定制").type("BTN_COLUMN").build());
rightMenuList.add(MenuBtn.rightMenu_btnLog());
btnDatas.put("rightMenu", rightMenuList);
}
btnDatas.put("hasRight", true);
return btnDatas;
}
@ -631,7 +633,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
Map<Long, CompPO> allMaps = allCompanys.stream().collect(Collectors.toMap(CompPO::getId, item -> item, (k1, k2) -> k1));
Set<CompPO> builderComps = new HashSet<>();
for (CompPO compPO : filterComps) {
buildParentComps(compPO, builderComps,allMaps);
buildParentComps(compPO, builderComps, allMaps);
}
return SearchTreeUtil.builderTreeMode(CompBO.buildSetToSearchTree(builderComps), searchTrees);
}
@ -706,11 +708,11 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
* @param compPO
* @param builderComps
*/
private void buildParentComps(CompPO compPO, Set<CompPO> builderComps,Map<Long, CompPO> allMaps) {
private void buildParentComps(CompPO compPO, Set<CompPO> builderComps, Map<Long, CompPO> allMaps) {
builderComps.add(compPO);
CompPO parentComp = allMaps.get(compPO.getParentCompany());
if (null != parentComp) {
buildParentComps(parentComp, builderComps,allMaps);
buildParentComps(parentComp, builderComps, allMaps);
}
}
@ -736,7 +738,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
// 人员状态
String status = Util.null2String(params.get("status"));
if(StringUtils.isBlank(status)){
if (StringUtils.isBlank(status)) {
params.put("status", "0");
}
}

@ -141,9 +141,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields(extendType, "", tableName, ExtendInfoOperateType.LIST.getValue(), "1");
List<ExtendInfoPO> filterList = infoPOList.stream().filter(item -> !excludeFields.contains(item.getFieldName()) && 6 != item.getControlType()).collect(Collectors.toList());
List<FieldTransferParam> fieldDatas = filterList.stream().map(item -> FieldTransferParam.builder().id(item.getId().toString()).name(item.getFieldNameDesc()).build()).collect(Collectors.toList());
//fieldDatas.addAll(0, includeFields);
List<String> selectedKeys = filterList.stream().filter(item -> (0 == item.getIsSystemDefault()) && 1 == item.getIsrequired()).map(item -> item.getId().toString()).collect(Collectors.toList());
//selectedKeys.addAll(0, selectedList);
returnMaps.put("data", fieldDatas);
returnMaps.put("selectedKeys", selectedKeys);
@ -203,37 +201,12 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
returnMap.put("pId", jobImport(operateType, excelFile));
break;
case "resource":
//Long importHistoryId = saveImportLog("resource", operateType);
//HrmImportAdaptExcelE9 importAdapt = new HrmImportAdaptExcelE9();
//FileUploadToPath fu = new FileUploadToPath(request);
//
//List<String> errorInfo = importAdapt.creatImportMap(fu);
//
////如果读取数据和验证模板没有发生错误
//if (errorInfo.isEmpty()) {
// Map<String, HrmResourceVo> hrMap = importAdapt.getHrmImportMap();
//
// HrmImportProcessE9 importProcess = new HrmImportProcessE9();
// importProcess.init(request, importHistoryId);
//
//
// importProcess.processMap(hrMap);
//} else {
// for (String s : errorInfo) {
// MapperProxyFactory.getProxy(JclImportHistoryDetailMapper.class).insertHistoryDetail(JclImportHistoryDetailPO.builder().pid(importHistoryId).operateDetail(Util.null2String(s)).status("0").build());
// }
//}
//returnMap.put("pId", importHistoryId);
returnMap.put("pId", hrmResourceImport(operateType, excelFile,keyField));
break;
default:
break;
}
}
// 列表
// importstatus
return returnMap;
}

@ -4,7 +4,7 @@ import com.engine.organization.entity.company.po.CompPO;
import com.engine.organization.entity.hrmresource.po.HrmResourcePO;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.map.JclOrgMap;
import com.engine.organization.entity.personnelcard.User;
import com.engine.organization.entity.personnelcard.UserCard;
import com.engine.organization.entity.staff.po.StaffPO;
import com.engine.organization.enums.ModuleTypeEnum;
import com.engine.organization.mapper.comp.CompMapper;
@ -77,7 +77,7 @@ public class CompanyTriggerRunnable implements Runnable {
jclMap.setFLeaderJobId(hrmResourcePO.getJobTitle().intValue());
jclMap.setFLeaderSt(hrmResourcePO.getJobGrade());
jclMap.setFLeaderLv(hrmResourcePO.getJobLevel());
String image = User.builder().image(hrmResourcePO.getResourceImageId()).build().getImage();
String image = UserCard.builder().image(hrmResourcePO.getResourceImageId()).build().getImage();
jclMap.setFLeaderImg(image);
if (null != hrmResourcePO.getJobTitle()) {
JobPO jobById = MapperProxyFactory.getProxy(JobMapper.class).getJobById(hrmResourcePO.getJobTitle());

@ -5,7 +5,7 @@ import com.engine.organization.entity.hrmresource.po.HrmResourcePO;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.logview.bo.FieldBaseEquator;
import com.engine.organization.entity.map.JclOrgMap;
import com.engine.organization.entity.personnelcard.User;
import com.engine.organization.entity.personnelcard.UserCard;
import com.engine.organization.entity.staff.po.StaffPO;
import com.engine.organization.enums.ModuleTypeEnum;
import com.engine.organization.mapper.department.DepartmentMapper;
@ -113,7 +113,7 @@ public class DepartmentTriggerRunnable implements Runnable {
jclMap.setFLeaderJobId(hrmResourcePO.getJobTitle().intValue());
jclMap.setFLeaderSt(hrmResourcePO.getJobGrade());
jclMap.setFLeaderLv(hrmResourcePO.getJobLevel());
String image = User.builder().image(hrmResourcePO.getResourceImageId()).build().getImage();
String image = UserCard.builder().image(hrmResourcePO.getResourceImageId()).build().getImage();
jclMap.setFLeaderImg(image);
if (null != hrmResourcePO.getJobTitle()) {
JobPO jobById = MapperProxyFactory.getProxy(JobMapper.class).getJobById(hrmResourcePO.getJobTitle());

@ -3,7 +3,7 @@ package com.engine.organization.thread;
import com.engine.organization.entity.hrmresource.po.HrmResourcePO;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.map.JclOrgMap;
import com.engine.organization.entity.personnelcard.User;
import com.engine.organization.entity.personnelcard.UserCard;
import com.engine.organization.mapper.hrmresource.HrmResourceMapper;
import com.engine.organization.mapper.jclorgmap.JclOrgMapper;
import com.engine.organization.mapper.job.JobMapper;
@ -66,7 +66,7 @@ public class HrmResourceTriggerRunnable implements Runnable {
jclMap.setUuid(hrmResource.getUuid());
delete = hrmResource.getStatus() < 4 ? 0 : 1;
// 展示为花名册上传的照片
String image = User.builder().image(hrmResource.getResourceImageId()).build().getImage();
String image = UserCard.builder().image(hrmResource.getResourceImageId()).build().getImage();
jclMap.setFLeaderImg(image);
jclMap.setFLeaderName(hrmResource.getLastName());
jclMap.setFLeaderJobId(hrmResource.getJobTitle().intValue());

@ -2,10 +2,10 @@ package com.engine.organization.transmethod;
import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.hrmresource.HrmResourceMapper;
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
import com.engine.organization.mapper.job.JobMapper;
import com.engine.organization.util.db.MapperProxyFactory;
import weaver.hrm.User;
/**
* @author:dxfeng
@ -26,7 +26,7 @@ public class HrmResourceTransMethod {
}
public static String getManagerName(String managerId) {
return MapperProxyFactory.getProxy(HrmResourceMapper.class).getLastNameById(Long.parseLong(managerId));
return new User(Integer.parseInt(managerId)).getLastname();
}
public static String getScDepartmentName(String departmentId) {

@ -979,7 +979,7 @@ public class ResourceSyncUtil {
}
public static Map<String,Object> convertEcResourceParams(Map<String, Object> params){
// TODO 先查询原有EC人员信息再封装传参
// 先查询原有EC人员信息再封装传参
Map<String, Object> convertParams = new HashMap<>();
String jclResourceId = Util.null2String(params.get("id"));
String ecResourceId = "";

@ -780,8 +780,6 @@ public class HrmImportProcessE9 extends BaseBean {
flag = false;
if (updateWorkData(vo.getWorkFields(), vo.getWorkFieldsValue(), id)) //添加工作字段信息
flag = false;
// TODO 更新聚才林相关字段
// CusFieldDataTrigger.run((long) id);
}
/*添加人员缓存人员默认按id显示顺序,HrmResource_Trigger_Insert 人员共享 入职维护项目状态*/
@ -1394,9 +1392,6 @@ public class HrmImportProcessE9 extends BaseBean {
if (updateWorkData(vo.getWorkFields().trim(), vo.getWorkFieldsValue(), keyMap.get(key)))
flag = false;
//TODO 更新聚才林相关字段
//CusFieldDataTrigger.run((long) keyMap.get(key));
/*update HrmResource_Trigger */
if (flag) {
recordSet.executeSql("select id from HrmResource_Trigger where id=" + hrmId);

Loading…
Cancel
Save