From b17d04c9681c86fa4d13464077dffc02650ddac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E9=98=B3=20=E9=82=B9?= Date: Wed, 29 Nov 2023 14:37:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppMode/App_LawyerServicesModel.cs | 30 ++++++++++++++++++- .../SystemModel/App_Sys_UserModel.cs | 6 ++++ 2 files changed, 35 insertions(+), 1 deletion(-) 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; } /// /// 密码 /// From 3fbb53f3a4ee5f1e6428edb35fb1d5b1faa8a31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E9=98=B3=20=E9=82=B9?= Date: Wed, 29 Nov 2023 14:38:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/LawyerArchivesController.cs | 84 ++++++++++++++++++- 1 file changed, 81 insertions(+), 3 deletions(-) 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) From 3c1cef7338c77c0921f4c308ad3349a72720ab18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E9=98=B3=20=E9=82=B9?= Date: Wed, 29 Nov 2023 14:52:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9git=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) 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