Merge branch 'Test.IRC' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test.IRC
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
0f5a1a6335
|
@ -563,7 +563,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
templateFileStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
|
||||
var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/SiteSurvey", realFileName);
|
||||
var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/Check", realFileName);
|
||||
|
||||
await _repository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });
|
||||
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||
"publishAllPorts": true
|
||||
},
|
||||
"IRaCIS.Staging": {
|
||||
"IRaCIS.Uat_IRC": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Staging"
|
||||
"ASPNETCORE_ENVIRONMENT": "Uat_IRC"
|
||||
},
|
||||
"applicationUrl": "http://localhost:6100"
|
||||
},
|
||||
|
@ -46,6 +46,6 @@
|
|||
},
|
||||
"applicationUrl": "http://localhost:6300"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -71,6 +71,8 @@ namespace IRaCIS.Core.API
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
//½¡¿µ¼ì²é
|
||||
services.AddHealthChecks();
|
||||
//±¾µØ»¯
|
||||
services.AddJsonLocalization(options => options.ResourcesPath = "Resources");
|
||||
|
||||
|
@ -167,6 +169,8 @@ namespace IRaCIS.Core.API
|
|||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public async void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
|
||||
|
||||
//±¾µØ»¯
|
||||
app.UseLocalization();
|
||||
|
||||
|
@ -234,6 +238,8 @@ namespace IRaCIS.Core.API
|
|||
endpoints.MapControllers();
|
||||
|
||||
endpoints.MapHub<UploadHub>("/UploadHub");
|
||||
|
||||
endpoints.MapHealthChecks("/health");
|
||||
});
|
||||
|
||||
var hangfireJobService = app.ApplicationServices.GetRequiredService<IIRaCISHangfireJob>();
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Uat_IRC;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Uat.Study.Hangfire;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"
|
||||
"RemoteNew": "Server=47.117.164.182,1434;Database=Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=47.117.164.182,1434;Database=Uat_IRC.Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||
},
|
||||
|
||||
"AliyunOSS": {
|
|
@ -113,6 +113,14 @@ namespace IRaCIS.Core.Application.Helper
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||
/// </summary>
|
||||
/// <param name="fileStream"></param>
|
||||
/// <param name="oosFolderPath"></param>
|
||||
/// <param name="fileRealName"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
public string UploadToOSS(Stream fileStream, string oosFolderPath,string fileRealName)
|
||||
{
|
||||
|
||||
|
@ -133,7 +141,7 @@ namespace IRaCIS.Core.Application.Helper
|
|||
}
|
||||
|
||||
|
||||
return ossRelativePath;
|
||||
return "/" + ossRelativePath;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -142,6 +150,13 @@ namespace IRaCIS.Core.Application.Helper
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||
/// </summary>
|
||||
/// <param name="localFilePath"></param>
|
||||
/// <param name="oosFolderPath"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
public string UploadToOSS(string localFilePath, string oosFolderPath)
|
||||
{
|
||||
var localFileName = Path.GetFileName(localFilePath);
|
||||
|
|
|
@ -85,6 +85,25 @@
|
|||
<param name="type"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.UploadToOSS(System.IO.Stream,System.String,System.String)">
|
||||
<summary>
|
||||
oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||
</summary>
|
||||
<param name="fileStream"></param>
|
||||
<param name="oosFolderPath"></param>
|
||||
<param name="fileRealName"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.UploadToOSS(System.String,System.String)">
|
||||
<summary>
|
||||
oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||
</summary>
|
||||
<param name="localFilePath"></param>
|
||||
<param name="oosFolderPath"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TaskAllocationRuleService">
|
||||
<summary>
|
||||
分配规则
|
||||
|
|
|
@ -165,7 +165,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var trialId = querySystemDocument.TrialId;
|
||||
|
||||
var trialInfo = await (_repository.Where<Trial>(t => t.Id == querySystemDocument.TrialId).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstOrDefaultAsync());
|
||||
var trialInfo = await (_repository.Where<Trial>(t => t.Id == querySystemDocument.TrialId,ignoreQueryFilters:true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstOrDefaultAsync());
|
||||
|
||||
//系统文档查询
|
||||
var systemDocumentQueryable = from needConfirmedUserType in _repository.Where<SystemDocNeedConfirmedUserType>(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)
|
||||
|
|
|
@ -323,7 +323,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
//CRC只看到他负责的
|
||||
|
||||
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId)
|
||||
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId).IgnoreQueryFilters()
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.ProjectTo<TrialSiteForSelect>(_mapper.ConfigurationProvider).OrderBy(t => t.TrialSiteCode).ToListAsync();
|
||||
|
||||
|
|
|
@ -95,8 +95,6 @@ WHERE
|
|||
|
||||
--维护 删除临床数据配置,导致删除阅片期问题
|
||||
delete ReadingClinicalData
|
||||
--88020000-3E02-0016-9DA6-08DB6705F7C1
|
||||
--select *
|
||||
from ReadingClinicalData
|
||||
INNER JOIN ReadModule on ReadingClinicalData.ReadingId = ReadModule.Id
|
||||
|
||||
|
|
|
@ -1668,6 +1668,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
}
|
||||
await InsertInspection<TrialSite>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
IsDistinctionInterface= type == AuditOpt.Update ? true : false,
|
||||
TrialId = x.TrialId,
|
||||
|
||||
ObjectRelationParentId = x.TrialId
|
||||
|
@ -1718,6 +1719,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
await InsertInspection<TrialSiteUser>(item.Entity as TrialSiteUser, type, x => new InspectionConvertDTO
|
||||
{
|
||||
IsDistinctionInterface= type == AuditOpt.Update ? true : false,
|
||||
TrialId = x.TrialId,
|
||||
ObjectRelationParentId = entity.TrialSite.Id,
|
||||
ObjectRelationParentId2 = x.UserId,
|
||||
|
|
|
@ -2,46 +2,89 @@ kind: pipeline
|
|||
type: docker
|
||||
name: irc-netcore-api
|
||||
|
||||
steps:
|
||||
- name: docker-build
|
||||
image: docker
|
||||
pull: if-not-exists
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
- name: cached_nuget_packages
|
||||
path: /drone/nuget_packages
|
||||
commands:
|
||||
- date +%H:%M:%S
|
||||
- pwd
|
||||
- docker build -t Test.Study .
|
||||
- date +%H:%M:%S
|
||||
clone:
|
||||
disable: true #禁用默认克隆
|
||||
|
||||
steps:
|
||||
- name: clone-repo
|
||||
image: alpine/git
|
||||
pull: if-not-exists
|
||||
volumes:
|
||||
- name: irc-test-work
|
||||
path: /work
|
||||
commands:
|
||||
- if [ ! -e /work/netcore-repo/.git ]; then
|
||||
git clone -b Test.IRC http://192.168.3.68:2000/XCKJ/irc-netcore-api.git /work/netcore-repo;
|
||||
else
|
||||
cd /work/netcore-repo;
|
||||
git pull;
|
||||
fi
|
||||
|
||||
- |
|
||||
if [ ! -e Dockerfile ]; then
|
||||
echo 'FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
||||
EXPOSE 80
|
||||
WORKDIR /app
|
||||
COPY publish .
|
||||
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
ENTRYPOINT ["dotnet", "IRaCIS.Core.API.dll"]' > /work/Dockerfile
|
||||
fi
|
||||
|
||||
- name: restore-publish
|
||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||
pull: if-not-exists
|
||||
depends_on:
|
||||
- clone-repo
|
||||
volumes:
|
||||
- name: nuget-packages
|
||||
path: /root/.nuget/packages
|
||||
- name: irc-test-work
|
||||
path: /work
|
||||
commands:
|
||||
- cd /work/netcore-repo/IRaCIS.Core.API
|
||||
- dotnet restore ./IRaCIS.Core.API.csproj
|
||||
- rm -rf /work/publish
|
||||
- cd /work/netcore-repo/IRaCIS.Core.API
|
||||
- dotnet publish ./IRaCIS.Core.API.csproj -c Release --no-restore -o /work/publish
|
||||
|
||||
|
||||
- name: docker-build
|
||||
image: docker
|
||||
pull: if-not-exists
|
||||
depends_on:
|
||||
- restore-publish
|
||||
commands:
|
||||
- cd /work
|
||||
- docker build -t test-irc:v${DRONE_BUILD_NUMBER} .
|
||||
volumes:
|
||||
- name: irc-test-work
|
||||
path: /work
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
|
||||
- name: docker-deploy
|
||||
image: docker
|
||||
pull: if-not-exists
|
||||
depends_on:
|
||||
- docker-build
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- date +%H:%M:%S
|
||||
- docker rm -f test-study-container
|
||||
- docker run -itd -e TZ=Asia/Shanghai -e ASPNETCORE_ENVIRONMENT=Test_Study --restart=always --name test-study-container -p 8030:80 Test.Study
|
||||
- date +%H:%M:%S
|
||||
|
||||
volumes:
|
||||
- name: cached_nuget_packages
|
||||
- name: nuget-packages
|
||||
host:
|
||||
path: /mnt/f/docker_publish/nuget_packages
|
||||
path: /opt/cicd/nuget/packages
|
||||
- name: irc-test-work
|
||||
host:
|
||||
path: /opt/cicd/irc-test
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
- Test.IRC
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in New Issue