添加退料审核配置和读取
This commit is contained in:
parent
07e05db253
commit
31c7da6798
|
|
@ -7,4 +7,8 @@ package com.bonus.common.biz.constant;
|
||||||
public class BmConfigItems {
|
public class BmConfigItems {
|
||||||
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";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,15 @@ public class MaterialConstants
|
||||||
public static final String UTF8 = "UTF-8";
|
public static final String UTF8 = "UTF-8";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
<<<<<<< HEAD
|
|
||||||
* 领料任务类型
|
* 领料任务类型
|
||||||
*/
|
*/
|
||||||
public static final Long LEASE_TASK_TYPE = 2L;
|
public static final Long LEASE_TASK_TYPE = 2L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料任务类型
|
||||||
|
*/
|
||||||
|
public static final Long BACK_TASK_TYPE = 3L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XLS
|
* XLS
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -69,4 +69,6 @@ public interface IBmConfigService
|
||||||
public int deleteBmConfigById(Long id);
|
public int deleteBmConfigById(Long id);
|
||||||
|
|
||||||
public List<String> getLeaseTaskAuditRoleKeys();
|
public List<String> getLeaseTaskAuditRoleKeys();
|
||||||
|
|
||||||
|
public List<String> getBackTaskAuditRoleKeys();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,4 +131,16 @@ public class BmConfigServiceImpl implements IBmConfigService
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getBackTaskAuditRoleKeys() {
|
||||||
|
List<String> list = new ArrayList();
|
||||||
|
BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.BACK_TASK_AUDIT_ROLE_KEYS);
|
||||||
|
if (Objects.nonNull(bmConfig)) {
|
||||||
|
String value = getValueWithDefault(bmConfig.getItemValue(), "");
|
||||||
|
if (StringUtils.isNotEmpty(value)) {
|
||||||
|
list = Arrays.asList(value.split(","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,10 @@ public class TmTaskAuditLogServiceImpl implements ITmTaskAuditLogService {
|
||||||
List<String> needRoles = new ArrayList<>();
|
List<String> needRoles = new ArrayList<>();
|
||||||
if (MaterialConstants.LEASE_TASK_TYPE.equals(tmTaskAuditLog.getTaskType())) {
|
if (MaterialConstants.LEASE_TASK_TYPE.equals(tmTaskAuditLog.getTaskType())) {
|
||||||
needRoles = bmConfigService.getLeaseTaskAuditRoleKeys();
|
needRoles = bmConfigService.getLeaseTaskAuditRoleKeys();
|
||||||
}
|
} else if (MaterialConstants.BACK_TASK_TYPE.equals(tmTaskAuditLog.getTaskType())) {
|
||||||
//TODO, add more tasks logic to get needRoles
|
needRoles = bmConfigService.getBackTaskAuditRoleKeys();
|
||||||
|
} //TODO, add more tasks logic to get needRoles
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(needRoles)) {
|
if (CollectionUtils.isEmpty(needRoles)) {
|
||||||
return new TmTaskAuditResult(true);
|
return new TmTaskAuditResult(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue