/// <summary>
        /// 获取机构路径
        /// </summary>
        /// <param name="dep"></param>
        /// <param name="tempPath"></param>
        /// <returns></returns>
        private string GetDepPath(SysDepartmentDto dep, string tempPath = "")
        {
            if (dep != null)
            {
                SysDepartmentDto parent = null;
                if (dep.ParentSerialnum != null)
                {
                    parent = _sysDepartmentService.GetParentByParentId(dep.ParentSerialnum);
                }

                var p  = dep.Name;
                var p2 = "";
                if (parent == null)
                {
                    p2 = Path.Combine(tempPath, p);
                }
                else
                {
                    p2 = Path.Combine(GetDepPath(parent), tempPath, p);
                }
                if (!Directory.Exists(Path.Combine(_companyPicsPath, p2)))
                {
                    Directory.CreateDirectory(Path.Combine(_companyPicsPath, p2));
                    WriteLog("创建企业图库目录:" + Path.Combine(_companyPicsPath, p2));
                }
                return(p2);
            }
            return(null);
        }