feat(ClientBlack): 新增客户黑名单审批流程
- 黑名单新增、删除、批量导入、批量移出在配置审批节点后,审批通过才生效 - 新增黑名单待提交后可提交审批;仅首节点未审批时可撤回,进入后续节点禁止撤回 - 增加黑名单审批列表、审批弹窗、审批操作日志及状态筛选 - 支持审批配置中的“黑名单审批”流程及对应菜单、模块权限、操作权限 - 黑名单审批中禁止同名记录覆盖备注;已在黑名单中的同名导入会明确提示本次将修改备注 - 未配置审批节点时保持原有直接生效行为 - 增加黑名单审批状态机单测,39/39 通过 - 修正撤回全部失败时仍提示“撤回审批成功”的问题
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Linq.Expressions;
|
||||
using YLErp.BLL.Eod;
|
||||
using YLErp.DBModels;
|
||||
using YLErp.Helpers;
|
||||
using YLErp.Model;
|
||||
using YLErp.Model.Enum;
|
||||
using YLErp.Modules.TradeModule;
|
||||
|
||||
@@ -28,6 +29,17 @@ namespace YLErp.Modules.SystemModule
|
||||
{
|
||||
var clientQuery = DataCacheProvider.GetClientDataSource().AsQueryable();
|
||||
|
||||
if (type == "ClientBlackProcess")
|
||||
{
|
||||
var clientdb = DbContextFactory.GetClientDbContext(OptUser);
|
||||
if (clientdb.client_black.Any(x => x.State == client_black.新增审批中 || x.State == client_black.删除审批中))
|
||||
{
|
||||
throw new ServiceException(data == null || data.Count == 0
|
||||
? "有黑名单在审批中,不能删除审批流程!"
|
||||
: "有黑名单在审批中,不能修改审批流程!");
|
||||
}
|
||||
}
|
||||
|
||||
var delList = DbContext.approvalprocess.Where(s => s.processType == type).ToArray();
|
||||
|
||||
DbContext.approvalprocess.RemoveRange(delList);
|
||||
|
||||
Reference in New Issue
Block a user