Merge remote-tracking branch 'origin/develop' into feature/ml
This commit is contained in:
commit
0bcdbc9de8
|
|
@ -6,6 +6,7 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
|
|
@ -20,4 +21,6 @@ public class FormItem {
|
|||
private String id;
|
||||
private String title;
|
||||
private List<Item> items;
|
||||
|
||||
private List<Map<String, Object>> tables;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@ public class CardButtonPO {
|
|||
|
||||
private String sysDefault;
|
||||
|
||||
private Integer showOrder;
|
||||
|
||||
private Integer open;
|
||||
|
||||
private Long creator;
|
||||
|
||||
private int deleteType;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
<result column="url" property="url"/>
|
||||
<result column="roles" property="roles"/>
|
||||
<result column="sys_default" property="sysDefault"/>
|
||||
<result column="show_order" property="showOrder"/>
|
||||
<result column="open" property="open"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
|
|
@ -25,6 +27,8 @@
|
|||
, t.url
|
||||
, t.roles
|
||||
, t.sys_default
|
||||
, t.show_order
|
||||
, t.open
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.create_time
|
||||
|
|
@ -39,13 +43,13 @@
|
|||
<select id="listAll" resultType="com.engine.organization.entity.personnelcard.po.CardButtonPO">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_cardbutton t where delete_type = 0
|
||||
from jcl_org_cardbutton t where t.delete_type = 0 order by t.show_order
|
||||
</select>
|
||||
|
||||
<select id="listEnableButton" resultType="com.engine.organization.entity.personnelcard.po.CardButtonPO">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_cardbutton t where t.delete_type = 0 and t.status = 1
|
||||
from jcl_org_cardbutton t where t.delete_type = 0 and t.status = 1 order by t.show_order
|
||||
</select>
|
||||
<select id="listAllId" resultType="java.lang.Long">
|
||||
select t.id
|
||||
|
|
|
|||
|
|
@ -116,13 +116,15 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
|
|||
resultMap.put("id", item.getId());
|
||||
resultMap.put("name", item.getName());
|
||||
resultMap.put("status", "");
|
||||
resultMap.put("url", item.getUrl());
|
||||
resultMap.put("roles", item.getRoles());
|
||||
resultMap.put("rolesspan", SystemTransMethod.getRoleName(item.getRoles()));
|
||||
|
||||
if (1 == item.getStatus()) {
|
||||
isUsed.add(index.get());
|
||||
}
|
||||
index.getAndIncrement();
|
||||
resultMap.put("url", item.getUrl());
|
||||
resultMap.put("roles", item.getRoles());
|
||||
resultMap.put("rolesspan", SystemTransMethod.getRoleName(item.getRoles()));
|
||||
|
||||
return resultMap;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
|
@ -149,6 +151,10 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
|
|||
recordData.put("status", params.get("status" + recordIndex));
|
||||
recordData.put("url", params.get("url" + recordIndex));
|
||||
recordData.put("roles", params.get("roles" + recordIndex));
|
||||
// 排序字段
|
||||
recordData.put("show_order", i);
|
||||
// 预留字段
|
||||
// recordData.put("open", null);
|
||||
String id = Util.null2String(params.get("id" + recordIndex));
|
||||
if (StringUtils.isNotBlank(id)) {
|
||||
// 更新
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
for (String key : keys) {
|
||||
resultMap.put(key.toLowerCase(), item.get(key));
|
||||
}
|
||||
resultMap.put("viewAttr", finalCheckRight ? 2 : 1);
|
||||
resultMap.put("viewAttr", finalCheckRight ? viewAttr : 1);
|
||||
return resultMap;
|
||||
}).collect(Collectors.toList());
|
||||
tabinfoMap.put("datas", collect);
|
||||
|
|
|
|||
|
|
@ -249,9 +249,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|||
if (CollectionUtils.isEmpty(titlesByGroupID)) {
|
||||
// 删除整个分组
|
||||
getExtendGroupMapper().delete(param.getGroupType());
|
||||
if (4 == param.getGroupType()) {
|
||||
getCardAccessService(user).deleteByIds(DeleteParam.builder().ids(param.getGroupType().toString()).build().getIds());
|
||||
}
|
||||
getCardAccessService(user).deleteByIds(DeleteParam.builder().ids(param.getGroupType().toString()).build().getIds());
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.organization.service.impl;
|
|||
|
||||
import com.engine.common.service.HrmCommonService;
|
||||
import com.engine.common.service.impl.HrmCommonServiceImpl;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.extend.ExtendInfoOperateType;
|
||||
import com.engine.organization.entity.extend.bo.ExtendGroupBO;
|
||||
|
|
@ -106,7 +107,12 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
|
|||
if (CollectionUtils.isEmpty(formItem.getItems())) {
|
||||
continue;
|
||||
}
|
||||
// 处理明细表数据
|
||||
List<Map<String, Object>> detailList = ServiceUtil.getService(ExtServiceImpl.class, user).getExtendTables(user, "4", groupPO.getId(), "JCL_ORG_HRMRESOURCEEXT_DT1", uId, 1, false);
|
||||
formItem.setTables(detailList);
|
||||
|
||||
formItemList.add(formItem);
|
||||
|
||||
}
|
||||
// 所有锚点
|
||||
List<Anchor> anchorList = new ArrayList<>();
|
||||
|
|
@ -228,18 +234,15 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
|
|||
// 人员信息有误,返回false
|
||||
OrganizationAssert.notBlank(userId, "未获取到对应人员");
|
||||
|
||||
// 系统管理员、查看本人卡片直接返回true
|
||||
if (user.isAdmin() || userId.equals(String.valueOf(user.getUID()))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean hasAccess = false;
|
||||
CardAccessPO cardAccessPO = MapperProxyFactory.getProxy(CardAccessMapper.class).selectById(typeId);
|
||||
if (null == cardAccessPO) {
|
||||
if (null == cardAccessPO || 0 == cardAccessPO.getStatus()) {
|
||||
// 未配置相应数据、或者未启用返回false
|
||||
return false;
|
||||
}
|
||||
// 所有人,返回true
|
||||
if (1 == cardAccessPO.getAllPeople()) {
|
||||
|
||||
// 系统管理员、查看本人卡片,或者所有人有权限直接返回true
|
||||
if (user.isAdmin() || userId.equals(String.valueOf(user.getUID())) || 1 == cardAccessPO.getAllPeople()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue