Compare commits
No commits in common. "53d26c044551b53573e451c110e13a7f5be45cd7" and "40d035e7a77d67d7f4c879ea6fd8c0d1878d32d9" have entirely different histories.
53d26c0445
...
40d035e7a7
|
@ -14427,12 +14427,6 @@
|
||||||
定时提醒
|
定时提醒
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.MassTransit.Consumer.SystemDocumentPublishEvent.NewUserTypeIds">
|
|
||||||
<summary>
|
|
||||||
新增的需要发送邮件的用户角色ID列表
|
|
||||||
如果为null或空,则发送给所有相关角色
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.QCImageQuestionRecurringSchedule">
|
<member name="T:IRaCIS.Core.Application.MassTransit.Consumer.QCImageQuestionRecurringSchedule">
|
||||||
<summary>
|
<summary>
|
||||||
QC 影像质疑待处理
|
QC 影像质疑待处理
|
||||||
|
@ -16276,16 +16270,6 @@
|
||||||
组件一致性和原Arm2是否有差异
|
组件一致性和原Arm2是否有差异
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Contracts.ImageBackViewModel.ApplyReason">
|
|
||||||
<summary>
|
|
||||||
申请原因
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Contracts.ImageBackViewModel.ResultRemark">
|
|
||||||
<summary>
|
|
||||||
结果备注
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Contracts.GetNextCRCChallengeInDto.QCChallengeId">
|
<member name="P:IRaCIS.Core.Application.Contracts.GetNextCRCChallengeInDto.QCChallengeId">
|
||||||
<summary>
|
<summary>
|
||||||
QCChallengeId
|
QCChallengeId
|
||||||
|
@ -17125,12 +17109,12 @@
|
||||||
<member name="T:IRaCIS.Core.Application.Services.SystemDocumentService">
|
<member name="T:IRaCIS.Core.Application.Services.SystemDocumentService">
|
||||||
<summary>
|
<summary>
|
||||||
SystemDocumentService
|
SystemDocumentService
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},MassTransit.Mediator.IScopedMediator,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocumentAttachment},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},Microsoft.Extensions.DependencyInjection.IServiceScopeFactory,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},MassTransit.Mediator.IScopedMediator,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocumentAttachment},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},Microsoft.Extensions.DependencyInjection.IServiceScopeFactory,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||||
<summary>
|
<summary>
|
||||||
SystemDocumentService
|
SystemDocumentService
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.GetSystemDocumentAttachmentList(IRaCIS.Core.Application.Contracts.SystemDocumentAttachmentQuery)">
|
<member name="M:IRaCIS.Core.Application.Services.SystemDocumentService.GetSystemDocumentAttachmentList(IRaCIS.Core.Application.Contracts.SystemDocumentAttachmentQuery)">
|
||||||
<summary>
|
<summary>
|
||||||
|
@ -17574,22 +17558,20 @@
|
||||||
<param name="qaDialogCommand"></param>
|
<param name="qaDialogCommand"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.RequestImageBack(System.Guid,System.String)">
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.RequestImageBack(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
CRC IQC 申请影像回退
|
CRC IQC 申请影像回退
|
||||||
</summary>
|
</summary>
|
||||||
<param name="subjectVisitId"></param>
|
<param name="subjectVisitId"></param>
|
||||||
<param name="ApplyReason"></param>
|
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.AuditImageBack(System.Guid,System.Boolean,System.String)">
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.AuditImageBack(System.Guid,System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
PM 审核CRC IQC 申请影像回退
|
PM 审核CRC IQC 申请影像回退
|
||||||
</summary>
|
</summary>
|
||||||
<param name="iamgeBackRecordId"></param>
|
<param name="iamgeBackRecordId"></param>
|
||||||
<param name="isAgree"></param>
|
<param name="isAgree"></param>
|
||||||
<param name="resultRemark"></param>
|
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||||
</member>
|
</member>
|
||||||
|
|
|
@ -42,19 +42,13 @@ public class UrgentIRUnReadTaskRecurringEvent : DomainEvent
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SystemDocumentErverDayEvent : DomainEvent
|
public class SystemDocumentErverDayEvent : DomainEvent
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class SystemDocumentPublishEvent : DomainEvent
|
public class SystemDocumentPublishEvent : DomainEvent
|
||||||
{
|
{
|
||||||
public List<Guid> Ids { get; set; }
|
public List<Guid> Ids { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 新增的需要发送邮件的用户角色ID列表
|
|
||||||
/// 如果为null或空,则发送给所有相关角色
|
|
||||||
/// </summary>
|
|
||||||
public List<Guid> NewUserTypeIds { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -100,8 +100,8 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||||
|
|
||||||
var htmlBodyStr = string.Format(
|
var htmlBodyStr = string.Format(
|
||||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
userinfo.UserName, // 用户名 {0}
|
userinfo.UserName // 用户名 {0}
|
||||||
_systemEmailConfig.SiteUrl
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return (topicStr, htmlBodyStr);
|
return (topicStr, htmlBodyStr);
|
||||||
|
@ -150,71 +150,31 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||||
|
|
||||||
public async Task Consume(ConsumeContext<SystemDocumentPublishEvent> context)
|
public async Task Consume(ConsumeContext<SystemDocumentPublishEvent> context)
|
||||||
{
|
{
|
||||||
|
|
||||||
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
|
var systemDocQuery =
|
||||||
|
from sysDoc in _systemDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id))
|
||||||
|
from identityUser in _identityUserRepository.AsQueryable(false).Where(t => t.Status == UserStateEnum.Enable && t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
||||||
|
select new UnionDocumentWithConfirmInfoView()
|
||||||
|
{
|
||||||
|
IsSystemDoc = true,
|
||||||
|
Id = sysDoc.Id,
|
||||||
|
CreateTime = sysDoc.CreateTime,
|
||||||
|
IsDeleted = sysDoc.IsDeleted,
|
||||||
|
SignViewMinimumMinutes = sysDoc.SignViewMinimumMinutes,
|
||||||
|
Name = sysDoc.Name,
|
||||||
|
Path = sysDoc.Path,
|
||||||
|
FileTypeId = sysDoc.FileTypeId,
|
||||||
|
UpdateTime = sysDoc.UpdateTime,
|
||||||
|
ConfirmUserId = identityUser.Id,
|
||||||
|
|
||||||
// 记录是否只发送给新增角色的日志
|
RealName = identityUser.FullName,
|
||||||
if (context.Message.NewUserTypeIds != null && context.Message.NewUserTypeIds.Any())
|
UserName = identityUser.UserName,
|
||||||
{
|
IsNeedSendEmial = identityUser.IsZhiZhun || (!identityUser.IsZhiZhun && sysDoc.DocUserSignType == DocUserSignType.InnerAndOuter),
|
||||||
Console.WriteLine($"只发送给新增的角色,角色数量: {context.Message.NewUserTypeIds.Count}");
|
|
||||||
}
|
|
||||||
// 构建查询
|
|
||||||
IQueryable<UnionDocumentWithConfirmInfoView> systemDocQuery;
|
|
||||||
|
|
||||||
if (context.Message.NewUserTypeIds != null && context.Message.NewUserTypeIds.Any())
|
|
||||||
{
|
FullFilePath = sysDoc.Path
|
||||||
// 只查询新增角色的用户
|
};
|
||||||
systemDocQuery =
|
|
||||||
from sysDoc in _systemDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id))
|
|
||||||
from identityUser in _identityUserRepository.AsQueryable(false)
|
|
||||||
.Where(t => t.Status == UserStateEnum.Enable &&
|
|
||||||
t.UserRoleList.Where(t => t.IsUserRoleDisabled == false)
|
|
||||||
.Any(t => context.Message.NewUserTypeIds.Contains(t.UserTypeId) &&
|
|
||||||
sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
|
||||||
select new UnionDocumentWithConfirmInfoView()
|
|
||||||
{
|
|
||||||
IsSystemDoc = true,
|
|
||||||
Id = sysDoc.Id,
|
|
||||||
CreateTime = sysDoc.CreateTime,
|
|
||||||
IsDeleted = sysDoc.IsDeleted,
|
|
||||||
SignViewMinimumMinutes = sysDoc.SignViewMinimumMinutes,
|
|
||||||
Name = sysDoc.Name,
|
|
||||||
Path = sysDoc.Path,
|
|
||||||
FileTypeId = sysDoc.FileTypeId,
|
|
||||||
UpdateTime = sysDoc.UpdateTime,
|
|
||||||
ConfirmUserId = identityUser.Id,
|
|
||||||
RealName = identityUser.FullName,
|
|
||||||
UserName = identityUser.UserName,
|
|
||||||
IsNeedSendEmial = identityUser.IsZhiZhun || (!identityUser.IsZhiZhun && sysDoc.DocUserSignType == DocUserSignType.InnerAndOuter),
|
|
||||||
FullFilePath = sysDoc.Path
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 查询所有相关角色的用户
|
|
||||||
systemDocQuery =
|
|
||||||
from sysDoc in _systemDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id))
|
|
||||||
from identityUser in _identityUserRepository.AsQueryable(false)
|
|
||||||
.Where(t => t.Status == UserStateEnum.Enable &&
|
|
||||||
t.UserRoleList.Where(t => t.IsUserRoleDisabled == false)
|
|
||||||
.Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
|
||||||
select new UnionDocumentWithConfirmInfoView()
|
|
||||||
{
|
|
||||||
IsSystemDoc = true,
|
|
||||||
Id = sysDoc.Id,
|
|
||||||
CreateTime = sysDoc.CreateTime,
|
|
||||||
IsDeleted = sysDoc.IsDeleted,
|
|
||||||
SignViewMinimumMinutes = sysDoc.SignViewMinimumMinutes,
|
|
||||||
Name = sysDoc.Name,
|
|
||||||
Path = sysDoc.Path,
|
|
||||||
FileTypeId = sysDoc.FileTypeId,
|
|
||||||
UpdateTime = sysDoc.UpdateTime,
|
|
||||||
ConfirmUserId = identityUser.Id,
|
|
||||||
RealName = identityUser.FullName,
|
|
||||||
UserName = identityUser.UserName,
|
|
||||||
IsNeedSendEmial = identityUser.IsZhiZhun || (!identityUser.IsZhiZhun && sysDoc.DocUserSignType == DocUserSignType.InnerAndOuter),
|
|
||||||
FullFilePath = sysDoc.Path
|
|
||||||
};
|
|
||||||
}
|
|
||||||
var datalist = await systemDocQuery.IgnoreQueryFilters().Where(x => x.IsNeedSendEmial).ToListAsync();
|
var datalist = await systemDocQuery.IgnoreQueryFilters().Where(x => x.IsNeedSendEmial).ToListAsync();
|
||||||
|
|
||||||
var confirmUserIdList = datalist.Select(t => t.ConfirmUserId).Distinct().ToList();
|
var confirmUserIdList = datalist.Select(t => t.ConfirmUserId).Distinct().ToList();
|
||||||
|
@ -241,8 +201,8 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||||
|
|
||||||
var htmlBodyStr = string.Format(
|
var htmlBodyStr = string.Format(
|
||||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
userinfo.UserName, // 用户名 {0}
|
userinfo.UserName // 用户名 {0}
|
||||||
_systemEmailConfig.SiteUrl
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return (topicStr, htmlBodyStr);
|
return (topicStr, htmlBodyStr);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
// 生成时间 2022-01-05 09:17:03
|
// 生成时间 2022-01-05 09:17:03
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SystemDocumentService
|
/// SystemDocumentService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiExplorerSettings(GroupName = "Trial")]
|
[ApiExplorerSettings(GroupName = "Trial")]
|
||||||
public class SystemDocumentService(IRepository<SystemDocument> _systemDocumentRepository,
|
public class SystemDocumentService(IRepository<SystemDocument> _systemDocumentRepository,
|
||||||
IRepository<UserRole> _userRoleRepository,
|
IRepository<UserRole> _userRoleRepository,
|
||||||
|
@ -57,7 +57,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput> AddOrUpdateSystemDocumentAttachment(SystemDocumentAttachmentAddOrEdit addOrEditSystemDocumentAttachment)
|
public async Task<IResponseOutput> AddOrUpdateSystemDocumentAttachment(SystemDocumentAttachmentAddOrEdit addOrEditSystemDocumentAttachment)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var entity = await _systemDocumentAttachmentRepository.InsertOrUpdateAsync(addOrEditSystemDocumentAttachment, true);
|
var entity = await _systemDocumentAttachmentRepository.InsertOrUpdateAsync(addOrEditSystemDocumentAttachment, true);
|
||||||
|
@ -130,11 +130,6 @@ namespace IRaCIS.Core.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 保存修改前的状态和需要确认的用户类型列表
|
|
||||||
bool beforeIsPublish = document.IsPublish;
|
|
||||||
bool beforeIsDeleted = document.IsDeleted;
|
|
||||||
var beforeUserTypeIds = document.NeedConfirmedUserTypeList.Select(x => x.NeedConfirmUserTypeId).ToList();
|
|
||||||
|
|
||||||
_mapper.Map(addOrEditSystemDocument, document);
|
_mapper.Map(addOrEditSystemDocument, document);
|
||||||
|
|
||||||
#region 之前区分路径文件夹 现在不区分废弃
|
#region 之前区分路径文件夹 现在不区分废弃
|
||||||
|
@ -158,39 +153,9 @@ namespace IRaCIS.Core.Application.Services
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
var success = await _systemDocumentRepository.SaveChangesAsync();
|
var success = await _systemDocumentRepository.SaveChangesAsync();
|
||||||
|
|
||||||
// 检查是否需要发送邮件给新增的角色
|
|
||||||
if (beforeIsPublish && document.IsPublish && !beforeIsDeleted && !document.IsDeleted)
|
|
||||||
{
|
|
||||||
// 找出新增的用户角色ID
|
|
||||||
var newUserTypeIds = addOrEditSystemDocument.NeedConfirmedUserTypeIdList
|
|
||||||
.Where(id => !beforeUserTypeIds.Contains(id))
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
if (newUserTypeIds.Any()&& newUserTypeIds.Count()>0)
|
|
||||||
{
|
|
||||||
// 发送邮件给新增的角色
|
|
||||||
Console.WriteLine("开始 发送系统文档更新邮件给新增角色");
|
|
||||||
Console.WriteLine(string.Join(",", newUserTypeIds));
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
// 创建独立作用域
|
|
||||||
using (var scope = serviceScopeFactory.CreateScope())
|
|
||||||
{
|
|
||||||
// 从新作用域解析服务
|
|
||||||
var mediator = scope.ServiceProvider.GetRequiredService<IMediator>();
|
|
||||||
// 只发送给新增的角色
|
|
||||||
await mediator.Publish(new SystemDocumentPublishEvent {
|
|
||||||
Ids = new List<Guid> { document.Id },
|
|
||||||
NewUserTypeIds = newUserTypeIds
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(document.Id.ToString());
|
return ResponseOutput.Ok(document.Id.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,7 +267,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
AttachmentCount=sysDoc.SystemDocumentAttachmentList.Where(z=>!z.OffLine).Count(),
|
AttachmentCount=sysDoc.SystemDocumentAttachmentList.Where(z=>!z.OffLine).Count(),
|
||||||
IsSystemDoc = true,
|
IsSystemDoc = true,
|
||||||
CurrentStaffTrainDays=sysDoc.CurrentStaffTrainDays,
|
CurrentStaffTrainDays=sysDoc.CurrentStaffTrainDays,
|
||||||
NewStaffTrainDays = sysDoc.NewStaffTrainDays,
|
NewStaffTrainDays = sysDoc.NewStaffTrainDays,
|
||||||
Id = sysDoc.Id,
|
Id = sysDoc.Id,
|
||||||
UserCreateTime= user.CreateTime,
|
UserCreateTime= user.CreateTime,
|
||||||
CreateTime = sysDoc.CreateTime,
|
CreateTime = sysDoc.CreateTime,
|
||||||
|
|
|
@ -1750,16 +1750,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
public String TrialSiteCode { get; set; } = String.Empty;
|
public String TrialSiteCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 申请原因
|
|
||||||
/// </summary>
|
|
||||||
public string ApplyReason { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 结果备注
|
|
||||||
/// </summary>
|
|
||||||
public string ResultRemark { get; set; } = string.Empty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -251,11 +251,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
/// CRC IQC 申请影像回退
|
/// CRC IQC 申请影像回退
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="subjectVisitId"></param>
|
/// <param name="subjectVisitId"></param>
|
||||||
/// <param name="ApplyReason"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
public async Task<IResponseOutput> RequestImageBack(Guid subjectVisitId,string ApplyReason)
|
public async Task<IResponseOutput> RequestImageBack(Guid subjectVisitId)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (_subjectVisitRepository.Any(t => t.Id == subjectVisitId && t.QCChallengeList.Any(t => t.IsClosed == false)))
|
if (_subjectVisitRepository.Any(t => t.Id == subjectVisitId && t.QCChallengeList.Any(t => t.IsClosed == false)))
|
||||||
|
@ -291,7 +290,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]);
|
throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var newRecord = new SubjectVisitImageBackRecord() { SubjectVisitId = subjectVisitId, ApplyReason=ApplyReason, SubmitTime = sv.SubmitTime, EarliestScanDate = sv.EarliestScanDate, LatestScanDate = sv.LatestScanDate };
|
var newRecord = new SubjectVisitImageBackRecord() { SubjectVisitId = subjectVisitId, SubmitTime = sv.SubmitTime, EarliestScanDate = sv.EarliestScanDate, LatestScanDate = sv.LatestScanDate };
|
||||||
|
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator)
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator)
|
||||||
{
|
{
|
||||||
|
@ -315,11 +314,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="iamgeBackRecordId"></param>
|
/// <param name="iamgeBackRecordId"></param>
|
||||||
/// <param name="isAgree"></param>
|
/// <param name="isAgree"></param>
|
||||||
/// <param name="resultRemark"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
public async Task<IResponseOutput> AuditImageBack(Guid iamgeBackRecordId, bool isAgree,string? resultRemark)
|
public async Task<IResponseOutput> AuditImageBack(Guid iamgeBackRecordId, bool isAgree)
|
||||||
{
|
{
|
||||||
var backRecord = (await _subjectVisitImageBackRecordReposiotry.FirstOrDefaultAsync(t => t.Id == iamgeBackRecordId)).IfNullThrowException();
|
var backRecord = (await _subjectVisitImageBackRecordReposiotry.FirstOrDefaultAsync(t => t.Id == iamgeBackRecordId)).IfNullThrowException();
|
||||||
|
|
||||||
|
@ -414,7 +412,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
}
|
}
|
||||||
|
|
||||||
backRecord.AuditTime = DateTime.Now;
|
backRecord.AuditTime = DateTime.Now;
|
||||||
backRecord.ResultRemark = resultRemark??string.Empty;
|
|
||||||
await _subjectVisitRepository.SaveChangesAsync();
|
await _subjectVisitRepository.SaveChangesAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
|
@ -214,14 +214,4 @@ public class SubjectVisitImageBackRecord : BaseFullAuditEntity
|
||||||
|
|
||||||
public DateTime? AuditTime { get; set; }
|
public DateTime? AuditTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 申请原因
|
|
||||||
/// </summary>
|
|
||||||
public string ApplyReason { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 结果备注
|
|
||||||
/// </summary>
|
|
||||||
public string ResultRemark { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,42 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class ImageBack : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "ApplyReason",
|
|
||||||
table: "SubjectVisitImageBackRecord",
|
|
||||||
type: "nvarchar(400)",
|
|
||||||
maxLength: 400,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "ResultRemark",
|
|
||||||
table: "SubjectVisitImageBackRecord",
|
|
||||||
type: "nvarchar(400)",
|
|
||||||
maxLength: 400,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ApplyReason",
|
|
||||||
table: "SubjectVisitImageBackRecord");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ResultRemark",
|
|
||||||
table: "SubjectVisitImageBackRecord");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -9073,11 +9073,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("ApplyReason")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(400)
|
|
||||||
.HasColumnType("nvarchar(400)");
|
|
||||||
|
|
||||||
b.Property<int>("ApplyUserRole")
|
b.Property<int>("ApplyUserRole")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
@ -9101,11 +9096,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasComment("最晚拍片日期");
|
.HasComment("最晚拍片日期");
|
||||||
|
|
||||||
b.Property<string>("ResultRemark")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(400)
|
|
||||||
.HasColumnType("nvarchar(400)");
|
|
||||||
|
|
||||||
b.Property<Guid>("SubjectVisitId")
|
b.Property<Guid>("SubjectVisitId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue