/// <summary> /// 获取机构路径 /// </summary> /// <param name="dep"></param> /// <param name="tempPath"></param> /// <returns></returns> private async Task <string> GetDepPath(SysDepartmentDto dep, string tempPath = "") { var parent = await _sysDepartmentService.GetParentByParentIdAsny(dep.ParentSerialnum); var p = dep.Name; var p2 = ""; if (parent == null) { p2 = Path.Combine(tempPath, p); } else { p2 = Path.Combine(await GetDepPath(parent), tempPath, p); } if (!Directory.Exists(Path.Combine(_picsPath, p2))) { Directory.CreateDirectory(Path.Combine(_picsPath, p2)); LogHelper.Debug("创建实景监测点图库目录:" + Path.Combine(_picsPath, p2)); } return(p2); }