From 0364cb378e4f86e430fae6b3f2e074e353c3fa39 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Fri, 15 Apr 2022 11:11:13 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=9D=A2=E6=9D=BF?=
=?UTF-8?q?=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 2 +-
.../Service/Document/SystemDocumentService.cs | 7 ++--
.../TrialSiteUser/PersonalWorkstation.cs | 37 +++++++++----------
3 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index fa898aa3b..71eea224f 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1046,7 +1046,7 @@
-
+
获取需要签署的系统文档列表
diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs
index 3649f5322..f3a7edff0 100644
--- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs
+++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs
@@ -124,12 +124,13 @@ namespace IRaCIS.Core.Application.Services
///
///
- public async Task> GetWaitSignSysDocList()
+ public async Task> GetWaitSignSysDocList(SystemDocumentQuery querySystemDocument)
{
var query = from sysDoc in _systemDocumentRepository.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
-
+ .WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
+ .WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
join confirm in _repository.GetQueryable() on new { ConfirmUserId = _userInfo.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
from confirm in cc.DefaultIfEmpty()
@@ -157,7 +158,7 @@ namespace IRaCIS.Core.Application.Services
UserTypeShortName = user.UserTypeRole.UserTypeShortName
};
- return await query.Where(t=>t.ConfirmTime==null).ToListAsync();
+ return await query.Where(t=>t.ConfirmTime==null).ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs
index 4e6418c07..314ff36a4 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs
@@ -134,28 +134,25 @@ namespace IRaCIS.Core.Application
.WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id)).Count() > 0)
.ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId })
.OrderByDescending(t => t.WaitSignCount)
- .ToPagedListAsync(query.PageIndex, query.PageSize - 1, query.SortField, query.Asc);
+ .ToPagedListAsync(query.PageIndex, query.PageSize , query.SortField, query.Asc);
+
+ //var sysDocStat = new DocSignStat()
+ //{
+ // IsSystemDoc = true,
+ // WaitSignCount = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin
+ // ? 0
+ // : await _systemDocumentRepository
+ // .Where(t =>
+ // t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) &&
+ // !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id))
+ // .CountAsync()
+ //};
+ //var list = trialDocStat.CurrentPageData.ToList();
+ //list.Insert(0, sysDocStat);
+ //trialDocStat.CurrentPageData = list;
+ //trialDocStat.TotalCount++;
- var sysDocStat = new DocSignStat()
- {
- IsSystemDoc = true,
- WaitSignCount = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin
- ? 0
- : await _systemDocumentRepository
- .Where(t =>
- t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) &&
- !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id))
- .CountAsync()
-
- };
-
- var list = trialDocStat.CurrentPageData.ToList();
-
- list.Insert(0, sysDocStat);
-
- trialDocStat.CurrentPageData = list;
- trialDocStat.TotalCount++;
return trialDocStat;
}