This commit is contained in:
@@ -39,7 +39,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
//现在需要签署的总数(项目待签署 +系统待签署)
|
||||
public int? WaitSignDocCount => TotalNeedSignTrialDocCount + TotalNeedSignSystemDocCount;
|
||||
public int? TotalNeedSignDocCount => TotalNeedSignTrialDocCount + TotalNeedSignSystemDocCount;
|
||||
}
|
||||
|
||||
public class TrialSiteSurveyStatQuery : PageInput
|
||||
|
||||
@@ -129,6 +129,10 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
public string UserRealName => LastName + " / " + FirstName;
|
||||
|
||||
public string IsGenerateAccountStr => IsGenerateAccount ? "是" : "否";
|
||||
|
||||
public string StateStr => State.GetDescription();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -99,29 +99,40 @@ namespace IRaCIS.Core.Application
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<DocSignStat>> GetTrialDocStatList(TrialSiteSurveyStatQuery query)
|
||||
{
|
||||
var trialDocStat = await _trialRepository.ProjectTo<DocSignStat>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId })
|
||||
.ToPagedListAsync(query.PageIndex, query.PageSize - 1, query.SortField, query.Asc);
|
||||
|
||||
|
||||
var sysDocStat = new DocSignStat()
|
||||
if (_userInfo.IsAdmin)
|
||||
{
|
||||
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()
|
||||
return new PageOutput<DocSignStat>(query.PageIndex, query.PageSize, 0, new List<DocSignStat>());
|
||||
}
|
||||
else
|
||||
{
|
||||
var trialDocStat = await _trialRepository
|
||||
.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<DocSignStat>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId })
|
||||
.ToPagedListAsync(query.PageIndex, query.PageSize - 1, query.SortField, query.Asc);
|
||||
|
||||
};
|
||||
|
||||
var list = trialDocStat.CurrentPageData.ToList();
|
||||
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()
|
||||
|
||||
list.Insert(0,sysDocStat);
|
||||
};
|
||||
|
||||
trialDocStat.CurrentPageData= list;
|
||||
return trialDocStat;
|
||||
var list = trialDocStat.CurrentPageData.ToList();
|
||||
|
||||
list.Insert(0, sysDocStat);
|
||||
|
||||
trialDocStat.CurrentPageData = list;
|
||||
return trialDocStat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,8 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
var exportInfo = data;
|
||||
|
||||
//处理翻译
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.TrialSiteUserSummary_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user