修改中心调研
parent
0a2a5bdd7a
commit
3ddbd59995
|
@ -0,0 +1,35 @@
|
|||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 7050
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["IRaCIS.Core.API/IRaCIS.Core.API.csproj", "IRaCIS.Core.API/"]
|
||||
COPY ["IRaCIS.Core.Application/IRaCIS.Core.Application.csproj", "IRaCIS.Core.Application/"]
|
||||
COPY ["IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj", "IRaCIS.Core.Infra.EFCore/"]
|
||||
COPY ["IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj", "IRaCIS.Core.Domain/"]
|
||||
COPY ["IRaCIS.Core.Domain.Share/IRaCIS.Core.Domain.Share.csproj", "IRaCIS.Core.Domain.Share/"]
|
||||
COPY ["IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj", "IRaCIS.Core.Infrastructure/"]
|
||||
RUN dotnet restore "IRaCIS.Core.API/IRaCIS.Core.API.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/IRaCIS.Core.API"
|
||||
RUN dotnet build "IRaCIS.Core.API.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "IRaCIS.Core.API.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||
|
||||
ENTRYPOINT ["dotnet", "IRaCIS.Core.API.dll"]
|
|
@ -0,0 +1,35 @@
|
|||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 7050
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["IRaCIS.Core.API/IRaCIS.Core.API.csproj", "IRaCIS.Core.API/"]
|
||||
COPY ["IRaCIS.Core.Application/IRaCIS.Core.Application.csproj", "IRaCIS.Core.Application/"]
|
||||
COPY ["IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj", "IRaCIS.Core.Infra.EFCore/"]
|
||||
COPY ["IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj", "IRaCIS.Core.Domain/"]
|
||||
COPY ["IRaCIS.Core.Domain.Share/IRaCIS.Core.Domain.Share.csproj", "IRaCIS.Core.Domain.Share/"]
|
||||
COPY ["IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj", "IRaCIS.Core.Infrastructure/"]
|
||||
RUN dotnet restore "IRaCIS.Core.API/IRaCIS.Core.API.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/IRaCIS.Core.API"
|
||||
RUN dotnet build "IRaCIS.Core.API.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "IRaCIS.Core.API.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||
|
||||
ENTRYPOINT ["dotnet", "IRaCIS.Core.API.dll"]
|
|
@ -5,7 +5,7 @@
|
|||
<SignAssembly>false</SignAssembly>
|
||||
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
|
||||
<LangVersion>default</LangVersion>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<DockerDefaultTargetOS>Windows</DockerDefaultTargetOS>
|
||||
<Version>1.0.1.001</Version>
|
||||
<Company>上海展影医疗科技有限公司</Company>
|
||||
<Product>IRC影像系统 (EICS)</Product>
|
||||
|
@ -105,9 +105,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\EmailTemplate\AdminAddUser_US.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
@ -170,5 +167,13 @@
|
|||
|
||||
<ProjectExtensions><VisualStudio><UserProperties anonymizetagsetting_1json__JsonSchema="http://json.schemastore.org/jovo-language-model" properties_4launchsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="..\.dockerignore" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="..\.dockerignore" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
autoReload="true"
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||
<variable name="myvar" value="myvalue"/>
|
||||
|
||||
<targets>
|
||||
|
||||
<target xsi:type="file" name="File" fileName="${basedir}/logs/${shortdate}/${level}.log"
|
||||
layout="${longdate}||${level}||${logger}||${message}||${exception:format=ToString:innerFormat=ToString:maxInnerExceptionLevel=10:separator=\r\n}||end" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<logger name="*" minlevel="Debug" writeTo="file" />
|
||||
</rules>
|
||||
</nlog>
|
|
@ -102,7 +102,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//检查验证码是否失效
|
||||
if (verificationRecord.ExpirationTime < DateTime.Now)
|
||||
{
|
||||
//---验证码已经过期。
|
||||
//---验证码已经过期。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_ExpiredVerificationCode"]);
|
||||
}
|
||||
else //验证码正确 并且 没有超时
|
||||
|
@ -220,7 +220,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//检查验证码是否失效
|
||||
if (verificationRecord.ExpirationTime < DateTime.Now)
|
||||
{
|
||||
//---验证码已经过期。
|
||||
//---验证码已经过期。
|
||||
return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_ExpiredVerificationCode"]);
|
||||
}
|
||||
else //验证码正确 并且 没有超时
|
||||
|
@ -323,7 +323,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//该site 下不存在该邮箱的记录
|
||||
if (!dbEntityList.Any(t => t.Email == userInfo.EmailOrPhone || t.Phone == userInfo.EmailOrPhone))
|
||||
{
|
||||
//---该中心下已经有其他用户已填写的调研表,您不被允许继续填写
|
||||
//---该中心下已经有其他用户已填写的调研表,您不被允许继续填写
|
||||
return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_AlreadyFilledByOtherUsers"]);
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
if (await _trialSiteSurveyRepository.AnyAsync(t => t.Id == addOrEditTrialSiteSurvey.Id && t.State == TrialSiteSurveyEnum.PMCreatedAndLock))
|
||||
{
|
||||
//---中心调研已锁定,不允许操作。
|
||||
//---中心调研已锁定,不允许操作。
|
||||
return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_Locked"]);
|
||||
}
|
||||
}
|
||||
|
@ -734,39 +734,44 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
var trialId = siteSurvyeSubmit.TrialId;
|
||||
var trialSiteSurveyId = siteSurvyeSubmit.TrialSiteSurveyId;
|
||||
|
||||
if (_userInfo.IsAdmin)
|
||||
{
|
||||
//---不允许管理员操作。
|
||||
return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_NoAdminAcces"]);
|
||||
}
|
||||
var trialSiteSurvey = (await _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
var siteUserList = await _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurvey.SiteId == trialSiteSurvey.SiteId).Select(t => new { t.TrialSiteSurveyId, t.IsGenerateAccount, t.UserTypeId, t.UserTypeRole.UserTypeEnum, t.TrialRoleName.Code }).ToListAsync();
|
||||
|
||||
|
||||
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.Undefined)
|
||||
{
|
||||
var hasSPMOrCPM = await _trialSiteSurveyRepository.AnyAsync(t => t.TrialId == trialId && t.Trial.TrialUserList.Any(u => u.User.UserTypeEnum == UserTypeEnum.SPM || u.User.UserTypeEnum == UserTypeEnum.CPM));
|
||||
|
||||
if (hasSPMOrCPM)
|
||||
//是第一次
|
||||
if(!siteUserList.Any(t=>t.IsGenerateAccount))
|
||||
{
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.ToSubmit, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.CRCSubmitted });
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.ToSubmit, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved });
|
||||
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
|
||||
|
||||
if(!currentUserList.Any(t=>t.Code=="1")|| !currentUserList.Any(t => t.Code == "4"))
|
||||
{
|
||||
throw new BusinessValidationFailedException("本次提交,必须有CRC和影像负责人信息");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
|
||||
|
||||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||
{
|
||||
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.CRCSubmitted, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.SPMApproved, PreliminaryUserId = _userInfo.Id, PreliminaryTime = DateTime.Now });
|
||||
|
||||
}
|
||||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||
{
|
||||
//是第一次
|
||||
if (!siteUserList.Any(t => t.IsGenerateAccount))
|
||||
{
|
||||
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
|
||||
|
||||
if (!currentUserList.Any(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator) ||
|
||||
!currentUserList.Any(t => t.UserTypeEnum == UserTypeEnum.SR))
|
||||
{
|
||||
throw new BusinessValidationFailedException("本次提交,生成账号必须要有CRC 和SR");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var trialSiteSurvey = (await _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
|
||||
|
||||
|
@ -862,7 +867,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
if (userInfo.SystemUserId == null)
|
||||
{
|
||||
//---生成账户Id 未取到值,请排查
|
||||
//---生成账户Id 未取到值,请排查
|
||||
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_FailedToGenerateAccountId"]);
|
||||
}
|
||||
|
||||
|
@ -875,9 +880,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//判断TrialUser中是否存在 不存在就插入
|
||||
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true))
|
||||
{
|
||||
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now });
|
||||
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now });
|
||||
}
|
||||
if (!await _repository.AnyAsync<TrialSiteUser>(t => t.TrialId == trialId && t.UserId == userId && t.SiteId==siteId, true))
|
||||
if (!await _repository.AnyAsync<TrialSiteUser>(t => t.TrialId == trialId && t.UserId == userId && t.SiteId == siteId, true))
|
||||
{
|
||||
await _repository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId });
|
||||
}
|
||||
|
|
|
@ -170,25 +170,25 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 仲裁对象
|
||||
/// </summary>
|
||||
public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.Reading;
|
||||
public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.None;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 阅片模式
|
||||
/// </summary>
|
||||
public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double;
|
||||
public ReadingMethod ReadingType { get; set; } = ReadingMethod.Single;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否有阅片期
|
||||
/// </summary>
|
||||
public bool IsReadingPeriod { get; set; } = true;
|
||||
public bool IsReadingPeriod { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否生成全局阅片任务
|
||||
/// </summary>
|
||||
public bool IsGlobalReading { get; set; } = true;
|
||||
public bool IsGlobalReading { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否签名
|
||||
|
@ -199,7 +199,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// 仲裁阅片
|
||||
/// </summary>
|
||||
public bool IsArbitrationReading { get; set; } = true;
|
||||
public bool IsArbitrationReading { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue