🐛fix部门表字段属性更改导致添加失败

This commit is contained in:
不做码农 2023-07-31 18:42:08 +08:00
parent e627ddc60d
commit 946f4a6de9
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@
/// <summary> /// <summary>
/// 部门正常状态 /// 部门正常状态
/// </summary> /// </summary>
public static string DEPT_NORMAL = "0"; public static int DEPT_NORMAL = 0;
/// <summary> /// <summary>
/// 部门停用状态 /// 部门停用状态

View File

@ -67,7 +67,7 @@ namespace ZR.Service.System
{ {
SysDept info = GetFirst(it => it.DeptId == dept.ParentId); SysDept info = GetFirst(it => it.DeptId == dept.ParentId);
//如果父节点不为正常状态,则不允许新增子节点 //如果父节点不为正常状态,则不允许新增子节点
if (info != null && !UserConstants.DEPT_NORMAL.Equals(info?.Status)) if (info != null && UserConstants.DEPT_NORMAL != info?.Status)
{ {
throw new CustomException("部门停用,不允许新增"); throw new CustomException("部门停用,不允许新增");
} }