修改
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
048afdcc7b
commit
84a7d75174
|
@ -16992,11 +16992,32 @@
|
|||
SystemDocumentService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocumentAttachment},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
SystemDocumentService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.GetSystemDocumentAttachmentList(IRaCIS.Core.Application.Contracts.SystemDocumentAttachmentQuery)">
|
||||
<summary>
|
||||
获取系统文档附件
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.AddOrUpdateSystemDocumentAttachment(IRaCIS.Core.Application.Contracts.SystemDocumentAttachmentAddOrEdit)">
|
||||
<summary>
|
||||
新增或编辑系统文档附件
|
||||
</summary>
|
||||
<param name="addOrEditSystemDocumentAttachment"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.DeleteSystemDocumentAttachment(System.Guid)">
|
||||
<summary>
|
||||
删除系统文档附件
|
||||
</summary>
|
||||
<param name="systemDocumentAttachmentId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.GetSystemDocumentListAsync(IRaCIS.Core.Application.Contracts.SystemDocumentQuery)">
|
||||
<summary>
|
||||
管理端列表
|
||||
|
|
|
@ -8,6 +8,49 @@ using System.ComponentModel.DataAnnotations;
|
|||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
public class SystemDocumentAttachmentView : SystemDocumentAttachmentAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class SystemDocumentAttachmentAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public string FileFormat { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
|
||||
public string FilePath { get; set; }
|
||||
|
||||
public decimal? FileSize { get; set; }
|
||||
|
||||
public bool OffLine { get; set; }
|
||||
|
||||
public Guid SystemDocumentId { get; set; }
|
||||
}
|
||||
|
||||
public class SystemDocumentAttachmentQuery : PageInput
|
||||
{
|
||||
public string? FileFormat { get; set; }
|
||||
|
||||
public string? FileName { get; set; }
|
||||
|
||||
public string? FilePath { get; set; }
|
||||
|
||||
public decimal? FileSize { get; set; }
|
||||
|
||||
public bool? OffLine { get; set; }
|
||||
|
||||
public Guid? SystemDocumentId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary> SystemDocumentView 列表视图模型 </summary>
|
||||
public class SystemDocumentView : SystemDocumentAddOrEdit
|
||||
{
|
||||
|
|
|
@ -27,6 +27,13 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
Task<PageOutput<UnionDocumentWithConfirmInfoView>> getWaitSignSysDocList(SystemDocumentQuery querySystemDocument);
|
||||
|
||||
|
||||
Task<PageOutput<SystemDocumentAttachmentView>> GetSystemDocumentAttachmentList(SystemDocumentAttachmentQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateSystemDocumentAttachment(SystemDocumentAttachmentAddOrEdit addOrEditSystemDocumentAttachment);
|
||||
|
||||
Task<IResponseOutput> DeleteSystemDocumentAttachment(Guid systemDocumentAttachmentId);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -16,12 +16,59 @@ namespace IRaCIS.Core.Application.Services
|
|||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class SystemDocumentService(IRepository<SystemDocument> _systemDocumentRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<SystemDocumentAttachment> _systemDocumentAttachmentRepository,
|
||||
IRepository<IdentityUser> _identityUserRepository,
|
||||
IRepository<SystemDocConfirmedIdentityUser> _systemDocConfirmedUserRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISystemDocumentService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取系统文档附件
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<SystemDocumentAttachmentView>> GetSystemDocumentAttachmentList(SystemDocumentAttachmentQuery inQuery)
|
||||
{
|
||||
|
||||
var systemDocumentAttachmentQueryable = _systemDocumentAttachmentRepository
|
||||
.WhereIf(inQuery.SystemDocumentId != null, t => t.SystemDocumentId == inQuery.SystemDocumentId)
|
||||
.WhereIf(inQuery.FileName != null, t => t.FileName == inQuery.FileName)
|
||||
.WhereIf(inQuery.FileFormat != null, t => t.FileFormat == inQuery.FileFormat)
|
||||
.ProjectTo<SystemDocumentAttachmentView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await systemDocumentAttachmentQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增或编辑系统文档附件
|
||||
/// </summary>
|
||||
/// <param name="addOrEditSystemDocumentAttachment"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddOrUpdateSystemDocumentAttachment(SystemDocumentAttachmentAddOrEdit addOrEditSystemDocumentAttachment)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var entity = await _systemDocumentAttachmentRepository.InsertOrUpdateAsync(addOrEditSystemDocumentAttachment, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除系统文档附件
|
||||
/// </summary>
|
||||
/// <param name="systemDocumentAttachmentId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{systemDocumentAttachmentId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteSystemDocumentAttachment(Guid systemDocumentAttachmentId)
|
||||
{
|
||||
var success = await _systemDocumentAttachmentRepository.DeleteFromQueryAsync(t => t.Id == systemDocumentAttachmentId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -14,6 +14,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var userId = Guid.Empty;
|
||||
var isEn_Us = false;
|
||||
|
||||
// 在此处拷贝automapper 映射
|
||||
|
||||
CreateMap<SystemDocumentAttachment, SystemDocumentAttachmentView>();
|
||||
CreateMap<SystemDocumentAttachment, SystemDocumentAttachmentAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<AuditDocumentData, AuditDocumentAddOrEdit>();
|
||||
//CreateMap<List<AuditDocumentData>, List<AuditDocumentAddOrEdit>>();
|
||||
CreateMap<AuditDocument, AuditDocumentView>();
|
||||
|
|
Loading…
Reference in New Issue