From 47fb84d10de838b5ffd16ff1aca7da9da61f71f6 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Mon, 20 Jan 2025 17:11:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E6=A0=8F=E7=9B=AE=E8=AE=BE=E7=BD=AE=20=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=9C=AA=E6=89=BE=E5=88=B0=20=E6=94=BE?= =?UTF-8?q?=E5=BC=80=E6=89=80=E6=9C=89=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/service/impl/CardAccessServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/engine/organization/service/impl/CardAccessServiceImpl.java b/src/com/engine/organization/service/impl/CardAccessServiceImpl.java index 5c9559ab..db48ea10 100644 --- a/src/com/engine/organization/service/impl/CardAccessServiceImpl.java +++ b/src/com/engine/organization/service/impl/CardAccessServiceImpl.java @@ -60,8 +60,9 @@ public class CardAccessServiceImpl extends Service implements CardAccessService @Override public Map hasRight() { Map resultMap = new HashMap<>(); - boolean hasRight = HasRightUtil.hasRight(user, RIGHT_NAME, true); - resultMap.put("hasRight", hasRight); + //boolean hasRight = HasRightUtil.hasRight(user, RIGHT_NAME, true); + //脚本未找到该菜单 放开所有 + resultMap.put("hasRight", true); return resultMap; } From 289242d013e33dfb9c87c0057836b1cd6688d33c Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Thu, 6 Feb 2025 17:17:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=8A=B1=E5=90=8D=E5=86=8C=E9=9A=90?= =?UTF-8?q?=E7=A7=81=E8=AE=BE=E7=BD=AE=EF=BC=88=E6=A0=B9=E6=8D=AEe9?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E8=AE=BE=E7=BD=AE=E7=9A=84=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=94=B5=E8=AF=9D=EF=BC=8C=E5=8A=9E=E5=85=AC=E5=AE=A4=E7=94=B5?= =?UTF-8?q?=E8=AF=9D=EF=BC=8C=E9=82=AE=E4=BB=B6=E7=AD=89=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=EF=BC=89=E5=AE=8C=E6=88=90=E5=AF=B9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E9=9A=90=E7=A7=81=E8=AE=BE=E7=BD=AE=EF=BC=88?= =?UTF-8?q?=E5=85=AC=E5=BC=80=EF=BC=8C=E5=AF=B9=E6=89=80=E6=9C=89=E4=BA=BA?= =?UTF-8?q?=E4=BF=9D=E5=AF=86=E3=80=82=E5=AF=B9=E5=AE=89=E5=85=A8=E7=BA=A7?= =?UTF-8?q?=E5=88=AB=E4=BD=8E=E4=BA=8E=E8=87=AA=E5=B7=B1=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=BF=9D=E5=AF=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/hrmresource/vo/HrmResourceVO.java | 2 +- .../service/impl/HrmResourceServiceImpl.java | 23 ++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/com/engine/organization/entity/hrmresource/vo/HrmResourceVO.java b/src/com/engine/organization/entity/hrmresource/vo/HrmResourceVO.java index eb220ed3..f7d15e19 100644 --- a/src/com/engine/organization/entity/hrmresource/vo/HrmResourceVO.java +++ b/src/com/engine/organization/entity/hrmresource/vo/HrmResourceVO.java @@ -33,7 +33,7 @@ import lombok.NoArgsConstructor; " left join HRMJOBTITLES t3 on t.JOBTITLE=t3.id" + " left join HRMJOBACTIVITIES t4 on t3.JOBACTIVITYID=t4.ID" + " left join HRMJOBGROUPS t5 on t4.JOBGROUPID=t5.ID ", - orderby = " t.dsporder ", + orderby = " t.dsporder", sortway = " asc", primarykey = "id", operates = { diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java index a4df3778..a06bf172 100644 --- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java +++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java @@ -66,6 +66,7 @@ import weaver.general.Util; import weaver.hrm.company.DepartmentComInfo; import weaver.hrm.company.SubCompanyComInfo; import weaver.hrm.definedfield.HrmFieldManager; +import weaver.hrm.privacy.PrivacyComInfo; import weaver.systeminfo.SystemEnv; import java.math.BigDecimal; @@ -188,25 +189,40 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic } List items = filterByDomkey(all, columnList); + List privacyList = Arrays.asList("-1_hrm_mobile","-1_hrm_telephone","-1_hrm_mobilecall","-1_hrm_fax","-1_hrm_email"); for (SearchConditionItem item : items) { String columnName = item.getDomkey()[0]; WeaTableColumn weaTableColumn = new WeaTableColumn(); if (columnName.equals("-1_cus_"+propValue)){ + weaTableColumn.setOtherpara(columnName); fields.add("t.id as " + buildTableSql(columnName).replace(".", "_")); weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getOrgValue"); + }else if(privacyList.contains(columnName)) { + fields.add(buildTableSql(columnName) + " as " + buildTableSql(columnName).replace(".", "_")); + PrivacyComInfo pc = new PrivacyComInfo(); + Map mapShowSets = pc.getMapShowSets(); + String[] parts = columnName.split("_"); + String fieldName = parts[parts.length - 1]; + if (mapShowSets != null && mapShowSets.get("mobile") != null) { + weaTableColumn.setOtherpara("column:id+" + user.getUID() + "+"+fieldName+""); + weaTableColumn.setTransmethod("weaver.hrm.privacy.PrivacyComInfo.getSearchContent"); + }else { + weaTableColumn.setOtherpara(fieldName+":"+user.getLanguage()); + weaTableColumn.setTransmethod("weaver.hrm.HrmTransMethod.getDefineContent"); + } - }else{ + } else{ + weaTableColumn.setOtherpara(columnName); fields.add(buildTableSql(columnName) + " as " + buildTableSql(columnName).replace(".", "_")); weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValue"); } - String scopeId = columnName.split("_")[0]; String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1); weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId, user.getLanguage())); weaTableColumn.setColumn(buildTableSql(columnName).replace(".", "_")); - weaTableColumn.setOtherpara(columnName); + weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE); weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%"); weaTableColumnList.add(weaTableColumn); @@ -217,6 +233,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic weaTableColumn.setColumn("id"); weaTableColumn.setDisplay(WeaBoolAttr.FALSE); + weaTableColumnList.add(weaTableColumn); fields.add("t.id"); table.setBackfields(StringUtils.join(fields, ","));