运维系统通知列表维护
parent
6f09114bda
commit
7351415bbc
|
@ -154,6 +154,46 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传系统通知文档
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("SystemNotice/UploadSystemNoticeDoc")]
|
||||
[DisableRequestSizeLimit]
|
||||
[DisableFormValueModelBinding]
|
||||
public async Task<IResponseOutput> UploadSystemNoticeDoc()
|
||||
{
|
||||
var boundary = HeaderUtilities.RemoveQuotes(MediaTypeHeaderValue.Parse(Request.ContentType).Boundary).Value;
|
||||
|
||||
var reader = new MultipartReader(boundary, HttpContext.Request.Body);
|
||||
|
||||
var section = await reader.ReadNextSectionAsync();
|
||||
|
||||
while (section != null)
|
||||
{
|
||||
var hasContentDispositionHeader = ContentDispositionHeaderValue.TryParse(section.ContentDisposition, out var contentDisposition);
|
||||
|
||||
if (hasContentDispositionHeader)
|
||||
{
|
||||
|
||||
DealSystemNoticePath( contentDisposition.FileName.Value, out string serverFilePath, out string relativePath);
|
||||
|
||||
await WriteFileAsync(section.Body, serverFilePath);
|
||||
|
||||
//仅仅返回一个文件,如果多文件上传 在最后返回多个路径
|
||||
return ResponseOutput.Ok(new
|
||||
{
|
||||
FilePath = relativePath,
|
||||
FullFilePath = relativePath + "?access_token=" + _userInfo.UserToken
|
||||
});
|
||||
|
||||
}
|
||||
section = await reader.ReadNextSectionAsync();
|
||||
}
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
private void DealCommonStorePath(string fileType, string moduleType, string fileRealName, out string serverFilePath, out string relativePath)
|
||||
{
|
||||
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).FullName;
|
||||
|
@ -174,6 +214,26 @@ namespace IRaCIS.Core.API.Controllers
|
|||
}
|
||||
|
||||
|
||||
private void DealSystemNoticePath(string fileRealName, out string serverFilePath, out string relativePath)
|
||||
{
|
||||
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).FullName;
|
||||
//上传根路径
|
||||
var _fileStorePath = Path.Combine(rootPath, StaticData.SystemNoticeFolder);
|
||||
|
||||
//文件类型路径处理
|
||||
var uploadFolderPath = Path.Combine(_fileStorePath);
|
||||
if (!Directory.Exists(uploadFolderPath)) Directory.CreateDirectory(uploadFolderPath);
|
||||
|
||||
|
||||
var fileNameEX = Path.GetExtension(fileRealName);
|
||||
var trustedFileNameForFileStorage = fileRealName+Guid.NewGuid().ToString() + fileNameEX;
|
||||
|
||||
relativePath = $"/{StaticData.CommonFileFolder}/{trustedFileNameForFileStorage}";
|
||||
|
||||
serverFilePath = Path.Combine(uploadFolderPath, trustedFileNameForFileStorage);
|
||||
}
|
||||
|
||||
|
||||
private void DealSysTemStorePath( string type, string fileRealName, out string serverFilePath, out string relativePath)
|
||||
{
|
||||
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).FullName;
|
||||
|
|
|
@ -373,6 +373,12 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.UploadController.UploadSystemNoticeDoc">
|
||||
<summary>
|
||||
上传系统通知文档
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.UploadController.UploadVisitData(System.Guid,IRaCIS.Core.API.Controllers.UploadController.UploadFileTypeEnum,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit})">
|
||||
<summary>
|
||||
上传临床数据
|
||||
|
|
|
@ -325,6 +325,11 @@
|
|||
<param name="datas"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.SystemNoticeService">
|
||||
<summary>
|
||||
SystemNoticeService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TrialExternalUserService">
|
||||
<summary>
|
||||
项目外部人员 录入流程相关
|
||||
|
@ -515,15 +520,6 @@
|
|||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeQuery">
|
||||
<summary>SystemNoticeQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.SystemNoticeQuery.NoticeContent">
|
||||
<summary> NoticeContent</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.SystemNoticeQuery.FileName">
|
||||
<summary> FileName</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.SystemNoticeQuery.Path">
|
||||
<summary> Path</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeAddOrEdit">
|
||||
<summary> SystemNoticeAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
|
|
|
@ -6,60 +6,75 @@
|
|||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Share.Management;
|
||||
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
/// <summary> SystemNoticeView 列表视图模型 </summary>
|
||||
public class SystemNoticeView
|
||||
public class SystemNoticeView : SystemNoticeBasicInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public int NoticeLevelEnum { get; set; }
|
||||
public string NoticeContent { get; set; }
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public int ApplicableProjectEnum { get; set; }
|
||||
public int NoticeMode { get; set; }
|
||||
public int NoticeStateEnum { get; set; }
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public string Path { get; set; }
|
||||
|
||||
public string FullFilePath { get; set; }
|
||||
|
||||
public List<UserTypeSimpleDTO> NoticeUserTypeList { get; set; }
|
||||
|
||||
}
|
||||
|
||||
///<summary>SystemNoticeQuery 列表查询参数模型</summary>
|
||||
public class SystemNoticeQuery
|
||||
public class SystemNoticeQuery:PageInput
|
||||
{
|
||||
///<summary> NoticeContent</summary>
|
||||
public string NoticeContent { get; set; }
|
||||
public string NoticeContent { get; set; } = string.Empty;
|
||||
|
||||
///<summary> FileName</summary>
|
||||
public string FileName { get; set; }
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
public SystemNotice_NoticeTypeEnum? NoticeTypeEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeLevelEnum? NoticeLevelEnum { get; set; }
|
||||
|
||||
public SystemNotice_ApplicableProjectEnum? ApplicableProjectEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeModeEnum? NoticeModeEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeStateEnum? NoticeStateEnum { get; set; }
|
||||
|
||||
///<summary> Path</summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
}
|
||||
|
||||
///<summary> SystemNoticeAddOrEdit 列表查询参数模型</summary>
|
||||
public class SystemNoticeAddOrEdit
|
||||
public class SystemNoticeBasicInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public int NoticeLevelEnum { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public string NoticeContent { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public int ApplicableProjectEnum { get; set; }
|
||||
public int NoticeMode { get; set; }
|
||||
public int NoticeStateEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeTypeEnum NoticeTypeEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeLevelEnum NoticeLevelEnum { get; set; }
|
||||
|
||||
public SystemNotice_ApplicableProjectEnum ApplicableProjectEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeModeEnum NoticeModeEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeStateEnum NoticeStateEnum { get; set; }
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public string Path { get; set; }
|
||||
}
|
||||
|
||||
///<summary> SystemNoticeAddOrEdit 列表查询参数模型</summary>
|
||||
public class SystemNoticeAddOrEdit: SystemNoticeBasicInfo
|
||||
{
|
||||
|
||||
|
||||
public Guid[] NoticeUserTypeIdList { get; set; }
|
||||
}
|
||||
|
||||
public class SystemNoticeUserTypeView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
|
|
@ -80,6 +80,15 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
}
|
||||
|
||||
|
||||
public class UserTypeSimpleDTO
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string UserTypeName { get; set; } = string.Empty;
|
||||
public UserTypeEnum UserTypeEnum { get; set; }
|
||||
public string UserTypeShortName { get; set; } = string.Empty;
|
||||
public string PermissionStr { get; set; } = String.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
|||
{
|
||||
|
||||
|
||||
Task<List<SystemNoticeView>> GetSystemNoticeList(SystemNoticeQuery querySystemNotice);
|
||||
Task<PageOutput<SystemNoticeView>> GetSystemNoticeList(SystemNoticeQuery querySystemNotice);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateSystemNotice(SystemNoticeAddOrEdit addOrEditSystemNotice);
|
||||
|
||||
|
|
|
@ -1,64 +1,82 @@
|
|||
////--------------------------------------------------------------------
|
||||
//// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
//// 生成时间 2022-04-25 09:46:43
|
||||
//// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
////--------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-04-25 09:46:43
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
//using IRaCIS.Core.Domain.Models;
|
||||
//using Microsoft.AspNetCore.Mvc;
|
||||
//using IRaCIS.Core.Application.Interfaces;
|
||||
//using IRaCIS.Core.Application.ViewModel;
|
||||
//namespace IRaCIS.Core.Application.Service
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// SystemNoticeService
|
||||
// /// </summary>
|
||||
// [ ApiExplorerSettings(GroupName = "Test")]
|
||||
// public class SystemNoticeService: BaseService, ISystemNoticeService
|
||||
// {
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// SystemNoticeService
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Management")]
|
||||
public class SystemNoticeService : BaseService, ISystemNoticeService
|
||||
{
|
||||
|
||||
// private readonly IRepository<SystemNotice> _systemNoticeRepository;
|
||||
private readonly IRepository<SystemNotice> _systemNoticeRepository;
|
||||
|
||||
// public SystemNoticeService(IRepository<SystemNotice> systemNoticeRepository)
|
||||
// {
|
||||
// _systemNoticeRepository = systemNoticeRepository;
|
||||
// }
|
||||
public SystemNoticeService(IRepository<SystemNotice> systemNoticeRepository)
|
||||
{
|
||||
_systemNoticeRepository = systemNoticeRepository;
|
||||
}
|
||||
|
||||
|
||||
// public async Task<List<SystemNoticeView>> GetSystemNoticeList(SystemNoticeQuery querySystemNotice)
|
||||
// {
|
||||
|
||||
|
||||
// var systemNoticeQueryable = _repository.GetQueryable<SystemNotice>()
|
||||
// .ProjectTo<SystemNoticeView>(_mapper.ConfigurationProvider);
|
||||
|
||||
// return await systemNoticeQueryable.ToListAsync();
|
||||
// }
|
||||
|
||||
|
||||
// public async Task<IResponseOutput> AddOrUpdateSystemNotice(SystemNoticeAddOrEdit addOrEditSystemNotice)
|
||||
// {
|
||||
// // 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
// //CreateMap<SystemNotice, SystemNoticeView>();
|
||||
// // CreateMap< SystemNotice,SystemNoticeAddOrEdit>().ReverseMap();
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<SystemNoticeView>> GetSystemNoticeList(SystemNoticeQuery querySystemNotice)
|
||||
{
|
||||
|
||||
|
||||
// var entity = await _repository.InsertOrUpdateAsync<SystemNotice, SystemNoticeAddOrEdit>(addOrEditSystemNotice, true);
|
||||
var systemNoticeQueryable = _systemNoticeRepository
|
||||
.WhereIf(querySystemNotice.ApplicableProjectEnum != null, t => t.ApplicableProjectEnum == querySystemNotice.ApplicableProjectEnum)
|
||||
.WhereIf(querySystemNotice.NoticeLevelEnum != null, t => t.NoticeLevelEnum == querySystemNotice.NoticeLevelEnum)
|
||||
.WhereIf(querySystemNotice.NoticeModeEnum != null, t => t.NoticeModeEnum == querySystemNotice.NoticeModeEnum)
|
||||
.WhereIf(querySystemNotice.NoticeStateEnum != null, t => t.NoticeStateEnum == querySystemNotice.NoticeStateEnum)
|
||||
.WhereIf(querySystemNotice.NoticeTypeEnum != null, t => t.NoticeTypeEnum == querySystemNotice.NoticeTypeEnum)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.FileName), t => t.FileName.Contains(querySystemNotice.FileName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.NoticeContent), t => t.NoticeContent.Contains(querySystemNotice.NoticeContent))
|
||||
.ProjectTo<SystemNoticeView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken});
|
||||
|
||||
// return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
// }
|
||||
return await systemNoticeQueryable.ToPagedListAsync(querySystemNotice.PageIndex, querySystemNotice.PageSize, querySystemNotice.SortField, querySystemNotice.Asc);
|
||||
}
|
||||
|
||||
|
||||
// [HttpDelete("{systemNoticeId:guid}")]
|
||||
// public async Task<IResponseOutput> DeleteSystemNotice(Guid systemNoticeId)
|
||||
// {
|
||||
// var success = await _repository.BatchDeleteAsync<SystemNotice>()(t => t.Id == systemNoticeId);
|
||||
// return ResponseOutput.Result(success);
|
||||
// }
|
||||
public async Task<IResponseOutput> AddOrUpdateSystemNotice(SystemNoticeAddOrEdit addOrEditSystemNotice)
|
||||
{
|
||||
|
||||
|
||||
// }
|
||||
//}
|
||||
if (addOrEditSystemNotice.Id == null)
|
||||
{
|
||||
var entity = await _systemNoticeRepository.InsertFromDTOAsync(addOrEditSystemNotice,true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var systemNotice = await _systemNoticeRepository.Where(t => t.Id == addOrEditSystemNotice.Id, true, true).Include(t => t.NoticeUserTypeList).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
_mapper.Map(addOrEditSystemNotice, systemNotice);
|
||||
|
||||
await _systemNoticeRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{systemNoticeId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteSystemNotice(Guid systemNoticeId)
|
||||
{
|
||||
var success = await _systemNoticeRepository.BatchDeleteAsync(t => t.Id == systemNoticeId);
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using AutoMapper.EquivalencyExpression;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
|
@ -89,6 +90,23 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||
.ForMember(d => d.CanEditUserType, u => u.MapFrom(s => !s.UserTrials.Any()));
|
||||
|
||||
var token = string.Empty;
|
||||
CreateMap<SystemNotice, SystemNoticeView>()
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); ;
|
||||
|
||||
CreateMap<SystemNotice, SystemNoticeAddOrEdit>().ReverseMap()
|
||||
.ForMember(t=>t.NoticeUserTypeList,u=>u.MapFrom(t=>t.NoticeUserTypeIdList));
|
||||
|
||||
|
||||
CreateMap<SystemNoticeUserType, UserTypeSimpleDTO>().IncludeMembers(t=>t.NoticeUserType);
|
||||
|
||||
CreateMap<UserType, UserTypeSimpleDTO>();
|
||||
|
||||
CreateMap<Guid, SystemNoticeUserType>().EqualityComparison((odto, o) => odto == o.UserTypeId)
|
||||
.ForMember(d => d.UserTypeId, c => c.MapFrom(t => t));
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
||||
private readonly IHttpContextAccessor _httpContext;
|
||||
private readonly IWebHostEnvironment _hostEnvironment;
|
||||
private readonly IDictionaryService _dictionaryService;
|
||||
private readonly IInspectionService _inspectionService;
|
||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
||||
|
@ -36,7 +35,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public NoneDicomStudyService(IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||
IHttpContextAccessor httpContext,
|
||||
IWebHostEnvironment hostEnvironment,
|
||||
IDictionaryService dictionaryService,
|
||||
IInspectionService inspectionService,
|
||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository)
|
||||
|
@ -44,7 +42,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
_noneDicomStudyRepository = noneDicomStudyRepository;
|
||||
|
||||
this._httpContext = httpContext;
|
||||
this._hostEnvironment = hostEnvironment;
|
||||
this._dictionaryService = dictionaryService;
|
||||
this._inspectionService = inspectionService;
|
||||
_noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
||||
|
|
|
@ -15,8 +15,4 @@
|
|||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Management\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
namespace IRaCIS.Core.Domain.Share.Management
|
||||
{
|
||||
public enum SystemNotice_NoticeModeEnum
|
||||
{
|
||||
//跑马灯
|
||||
RunningLight = 0,
|
||||
|
||||
//页面
|
||||
Pages = 1
|
||||
}
|
||||
|
||||
public enum SystemNotice_NoticeStateEnum
|
||||
{
|
||||
NotPublish = 0,
|
||||
|
||||
HavePublished = 1,
|
||||
|
||||
HaveExpired = 2
|
||||
|
||||
}
|
||||
|
||||
|
||||
public enum SystemNotice_NoticeLevelEnum
|
||||
{
|
||||
SystemLevel=0,
|
||||
|
||||
TrialLevel=1
|
||||
}
|
||||
|
||||
public enum SystemNotice_NoticeTypeEnum
|
||||
{
|
||||
SystemUpgrade = 0,
|
||||
|
||||
TrialChanges = 1
|
||||
}
|
||||
|
||||
|
||||
public enum SystemNotice_ApplicableProjectEnum
|
||||
{
|
||||
//非正式项目
|
||||
OfficialTrial = 0,
|
||||
|
||||
NoneOfficial = 1
|
||||
}
|
||||
|
||||
}
|
|
@ -28,6 +28,7 @@
|
|||
public static readonly string UploadFileFolder = "UploadFile";
|
||||
public static readonly string TreatmenthistoryFolder = "Treatmenthistory";
|
||||
public static readonly string CommonFileFolder = "CommonFileFolder";
|
||||
public static readonly string SystemNoticeFolder = "SystemNoticeFolder";
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,94 +4,85 @@
|
|||
// 生成时间 2022-04-25 09:46:09
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using IRaCIS.Core.Domain.Share.Management;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///SystemNotice
|
||||
///</summary>
|
||||
[Table("SystemNotice")]
|
||||
public class SystemNotice : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// NoticeLevelEnum
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int NoticeLevelEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///<summary>
|
||||
///SystemNotice
|
||||
///</summary>
|
||||
[Table("SystemNotice")]
|
||||
public class SystemNotice : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
|
||||
public List<SystemNoticeUserType> NoticeUserTypeList { get; set; }
|
||||
|
||||
public List<SystemNoticeUserRead> NoticeUserReadList { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// NoticeContent
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string NoticeContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
[Required]
|
||||
public string NoticeContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
[Required]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ApplicableProjectEnum
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int ApplicableProjectEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NoticeMode
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int NoticeMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NoticeStateEnum
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int NoticeStateEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// StartDate
|
||||
/// </summary>
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// EndDate
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
[Required]
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
|
||||
|
||||
public SystemNotice_NoticeTypeEnum NoticeTypeEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeLevelEnum NoticeLevelEnum { get; set; }
|
||||
|
||||
public SystemNotice_ApplicableProjectEnum ApplicableProjectEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeModeEnum NoticeModeEnum { get; set; }
|
||||
|
||||
public SystemNotice_NoticeStateEnum NoticeStateEnum { get; set; }
|
||||
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FileName
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
[Required]
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Path { get; set; }
|
||||
|
||||
}
|
||||
[Required]
|
||||
public string Path { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -41,6 +41,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
[Required]
|
||||
public Guid UserTypeId { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("UserTypeId")]
|
||||
public UserType NoticeUserType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
context.Entity.UpdateTime=DateTime.UtcNow.AddHours(8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue