wlzboy
9 小时以前 5f2ee03958a1a16dc27195c76ea7cffb422c95d1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
@@ -6,6 +6,8 @@
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import com.ruoyi.common.utils.DeptUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.annotation.DataScope;
@@ -428,4 +430,30 @@
        
        return result;
    }
    @Override
    public Long getBranchCompany(Long deptId) {
       Long branchId = DeptUtil.getBranchId(deptId);
       if(branchId!=null)return branchId;
        branchId = deptMapper.selectBranchCompanyIdByDeptId(deptId);
        if(branchId!=null){
            DeptUtil.setDeptIdBranchId(deptId,branchId);
            return branchId;
        }
        else {
            return null;
        }
    }
    /**
     * 根据service_class查询部门信息
     *
     * @param serviceClass 服务类别编码
     * @return 部门信息
     */
    @Override
    public SysDept selectDeptByServiceClass(String serviceClass)
    {
        return deptMapper.selectDeptByServiceClass(serviceClass);
    }
}