Browse Source

Merge branch 'develop' of http://18t7i08736.yicp.fun:10018/Coder/24Hour.Service into develop

develop
林杨 2 years ago
parent
commit
906e230c32
  1. 2
      .gitignore
  2. 84
      24Hour/Controllers/Common/LawyerArchivesController.cs
  3. 28
      Elight.Entity/AppMode/App_LawyerServicesModel.cs
  4. 6
      Elight.Entity/SystemModel/App_Sys_UserModel.cs

2
.gitignore vendored

@ -80,3 +80,5 @@ dkms.conf
/24Hour/Properties/PublishProfiles/FolderProfile1.pubxml /24Hour/Properties/PublishProfiles/FolderProfile1.pubxml
/24Hour/Properties/PublishProfiles/FolderProfile1.pubxml.user /24Hour/Properties/PublishProfiles/FolderProfile1.pubxml.user
/24Hour/wwwroot /24Hour/wwwroot
/Dto/obj
/Dto/obj/Debug

84
24Hour/Controllers/Common/LawyerArchivesController.cs

@ -1201,6 +1201,7 @@ namespace _24Hour.Controllers.Common
{ {
var svc = await _db.Queryable<App_LawyerServicesModel>() var svc = await _db.Queryable<App_LawyerServicesModel>()
.Where(x => x.Id == lawyersvc.Id).FirstAsync(); .Where(x => x.Id == lawyersvc.Id).FirstAsync();
var annexphoto = Path.Combine(ziplawyersvcs, lawyersvc.Id, "annexs"); var annexphoto = Path.Combine(ziplawyersvcs, lawyersvc.Id, "annexs");
var annexs = new DirectoryInfo(annexphoto) var annexs = new DirectoryInfo(annexphoto)
.GetFiles() .GetFiles()
@ -1208,6 +1209,32 @@ namespace _24Hour.Controllers.Common
.Replace(@"\", @"/")) .Replace(@"\", @"/"))
.ToList() .ToList()
.ConvertToJsonStr(); .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) if (svc == null)
{ {
var lawyer = await _db.Queryable<App_Sys_UserModel>() var lawyer = await _db.Queryable<App_Sys_UserModel>()
@ -1219,6 +1246,9 @@ namespace _24Hour.Controllers.Common
lawyersvc.createuserId = lawyer.Id; lawyersvc.createuserId = lawyer.Id;
lawyersvc.annex = annexs; lawyersvc.annex = annexs;
lawyersvc.legalAidPhoto = legalAidPhotos;
lawyersvc.relationshipProofPhoto = relationshipProofPhotos;
lawyersvc.otherPhoto = otherPhotos;
_db.BeginTran(); _db.BeginTran();
var num = await _db.Insertable(lawyersvc).ExecuteCommandAsync(); var num = await _db.Insertable(lawyersvc).ExecuteCommandAsync();
@ -1235,13 +1265,18 @@ namespace _24Hour.Controllers.Common
svc.createuserId = lawyer.Id; svc.createuserId = lawyer.Id;
svc.annex = annexs; svc.annex = annexs;
svc.legalAidPhoto = legalAidPhotos;
svc.relationshipProofPhoto = relationshipProofPhotos;
svc.otherPhoto = otherPhotos;
_db.BeginTran(); _db.BeginTran();
var num = await _db.Updateable(svc) var num = await _db.Updateable(svc)
.UpdateColumns(x => new .UpdateColumns(x => new
{ {
x.annex, x.annex,
x.createuserId x.createuserId,
x.relationshipProofPhoto,
x.otherPhoto,
x.legalAidPhoto
}) })
.IgnoreColumns(ignoreAllNullColumns: true) .IgnoreColumns(ignoreAllNullColumns: true)
.ExecuteCommandAsync(); .ExecuteCommandAsync();
@ -1291,10 +1326,11 @@ namespace _24Hour.Controllers.Common
{ {
var lawyerdir = Path.Combine(packegdir, "lawyerservices", item.Id); var lawyerdir = Path.Combine(packegdir, "lawyerservices", item.Id);
if (Directory.Exists(lawyerdir) == false) Directory.CreateDirectory(lawyerdir); if (Directory.Exists(lawyerdir) == false) Directory.CreateDirectory(lawyerdir);
var files = item.annex.ConvertToModel<List<string>>(); var files = item.annex.ConvertToModel<List<string>>();
var annecdir = Path.Combine(lawyerdir, "annexs"); var annecdir = Path.Combine(lawyerdir, "annexs");
if (Directory.Exists(annecdir) == false) Directory.CreateDirectory(annecdir); if (Directory.Exists(annecdir) == false) Directory.CreateDirectory(annecdir);
foreach (var file in files) foreach (var file in files)
{ {
var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\"); var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\");
@ -1304,6 +1340,48 @@ namespace _24Hour.Controllers.Common
System.IO.File.Copy(filepath, targetfile); System.IO.File.Copy(filepath, targetfile);
} }
} }
var legalphotots = item.legalAidPhoto.ConvertToModel<List<string>>();
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<List<string>>();
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<List<string>>();
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) foreach (var item in users)

28
Elight.Entity/AppMode/App_LawyerServicesModel.cs

@ -153,5 +153,33 @@ namespace Elight.Entity
[DataMember] [DataMember]
public string? partyIDcard { get;set;} public string? partyIDcard { get;set;}
/// <summary>
/// 是否法律援助
/// </summary>
[DataMember]
public bool? IsLegalAid { get; set; }
/// <summary>
/// 法律援助图片
/// </summary>
[DataMember]
public string? legalAidPhoto { get; set; }
/// <summary>
/// 关系证明图片
/// </summary>
[DataMember]
public string? relationshipProofPhoto { get; set; }
/// <summary>
/// 其他图片
/// </summary>
[DataMember]
public string? otherPhoto { get; set; }
[DataMember]
public string? mandator { get; set; }
[DataMember]
public string? mandatorcardId { get; set; }
[DataMember]
public string? relationship { get; set; }
} }
} }

6
Elight.Entity/SystemModel/App_Sys_UserModel.cs

@ -41,6 +41,12 @@ namespace Elight.Entity
/// 单位证明 律师事务所证明 /// 单位证明 律师事务所证明
/// </summary> /// </summary>
public string? departmentPhoto { get; set; } public string? departmentPhoto { get; set; }
/// <summary>
/// 单位同意信用代码
/// </summary>
[DataMember]
public string? departmentUnifiedSocialCreditCode { get; set; }
/// <summary> /// <summary>
/// 密码 /// 密码
/// </summary> /// </summary>

Loading…
Cancel
Save