|
|
@ -4,6 +4,8 @@ using Elight.Entity.APPDto.Lawyer; |
|
|
|
using Elight.Entity.AppMode.Lawyer; |
|
|
|
using Elight.Entity.AppMode.Lawyer; |
|
|
|
using Elight.Logic; |
|
|
|
using Elight.Logic; |
|
|
|
using Elight.Utility.Code; |
|
|
|
using Elight.Utility.Code; |
|
|
|
|
|
|
|
using Elight.Utility.logs; |
|
|
|
|
|
|
|
using java.util; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using SqlSugar; |
|
|
|
using SqlSugar; |
|
|
@ -44,7 +46,7 @@ namespace _24Hour.Controllers.Common |
|
|
|
.Where(x => x.IsDeleted == 0) |
|
|
|
.Where(x => x.IsDeleted == 0) |
|
|
|
.Where(x => x.status != 2 && x.permissibleEndTime > DateTime.Now) |
|
|
|
.Where(x => x.status != 2 && x.permissibleEndTime > DateTime.Now) |
|
|
|
.Where(x => x.unitcode == unitcode) |
|
|
|
.Where(x => x.unitcode == unitcode) |
|
|
|
.Where(x=>x.IsDeleted==0) |
|
|
|
.Where(x => x.IsDeleted == 0) |
|
|
|
.ToListAsync(); |
|
|
|
.ToListAsync(); |
|
|
|
var data = mapper.Map<IEnumerable<LawyerArchivesDto>>(list); |
|
|
|
var data = mapper.Map<IEnumerable<LawyerArchivesDto>>(list); |
|
|
|
res.result = data; |
|
|
|
res.result = data; |
|
|
@ -67,7 +69,7 @@ namespace _24Hour.Controllers.Common |
|
|
|
var dtos = mapper.Map<List<JZJBXXDto>>(list); |
|
|
|
var dtos = mapper.Map<List<JZJBXXDto>>(list); |
|
|
|
var listdata = dtos.Select(x => new |
|
|
|
var listdata = dtos.Select(x => new |
|
|
|
{ |
|
|
|
{ |
|
|
|
jzid=x.Id, |
|
|
|
jzid = x.Id, |
|
|
|
files = x.jzml.OrderBy(x => x.mlsxh) |
|
|
|
files = x.jzml.OrderBy(x => x.mlsxh) |
|
|
|
.SelectMany(e => e.jzwj.OrderBy(x => x.wjsxh)) |
|
|
|
.SelectMany(e => e.jzwj.OrderBy(x => x.wjsxh)) |
|
|
|
.Select((q) => new |
|
|
|
.Select((q) => new |
|
|
@ -82,6 +84,41 @@ namespace _24Hour.Controllers.Common |
|
|
|
result.IsSucceed = true; |
|
|
|
result.IsSucceed = true; |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// 上传一体机的文件缓存状态 |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="dic"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
[HttpPost("UploadWJDownloadStatus")] |
|
|
|
|
|
|
|
public async Task<Result> UploadWJDownloadStatus(IEnumerable<LawyerArchivesDto> dtos) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var result = new Result(); |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
_db.BeginTran(); |
|
|
|
|
|
|
|
var updatelist = await _db.Queryable<LawyerArchives>().In(q => q.jzlbxxId, dtos.Select(x => x.jzlbxxId).ToList()).ToListAsync(); |
|
|
|
|
|
|
|
updatelist.ForEach(q => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var value = dtos.FirstOrDefault(x => x.jzlbxxId == q.jzlbxxId); |
|
|
|
|
|
|
|
q.downloadedCount = value?.downloadedCount; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
var num = await _db.Updateable(updatelist).ExecuteCommandAsync(); |
|
|
|
|
|
|
|
_db.CommitTran(); |
|
|
|
|
|
|
|
if (num > 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = true; |
|
|
|
|
|
|
|
result.result = "更新成功"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (System.Exception ex) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
_db.RollbackTran(); |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = ex.Message; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// 解密字符串信息 |
|
|
|
/// 解密字符串信息 |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
@ -98,9 +135,9 @@ namespace _24Hour.Controllers.Common |
|
|
|
result.IsSucceed = true; |
|
|
|
result.IsSucceed = true; |
|
|
|
return Task.FromResult(result); |
|
|
|
return Task.FromResult(result); |
|
|
|
} |
|
|
|
} |
|
|
|
catch(Exception ex) |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
{ |
|
|
|
logger.LogError(ex,""); |
|
|
|
logger.LogError(ex, ""); |
|
|
|
result.IsSucceed = false; |
|
|
|
result.IsSucceed = false; |
|
|
|
return Task.FromResult(result); |
|
|
|
return Task.FromResult(result); |
|
|
|
} |
|
|
|
} |
|
|
|