修改提示
parent
6312dec704
commit
a44c3dae10
|
@ -177,6 +177,7 @@ namespace IRaCIS.Api.Controllers
|
|||
|
||||
|
||||
[HttpGet, Route("imageShare/ShareImage")]
|
||||
[AllowAnonymous]
|
||||
public IResponseOutput ShareImage([FromServices] ITokenService _tokenService)
|
||||
{
|
||||
var token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()
|
||||
|
@ -191,7 +192,7 @@ namespace IRaCIS.Api.Controllers
|
|||
UserTypeEnum = UserTypeEnum.ShareImage,
|
||||
Code = "ShareCode001",
|
||||
}));
|
||||
return ResponseOutput.Ok("/#/preview?studyId=d8e7ed1c-4b59-a483-563d-4f05bd4f8921&token=" + token);
|
||||
return ResponseOutput.Ok("/#//showdicom?studyId=f7b67793-8155-0223-2f15-118f2642efb8&type=Share" + token);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@
|
|||
<summary>设置已读 </summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.SystemNoticeService.GetUserSystemNoticeList(IRaCIS.Core.Application.ViewModel.SystemNoticeQuery)">
|
||||
<summary>获取登陆用户的系统通知列表 只是过滤了用户类型 </summary>
|
||||
<summary>获取登陆用户的系统通知列表 只是过滤了用户类型 和已经发布的</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TrialExternalUserService">
|
||||
<summary>
|
||||
|
@ -1890,6 +1890,12 @@
|
|||
<param name="searchKey"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetBasicDataAllSelect">
|
||||
<summary>
|
||||
获取所有下拉框 枚举 bool 数据
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetBoolValueState(System.Boolean)">
|
||||
<summary>
|
||||
获取是和否
|
||||
|
@ -1906,12 +1912,6 @@
|
|||
<param name="childCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetBasicDataAllSelect">
|
||||
<summary>
|
||||
获取所有下拉框 枚举 bool 数据
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.FileService.CreateOfficialResumeZip(System.Int32,System.Guid[])">
|
||||
<summary>
|
||||
打包医生官方简历
|
||||
|
|
|
@ -135,6 +135,21 @@ namespace IRaCIS.Application.Services
|
|||
return searchList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有下拉框 枚举 bool 数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<Dictionary<string, List<BasicDicSelect>>> GetBasicDataAllSelect()
|
||||
{
|
||||
var searchList = await _dicRepository.Where(t => t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
return searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||
}
|
||||
|
||||
|
||||
#region 稽查相关
|
||||
|
||||
/// <summary>
|
||||
/// 获取是和否
|
||||
/// </summary>
|
||||
|
@ -155,11 +170,11 @@ namespace IRaCIS.Application.Services
|
|||
/// <returns></returns>
|
||||
public async Task<string> GetAuditState<T>(Guid trial, T childCode)
|
||||
{
|
||||
var QCProcessEnum = _trialRepository.Where(x=>x.Id==trial).Select(x => x.QCProcessEnum).FirstOrDefault();
|
||||
var QCProcessEnum = _trialRepository.Where(x => x.Id == trial).Select(x => x.QCProcessEnum).FirstOrDefault();
|
||||
switch (QCProcessEnum)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
case TrialQCProcess.SingleAudit:
|
||||
return await _dicRepository.Where(t => t.Parent.Code == "AuditStatePE" && t.Code == Convert.ToInt32(childCode).ToString()).Select(x => x.ValueCN).FirstOrDefaultAsync() ?? string.Empty;
|
||||
|
||||
|
@ -173,20 +188,14 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
public async Task<string> GetBasicDataTranslateItem<T>(string parentCode, T childCode)
|
||||
{
|
||||
return await _dicRepository.Where(t => t.Parent.Code == parentCode && t.Code == Convert.ToInt32(childCode).ToString() ).Select(x => x.ValueCN).FirstOrDefaultAsync()??string.Empty;
|
||||
return await _dicRepository.Where(t => t.Parent.Code == parentCode && t.Code == Convert.ToInt32(childCode).ToString()).Select(x => x.ValueCN).FirstOrDefaultAsync() ?? string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有下拉框 枚举 bool 数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<Dictionary<string, List<BasicDicSelect>>> GetBasicDataAllSelect()
|
||||
{
|
||||
var searchList = await _dicRepository.Where(t => t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
return searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ public static class ExcelExportHelper
|
|||
|
||||
if (doc == null)
|
||||
{
|
||||
throw new Exception("当前code 没要找到对应的导出模板文件");
|
||||
throw new Exception("当前code 没找到对应的导出模板文件");
|
||||
}
|
||||
|
||||
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\'))?.FullName;
|
||||
|
|
|
@ -4,13 +4,8 @@
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using User = IRaCIS.Core.Domain.Models.User;
|
||||
|
||||
namespace IRaCIS.Core.Application.Services
|
||||
|
@ -70,9 +65,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
else
|
||||
{
|
||||
var document = await _systemDocumentRepository.Where(t => t.Id == addOrEditSystemDocument.Id, true, true).Include(t => t.NeedConfirmedUserTypeList).FirstOrDefaultAsync();
|
||||
var document = (await _systemDocumentRepository.Where(t => t.Id == addOrEditSystemDocument.Id, true, true).Include(t => t.NeedConfirmedUserTypeList).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
if (document == null) return Null404NotFound(document);
|
||||
|
||||
if (await _systemDocumentRepository.AnyAsync(t => t.FileTypeId == addOrEditSystemDocument.FileTypeId && t.Name == addOrEditSystemDocument.Name && t.Id != addOrEditSystemDocument.Id, true))
|
||||
{
|
||||
|
@ -82,25 +76,29 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
_mapper.Map(addOrEditSystemDocument, document);
|
||||
|
||||
document.UpdateTime = DateTime.Now;
|
||||
#region 之前区分路径文件夹 现在不区分废弃
|
||||
|
||||
if (document.FileTypeId != addOrEditSystemDocument.FileTypeId)
|
||||
{
|
||||
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).IfNullThrowException().FullName;
|
||||
var beforeFilePath = Path.Combine(rootPath, document.Path);
|
||||
//if (document.FileTypeId != addOrEditSystemDocument.FileTypeId)
|
||||
//{
|
||||
// var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).IfNullThrowException().FullName;
|
||||
// var beforeFilePath = Path.Combine(rootPath, document.Path);
|
||||
|
||||
document.Path = document.Path.Replace(document.FileTypeId.ToString(), addOrEditSystemDocument.FileTypeId.ToString());
|
||||
// document.Path = document.Path.Replace(document.FileTypeId.ToString(), addOrEditSystemDocument.FileTypeId.ToString());
|
||||
|
||||
var nowPath = Path.Combine(rootPath, document.Path);
|
||||
// var nowPath = Path.Combine(rootPath, document.Path);
|
||||
|
||||
if (File.Exists(beforeFilePath))
|
||||
{
|
||||
File.Move(beforeFilePath, nowPath, true);
|
||||
File.Delete(beforeFilePath);
|
||||
}
|
||||
// if (File.Exists(beforeFilePath))
|
||||
// {
|
||||
// File.Move(beforeFilePath, nowPath, true);
|
||||
// File.Delete(beforeFilePath);
|
||||
// }
|
||||
|
||||
}
|
||||
var success = await _repository.SaveChangesAsync();
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
var success = await _systemDocumentRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(document.Id.ToString());
|
||||
}
|
||||
|
|
|
@ -418,34 +418,37 @@ namespace IRaCIS.Core.Application.Services
|
|||
return ResponseOutput.NotOk("同类型已存在该文件名");
|
||||
}
|
||||
|
||||
var document = _trialDocumentRepository.Where(t => t.Id == addOrEditTrialDocument.Id, true).Include(t => t.NeedConfirmedUserTypeList).FirstOrDefault();
|
||||
var document = (await _trialDocumentRepository.Where(t => t.Id == addOrEditTrialDocument.Id, true).Include(t => t.NeedConfirmedUserTypeList).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
if (document == null) return Null404NotFound(document);
|
||||
|
||||
//var dbDocumentType = document.Type;
|
||||
|
||||
_mapper.Map(addOrEditTrialDocument, document);
|
||||
|
||||
if (document.FileTypeId != addOrEditTrialDocument.FileTypeId)
|
||||
{
|
||||
#region 不区分路径了
|
||||
|
||||
//if (document.FileTypeId != addOrEditTrialDocument.FileTypeId)
|
||||
//{
|
||||
|
||||
|
||||
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).IfNullThrowException().FullName;
|
||||
var beforeFilePath = Path.Combine(rootPath, document.Path);
|
||||
// var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).IfNullThrowException().FullName;
|
||||
// var beforeFilePath = Path.Combine(rootPath, document.Path);
|
||||
|
||||
document.Path = document.Path.Replace(document.FileTypeId.ToString(), addOrEditTrialDocument.FileTypeId.ToString());
|
||||
// document.Path = document.Path.Replace(document.FileTypeId.ToString(), addOrEditTrialDocument.FileTypeId.ToString());
|
||||
|
||||
var nowPath = Path.Combine(rootPath, document.Path);
|
||||
// var nowPath = Path.Combine(rootPath, document.Path);
|
||||
|
||||
if (File.Exists(beforeFilePath))
|
||||
{
|
||||
File.Move(beforeFilePath, nowPath, true);
|
||||
File.Delete(beforeFilePath);
|
||||
}
|
||||
// if (File.Exists(beforeFilePath))
|
||||
// {
|
||||
// File.Move(beforeFilePath, nowPath, true);
|
||||
// File.Delete(beforeFilePath);
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
var success = await _repository.SaveChangesAsync();
|
||||
#endregion
|
||||
|
||||
|
||||
var success = await _trialDocumentRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(document.Id.ToString());
|
||||
}
|
||||
|
@ -525,10 +528,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> UserConfirm(UserConfirmCommand userConfirmCommand)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (userConfirmCommand.isSystemDoc)
|
||||
{
|
||||
if (await _repository.AnyAsync<SystemDocConfirmedUser>(t => t.SystemDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id))
|
||||
|
|
|
@ -463,6 +463,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
/// <summary> 指定资源Id,获取Dicom检查信息 </summary>
|
||||
/// <param name="studyId"> Dicom检查的Id </param>
|
||||
[HttpGet, Route("{studyId:guid}")]
|
||||
[AllowAnonymous]
|
||||
public IResponseOutput<DicomStudyDTO> Item(Guid studyId)
|
||||
{
|
||||
return ResponseOutput.Ok(_mapper.Map<DicomStudyDTO>(_repository.Where<DicomStudy>().FirstOrDefault(s => s.Id == studyId)));
|
||||
|
|
|
@ -112,6 +112,30 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string FullFilePath { get; set; }
|
||||
|
||||
public bool IsRead { get; set; }
|
||||
|
||||
|
||||
public Guid? PublishedUserId { get; set; }
|
||||
|
||||
public DateTime? PublishedTime { get; set; }
|
||||
|
||||
public string PublishUserName { get; set; }
|
||||
|
||||
public SystemNotice_NoticeStateEnum ActualNoticeStateEnum
|
||||
|
||||
{
|
||||
get
|
||||
{
|
||||
if (NoticeStateEnum == SystemNotice_NoticeStateEnum.HavePublished && EndDate != null && EndDate < DateTime.Now)
|
||||
{
|
||||
return SystemNotice_NoticeStateEnum.HaveExpired;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NoticeStateEnum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class SystemNoticeUserTypeView
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
/// <summary>获取登陆用户的系统通知列表 只是过滤了用户类型 </summary>
|
||||
/// <summary>获取登陆用户的系统通知列表 只是过滤了用户类型 和已经发布的</summary>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<SystemNoticeReadDTO>> GetUserSystemNoticeList(SystemNoticeQuery querySystemNotice)
|
||||
{
|
||||
|
|
|
@ -78,14 +78,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.UserType, u => u.MapFrom(t => t.UserTypeName));
|
||||
|
||||
CreateMap<User, UserDetailDTO>()
|
||||
.ForMember(d => d.RealName, u => u.MapFrom(s => s.LastName + " / " + s.FirstName))
|
||||
.ForMember(d => d.RealName, u => u.MapFrom(s => s.FullName))
|
||||
.ForMember(d => d.UserTypeId, u => u.MapFrom(s => s.UserTypeRole.Id))
|
||||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeName))
|
||||
.ForMember(d => d.UserTypeShortName, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||
.ForMember(d => d.CanEditUserType, u => u.MapFrom(s => !s.UserTrials.Any()));
|
||||
|
||||
CreateMap<User, UserListDTO>()
|
||||
.ForMember(d => d.RealName, u => u.MapFrom(s => s.LastName + " / " + s.FirstName))
|
||||
.ForMember(d => d.RealName, u => u.MapFrom(s => s.FullName))
|
||||
.ForMember(d => d.UserTypeId, u => u.MapFrom(s => s.UserTypeRole.Id))
|
||||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||
.ForMember(d => d.CanEditUserType, u => u.MapFrom(s => !s.UserTrials.Any()));
|
||||
|
@ -93,15 +93,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
var token = string.Empty;
|
||||
var userId = Guid.Empty;
|
||||
CreateMap<SystemNotice, SystemNoticeView>()
|
||||
.ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.FullName))
|
||||
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUser.FullName))
|
||||
.ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName))
|
||||
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUser.UserName))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token));
|
||||
|
||||
|
||||
|
||||
|
||||
CreateMap<SystemNotice, SystemNoticeReadDTO>()
|
||||
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUser.FullName))
|
||||
.ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName))
|
||||
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUser.UserName))
|
||||
.ForMember(t => t.IsRead, d => d.MapFrom(t => t.NoticeUserReadList.Any(t => t.CreateUserId == userId)))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token));
|
||||
|
||||
|
|
Loading…
Reference in New Issue