Compare commits

...

10 Commits

Author SHA1 Message Date
hang 19fbb762b0 测试Study 环境打包增加企业微信通知
continuous-integration/drone/push Build is passing
2026-02-06 11:33:22 +08:00
hang df18b6678c Merge branch 'Test_Study_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_Study_Net8
continuous-integration/drone/push Build is passing
2025-03-04 10:43:28 +08:00
hang 3a7500d079 修改oss 配置 2025-03-04 10:43:26 +08:00
he 80dd6962e6 修改找上一个访视的逻辑
continuous-integration/drone/push Build is passing
2025-03-03 15:40:22 +08:00
hang 0c21eedc0c 修改uat 环境配置文件
continuous-integration/drone/push Build is passing
2024-11-20 14:43:46 +08:00
hang e40a28222f study net8 自动打包配置
continuous-integration/drone/push Build is passing
2024-07-11 16:07:11 +08:00
hang 3b118c70ba 升级netcore8 测试 2024-07-11 15:45:47 +08:00
hang f639962b68 修改打包发布配置镜像bug 发现
continuous-integration/drone/push Build is passing
2024-07-11 15:27:03 +08:00
hang 515a99fa46 清理掉日志组件
continuous-integration/drone/push Build is passing
2024-06-25 09:30:50 +08:00
hang 689934ca0a 导航属性bug
continuous-integration/drone/push Build is passing
2024-06-04 16:22:53 +08:00
17 changed files with 87 additions and 230 deletions
+1 -2
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>false</SignAssembly>
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
<LangVersion>default</LangVersion>
@@ -85,7 +85,6 @@
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.7.0" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.0.1" />
<PackageReference Include="Serilog.Sinks.Email" Version="2.4.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
</ItemGroup>
@@ -15,7 +15,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Uat_Study"
},
"applicationUrl": "http://localhost:6100"
"applicationUrl": "http://localhost:6101"
}
}
}
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Builder;
using Serilog;
using Serilog.Events;
using Serilog.Sinks.Email;
//using Serilog.Sinks.Email;
using System;
using System.Net;
+7 -16
View File
@@ -11,26 +11,17 @@
"AliyunOSS": {
"regionId": "cn-shanghai",
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
"bucketName": "zy-sir-uat-store",
"roleArn": "acs:ram::1899121822495495:role/oss-upload",
"viewEndpoint": "https://zy-sir-uat-store.oss-cn-shanghai.aliyuncs.com",
"accessKeyId": "LTAI5tL9GrNqqvCWYWtfVfn9",
"accessKeySecret": "YAZuoDTenF7ljLcDPgNjvh93KemAxk",
"bucketName": "tl-med-sir-uat-store",
"roleArn": "acs:ram::1078130221702011:role/uat-oss-access",
"viewEndpoint": "https://tl-med-sir-uat-store.oss-cn-shanghai.aliyuncs.com",
"region": "oss-cn-shanghai"
},
"MinIO": {
"endpoint": "http://192.168.3.68",
"port": "8001",
"useSSL": false,
"accessKey": "IDFkwEpWej0b4DtiuThL",
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
"bucketName": "test"
}
},
"ConnectionStrings": {
"RemoteNew": "Server=47.117.164.182,1434;Database=Uat.Study;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
"Hangfire": "Server=47.117.164.182,1434;Database=Uat.Study.hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_Study;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
"Hangfire": "Server=101.132.253.119,1435;Database=Uat_Study_hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
},
"BasicSystemConfig": {
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>default</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
@@ -23,9 +23,9 @@ using System.Linq;
using Spire.Doc;
using Microsoft.AspNetCore.Http;
using System;
using System.Runtime.InteropServices;
using SharpCompress.Common;
using SkiaSharp;
using System.Runtime.InteropServices;
namespace IRaCIS.Core.Application.Service
{
@@ -1712,14 +1712,24 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
else
{
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
var lastTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
//x.DoctorUserId == taskinfo.DoctorUserId &&
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ArmEnum == taskinfo.ArmEnum
&& x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
var lastTaskId = default(Guid);
if (taskinfo.ReadingTaskState == ReadingTaskState.HaveSigned)
{
lastTaskId = await _visitTaskRepository.Where(x => taskinfo.RelatedVisitTaskIdList.Contains(x.Id) && x.Id != taskinfo.Id).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync(); ;
}
else
{
lastTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
//x.DoctorUserId == taskinfo.DoctorUserId &&
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ArmEnum == taskinfo.ArmEnum
&& x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
}
lastVisitTaskId = lastTaskId;
return lastTaskId;
}
@@ -1373,21 +1373,26 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// <returns></returns>
private async Task<Guid> GetLastVisitTaskId(ReadingCalculateDto inDto)
{
// 拿到这一个访视
var thisNum = await _subjectVisitRepository.Where(x => x.Id == inDto.SubjectVisitId).Select(x => x.VisitNum).FirstOrDefaultAsync();
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
// 先找到上一个访视
var lastVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == inDto.SubjectId && !x.IsLostVisit && x.VisitNum < thisNum).OrderByDescending(x => x.VisitNum).Select(x => x.Id).FirstOrDefaultAsync();
var lastTaskId = default(Guid);
if (taskinfo.ReadingTaskState == ReadingTaskState.HaveSigned)
{
lastTaskId = await _visitTaskRepository.Where(x => taskinfo.RelatedVisitTaskIdList.Contains(x.Id) && x.Id != taskinfo.Id).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync(); ;
}
else
{
lastTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
//x.DoctorUserId == taskinfo.DoctorUserId &&
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ArmEnum == taskinfo.ArmEnum
&& x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
}
// 找到访视任务Id
var LastVisitTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == inDto.TrialReadingCriterionId &&
x.TaskState == TaskState.Effect &&
x.IsAnalysisCreate == inDto.IsAnalysisCreate
&& x.SourceSubjectVisitId == lastVisitId && x.ArmEnum==inDto.ArmEnum).Select(x => x.Id).FirstOrDefaultAsync();
return LastVisitTaskId;
return lastTaskId;
}
#endregion
@@ -1368,21 +1368,26 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// <returns></returns>
private async Task<Guid> GetLastVisitTaskId(ReadingCalculateDto inDto)
{
// 拿到这一个访视
var thisNum = await _subjectVisitRepository.Where(x => x.Id == inDto.SubjectVisitId).Select(x => x.VisitNum).FirstOrDefaultAsync();
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
// 先找到上一个访视
var lastVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == inDto.SubjectId && !x.IsLostVisit && x.VisitNum < thisNum).OrderByDescending(x => x.VisitNum).Select(x => x.Id).FirstOrDefaultAsync();
var lastTaskId = default(Guid);
if (taskinfo.ReadingTaskState == ReadingTaskState.HaveSigned)
{
lastTaskId = await _visitTaskRepository.Where(x => taskinfo.RelatedVisitTaskIdList.Contains(x.Id) && x.Id != taskinfo.Id).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync(); ;
}
else
{
lastTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
//x.DoctorUserId == taskinfo.DoctorUserId &&
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ArmEnum == taskinfo.ArmEnum
&& x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).FirstOrDefaultAsync();
}
// 找到访视任务Id
var LastVisitTaskId = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
x.TrialReadingCriterionId == inDto.TrialReadingCriterionId &&
x.TaskState == TaskState.Effect &&
x.IsAnalysisCreate == inDto.IsAnalysisCreate
&& x.SourceSubjectVisitId == lastVisitId && x.ArmEnum==inDto.ArmEnum).Select(x => x.Id).FirstOrDefaultAsync();
return LastVisitTaskId;
return lastTaskId;
}
#endregion
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-50
View File
@@ -1,50 +0,0 @@
using System.Runtime.InteropServices;
namespace IRaCIS.Core.Domain.Share
{
[StructLayout(LayoutKind.Sequential)]
public class NetResource
{
public int dwScope;
public int dwType;
public int dwDisplayType;
public int dwUsage;
public string lpLocalName;
public string lpRemoteName;
public string lpComment;
public string lpProvider;
}
public class WNetAddConnectionHelper
{
[DllImport("mpr.dll", EntryPoint = "WNetAddConnection2")]
private static extern uint WNetAddConnection2(NetResource lpNetResource, string lpPassword, string lpUsername, uint dwFlags);
[DllImport("mpr.dll")]
public static extern int WNetCancelConnection2A(string sharename, int dwFlags, int fForce);
public static void Connect()
{
var remoteName = @"\\192.168.1.119\Potomac_01";
NetResource netResource = new NetResource();
netResource.dwScope = 1;
netResource.dwType = 1;
netResource.dwDisplayType = 3;
netResource.dwUsage = 1;
netResource.lpLocalName = "W:";
netResource.lpRemoteName = remoteName.TrimEnd('\\');
WNetAddConnection2(netResource, "Everest@suzhou406", "share", 1);
}
public static int Disconnect()
{
return WNetCancelConnection2A("W:", 1, 1);
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+1 -2
View File
@@ -37,8 +37,7 @@ namespace IRaCIS.Core.Domain.Models
public DateTime CreateTime { get; set; } = DateTime.Now;
public Guid UpdateUserId { get; set; } = Guid.Empty;
public DateTime UpdateTime { get; set; } = DateTime.Now;
[JsonIgnore]
public List<Subject> SubjectList { get; set; }
//导航属性
[JsonIgnore]
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
+15 -117
View File
@@ -1,114 +1,3 @@
kind: pipeline
type: docker
name: irc-netcore-api
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 .
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
volumes:
- name: nuget-packages
host:
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
---
kind: pipeline
type: ssh
name: ssh-linux-test-irc-publish
platform:
os: Linux
arch: 386
clone:
disable: true #禁用默认克隆
server:
host: 106.14.89.110
user: root
password:
from_secret: test_ssh_pwd
steps:
- name: publish-test-irc
commands:
- echo start publish test-irc-api
- cd /opt/1panel/hang/devops/test-irc
- sh test-irc.sh v${DRONE_BUILD_NUMBER}
trigger:
branch:
- Test.IRC
---
kind: pipeline
type: ssh
name: ssh-linux-test-study-publish
@@ -127,14 +16,23 @@ server:
from_secret: test_ssh_pwd
steps:
- name: publish-test-study
commands:
- echo start publish test-study-api
- cd /opt/1panel/hang/devops/test-study
- sh test-study.sh v${DRONE_BUILD_NUMBER}
- name: publish-test-sir(study)
commands:
- bash /opt/1panel/xc-deploy-new/Test_Study/devops-publish/test-branch-publish.sh
- name: notify-wecom
commands:
- bash /opt/1panel/xc-deploy-new/devops-center/drone-notify-wecom.sh "$DRONE_BUILD_STATUS" "$DRONE_REPO_NAME" "$DRONE_BRANCH" "$DRONE_BUILD_NUMBER" "4355b98e-1e72-4678-8dfb-2fc6ad0bf449" "$DRONE_COMMIT_MESSAGE" "$DRONE_COMMIT_AUTHOR" "Test_Study_API" "sir.test.extimaging.com"
when:
status:
- success
- failure
trigger:
branch:
- Test.Study
- Test_Study_Net8