国际化修改
parent
9692ae569e
commit
0f47a14e69
|
@ -0,0 +1,25 @@
|
|||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
11
Dockerfile
11
Dockerfile
|
@ -1,14 +1,8 @@
|
|||
#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
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
|
@ -29,7 +23,4 @@ RUN dotnet publish "IRaCIS.Core.API.csproj" -c Release -o /app/publish /p:UseApp
|
|||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||
|
||||
ENTRYPOINT ["dotnet", "IRaCIS.Core.API.dll"]
|
|
@ -985,7 +985,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
if (!fileName.EndsWith(".xlsx", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
throw new BusinessValidationFailedException("请用提供格式的模板excel上传需要处理的数据");
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_TemplateUploadData"));
|
||||
}
|
||||
|
||||
(serverFilePath, relativePath) = FileStoreHelper.GetOtherFileUploadPath(_hostEnvironment, StaticData.Folder.TempFile, fileName);
|
||||
|
@ -1000,30 +1000,30 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
if (excelList.Any(t => string.IsNullOrWhiteSpace(t.TrialSiteCode) || string.IsNullOrWhiteSpace(t.FirstName) || string.IsNullOrWhiteSpace(t.LastName) || string.IsNullOrWhiteSpace(t.Email) || string.IsNullOrWhiteSpace(t.UserTypeStr)))
|
||||
{
|
||||
throw new BusinessValidationFailedException("请确保Excel中 每一行的 中心编号,姓名,邮箱,用户类型数据记录完整再进行上传");
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_EnsureCompleteData"));
|
||||
}
|
||||
|
||||
var siteCodeList = excelList.Select(t => t.TrialSiteCode.Trim().ToUpper()).Distinct().ToList();
|
||||
|
||||
if (_trialSiteRepository.Where(t => t.TrialId==trialId && siteCodeList.Contains(t.TrialSiteCode.ToUpper())).Count() != siteCodeList.Count)
|
||||
{
|
||||
throw new BusinessValidationFailedException("在项目中未找到该Excel中部分或全部中心");
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidCenters"));
|
||||
}
|
||||
|
||||
if (excelList.GroupBy(t => new { t.UserTypeStr, t.Email }).Any(g => g.Count() > 1))
|
||||
{
|
||||
throw new BusinessValidationFailedException("同一邮箱,同一用户类型,只能生成一个账户,请核查Excel数据");
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_CheckDuplicateAccounts"));
|
||||
}
|
||||
|
||||
if (excelList.Any(t => !t.Email.Contains("@")))
|
||||
{
|
||||
throw new BusinessValidationFailedException("有邮箱不符合邮箱格式,请核查Excel数据");
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidEmail"));
|
||||
}
|
||||
var generateUserTypeList = new List<string>() { "CRC", "SR", "CRA" };
|
||||
|
||||
if (excelList.Any(t => !generateUserTypeList.Contains(t.UserTypeStr.ToUpper())))
|
||||
{
|
||||
throw new BusinessValidationFailedException("用户类型仅能为 CRC,SR,CRA 请核查Excel数据");
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidUserType"));
|
||||
}
|
||||
|
||||
//处理好 用户类型 和用户类型枚举
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#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.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
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 .
|
||||
ENTRYPOINT ["dotnet", "IRaCIS.Core.API.dll"]
|
|
@ -5,7 +5,7 @@
|
|||
<SignAssembly>false</SignAssembly>
|
||||
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
|
||||
<LangVersion>default</LangVersion>
|
||||
<DockerDefaultTargetOS>Windows</DockerDefaultTargetOS>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<Version>1.0.1.001</Version>
|
||||
<Company>上海展影医疗科技有限公司</Company>
|
||||
<Product>IRC影像系统 (EICS)</Product>
|
||||
|
|
Loading…
Reference in New Issue