增加配置接口

This commit is contained in:
sxu 2024-10-31 09:41:04 +08:00
parent 4d3c40d9fa
commit e2a6f85fc2
2 changed files with 34 additions and 1 deletions

View File

@ -5,6 +5,11 @@ package com.bonus.common.biz.constant;
* @author bonus * @author bonus
*/ */
public class BmConfigItems { public class BmConfigItems {
public static final String KU_GUAN_ROLE_IDS = "KuGuanRoleIDs";
public static final String WEI_XIU_ROLE_IDS = "KuGuanRoleIDs";
public static final String LEASE_TASK_AUDIT_ROLE_KEYS = "LeaseTaskAuditRoleKeys"; public static final String LEASE_TASK_AUDIT_ROLE_KEYS = "LeaseTaskAuditRoleKeys";
public static final String BACK_TASK_AUDIT_ROLE_KEYS = "BackTaskAuditRoleKeys"; public static final String BACK_TASK_AUDIT_ROLE_KEYS = "BackTaskAuditRoleKeys";

View File

@ -116,10 +116,37 @@ public class BmConfigServiceImpl implements IBmConfigService
if (StringUtils.isEmpty(value1)) { if (StringUtils.isEmpty(value1)) {
return value2; return value2;
} else { } else {
return value1; return value1.trim();
} }
} }
/**获取所设定的库管员role ids*/
public List<String> getKuGuanRoleIds() {
List<String> list = new ArrayList();
BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.KU_GUAN_ROLE_IDS);
if (Objects.nonNull(bmConfig)) {
String value = getValueWithDefault(bmConfig.getItemValue(), "");
if (StringUtils.isNotEmpty(value)) {
list = Arrays.asList(value.split(","));
}
}
return list;
}
/**获取所设定的维修员role ids*/
public List<String> getWeiXiuRoleIds() {
List<String> list = new ArrayList();
BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.WEI_XIU_ROLE_IDS);
if (Objects.nonNull(bmConfig)) {
String value = getValueWithDefault(bmConfig.getItemValue(), "");
if (StringUtils.isNotEmpty(value)) {
list = Arrays.asList(value.split(","));
}
}
return list;
}
/**获取所设定的领料审核角色列表*/
public List<String> getLeaseTaskAuditRoleKeys() { public List<String> getLeaseTaskAuditRoleKeys() {
List<String> list = new ArrayList(); List<String> list = new ArrayList();
BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.LEASE_TASK_AUDIT_ROLE_KEYS); BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.LEASE_TASK_AUDIT_ROLE_KEYS);
@ -132,6 +159,7 @@ public class BmConfigServiceImpl implements IBmConfigService
return list; return list;
} }
/**获取所设定的退料审核角色列表*/
public List<String> getBackTaskAuditRoleKeys() { public List<String> getBackTaskAuditRoleKeys() {
List<String> list = new ArrayList(); List<String> list = new ArrayList();
BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.BACK_TASK_AUDIT_ROLE_KEYS); BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.BACK_TASK_AUDIT_ROLE_KEYS);