代码提交

This commit is contained in:
he
2025-02-25 10:38:11 +08:00
parent 337bda45fd
commit 6200ec1ba7
7 changed files with 135 additions and 18 deletions
@@ -1480,6 +1480,13 @@
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.SetAuthorizedView(IRaCIS.Core.Application.ViewModel.SetAuthorizedViewInDto)">
<summary>
修改授权状态
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.Application.Service.TrialFinalRecordService">
<summary>
项目定稿记录
@@ -14176,11 +14183,41 @@
<member name="T:IRaCIS.Core.Application.ViewModel.TrialEmailNoticeConfigAddOrEdit">
<summary> TrialEmailNoticeConfigAddOrEdit 列表查询参数模型</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.GetTrialFileTypeDataInDto.IsAuthorizedView">
<summary>
是否授权
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFileTypeAddOrEdit.IsAuthorizedView">
<summary>
是否授权
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFileTypeAddOrEdit.ShowOrder">
<summary>
显示顺序
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit.PDFFileRecord">
<summary>
定稿PDF
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit.WordFileRecord">
<summary>
定稿Word
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit.SignFileRecord">
<summary>
签名页
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit.HistoryFileRecord">
<summary>
历史记录
</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.SystemAnonymizationView">
<summary> SystemAnonymizationView 列表视图模型 </summary>
</member>
@@ -32,12 +32,21 @@ public class TrialFileTypeData
public List<TrialFileTypeView> TrialFileTypeList { get; set; }
}
public class SetAuthorizedViewInDto
{
public Guid Id { get; set; }
public bool IsAuthorizedView { get; set; }
}
public class GetTrialFileTypeDataInDto
{
public Guid TrialId { get; set; }
public bool IsCheck { get; set; } = false;
/// <summary>
/// 是否授权
/// </summary>
public bool IsAuthorizedView { get; set; } = false;
}
public class CopySystemFileTypeToTrialInDto
{
@@ -82,6 +91,11 @@ public class TrialFileTypeAddOrEdit
public Guid TrialId { get; set; }
/// <summary>
/// 是否授权
/// </summary>
public bool IsAuthorizedView { get; set; }
/// <summary>
/// 显示顺序
/// </summary>
@@ -7,6 +7,7 @@
using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Application.ViewModel;
public class TrialFinalRecordView : TrialFinalRecordAddOrEdit
@@ -23,15 +24,15 @@ public class TrialFinalRecordAddOrEdit
{
public Guid? Id { get; set; }
public Guid HistoryFileRecordId { get; set; }
public Guid? HistoryFileRecordId { get; set; }
public bool IsAuthorizedView { get; set; }
public string Name { get; set; }
public Guid PDFFileRecordId { get; set; }
public Guid? PDFFileRecordId { get; set; }
public Guid SignFileRecordId { get; set; }
public Guid? SignFileRecordId { get; set; }
public int State { get; set; }
@@ -41,8 +42,28 @@ public class TrialFinalRecordAddOrEdit
public string Version { get; set; }
public Guid WordFileRecordId { get; set; }
}
public Guid? WordFileRecordId { get; set; }
/// <summary>
/// 定稿PDF
/// </summary>
public TrialFile PDFFileRecord { get; set; }
/// <summary>
/// 定稿Word
/// </summary>
public TrialFile WordFileRecord { get; set; }
/// <summary>
/// 签名页
/// </summary>
public TrialFile SignFileRecord { get; set; }
/// <summary>
/// 历史记录
/// </summary>
public TrialFile HistoryFileRecord { get; set; }
}
public class TrialFinalRecordQuery : PageInput
{
@@ -51,10 +72,7 @@ public class TrialFinalRecordQuery : PageInput
public bool? IsAuthorizedView { get; set; }
public string? Name { get; set; }
public Guid? PDFFileRecordId { get; set; }
public Guid? SignFileRecordId { get; set; }
public int? State { get; set; }
@@ -138,7 +138,7 @@ public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepos
TrialId = inDto.TrialId
});
var trialFileTypeList = await _trialFileTypeRepository.Where(x=>x.TrialId==inDto.TrialId)
.WhereIf(inDto.IsCheck, x => x.IsEnable)
.WhereIf(inDto.IsAuthorizedView, x => x.IsAuthorizedView)
.OrderBy(x=>x.ShowOrder)
.ProjectTo<TrialFileTypeView>(_mapper.ConfigurationProvider)
.ToListAsync();
@@ -153,6 +153,18 @@ public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepos
}
/// <summary>
/// 修改授权状态
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> SetAuthorizedView(SetAuthorizedViewInDto inDto)
{
await _trialFileTypeRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new TrialFileType() { IsAuthorizedView = inDto.IsAuthorizedView }, true);
return ResponseOutput.Ok();
}
}
@@ -27,13 +27,16 @@ public class TrialFinalRecordService(IRepository<TrialFinalRecord> _trialFinalRe
[HttpPost]
public async Task<PageOutput<TrialFinalRecordView>> GetTrialFinalRecordList(TrialFinalRecordQuery inQuery)
public async Task<PageOutput<TrialFinalRecordView>> GetTrialFinalRecordList(TrialFinalRecordQuery inDto)
{
var trialFinalRecordQueryable = _trialFinalRecordRepository
.ProjectTo<TrialFinalRecordView>(_mapper.ConfigurationProvider);
.WhereIf(inDto.Name.IsNotNullOrEmpty(),x=>x.Name.Contains(inDto.Name))
.WhereIf(inDto.Version.IsNotNullOrEmpty(), x => x.Version.Contains(inDto.Version))
.WhereIf(inDto.IsAuthorizedView!=null, x => x.IsAuthorizedView==inDto.IsAuthorizedView)
.ProjectTo<TrialFinalRecordView>(_mapper.ConfigurationProvider);
var pageList = await trialFinalRecordQueryable.ToPagedListAsync(inQuery);
var pageList = await trialFinalRecordQueryable.ToPagedListAsync(inDto);
return pageList;
}