Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
9fc6ee267e
|
@ -22,6 +22,8 @@ namespace IRaCIS.Core.Application.Auth
|
|||
|
||||
public bool IsTestUser { get; set; }
|
||||
|
||||
public bool IsZhiZhun { get; set; }
|
||||
|
||||
public string Phone { get; set; } = String.Empty;
|
||||
|
||||
public static IRaCISClaims Create(UserBasicInfo user)
|
||||
|
@ -36,7 +38,7 @@ namespace IRaCIS.Core.Application.Auth
|
|||
IsTestUser = user.IsTestUser,
|
||||
Code = user.Code,
|
||||
PermissionStr = user.PermissionStr,
|
||||
|
||||
IsZhiZhun = user.IsZhiZhun,
|
||||
UserTypeShortName = user.UserTypeShortName
|
||||
};
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace IRaCIS.Core.Application.Auth
|
|||
new Claim(JwtIRaCISClaimType.UserTypeEnumInt,((int)user.UserTypeEnum).ToString()),
|
||||
new Claim(JwtIRaCISClaimType.UserTypeShortName,user.UserTypeShortName),
|
||||
new Claim(JwtIRaCISClaimType.PermissionStr,user.PermissionStr),
|
||||
|
||||
new Claim(JwtIRaCISClaimType.IsZhiZhun,user.IsZhiZhun.ToString()),
|
||||
new Claim(JwtIRaCISClaimType.IsTestUser,user.IsTestUser.ToString())
|
||||
};
|
||||
|
||||
|
|
|
@ -2312,20 +2312,22 @@
|
|||
<param name="password"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService">
|
||||
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService">
|
||||
<summary>
|
||||
minimal api 测试
|
||||
学习参考文档:http://fanrk.cn/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/MinimalApi/MinimalApi.html
|
||||
组件参考文档:https://docs.masastack.com/framework/building-blocks/minimal-apis#section-69828ff0
|
||||
上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
|
||||
</summary>
|
||||
<param name="_hostEnvironment"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService.#ctor(Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
|
||||
<summary>
|
||||
minimal api 测试
|
||||
学习参考文档:http://fanrk.cn/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/MinimalApi/MinimalApi.html
|
||||
组件参考文档:https://docs.masastack.com/framework/building-blocks/minimal-apis#section-69828ff0
|
||||
上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
|
||||
</summary>
|
||||
<param name="_hostEnvironment"></param>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo)" -->
|
||||
<member name="M:IRaCIS.Core.Application.Service.QCCommon.VerifyIsCRCSubmmitAsync(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Domain.Share.IUserInfo,System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
验证CRC 是否已提交 已提交 就不允许进行任何操作,如果是IQC 那么还验证是否是当前任务领取人
|
||||
|
|
|
@ -18,7 +18,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
Task SendEmailVerification(string emailAddress, int verificationCode);
|
||||
|
||||
Task SiteSurveyRejectEmail(MimeMessage messageToSend, TrialSiteSurvey trialSiteSurvey, string routeUrl, User? user = null);
|
||||
|
||||
Task SenMFAVerifyEmail(Guid userId, string userName, string emailAddress, int verificationCode, UserMFAType mfaType = UserMFAType.Login);
|
||||
|
||||
|
@ -334,49 +333,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}
|
||||
|
||||
public async Task SiteSurveyRejectEmail(MimeMessage messageToSend, TrialSiteSurvey trialSiteSurvey, string routeUrl, User? user)
|
||||
{
|
||||
|
||||
//发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
|
||||
|
||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialSiteSurvey.TrialId);
|
||||
|
||||
var siteInfo = await _trialSiteRepository.FirstOrDefaultAsync(t => t.TrialId == trialSiteSurvey.TrialId && t.Id == trialSiteSurvey.TrialSiteId, true);
|
||||
|
||||
|
||||
var companyName = _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName, trialInfo.ResearchProgramNo);
|
||||
|
||||
var htmlBodyStr = string.Format(ReplaceCompanyName(input.htmlBodyStr),
|
||||
|
||||
(user == null ? trialSiteSurvey.UserName : user.LastName + "/ " + user.FirstName),
|
||||
trialInfo.TrialCode,
|
||||
trialInfo.ResearchProgramNo,
|
||||
trialInfo.ExperimentName,
|
||||
siteInfo.TrialSiteCode,
|
||||
siteInfo.TrialSiteAliasName,
|
||||
trialSiteSurvey.LatestBackReason,
|
||||
routeUrl,
|
||||
(trialSiteSurvey.State == TrialSiteSurveyEnum.ToSubmit ? "inline - block" : "none")
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
|
||||
await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.SiteSurveyReject, messageToSend, emailConfigFunc);
|
||||
|
||||
|
||||
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||
|
||||
}
|
||||
|
||||
//添加用户发送邮件
|
||||
public async Task AddUserSendEmailAsync(Guid userId, string baseUrl, string routeUrl)
|
||||
|
|
|
@ -143,8 +143,13 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<PageOutput<UnionDocumentWithConfirmInfoView>> getWaitSignSysDocList(SystemDocumentQuery inQuery)
|
||||
{
|
||||
|
||||
var isInternal = _userInfo.IsZhiZhun;
|
||||
|
||||
var query = from sysDoc in _systemDocumentRepository.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
||||
//外部人员 只签署 文档类型枚举值有值的
|
||||
.WhereIf(isInternal == false, t => t.FileType.Code.Length == 0)
|
||||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
|
|
|
@ -65,6 +65,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public string EMail { get; set; } = string.Empty;
|
||||
public bool IsFirstAdd { get; set; }
|
||||
|
||||
public bool IsZhiZhun { get; set; }
|
||||
public bool IsReviewer { get; set; } = false;
|
||||
|
||||
public int LoginState { get; set; } = 0;
|
||||
|
|
|
@ -16,6 +16,11 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace IRaCIS.Core.Application.Service.MinimalApiService
|
||||
{
|
||||
/// <summary>
|
||||
/// 上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="_hostEnvironment"></param>
|
||||
[ApiExplorerSettings(GroupName = "Institution")]
|
||||
public class FileToPDFService(IWebHostEnvironment _hostEnvironment) : ServiceBase
|
||||
{
|
||||
|
|
|
@ -14,6 +14,9 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
|
|||
/// minimal api 测试
|
||||
/// 学习参考文档:http://fanrk.cn/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/MinimalApi/MinimalApi.html
|
||||
/// 组件参考文档:https://docs.masastack.com/framework/building-blocks/minimal-apis#section-69828ff0
|
||||
/// 升级只用改一个地方 搜索关键词: 统一使用 Directory.Build.props 管理项目
|
||||
//https://www.toutiao.com/article/7407615998343348787/?app=news_article×tamp=1724760241&use_new_style=1&req_id=20240827200400D600951D2F54551B5ACF&group_id=7407615998343348787&share_token=03C009BA-571C-47AB-86E5-87DA93F08975&tt_from=weixin&utm_source=weixin&utm_medium=toutiao_ios&utm_campaign=client_share&wxshare_count=1&source=m_redirect&wid=1729739417949
|
||||
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Institution")]
|
||||
|
||||
|
|
|
@ -232,11 +232,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<VisitTask, CommonEvaluationExport>()
|
||||
.ForMember(o => o.IsBaseline, t => t.MapFrom(u => u.SourceSubjectVisit.IsBaseLine))
|
||||
.ForMember(o => o.JudgeArmEnum, t => t.MapFrom(u => u.JudgeResultTask.ArmEnum))
|
||||
.ForMember(o => o.IsTrigerJudge, t => t.MapFrom(u => arbitrationRule == ArbitrationRule.Visit ? u.JudgeResultTaskId != null :
|
||||
.ForMember(o => o.IsTrigerJudge, t => t.MapFrom(u => arbitrationRule == ArbitrationRule.Visit ? u.JudgeVisitTaskId != null :
|
||||
(arbitrationRule == ArbitrationRule.Reading ?
|
||||
u.Subject.SubjectVisitTaskList.Any(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Judge && t.TrialReadingCriterionId == trialReadingCriterionId && u.VisitTaskNum < t.VisitTaskNum) :
|
||||
false)))
|
||||
.ForMember(o => o.JudgeNote, t => t.MapFrom(u => u.JudgeResultRemark))
|
||||
.ForMember(o => o.JudgeNote, t => t.MapFrom(u => u.JudgeVisitTask.JudgeResultRemark))
|
||||
.ForMember(o => o.VisitNote, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.AdjustReason).FirstOrDefault()!.Answer))
|
||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
|
||||
|
|
|
@ -175,7 +175,7 @@ public class VisitTask : BaseFullAuditEntity
|
|||
|
||||
public Guid? DoctorUserId { get; set; }
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
[Comment("裁判任务的Id")]
|
||||
[Comment("在访视或者全局任务上记录 裁判任务的Id")]
|
||||
public Guid? JudgeVisitTaskId { get; set; }
|
||||
|
||||
[Comment("任务阅片状态")]
|
||||
|
@ -191,7 +191,7 @@ public class VisitTask : BaseFullAuditEntity
|
|||
[Comment("PM 对该任务进行了回退 影响的任务不设置")]
|
||||
public bool IsPMSetBack { get; set; }
|
||||
|
||||
[Comment("裁判结果的任务ID(访视或者全局)")]
|
||||
[Comment("在裁判任务上记录 裁判结果的任务ID(访视或者全局)")]
|
||||
public Guid? JudgeResultTaskId { get; set; }
|
||||
[Comment("随访任务号 取访视的号 计划外是 访视+0.1 裁判任务在访视任务上+0.002 全局任务在截止访视号上+0.03 肿瘤待定")]
|
||||
public decimal VisitTaskNum { get; set; }
|
||||
|
|
|
@ -5,25 +5,18 @@
|
|||
/// </summary>
|
||||
public interface IUserInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
|
||||
Guid Id { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
string UserName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 昵称
|
||||
/// </summary>
|
||||
string RealName { get; }
|
||||
string ReviewerCode { get; }
|
||||
|
||||
bool IsAdmin { get; }
|
||||
|
||||
bool IsTestUser { get; }
|
||||
public bool IsZhiZhun { get; }
|
||||
|
||||
string UserTypeShortName { get; }
|
||||
|
||||
|
|
|
@ -151,6 +151,20 @@ namespace IRaCIS.Core.Domain.Share
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsZhiZhun
|
||||
{
|
||||
get
|
||||
{
|
||||
var isZhizhunClaime = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.IsZhiZhun);
|
||||
|
||||
if (isZhizhunClaime != null && !string.IsNullOrEmpty(isZhizhunClaime.Value))
|
||||
{
|
||||
return bool.Parse(isZhizhunClaime.Value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsTestUser
|
||||
{
|
||||
get
|
||||
|
@ -341,6 +355,8 @@ namespace IRaCIS.Core.Domain.Share
|
|||
|
||||
public const string IsTestUser = "isTestUser";
|
||||
|
||||
public const string IsZhiZhun = "isZhiZhun";
|
||||
|
||||
public const string PermissionStr = "permissionStr";
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue