修改稽查

Uat_Study
hang 2022-08-15 16:13:12 +08:00
parent e9b20cc94f
commit 8187a0bc2a
7 changed files with 253 additions and 59 deletions

View File

@ -97,10 +97,6 @@
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\PublishProfiles\" />
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
@ -135,6 +131,10 @@
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\PublishProfiles\" />
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties anonymizetagsetting_1json__JsonSchema="http://json.schemastore.org/jovo-language-model" /></VisualStudio></ProjectExtensions>

View File

@ -1,4 +1,5 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
@ -7,16 +8,8 @@
"sslPort": 0
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IRaCIS.Core.API": {
"IRaCIS.Development": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
@ -29,6 +22,22 @@
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true
},
"IRaCIS.Staging": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Staging"
},
"applicationUrl": "http://localhost:6200"
},
"IRaCIS.Production": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
},
"applicationUrl": "http://localhost:6300"
}
}
}

View File

@ -2330,9 +2330,24 @@
阅片期名称
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemView.TableQuestionType">
<summary>
表格问题类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemQuery.TableQuestionType">
<summary>
表格问题类型
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit">
<summary> ReadingTableQuestionSystemAddOrEdit 列表查询参数模型</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.TableQuestionType">
<summary>
表格问题类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCriterionPageQuery.PageName">
<summary> PageName</summary>
</member>
@ -2966,6 +2981,60 @@
是否是系统数据
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.OrganInfoService">
<summary>
器官服务层
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.GetOrganInfoList(IRaCIS.Core.Application.ViewModel.OrganInfoQuery)">
<summary>
获取系统器官信息
</summary>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.AddOrUpdateOrganInfo(IRaCIS.Core.Application.ViewModel.OrganInfoAddOrEdit)">
<summary>
新增或修改系统器官数据
</summary>
<param name="addOrEditOrganInfo"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.DeleteOrganInfo(System.Guid)">
<summary>
删除系统器官
</summary>
<param name="Id"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.BatchAddTrialOrgan(IRaCIS.Core.Application.ViewModel.BatchAddTrialOrganInDto)">
<summary>
批量添加项目器官
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.DeleteTrialOrganInfo(System.Guid)">
<summary>
删除系统器官
</summary>
<param name="Id"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.GetTrialOrganList(IRaCIS.Core.Application.ViewModel.GetTrialOrganListInDto)">
<summary>
获取项目器官信息
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.GetTrialCheckOrganList(IRaCIS.Core.Application.ViewModel.GetTrialOrganListInDto)">
<summary>
获取项目勾选器官信息
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Core.Application.Service.ReadingMedicalReviewService">
<summary>
阅片医学审核
@ -3114,6 +3183,14 @@
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.VerifyReadingMedicineQuestion(IRaCIS.Core.Application.ViewModel.ConfirmReadingMedicineQuestionInDto)">
<summary>
验证医学审核问题
</summary>
<param name="inDto"></param>
<returns></returns>
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
</member>
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.ConfirmReadingMedicineQuestion(IRaCIS.Core.Application.ViewModel.ConfirmReadingMedicineQuestionInDto)">
<summary>
确认医学审核问题
@ -3472,6 +3549,53 @@
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeAddOrEdit">
<summary> SystemNoticeAddOrEdit 列表查询参数模型</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.OrganInfoView">
<summary> OrganInfoView 列表视图模型 </summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.OrganInfoView.Remark">
<summary>
备注
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.OrganInfoView.OrganType">
<summary>
类型枚举
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.GetTrialOrganListInDto.OrganType">
<summary>
类型枚举
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.GetTrialOrganListOutDto.OrganType">
<summary>
类型枚举
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.GetTrialOrganListOutDto.Remark">
<summary>
备注
</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.OrganInfoQuery">
<summary>OrganInfoQuery 列表查询参数模型</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.OrganInfoQuery.TypeName">
<summary> 类型名称</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.OrganInfoAddOrEdit">
<summary> OrganInfoAddOrEdit 列表查询参数模型</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.OrganInfoAddOrEdit.OrganType">
<summary>
类型枚举
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.OrganInfoAddOrEdit.Remark">
<summary>
备注
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionView.Type">
<summary>
类型
@ -3747,6 +3871,11 @@
ISystemNoticeService
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Interfaces.IOrganInfoService">
<summary>
IOrganInfoService
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Interfaces.ITrialExternalUserService">
<summary>
ITrialExternalUserService
@ -5319,6 +5448,14 @@
<param name="signCode"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.TrialConfigService.VerifyTrialConfigSignatureConfirm(IRaCIS.Core.Application.Contracts.SignConfirmDTO)">
<summary>
验证签名确认
</summary>
<param name="signConfirmDTO"></param>
<returns></returns>
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
</member>
<member name="M:IRaCIS.Core.Application.TrialConfigService.TrialConfigSignatureConfirm(IRaCIS.Core.Application.Contracts.SignConfirmDTO)">
<summary>
签名确认 包括项目的三组配置 + QC问题确认 后修改状态 (适用于不会回退的,项目废除、状态修改, 存在回退 不在这里弄,提供单独接口修改状态)

