diff --git a/.gitea/workflows/push-master.yaml b/.gitea/workflows/push-master.yaml index 93595ac..b0a7271 100644 --- a/.gitea/workflows/push-master.yaml +++ b/.gitea/workflows/push-master.yaml @@ -35,16 +35,21 @@ jobs: volumes: - /opt/.runner/nuget_packages:/root/.nuget/packages + env: + run_cmd: | + + cd D:/marking.cut.service/publish + + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30000" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30001" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30002" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30003" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30004" + steps: - name: 下载源码 uses: actions/checkout@v3 - - name: 使用缓存 - uses: actions/cache@master - with: - mount: | - node_modules - - name: 编译后端 uses: actions/aspnet@8.0 with: @@ -84,7 +89,12 @@ jobs: rm -rf marking.cut.service.tar.gz curl -O https://static.w.23544.com:8843/marking/marking.cut.service.tar.gz tar -zxvf marking.cut.service.tar.gz - curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + # curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + + echo "${{ env.run_cmd }}" + echo "${{ env.run_cmd }}"> publish/run.cmd + + curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/run.cmd&count=2" - name: 启动生产环境106 uses: docker://appleboy/drone-ssh @@ -101,7 +111,12 @@ jobs: rm -rf marking.cut.service.tar.gz curl -O https://static.w.23544.com:8843/marking/marking.cut.service.tar.gz tar -zxvf marking.cut.service.tar.gz - curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + # curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + + echo "${{ env.run_cmd }}" + echo "${{ env.run_cmd }}"> publish/run.cmd + + curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/run.cmd&count=2" - name: 发送构建通知 if: ${{ always() }} diff --git a/.gitea/workflows/release-version.yaml b/.gitea/workflows/release-version.yaml index 64db7bc..6ca53c6 100644 --- a/.gitea/workflows/release-version.yaml +++ b/.gitea/workflows/release-version.yaml @@ -22,6 +22,17 @@ jobs: volumes: - /opt/.runner/nuget_packages:/root/.nuget/packages + env: + run_cmd: | + + cd D:/marking.cut.service/publish + + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30000" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30001" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30002" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30003" + start dotnet Dolphin.ExamPictureCut.HttpApi.Host.dll --URLS="http://*:30004" + steps: - name: 下载源码 uses: actions/checkout@v3 @@ -75,7 +86,12 @@ jobs: rm -rf marking.cut.service.tar.gz curl -O https://static.w.23544.com:8843/marking/marking.cut.service.tar.gz tar -zxvf marking.cut.service.tar.gz - curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + # curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + + echo "${{ env.run_cmd }}" + echo "${{ env.run_cmd }}"> publish/run.cmd + + curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/run.cmd&count=2" - name: 启动生产环境106 uses: docker://appleboy/drone-ssh @@ -92,7 +108,12 @@ jobs: rm -rf marking.cut.service.tar.gz curl -O https://static.w.23544.com:8843/marking/marking.cut.service.tar.gz tar -zxvf marking.cut.service.tar.gz - curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + # curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/Dolphin.ExamPictureCut.HttpApi.Host.exe&count=2" + + echo "${{ env.run_cmd }}" + echo "${{ env.run_cmd }}"> publish/run.cmd + + curl "http://localhost:5244/publish/run?execPath=D:/marking.cut.service/publish/run.cmd&count=2" - name: 发送构建通知 if: ${{ always() }} diff --git a/Dolphin.ExamPictureCut.Application/Exams/ExamManager.cs b/Dolphin.ExamPictureCut.Application/Exams/ExamManager.cs index aee40b1..7464b60 100644 --- a/Dolphin.ExamPictureCut.Application/Exams/ExamManager.cs +++ b/Dolphin.ExamPictureCut.Application/Exams/ExamManager.cs @@ -105,7 +105,7 @@ public class ExamManager : DomainService, IExamManager }).ToListAsync(); var gotoCount = 0; -dotPenOriginalImg: + dotPenOriginalImg: var zgtSettingDtls = await DbBiz.Queryable().Where(w => w.ExamSubjectId == eto.ExamSubjectId).ToListAsync(); // 割原题 @@ -413,11 +413,19 @@ dotPenOriginalImg: await DbBiz.BeginTranAsync(); // 删除 - await DbBiz.Deleteable().Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentNo == penSerial).ExecuteCommandAsync(); + var delObjectiveIds = await DbBiz.Queryable() + .Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentNo == penSerial) + .Select(s => s.Id).ToListAsync(); + await DbBiz.Deleteable().Where(w => delObjectiveIds.Contains(w.Id)).ExecuteCommandAsync(); + + var delSubjectiveIds = await DbBiz.Queryable() + .Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentExamNum == penSerial && w.IsDeleted == false) + .Select(s => s.Id).ToListAsync(); await DbBiz.Updateable() .SetColumns(s => new SubjectiveMarkingResult { IsDeleted = true, UpdateDate = Clock.Now }) - .Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentExamNum == penSerial && w.IsDeleted == false) + .Where(w => delSubjectiveIds.Contains(w.Id)) .ExecuteCommandAsync(); + // 新增 await DbBiz.Insertable(kgtDtls).ExecuteCommandAsync(); await DbBiz.Insertable(zgtDtls).ExecuteCommandAsync(); diff --git a/Dolphin.ExamPictureCut.HttpApi.Host/DolphinExamPictureCutHttpApiHostModule.cs b/Dolphin.ExamPictureCut.HttpApi.Host/DolphinExamPictureCutHttpApiHostModule.cs index d441447..f69d096 100644 --- a/Dolphin.ExamPictureCut.HttpApi.Host/DolphinExamPictureCutHttpApiHostModule.cs +++ b/Dolphin.ExamPictureCut.HttpApi.Host/DolphinExamPictureCutHttpApiHostModule.cs @@ -63,7 +63,7 @@ public class DolphinExamPictureCutHttpApiHostModule : AbpModule }, db => { - db.QueryFilter.AddTableFilter(s => s.IsDeleted == false); + //db.QueryFilter.AddTableFilter(s => s.IsDeleted == false); var config = new SqlSugarConfig(); db.Aop.DataExecuting = config.DataExecuting(context.Services);