Browse Source

添加一个上传保密承诺书的接口,升级版本号至1.0.1.15

develop
胡超1 2 years ago
parent
commit
7454e82a2d
  1. 4
      24Hour/24Hour.csproj
  2. 49
      24Hour/Controllers/Common/LawyerArchivesController.cs
  3. 2
      Elight.Entity/APPDto/Lawyer/LawyerArchivesDto.cs
  4. 2
      Elight.Entity/AppMode/Lawyer/LawyerArchives.cs

4
24Hour/24Hour.csproj

@ -8,8 +8,8 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<UserSecretsId>e485308c-2f05-470b-b0a4-68f1ec2b3412</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<AssemblyVersion>1.0.1.11</AssemblyVersion>
<Version>1.0.1.11</Version>
<AssemblyVersion>1.0.1.15</AssemblyVersion>
<Version>1.0.1.15</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

49
24Hour/Controllers/Common/LawyerArchivesController.cs

@ -1098,6 +1098,55 @@ namespace _24Hour.Controllers.Common
return Task.FromResult(result);
}
[HttpPost]
[Route("UploadSignImage")]
/// <summary>
///
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public async Task<Result> UploadSignImage(object data)
{
var input = data.ConvertToAnonymousType(new
{
id = default(string),
image = default(string)
});
if (string.IsNullOrEmpty(input.image) == false)
{
var _path = Path.Combine("CaseFile", "card", DateTime.Now.ToString("yyyy-MM-dd"));
var dic = Path.Combine(Environment.CurrentDirectory, "wwwroot", _path);
var filename = DateTime.Now.Ticks.ToString() + ".png";
var filefullpath = Path.Combine(dic, filename);
if (Directory.Exists(dic) == false)
{
Directory.CreateDirectory(dic);
}
await System.IO.File.WriteAllBytesAsync(filefullpath, Convert.FromBase64String(input.image));
var item = await _db.Queryable<LawyerArchives>().Where(x => x.Id == input.id).FirstAsync();
if (item != null)
{
var __path = Path.Combine(_path, filename);
var repath = "/" + __path.Replace(@"\", @"/");
item.secertphoto = repath;
await _db.Updateable(item).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
result.IsSucceed = true;
}
else
{
result.IsSucceed = false;
result.Message = "数据不存在";
}
}
else
{
result.IsSucceed = false;
result.Message = "图片接收失败";
}
return result;
}
public class DecodeQRDataModel
{
public string QRData { get; set; }

2
Elight.Entity/APPDto/Lawyer/LawyerArchivesDto.cs

@ -52,6 +52,8 @@ namespace Elight.Entity.APPDto.Lawyer
/// </summary>
[DataMember]
public string? casename { get; set; }
[DataMember]
public string? secertphoto { get; set; }
/// <summary>
/// 授权的开始阅卷时间
/// </summary>

2
Elight.Entity/AppMode/Lawyer/LawyerArchives.cs

@ -52,6 +52,8 @@ namespace Elight.Entity.AppMode.Lawyer
public DateTime? createTime { get; set; }
[DataMember]
public string? createrId { get; set; }
[DataMember]
public string? secertphoto { get; set; }
/// <summary>
/// 已缓存的文件计数
/// </summary>

Loading…
Cancel
Save