View File

@ -480,12 +480,23 @@ namespace IRaCIS.Core.Application.Services
var success = false;
if (isSystemDoc)
{
await _repository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, SignFirstViewTime = DateTime.Now });
if(!await _systemDocConfirmedUserRepository.AnyAsync(t=>t.SystemDocumentId==documentId && t.ConfirmUserId == _userInfo.Id))
{
await _repository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now });
}
}
else
{
await _repository.AddAsync(new TrialDocUserTypeConfirmedUser() { TrialDocumentId = documentId, SignFirstViewTime = DateTime.Now });
if (!await _trialDocUserTypeConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.Id))
{
await _repository.AddAsync(new TrialDocUserTypeConfirmedUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now });
}
}
@ -497,7 +508,13 @@ namespace IRaCIS.Core.Application.Services
[HttpPut("{documentId:guid}")]
public async Task<IResponseOutput> SetSystemDocFirstViewTime(Guid documentId)
{
await _repository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, SignFirstViewTime = DateTime.Now });
if (!await _systemDocConfirmedUserRepository.AnyAsync(t => t.SystemDocumentId == documentId && t.ConfirmUserId == _userInfo.Id))
{
await _repository.AddAsync(new SystemDocConfirmedUser() { SystemDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now });
}
var success = await _repository.SaveChangesAsync();
return ResponseOutput.Result(success);
@ -506,7 +523,12 @@ namespace IRaCIS.Core.Application.Services
[HttpPut("{trialId:guid}/{documentId:guid}")]
public async Task<IResponseOutput> SetTrialDocFirstViewTime(Guid documentId)
{
await _repository.AddAsync(new TrialDocUserTypeConfirmedUser() { TrialDocumentId = documentId, SignFirstViewTime = DateTime.Now });
if (!await _trialDocUserTypeConfirmedUserRepository.AnyAsync(t => t.TrialDocumentId == documentId && t.ConfirmUserId == _userInfo.Id))
{
await _repository.AddAsync(new TrialDocUserTypeConfirmedUser() { TrialDocumentId = documentId, ConfirmUserId = _userInfo.Id, SignFirstViewTime = DateTime.Now });
}
var success = await _repository.SaveChangesAsync();
return ResponseOutput.Result(success);
@ -525,11 +547,13 @@ namespace IRaCIS.Core.Application.Services
{
return ResponseOutput.NotOk("该文件已经签名");
}
if (!await _systemDocumentRepository.AnyAsync(t => t.Id == userConfirmCommand.DocumentId) || await _trialDocumentRepository.AnyAsync(t => t.Id == userConfirmCommand.DocumentId && t.IsDeleted, true))
if (!await _systemDocumentRepository.AnyAsync(t => t.Id == userConfirmCommand.DocumentId) || await _systemDocumentRepository.AnyAsync(t => t.Id == userConfirmCommand.DocumentId && t.IsDeleted, true))
{
return ResponseOutput.NotOk("文件已删除或者废除,签署失败!");
return ResponseOutput.NotOk("文件已废除,签署失败!");
}
await _systemDocConfirmedUserRepository.AddAsync(new SystemDocConfirmedUser() { ConfirmTime = DateTime.Now, ConfirmUserId = _userInfo.Id, IsDeleted = false, SystemDocumentId = userConfirmCommand.DocumentId }, true);
}
else
@ -539,9 +563,9 @@ namespace IRaCIS.Core.Application.Services
return ResponseOutput.NotOk("该文件已经签名");
}
if (!await _trialDocumentRepository.AnyAsync(t => t.Id == userConfirmCommand.DocumentId) || await _repository.AnyAsync<TrialDocument>(t => t.Id == userConfirmCommand.DocumentId && t.IsDeleted, true))
if (!await _trialDocumentRepository.AnyAsync(t => t.Id == userConfirmCommand.DocumentId) || await _trialDocumentRepository.AnyAsync(t => t.Id == userConfirmCommand.DocumentId && t.IsDeleted, true))
{
return ResponseOutput.NotOk("文件已删除或者废除,签署失败!");
return ResponseOutput.NotOk("文件已废除,签署失败!");
}
await _trialDocUserTypeConfirmedUserRepository.AddAsync(new TrialDocUserTypeConfirmedUser() { ConfirmTime = DateTime.Now, ConfirmUserId = _userInfo.Id, IsDeleted = false, TrialDocumentId = userConfirmCommand.DocumentId }, true);

