配置列表接口优化
This commit is contained in:
parent
36adb269e9
commit
f3bedea63b
|
|
@ -8,6 +8,7 @@ import java.util.Objects;
|
|||
import com.bonus.common.biz.constant.BmConfigItems;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.material.basic.mapper.BmConfigMapper;
|
||||
|
|
@ -72,6 +73,7 @@ public class BmConfigServiceImpl implements IBmConfigService
|
|||
public int insertBmConfig(BmConfig bmConfig)
|
||||
{
|
||||
bmConfig.setCreateTime(DateUtils.getNowDate());
|
||||
bmConfig.setCreateBy(SecurityUtils.getUsername());
|
||||
bmConfigMapper.deleteBmConfigByName(bmConfig.getItemName());
|
||||
return bmConfigMapper.insertBmConfig(bmConfig);
|
||||
}
|
||||
|
|
@ -121,33 +123,7 @@ public class BmConfigServiceImpl implements IBmConfigService
|
|||
}
|
||||
}
|
||||
|
||||
/**获取所设定的库管员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> getLeaseTaskAuditRoleIds() {
|
||||
List<String> list = new ArrayList();
|
||||
BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.LEASE_TASK_AUDIT_ROLE_IDS);
|
||||
|
|
@ -160,7 +136,7 @@ public class BmConfigServiceImpl implements IBmConfigService
|
|||
return list;
|
||||
}
|
||||
|
||||
/**获取所设定的退料审核角色列表*/
|
||||
/**获取所设定的选项:退料审核角色列表*/
|
||||
public List<String> getBackTaskAuditRoleIds() {
|
||||
List<String> list = new ArrayList();
|
||||
BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.BACK_TASK_AUDIT_ROLE_IDS);
|
||||
|
|
@ -172,4 +148,17 @@ public class BmConfigServiceImpl implements IBmConfigService
|
|||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**获取所设定的选项:新购物资是否允许部分流转到下一阶段*/
|
||||
public boolean isPurchaseAllowPartTransfer() {
|
||||
boolean result = false;
|
||||
BmConfig bmConfig = bmConfigMapper.selectBmConfigByItemName(BmConfigItems.KU_GUAN_ROLE_IDS);
|
||||
if (Objects.nonNull(bmConfig)) {
|
||||
String value = getValueWithDefault(bmConfig.getItemValue(), "0");
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
result = "1".equals(value) ? true : false;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue