diff --git a/.gitignore b/.gitignore index 9294111..3922885 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,5 @@ dkms.conf /24Hour/Properties/PublishProfiles/FolderProfile1.pubxml /24Hour/Properties/PublishProfiles/FolderProfile1.pubxml.user /24Hour/wwwroot +/Dto/obj +/Dto/obj/Debug \ No newline at end of file diff --git a/24Hour/Controllers/Common/LawyerArchivesController.cs b/24Hour/Controllers/Common/LawyerArchivesController.cs index ec23882..746c372 100644 --- a/24Hour/Controllers/Common/LawyerArchivesController.cs +++ b/24Hour/Controllers/Common/LawyerArchivesController.cs @@ -1201,6 +1201,7 @@ namespace _24Hour.Controllers.Common { var svc = await _db.Queryable() .Where(x => x.Id == lawyersvc.Id).FirstAsync(); + var annexphoto = Path.Combine(ziplawyersvcs, lawyersvc.Id, "annexs"); var annexs = new DirectoryInfo(annexphoto) .GetFiles() @@ -1208,6 +1209,32 @@ namespace _24Hour.Controllers.Common .Replace(@"\", @"/")) .ToList() .ConvertToJsonStr(); + + + var legalAidPhoto = Path.Combine(ziplawyersvcs, lawyersvc.Id, "legalAidPhoto"); + var legalAidPhotos = new DirectoryInfo(legalAidPhoto) + .GetFiles() + .Select(x => "/CaseFile/imports/" + Path.GetRelativePath(dir, x.FullName) + .Replace(@"\", @"/")) + .ToList() + .ConvertToJsonStr(); + + var relationshipProofPhoto = Path.Combine(ziplawyersvcs, lawyersvc.Id, "relationshipProofPhoto"); + var relationshipProofPhotos = new DirectoryInfo(relationshipProofPhoto) + .GetFiles() + .Select(x => "/CaseFile/imports/" + Path.GetRelativePath(dir, x.FullName) + .Replace(@"\", @"/")) + .ToList() + .ConvertToJsonStr(); + + var otherPhoto = Path.Combine(ziplawyersvcs, lawyersvc.Id, "otherPhoto"); + var otherPhotos = new DirectoryInfo(otherPhoto) + .GetFiles() + .Select(x => "/CaseFile/imports/" + Path.GetRelativePath(dir, x.FullName) + .Replace(@"\", @"/")) + .ToList() + .ConvertToJsonStr(); + if (svc == null) { var lawyer = await _db.Queryable() @@ -1219,6 +1246,9 @@ namespace _24Hour.Controllers.Common lawyersvc.createuserId = lawyer.Id; lawyersvc.annex = annexs; + lawyersvc.legalAidPhoto = legalAidPhotos; + lawyersvc.relationshipProofPhoto = relationshipProofPhotos; + lawyersvc.otherPhoto = otherPhotos; _db.BeginTran(); var num = await _db.Insertable(lawyersvc).ExecuteCommandAsync(); @@ -1235,13 +1265,18 @@ namespace _24Hour.Controllers.Common svc.createuserId = lawyer.Id; svc.annex = annexs; - + svc.legalAidPhoto = legalAidPhotos; + svc.relationshipProofPhoto = relationshipProofPhotos; + svc.otherPhoto = otherPhotos; _db.BeginTran(); var num = await _db.Updateable(svc) .UpdateColumns(x => new { x.annex, - x.createuserId + x.createuserId, + x.relationshipProofPhoto, + x.otherPhoto, + x.legalAidPhoto }) .IgnoreColumns(ignoreAllNullColumns: true) .ExecuteCommandAsync(); @@ -1291,10 +1326,11 @@ namespace _24Hour.Controllers.Common { var lawyerdir = Path.Combine(packegdir, "lawyerservices", item.Id); if (Directory.Exists(lawyerdir) == false) Directory.CreateDirectory(lawyerdir); + + var files = item.annex.ConvertToModel>(); var annecdir = Path.Combine(lawyerdir, "annexs"); if (Directory.Exists(annecdir) == false) Directory.CreateDirectory(annecdir); - foreach (var file in files) { var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\"); @@ -1304,6 +1340,48 @@ namespace _24Hour.Controllers.Common System.IO.File.Copy(filepath, targetfile); } } + + + var legalphotots = item.legalAidPhoto.ConvertToModel>(); + var legalAidPhotoDir = Path.Combine(lawyerdir, "legalAidPhoto"); + if (Directory.Exists(legalAidPhotoDir) == false) Directory.CreateDirectory(legalAidPhotoDir); + foreach (var legalphotot in legalphotots) + { + var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + legalphotot.Replace("/", @"\"); + if (System.IO.File.Exists(filepath)) + { + var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); + System.IO.File.Copy(filepath, targetfile); + } + } + + + var relationshipProofPhotos = item.relationshipProofPhoto.ConvertToModel>(); + var relationshipProofPhotoDir = Path.Combine(lawyerdir, "relationshipProofPhoto"); + if (Directory.Exists(relationshipProofPhotoDir) == false) Directory.CreateDirectory(relationshipProofPhotoDir); + foreach (var relationshipProofPhoto in relationshipProofPhotos) + { + var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + relationshipProofPhoto.Replace("/", @"\"); + if (System.IO.File.Exists(filepath)) + { + var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); + System.IO.File.Copy(filepath, targetfile); + } + } + + var otherPhotos = item.otherPhoto.ConvertToModel>(); + var otherPhotoDir = Path.Combine(lawyerdir, "otherPhoto"); + if (Directory.Exists(otherPhotoDir) == false) Directory.CreateDirectory(otherPhotoDir); + foreach (var otherPhoto in otherPhotos) + { + var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + otherPhoto.Replace("/", @"\"); + if (System.IO.File.Exists(filepath)) + { + var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); + System.IO.File.Copy(filepath, targetfile); + } + } + } //存储用户的相关附件 foreach (var item in users) diff --git a/Elight.Entity/AppMode/App_LawyerServicesModel.cs b/Elight.Entity/AppMode/App_LawyerServicesModel.cs index 43c902a..4e92972 100644 --- a/Elight.Entity/AppMode/App_LawyerServicesModel.cs +++ b/Elight.Entity/AppMode/App_LawyerServicesModel.cs @@ -152,6 +152,34 @@ namespace Elight.Entity /// [DataMember] public string? partyIDcard { get;set;} - + + /// + /// 是否法律援助 + /// + [DataMember] + public bool? IsLegalAid { get; set; } + + /// + /// 法律援助图片 + /// + [DataMember] + public string? legalAidPhoto { get; set; } + + /// + /// 关系证明图片 + /// + [DataMember] + public string? relationshipProofPhoto { get; set; } + /// + /// 其他图片 + /// + [DataMember] + public string? otherPhoto { get; set; } + [DataMember] + public string? mandator { get; set; } + [DataMember] + public string? mandatorcardId { get; set; } + [DataMember] + public string? relationship { get; set; } } } diff --git a/Elight.Entity/SystemModel/App_Sys_UserModel.cs b/Elight.Entity/SystemModel/App_Sys_UserModel.cs index 467606e..f9dfab6 100644 --- a/Elight.Entity/SystemModel/App_Sys_UserModel.cs +++ b/Elight.Entity/SystemModel/App_Sys_UserModel.cs @@ -41,6 +41,12 @@ namespace Elight.Entity /// 单位证明 律师事务所证明 /// public string? departmentPhoto { get; set; } + + /// + /// 单位同意信用代码 + /// + [DataMember] + public string? departmentUnifiedSocialCreditCode { get; set; } /// /// 密码 ///