View File

@ -4,9 +4,9 @@ namespace IRaCIS.Core.Domain.Models
{
public interface IAuditAdd<TKey> where TKey : struct
{
TKey CreateUserId { get; set; }
public TKey CreateUserId { get; set; }
DateTime CreateTime { get; set; }
public DateTime CreateTime { get; set; }
}

View File

@ -4,9 +4,9 @@ namespace IRaCIS.Core.Domain.Models
{
public interface IAuditUpdate<TKey> where TKey : struct
{
TKey UpdateUserId { get; set; }
public TKey UpdateUserId { get; set; }
//string UpdateUserName { get; set; }
DateTime UpdateTime { get; set; }
public DateTime UpdateTime { get; set; }
}
public interface IAuditUpdate : IAuditUpdate<Guid>

View File

@ -927,6 +927,31 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
}
/// <summary>
/// 将数据库实体属性,映射到稽查实体属性 避免重复赋值
/// </summary>
/// <param name="date"></param>
/// <param name="auditEntity"></param>
public void EntityMapPropertyToAuditEntity(object data, DataInspection auditEntity)
{
foreach (var auditEntityPropertyInfo in auditEntity.GetType().GetProperties())
{
var excepetNameList = typeof(Entity).GetProperties().Select(t => t.Name)
.Concat(typeof(ISoftDelete).GetProperties().Select(t => t.Name))
.Concat(typeof(IAuditAdd<>).GetProperties().Select(t => t.Name))
.Concat(typeof(IAuditUpdate<>).GetProperties().Select(t => t.Name));
var filterProperties = data.GetType().GetProperties().Where(t => !excepetNameList.Any(u=>u==t.Name));
if (filterProperties.Any(t => t.Name == auditEntityPropertyInfo.Name))
{
var value = data.GetType().GetProperty(auditEntityPropertyInfo.Name).GetValue(data);
auditEntity.GetType().GetProperty(auditEntityPropertyInfo.Name).SetValue(auditEntity, value);
}
}
}
/// <summary>
/// 添加稽查
/// </summary>
@ -936,7 +961,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// <exception cref="BusinessValidationFailedException"></exception>
public async Task AddInspectionRecordAsync(DataInspection add, object data, object otherItem = null)
{
MapData(data, add);
//MapData(data, add);
EntityMapPropertyToAuditEntity(data, add);
InspectionGeneralData generalData = new InspectionGeneralData()
{
CreateUserName = add.CreateUserName,
@ -1050,8 +1078,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
generalData.TrialName = trialdata.ExperimentName;
}
}
#endregion
@ -1088,8 +1114,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
}
#endregion
#region 访视