代码修改
This commit is contained in:
@@ -50,6 +50,8 @@ public class SysFileTypeQuery : PageInput
|
||||
{
|
||||
public ArchiveType? ArchiveTypeEnum { get; set; }
|
||||
|
||||
public SysTemplateType? SysTemplateTypeEnum { get; set; }
|
||||
|
||||
public bool? IsConfirmRecord { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public string FileType { get; set; } = string.Empty;
|
||||
|
||||
public int AttachmentCount { get; set; }
|
||||
|
||||
public List<NeedConfirmedUserTypeView> NeedConfirmedUserTypeList { get; set; } = new List<NeedConfirmedUserTypeView>();
|
||||
}
|
||||
|
||||
@@ -46,6 +48,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public class UnionDocumentWithConfirmInfoView : UnionDocumentView
|
||||
{
|
||||
|
||||
public DateTime UserCreateTime { get; set; }
|
||||
|
||||
|
||||
|
||||
public DateTime? ConfirmTime { get; set; }
|
||||
|
||||
@@ -58,6 +63,24 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string RealName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public int AttachmentCount { get; set; }
|
||||
|
||||
public DateTime? SuggestFinishTime { get {
|
||||
|
||||
if (this.CreateTime > this.UserCreateTime && this.CurrentStaffTrainDays != null)
|
||||
{
|
||||
return this.CreateTime.AddDays(this.CurrentStaffTrainDays.Value);
|
||||
}
|
||||
|
||||
if (this.CreateTime < this.UserCreateTime && this.NewStaffTrainDays != null)
|
||||
{
|
||||
return this.UserCreateTime.AddDays(this.NewStaffTrainDays.Value);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
} }
|
||||
|
||||
public string DocTypeCode { get; set; }
|
||||
|
||||
public List<string> UserConfirmedUserTypeList => (DocNeedSignUserTypeList != null && IdentityUserTypeList != null) ? IdentityUserTypeList.Intersect(DocNeedSignUserTypeList).ToList() : new List<string>();
|
||||
|
||||
@@ -33,6 +33,7 @@ public class SysFileTypeService(IRepository<SysFileType> _sysFileTypeRepository,
|
||||
|
||||
var sysFileTypeQueryable = _sysFileTypeRepository
|
||||
.WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum)
|
||||
.WhereIf(inQuery.SysTemplateTypeEnum != null, t => t.SysTemplateTypeEnum == inQuery.SysTemplateTypeEnum)
|
||||
.WhereIf(inQuery.IsConfirmRecord != null, t => t.IsConfirmRecord == inQuery.IsConfirmRecord)
|
||||
.WhereIf(inQuery.SubIdentificationEnum != null, t => t.SubIdentificationEnum == inQuery.SubIdentificationEnum)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
|
||||
@@ -164,9 +164,12 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
{
|
||||
AttachmentCount=sysDoc.SystemDocumentAttachmentList.Count(),
|
||||
IsSystemDoc = true,
|
||||
|
||||
CurrentStaffTrainDays=sysDoc.CurrentStaffTrainDays,
|
||||
NewStaffTrainDays = sysDoc.NewStaffTrainDays,
|
||||
Id = sysDoc.Id,
|
||||
UserCreateTime= user.CreateTime,
|
||||
CreateTime = sysDoc.CreateTime,
|
||||
IsDeleted = sysDoc.IsDeleted,
|
||||
SignViewMinimumMinutes = sysDoc.SignViewMinimumMinutes,
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
CreateMap<AuditDocument, AuditDocumentData>();
|
||||
CreateMap<AuditDocument, AuditDocumentAddOrEdit>().ReverseMap();
|
||||
CreateMap<SystemDocument, SystemDocumentView>()
|
||||
.ForMember(d => d.AttachmentCount, u => u.MapFrom(s => s.SystemDocumentAttachmentList.Count()))
|
||||
.ForMember(d => d.FileType, u => u.MapFrom(s => isEn_Us ? s.FileType.Value : s.FileType.ValueCN))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user