修改增加顶级公司 不校验部门名称唯一性的问题
This commit is contained in:
parent
7adc846c3a
commit
c436674445
|
|
@ -184,7 +184,10 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
public boolean checkDeptNameUnique(SysDept dept)
|
public boolean checkDeptNameUnique(SysDept dept)
|
||||||
{
|
{
|
||||||
Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId();
|
Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId();
|
||||||
SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId());
|
//如果没有parentid则认为是根节点,检查根节点是否重名,added by weiweiwang 2024/9/20
|
||||||
|
Long parentId = StringUtils.isNull(dept.getParentId()) ? 0L : dept.getParentId();
|
||||||
|
|
||||||
|
SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), parentId);
|
||||||
if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue())
|
if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue())
|
||||||
{
|
{
|
||||||
return UserConstants.NOT_UNIQUE;
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue