Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
58c1c25fc2
|
@ -419,9 +419,9 @@ namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
if (sysDataList.Any(y => y.Id == x.Id))
|
if (sysDataList.Any(y => y.Id == x.Id))
|
||||||
{
|
{
|
||||||
x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z=> !z.OffLine).Count()).FirstOrDefault();
|
x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -542,7 +542,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
select new UnionDocumentWithConfirmInfoView()
|
select new UnionDocumentWithConfirmInfoView()
|
||||||
{
|
{
|
||||||
IsSystemDoc = true,
|
IsSystemDoc = true,
|
||||||
|
|
||||||
Id = sysDoc.Id,
|
Id = sysDoc.Id,
|
||||||
CreateTime = sysDoc.CreateTime,
|
CreateTime = sysDoc.CreateTime,
|
||||||
IsDeleted = sysDoc.IsDeleted,
|
IsDeleted = sysDoc.IsDeleted,
|
||||||
|
@ -590,7 +590,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
if (sysDataList.Any(y => y.Id == x.Id))
|
if (sysDataList.Any(y => y.Id == x.Id))
|
||||||
{
|
{
|
||||||
x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z=>!z.OffLine).Count()).FirstOrDefault();
|
x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -785,7 +785,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput> GetSysDocSignUserList()
|
public async Task<IResponseOutput> GetSysDocSignUserList()
|
||||||
{
|
{
|
||||||
var list = _systemDocConfirmedUserRepository.Where(t => t.ConfirmTime !=null).Select(t => new { t.ConfirmUserId, t.ConfirmUser.UserName, t.ConfirmUser.FullName }).Distinct().ToList();
|
var list = _systemDocConfirmedUserRepository.Where(t => t.ConfirmTime != null).Select(t => new { t.ConfirmUserId, t.ConfirmUser.UserName, t.ConfirmUser.FullName }).Distinct().ToList();
|
||||||
|
|
||||||
return ResponseOutput.Ok(list);
|
return ResponseOutput.Ok(list);
|
||||||
}
|
}
|
||||||
|
@ -793,6 +793,9 @@ namespace IRaCIS.Core.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput<PageOutput<UnionDocumentWithConfirmInfoView>>> GetSysDocumentConfirmList(SystemDocQuery inQuery)
|
public async Task<IResponseOutput<PageOutput<UnionDocumentWithConfirmInfoView>>> GetSysDocumentConfirmList(SystemDocQuery inQuery)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var isInternal = _userInfo.IsZhiZhun;
|
||||||
|
|
||||||
var systemDocQuery =
|
var systemDocQuery =
|
||||||
from sysDoc in _systemDocumentRepository.AsQueryable(false)
|
from sysDoc in _systemDocumentRepository.AsQueryable(false)
|
||||||
.Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true)
|
.Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true)
|
||||||
|
@ -837,7 +840,8 @@ namespace IRaCIS.Core.Application.Services
|
||||||
.WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime)
|
.WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime)
|
||||||
.WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime)
|
.WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime)
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName))
|
||||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted);
|
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||||
|
.WhereIf(isInternal == false, t => t.ConfirmTime != null);
|
||||||
|
|
||||||
var result = await unionQuery.ToPagedListAsync(inQuery);
|
var result = await unionQuery.ToPagedListAsync(inQuery);
|
||||||
|
|
||||||
|
@ -858,13 +862,13 @@ namespace IRaCIS.Core.Application.Services
|
||||||
var sysids = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();
|
var sysids = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();
|
||||||
|
|
||||||
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
|
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
|
||||||
|
|
||||||
foreach (var item in result.CurrentPageData)
|
foreach (var item in result.CurrentPageData)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (sysDataList.Any(y => y.Id == item.Id))
|
if (sysDataList.Any(y => y.Id == item.Id))
|
||||||
{
|
{
|
||||||
item.AttachmentCount = sysDataList.Where(y => y.Id == item.Id).Select(x => x.SystemDocumentAttachmentList.Where(z=>!z.OffLine).Count()).FirstOrDefault();
|
item.AttachmentCount = sysDataList.Where(y => y.Id == item.Id).Select(x => x.SystemDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.IsSystemDoc)
|
if (item.IsSystemDoc)
|
||||||
|
|
Loading…
Reference in New Issue