mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	update 取消多余父部门类别编码获取
This commit is contained in:
		@@ -41,11 +41,6 @@ public class SysDeptVo implements Serializable {
 | 
			
		||||
     */
 | 
			
		||||
    private String parentName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父部门类别编码
 | 
			
		||||
     */
 | 
			
		||||
    private String parentCategory;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 祖级列表
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -135,11 +135,8 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        SysDeptVo parentDept = baseMapper.selectVoOne(new LambdaQueryWrapper<SysDept>()
 | 
			
		||||
            .select(SysDept::getDeptName, SysDept::getDeptCategory).eq(SysDept::getDeptId, dept.getParentId()));
 | 
			
		||||
        if (ObjectUtil.isNotNull(parentDept)) {
 | 
			
		||||
            dept.setParentName(parentDept.getDeptName());
 | 
			
		||||
            dept.setParentCategory(parentDept.getDeptCategory());
 | 
			
		||||
        }
 | 
			
		||||
            .select(SysDept::getDeptName).eq(SysDept::getDeptId, dept.getParentId()));
 | 
			
		||||
        dept.setParentName(ObjectUtil.isNotNull(parentDept) ? parentDept.getDeptName() : null);
 | 
			
		||||
        return dept;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user