diff --git a/24Hour/Controllers/Common/LawyerArchivesController.cs b/24Hour/Controllers/Common/LawyerArchivesController.cs index 124a2fd..c506910 100644 --- a/24Hour/Controllers/Common/LawyerArchivesController.cs +++ b/24Hour/Controllers/Common/LawyerArchivesController.cs @@ -2009,7 +2009,7 @@ namespace _24Hour.Controllers.Common if (System.IO.File.Exists(filepath)) { var targetfile = Path.Combine(annecdir, Path.GetFileName(filepath)); - System.IO.File.Copy(filepath, targetfile,true); + System.IO.File.Copy(filepath, targetfile, true); } } @@ -2024,7 +2024,7 @@ namespace _24Hour.Controllers.Common if (System.IO.File.Exists(filepath)) { var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); - System.IO.File.Copy(filepath, targetfile,true); + System.IO.File.Copy(filepath, targetfile, true); } } @@ -2038,7 +2038,7 @@ namespace _24Hour.Controllers.Common if (System.IO.File.Exists(filepath)) { var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); - System.IO.File.Copy(filepath, targetfile,true); + System.IO.File.Copy(filepath, targetfile, true); } } var otherPhotos = item.otherPhoto.ConvertToModel>() ?? new List(); @@ -2050,7 +2050,7 @@ namespace _24Hour.Controllers.Common if (System.IO.File.Exists(filepath)) { var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); - System.IO.File.Copy(filepath, targetfile,true); + System.IO.File.Copy(filepath, targetfile, true); } } @@ -2062,7 +2062,7 @@ namespace _24Hour.Controllers.Common var userdir = Path.Combine(packegdir, "users", item.cardId); //保存身份证图片 - var cardids = item.cardIdphoto.ConvertToModel>(); + var cardids = item.cardIdphoto.ConvertToModel>() ?? new List(); var cardidDir = Path.Combine(userdir, "cardids"); if (Directory.Exists(cardidDir) == false) Directory.CreateDirectory(cardidDir); foreach (var file in cardids) @@ -2070,7 +2070,7 @@ namespace _24Hour.Controllers.Common var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\"); if (System.IO.File.Exists(filepath)) { - System.IO.File.Copy(filepath, Path.Combine(cardidDir, Path.GetFileName(filepath)),true); + System.IO.File.Copy(filepath, Path.Combine(cardidDir, Path.GetFileName(filepath)), true); } } //保存工作证图片 律师职业证书 @@ -2082,7 +2082,7 @@ namespace _24Hour.Controllers.Common var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\"); if (System.IO.File.Exists(filepath)) { - System.IO.File.Copy(filepath, Path.Combine(identityphotosDir, Path.GetFileName(filepath)),true); + System.IO.File.Copy(filepath, Path.Combine(identityphotosDir, Path.GetFileName(filepath)), true); } } @@ -2094,7 +2094,7 @@ namespace _24Hour.Controllers.Common var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\"); if (System.IO.File.Exists(filepath)) { - System.IO.File.Copy(filepath, Path.Combine(departmentPhotosDir, Path.GetFileName(filepath)),true); + System.IO.File.Copy(filepath, Path.Combine(departmentPhotosDir, Path.GetFileName(filepath)), true); } } } @@ -2105,9 +2105,9 @@ namespace _24Hour.Controllers.Common FileInfo fi = new FileInfo(packegzipname); //xx/xx/aa.rar var akspath = System.IO.Path.ChangeExtension(packegzipname, ".aks"); - fi.MoveTo(akspath,true); //xx/xx/xx.rar + fi.MoveTo(akspath, true); //xx/xx/xx.rar FileInfo fimoved = new FileInfo(akspath); - result.result = fimoved.FullName; + result.result = fimoved.FullName; result.IsSucceed = true; logger.LogInformation("step5"); return result;