修改警告
parent
6318c09946
commit
2e1cb7a3b3
|
@ -14,6 +14,7 @@ using System;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace IRaCIS.Core.API.Controllers
|
||||
{
|
||||
|
@ -62,7 +63,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
[HttpGet("CommonDocument/DownloadCommonDoc")]
|
||||
public async Task<IActionResult> DownloadCommonFile(string code, [FromServices] IRepository<CommonDocument> _commonDocumentRepository)
|
||||
{
|
||||
var doc = _commonDocumentRepository.AsQueryable(true).FirstOrDefault(t => t.Code == code);
|
||||
var doc = await _commonDocumentRepository.AsQueryable(true).FirstOrDefaultAsync(t => t.Code == code);
|
||||
|
||||
if (doc == null)
|
||||
{
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace IRaCIS.Core.API.Controllers.Special
|
|||
}, User.FindFirst("id").Value);
|
||||
}
|
||||
}
|
||||
_costAdjustmentService.CalculateCNY(addOrUpdateModel.YearMonth, addOrUpdateModel.Rate);
|
||||
await _costAdjustmentService.CalculateCNY(addOrUpdateModel.YearMonth, addOrUpdateModel.Rate);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -271,7 +271,6 @@
|
|||
</summary>
|
||||
<param name="addDto">添加对象</param>
|
||||
<param name="signId">签名Id</param>
|
||||
<param name="Statusdata">初始化状态对象</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Inspection.InspectionService.AddListInspectionRecordAsync(System.Collections.Generic.List{IRaCIS.Core.Domain.Models.DataInspection})">
|
||||
|
@ -1123,6 +1122,9 @@
|
|||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<param name="isSiteUserNotAll">isAllSiteUser true : site用户列表,false :Site调研汇总表</param>
|
||||
<param name="_commonDocumentRepository"></param>
|
||||
<param name="_trialSiteSurveyRepository"></param>
|
||||
<param name="_trialSiteUserSurveyRepository"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
|
@ -1679,25 +1681,6 @@
|
|||
<param name="searchArray"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetDictionary(System.String[])">
|
||||
<summary>
|
||||
获取项目多选字典
|
||||
</summary>
|
||||
<param name="searchArray">Title、Department、Rank、Position、ReadingType、Subspeciality Sponsor CROCompany ReadingStandard ReviewMode ReviewType ProjectState</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.getDictionarySelectList(IRaCIS.Application.Contracts.DicQueryDTO)">
|
||||
<summary> 根据Key,获取单个字典数组 </summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetDicTree">
|
||||
<summary> 根据Type、Key 获取字典 树结构 </summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.DeleteDictionary(System.Guid)">
|
||||
<summary> 删除字典数据 </summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.getDictionarySelect">
|
||||
<summary> 获取所有字典数据 </summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.FileService.CreateOfficialResumeZip(System.Int32,System.Guid[])">
|
||||
<summary>
|
||||
打包医生官方简历
|
||||
|
@ -2178,7 +2161,12 @@
|
|||
<param name="newPwd"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Application.Services.UserService.ModifyPassword(IRaCIS.Application.Contracts.EditPasswordCommand)" -->
|
||||
<member name="M:IRaCIS.Application.Services.UserService.ModifyPassword(IRaCIS.Application.Contracts.EditPasswordCommand)">
|
||||
<summary>
|
||||
修改密码,当前支持旧密码修改密码
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.UserService.GetUserList(IRaCIS.Application.Contracts.UserListQueryDTO)">
|
||||
<summary>
|
||||
获取用户列表
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string FileType { get; set; } = String.Empty;
|
||||
public string ModuleType { get; set; } = String.Empty;
|
||||
|
||||
public string FullFilePath { get; set; }
|
||||
public string FullFilePath { get; set; } = String.Empty;
|
||||
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
|
|
|
@ -13,9 +13,9 @@ namespace IRaCIS.Application.Contracts
|
|||
public DateTime UpdateTime { get; set; }
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
public string ConfigType { get; set; }
|
||||
public string ConfigType { get; set; } = String.Empty;
|
||||
|
||||
public string ConfigTypeDes { get; set; }
|
||||
public string ConfigTypeDes { get; set; } = String.Empty;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -104,208 +104,5 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
|
||||
#region old 待废弃
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目多选字典
|
||||
/// </summary>
|
||||
/// <param name="searchArray">Title、Department、Rank、Position、ReadingType、Subspeciality Sponsor CROCompany ReadingStandard ReviewMode ReviewType ProjectState</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public DicResultDTO GetDictionary(string[] searchArray)
|
||||
{
|
||||
var doctorViewList = _dicRepository.ProjectTo<DicViewModelDTO>(_mapper.ConfigurationProvider).OrderBy(t => t.KeyName)
|
||||
.ThenBy(t => t.ShowOrder).ToList();
|
||||
|
||||
var projectDicResult = new DicResultDTO();
|
||||
foreach (var searchItem in searchArray)
|
||||
{
|
||||
var item = searchItem.Trim();
|
||||
var tempDic = new Dictionary<Guid, string>();
|
||||
doctorViewList.Where(o => o.KeyName == item).ToList().ForEach(o => tempDic.Add(o.Id!.Value, o.Value));
|
||||
projectDicResult.DicList.Add(item, tempDic);
|
||||
}
|
||||
return projectDicResult;
|
||||
}
|
||||
|
||||
|
||||
public DicResultDTO GetAllDictionary()
|
||||
{
|
||||
var list = _dicRepository.ProjectTo<DicViewModelDTO>(_mapper.ConfigurationProvider).OrderBy(t => t.KeyName)
|
||||
.ThenBy(t => t.ShowOrder).ToList();
|
||||
|
||||
var types = list.Select(u => u.KeyName).Distinct();
|
||||
|
||||
var projectDicResult = new DicResultDTO();
|
||||
foreach (var type in types)
|
||||
{
|
||||
var tempDic = new Dictionary<Guid, string>();
|
||||
|
||||
//list.Where(o => o.KeyName == type).ToList().ForEach(o => tempDic.Add(o.Id, string.IsNullOrEmpty(o.ValueCN)?o.Value: o.Value + " / " + o.ValueCN));
|
||||
list.Where(o => o.KeyName == type).ToList().ForEach(o => tempDic.Add(o.Id!.Value, o.Value));
|
||||
|
||||
projectDicResult.DicList.Add(type, tempDic);
|
||||
}
|
||||
|
||||
// //用户类型从字典表 移到另外的表了,现在为了前端不变,在这里获取,给出数据
|
||||
|
||||
//var userTypes= _userTypeRoleRepository.GetAll().OrderBy(t => t.Order).Select(t => new {t.Id, t.UserType}).ToList();
|
||||
//var userTypeDic = new Dictionary<Guid, string>();
|
||||
//userTypes.ForEach(o => userTypeDic.Add(o.Id, o.UserType));
|
||||
|
||||
// projectDicResult.DicList.Add("UserType", userTypeDic);
|
||||
|
||||
|
||||
return projectDicResult;
|
||||
}
|
||||
|
||||
/// <summary> 根据Key,获取单个字典数组 </summary>
|
||||
[HttpPost]
|
||||
public PageOutput<DicViewModelDTO> getDictionarySelectList(DicQueryDTO dicSearchModel)
|
||||
{
|
||||
|
||||
|
||||
var dicQueryable = _dicRepository
|
||||
.WhereIf(!string.IsNullOrEmpty(dicSearchModel.KeyName), t => t.KeyName == dicSearchModel.KeyName && t.Value != "")
|
||||
.ProjectTo<DicViewModelDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = dicQueryable.ToPagedList(dicSearchModel.PageIndex, dicSearchModel.PageSize, dicSearchModel.SortField, dicSearchModel.Asc);
|
||||
|
||||
return pageList;
|
||||
|
||||
}
|
||||
|
||||
/// <summary> 根据Type、Key 获取字典 树结构 </summary>
|
||||
public List<DictionaryTreeNode> GetDicTree()
|
||||
{
|
||||
var keyNameTypeDistinctList = _dicRepository.Where(t => t.ParentId != null)
|
||||
.ProjectTo<KeyNameType>(_mapper.ConfigurationProvider).Distinct().ToList();
|
||||
|
||||
var treeNodeList = new List<DictionaryTreeNode>();
|
||||
var group = keyNameTypeDistinctList.GroupBy(t => t.Type);
|
||||
foreach (var groupItem in group)
|
||||
{
|
||||
var node = new DictionaryTreeNode()
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
KeyName = groupItem.Key,
|
||||
Type = groupItem.Key,
|
||||
Children = keyNameTypeDistinctList.Where(t => t.Type == groupItem.Key).Select(t =>
|
||||
new DictionaryTreeNode()
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
KeyName = t.KeyName,
|
||||
Type = t.Type,
|
||||
Children = new List<DictionaryTreeNode>()
|
||||
}).ToList()
|
||||
};
|
||||
treeNodeList.Add(node);
|
||||
}
|
||||
return treeNodeList;
|
||||
}
|
||||
|
||||
|
||||
/// <summary> 添加或更新字典数据 </summary>
|
||||
//[HttpPost]
|
||||
//public IResponseOutput AddOrUpdateDictionary(AddOrUpdateDicDTO viewModel)
|
||||
//{
|
||||
// #region 封装前
|
||||
// //if (viewModel.Id == null)
|
||||
// //{
|
||||
// // var existItem = _dicRepository.FirstOrDefault(dic => dic.KeyName.Equals(viewModel.KeyName) && dic.Value.Equals(viewModel.Value));
|
||||
// // if (existItem != null)
|
||||
// // {
|
||||
// // return ResponseOutput.NotOk("The added item has the same name as a sub-item of current categpry. Please modify the name.");
|
||||
// // }
|
||||
// // var result = _dicRepository.Add(_mapper.Map<Dictionary>(viewModel));
|
||||
// // var success = _dicRepository.SaveChanges();
|
||||
// // return ResponseOutput.Result(success);
|
||||
// //}
|
||||
// //else
|
||||
// //{
|
||||
// // var existItem = _dicRepository.FirstOrDefault(dic => dic.KeyName.Equals(viewModel.KeyName) && dic.Value.Equals(viewModel.Value));
|
||||
// // if (existItem != null && existItem.Id != viewModel.Id)
|
||||
// // {
|
||||
// // return ResponseOutput.NotOk("The updated item has the same name as a sub-item of current categpry. Please modify the name.");
|
||||
// // }
|
||||
// // var updateItem = _dicRepository.FirstOrDefault(t => t.Id == viewModel.Id);
|
||||
// // _mapper.Map(viewModel, updateItem);
|
||||
// // var success = _dicRepository.SaveChanges();
|
||||
// // return ResponseOutput.Result(success);
|
||||
// //}
|
||||
// #endregion
|
||||
|
||||
// var exp = new EntityVerifyExp<Dictionary>()
|
||||
// {
|
||||
// VerifyExp = dic => dic.KeyName.Equals(viewModel.KeyName) && dic.Value.Equals(viewModel.Value),
|
||||
// VerifyMsg = "The item has the same name as a sub-item of current categpry"
|
||||
// };
|
||||
|
||||
// //var entity = _dicRepository.UseMapper(_mapper).InsertOrUpdate(viewModel, true, exp);
|
||||
|
||||
// return ResponseOutput.Ok(entity.Id);
|
||||
|
||||
//}
|
||||
|
||||
|
||||
/// <summary> 删除字典数据 </summary>
|
||||
[HttpDelete("{id:guid}")]
|
||||
public async Task<IResponseOutput> DeleteDictionary(Guid id)
|
||||
{
|
||||
if ((await _doctorDictionaryRepository.AnyAsync(t => t.DictionaryId == id)) ||
|
||||
(await _doctorRepository.AnyAsync(t => t.SpecialityId == id|| t.PositionId == id|| t.DepartmentId == id|| t.RankId == id))
|
||||
|
||||
)
|
||||
{
|
||||
return ResponseOutput.NotOk("This item is referenced by content of the reviewer's resume.");
|
||||
}
|
||||
|
||||
if (await _trialDictionaryRepository.AnyAsync(t => t.DictionaryId == id) ||
|
||||
await _trialRepository.AnyAsync(t => t.ReviewModeId == id))
|
||||
{
|
||||
return ResponseOutput.NotOk("This item is referenced by content of the trial infomation.");
|
||||
}
|
||||
|
||||
var success = await _dicRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
/// <summary> 获取所有字典数据 </summary>
|
||||
public async Task<IEnumerable<string>> getDictionarySelect()
|
||||
{
|
||||
return await _dicRepository.Select(t => t.KeyName).Distinct().ToListAsync();
|
||||
}
|
||||
|
||||
//[Obsolete]
|
||||
[NonDynamicMethod]
|
||||
public DicViewModelDTO GetDetailById(Guid id)
|
||||
{
|
||||
var result = _dicRepository.ProjectTo<DicViewModelDTO>(_mapper.ConfigurationProvider).FirstOrDefault(u => u.Id == id).IfNullThrowException();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public TrialDicSelect GetGenerateTrialCodeDic()
|
||||
{
|
||||
var list = _dicRepository.Where(t => t.KeyName == "Phase" || t.KeyName == "IndicationType" || t.KeyName == "DeclarationType").ProjectTo<TrialDictionaryView>(_mapper.ConfigurationProvider).ToList();
|
||||
|
||||
return new TrialDicSelect()
|
||||
{
|
||||
Phase = list.Where(t => t.KeyName == "Phase").OrderBy(t => t.ShowOrder).ToArray(),
|
||||
IndicationType = list.Where(t => t.KeyName == "IndicationType").OrderBy(t => t.ShowOrder).ToArray(),
|
||||
DeclarationType = list.Where(t => t.KeyName == "DeclarationType").OrderBy(t => t.ShowOrder).ToArray()
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,18 +9,6 @@ namespace IRaCIS.Application.Interfaces
|
|||
public interface IDictionaryService
|
||||
{
|
||||
|
||||
Task<IEnumerable<string>> getDictionarySelect();
|
||||
PageOutput<DicViewModelDTO> getDictionarySelectList(DicQueryDTO dicSearchModel);
|
||||
|
||||
Task<IResponseOutput> DeleteDictionary(Guid id);
|
||||
DicResultDTO GetDictionary(string[] searchArray);
|
||||
DicResultDTO GetAllDictionary();
|
||||
//IResponseOutput AddOrUpdateDictionary(AddOrUpdateDicDTO viewModel);
|
||||
|
||||
[EasyCachingAble(Expiration = 10)]
|
||||
List<DictionaryTreeNode> GetDicTree();
|
||||
DicViewModelDTO GetDetailById(Guid Id);
|
||||
|
||||
TrialDicSelect GetGenerateTrialCodeDic();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpGet("{code}")]
|
||||
public async Task<SystemBasicDataView> GetSystemBasicData(string code)
|
||||
{
|
||||
return await _repository.Where<SystemBasicData>(t => t.Code == code).ProjectTo<SystemBasicDataView>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
return (await _repository.Where<SystemBasicData>(t => t.Code == code).ProjectTo<SystemBasicDataView>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,12 +22,10 @@ namespace IRaCIS.Core.Application.Services
|
|||
public class SystemDocumentService : BaseService, ISystemDocumentService
|
||||
{
|
||||
|
||||
private readonly IWebHostEnvironment _hostEnvironment;
|
||||
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
||||
|
||||
public SystemDocumentService(IWebHostEnvironment hostEnvironment, IRepository<SystemDocument> systemDocumentRepository)
|
||||
public SystemDocumentService( IRepository<SystemDocument> systemDocumentRepository)
|
||||
{
|
||||
_hostEnvironment = hostEnvironment;
|
||||
_systemDocumentRepository = systemDocumentRepository;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,17 +21,13 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
|
||||
|
||||
private readonly IWebHostEnvironment _hostEnvironment;
|
||||
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
||||
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
||||
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
||||
|
||||
public TrialDocumentService(IWebHostEnvironment hostEnvironment, IRepository<TrialDocument> trialDocumentRepository
|
||||
, IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository, IRepository<SystemDocument> systemDocumentRepository)
|
||||
public TrialDocumentService( IRepository<TrialDocument> trialDocumentRepository
|
||||
, IRepository<SystemDocument> systemDocumentRepository)
|
||||
{
|
||||
_hostEnvironment = hostEnvironment;
|
||||
_trialDocumentRepository = trialDocumentRepository;
|
||||
_systemDocConfirmedUserRepository = systemDocConfirmedUserRepository;
|
||||
_systemDocumentRepository = systemDocumentRepository;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
public string SubjectCode { get; set; } = String.Empty;
|
||||
|
||||
public string VisitName { get; set; } = string.Empty;
|
||||
|
||||
|
@ -58,12 +58,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public decimal FileSize { get; set; }
|
||||
|
||||
public string IP { get; set; }
|
||||
public string IP { get; set; } = String.Empty;
|
||||
|
||||
|
||||
public bool IsDicomReUpload { get; set; }
|
||||
|
||||
public bool IsDicom { get; set; }
|
||||
|
||||
public int FileCount { get; set; }
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace IRaCIS.Application.Interfaces
|
|||
|
||||
//IEnumerable<RelationStudyDTO> GetAllRelationStudyList(Guid studyId);
|
||||
|
||||
/// <summary> 根据项目Id,医生Id,获取受试者访视点(不分页)</summary>
|
||||
|
||||
//IEnumerable<StudyStatDTO> GetStudyStatList(Guid trialId, Guid subjectId, Guid siteId);
|
||||
|
||||
|
||||
|
@ -72,10 +72,7 @@ namespace IRaCIS.Application.Interfaces
|
|||
|
||||
|
||||
//void UploadStudyDeal(Guid studyId);
|
||||
/// <summary>
|
||||
/// 更新Study 表中的Status,并且往 StudyStatusDetail详情表中插入一条状态变化记录
|
||||
/// </summary>
|
||||
/// <param name="studyStatusDetailDTO"></param>
|
||||
|
||||
|
||||
//List<ReviewerDistributionDTO> GetReviewerListByTrialId(Guid trialId);
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
{
|
||||
public string ExperimentName { get; set; } = string.Empty;
|
||||
|
||||
public string SiteName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
|
||||
|
|
|
@ -260,7 +260,6 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
/// </summary>
|
||||
/// <param name="addDto">添加对象</param>
|
||||
/// <param name="signId">签名Id</param>
|
||||
/// <param name="Statusdata">初始化状态对象</param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddInspectionRecordAsync(DataInspectionAddDTO addDto, Guid? signId=null)
|
||||
{
|
||||
|
|
|
@ -55,9 +55,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public List<Guid> UserTypeGroupIdList { get; set; } = new List<Guid>();
|
||||
|
||||
|
||||
/// <summary> 用户类型名称简写/// </summary>
|
||||
//public bool IsInternal { get; set; }
|
||||
//public UserTypeGroup Type { get; set; } = UserTypeGroup.TrialUser;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -277,7 +277,6 @@ namespace IRaCIS.Application.Services
|
|||
/// <summary>
|
||||
/// 修改密码,当前支持旧密码修改密码
|
||||
/// </summary>
|
||||
/// <param name="editPwModel">
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> ModifyPassword(EditPasswordCommand editPwModel)
|
||||
|
|
|
@ -167,8 +167,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid SignId { get; set; }
|
||||
|
||||
|
||||
[NotDefault]
|
||||
public string SignCode { get; set; }
|
||||
[NotDefault]
|
||||
public string SignCode { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class TrialConfigDTO: BasicTrialConfig
|
||||
|
@ -240,7 +240,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public bool IsQCQuestionConfirmed { get; set; }
|
||||
|
||||
public string TrialStatusStr { get; set; }
|
||||
public string TrialStatusStr { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public DateTime? ConfirmTime { get; set; }
|
||||
|
||||
public string RejectReason { get; set; }
|
||||
public string RejectReason { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
///<summary>TrialExternalUserQuery 列表查询参数模型</summary>
|
||||
|
@ -102,7 +102,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public DateTime? ConfirmTime { get; set; }
|
||||
|
||||
public string RejectReason { get; set; }
|
||||
public string RejectReason { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="isSiteUserNotAll">isAllSiteUser true : site用户列表,false :Site调研汇总表</param>
|
||||
|
||||
/// <param name="_commonDocumentRepository"></param>
|
||||
/// <param name="_trialSiteSurveyRepository"></param>
|
||||
/// <param name="_trialSiteUserSurveyRepository"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
[HttpGet, Route("{trialId:guid}/{isSiteUserNotAll:bool}")]
|
||||
|
@ -67,13 +69,13 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
if (isSiteUserNotAll)
|
||||
{
|
||||
exportInfo = await _trialRepository.Where(t => t.Id == trialId).IgnoreQueryFilters().ProjectTo<TrialSiteUserExportDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
exportInfo = (await _trialRepository.Where(t => t.Id == trialId).IgnoreQueryFilters().ProjectTo<TrialSiteUserExportDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var data = await _trialRepository.Where(t => t.Id == trialId).IgnoreQueryFilters().ProjectTo<TrialSiteUserSummaryExportDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
var data = (await _trialRepository.Where(t => t.Id == trialId).IgnoreQueryFilters().ProjectTo<TrialSiteUserSummaryExportDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
var groupSelectIdQuery =
|
||||
_trialSiteSurveyRepository.Where(t => t.TrialId == trialId && t.IsDeleted == false)
|
||||
|
|
|
@ -17,11 +17,13 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IInspectionService _inspectionService;
|
||||
private readonly IRepository<Subject> _subjectRepository;
|
||||
|
||||
public SubjectVisitService(IRepository<SubjectVisit> subjectVisitRepository, IInspectionService inspectionService)
|
||||
public SubjectVisitService(IRepository<SubjectVisit> subjectVisitRepository, IInspectionService inspectionService,IRepository<Subject> subjectRepository)
|
||||
{
|
||||
_subjectVisitRepository = subjectVisitRepository;
|
||||
this._inspectionService = inspectionService;
|
||||
_subjectRepository = subjectRepository;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
@ -52,7 +54,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
svCommand.BlindName = "B" + ((int)(svCommand.VisitNum * 10)).ToString("D3");
|
||||
|
||||
var subject = (await _repository.FirstOrDefaultAsync<Subject>(t => t.Id == svCommand.SubjectId)).IfNullThrowException();
|
||||
var subject = (await _subjectRepository.FirstOrDefaultAsync(t => t.Id == svCommand.SubjectId)).IfNullThrowException();
|
||||
|
||||
|
||||
|
||||
|
@ -206,6 +208,10 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
return ResponseOutput.NotOk("This visit is InPlan and couldn't be deleted.");
|
||||
}
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.OutPlanPreviousVisitId == id ))
|
||||
{
|
||||
return ResponseOutput.NotOk("This visit is OutPlanPreviousVisitId and couldn't be deleted.");
|
||||
}
|
||||
return ResponseOutput.Result(await _repository.DeleteFromQueryAsync<SubjectVisit>(s => s.Id == id));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue