Compare commits

...

16 Commits

Author SHA1 Message Date
yangqiang cf8e8b9fc3 Merge pull request 'staging' (#17) from staging into master
部署生产环境 / 发布版本 (push) Successful in 19s Details
部署生产环境 / 编译发布 (push) Successful in 5m33s Details
Reviewed-on: #17
2024-05-17 10:07:28 +08:00
yangqiang 001bda7d9d Merge pull request 'dev' (#16) from dev into staging
部署到测试环境 / 编译发布 (push) Successful in 2m5s Details
Reviewed-on: #16
2024-05-17 10:03:46 +08:00
lyndonliu 072ffebfbc fix: 笔迹生成优化
部署到开发环境 / 编译发布 (push) Successful in 3m17s Details
2024-05-17 09:48:15 +08:00
qxa ac3b9c82f1 修改通知脚本
部署到开发环境 / 编译发布 (push) Successful in 5m11s Details
2024-04-18 15:30:03 +08:00
qxa b4134da779 Merge pull request 'dev' (#15) from dev into staging
部署到测试环境 / 编译发布 (push) Successful in 2m53s Details
Reviewed-on: #15
2024-04-18 13:35:52 +08:00
qxa 111b94f9d8 修改默认启动数量
部署到开发环境 / 编译发布 (push) Successful in 3m27s Details
2024-04-18 11:33:48 +08:00
lyndonliu b5e608cf94 Merge branch 'dev' of https://gitea.23544.com/marking/Picture.Cut.Service into dev
部署到开发环境 / 编译发布 (push) Successful in 2m56s Details
2024-04-01 17:52:02 +08:00
lyndonliu 0005e17b3b fix: 异常钉钉通知 2024-04-01 17:51:57 +08:00
qxa 6f22aa7799 Merge pull request 'dev' (#14) from dev into staging
部署到测试环境 / 编译发布 (push) Successful in 6m3s Details
Reviewed-on: #14
2024-03-29 18:32:21 +08:00
qxa 4cc1f472e9 1
部署到开发环境 / 编译发布 (push) Successful in 4m27s Details
2024-03-29 18:32:07 +08:00
qxa 56f9f61400 Merge pull request '修改更新脚本' (#13) from dev into master
部署生产环境 / 发布版本 (push) Successful in 21s Details
部署生产环境 / 编译发布 (push) Successful in 5m10s Details
Reviewed-on: #13
2024-03-29 18:24:59 +08:00
qxa ef12c7a257 修改更新脚本
部署到开发环境 / 编译发布 (push) Successful in 2m38s Details
2024-03-29 18:24:03 +08:00
yangqiang f8debc1334 Merge pull request 'staging' (#12) from staging into master
部署生产环境 / 发布版本 (push) Successful in 21s Details
部署生产环境 / 编译发布 (push) Has been cancelled Details
Reviewed-on: #12
2024-03-29 18:11:48 +08:00
yangqiang f1d19ec0f7 Merge pull request 'dev' (#11) from dev into staging
部署到测试环境 / 编译发布 (push) Successful in 2m47s Details
Reviewed-on: #11
2024-03-29 18:10:03 +08:00
lyndonliu c67424492a fix: 查了再删
部署到开发环境 / 编译发布 (push) Successful in 3m39s Details
2024-03-29 18:05:49 +08:00
qxa a95de36734 Merge pull request 'dev' (#7) from dev into staging
部署到测试环境 / 编译发布 (push) Successful in 3m49s Details
Reviewed-on: #7
2024-03-29 16:19:36 +08:00
11 changed files with 60 additions and 42 deletions

View File

@ -48,6 +48,7 @@ jobs:
OWNER=${{ gitea.repository_owner }}
TAG=${{ gitea.ref_name }}
ASPNETCORE_ENVIRONMENT=${{ env.ASPNETCORE_ENVIRONMENT }}
replicas=1
run: |
echo "$env_file">.env
@ -59,7 +60,7 @@ jobs:
username: ${{ secrets.PUBLISH_USER_NAME }}
password: ${{ secrets.PUBLISH_PASSWORD }}
target: ${{ env.PUBLISH_PATH }}
source: docker-compose.yaml,.env
source: docker-swarm.yaml,.env
- name: 部署到服务器
uses: docker://appleboy/drone-ssh
@ -74,7 +75,7 @@ jobs:
[ -f .env ] && export $(sed '/^#/d' .env)
docker stack deploy -c docker-compose.yaml --with-registry-auth mk
docker stack deploy -c docker-swarm.yaml --with-registry-auth mk
- name: 发送构建通知
if: ${{ always() }}
@ -93,6 +94,7 @@ jobs:
>**代码分支**: ${{ gitea.ref_name }}
>**提交标识**: ${{ gitea.sha }}
>**提交发起**: ${{ gitea.actor }}
>**提交信息**: ${{ gitea.event.head_commit.message }}\n
"
}
}

View File

@ -40,11 +40,11 @@ jobs:
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"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30000"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30001"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30002"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30003"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30004"
steps:
- name: 下载源码
@ -135,6 +135,7 @@ jobs:
>**代码分支**: ${{ gitea.ref_name }}
>**提交标识**: ${{ gitea.sha }}
>**提交发起**: ${{ gitea.actor }}
>**提交信息**: ${{ gitea.event.head_commit.message }}\n
"
}
}

View File

@ -48,6 +48,7 @@ jobs:
OWNER=${{ gitea.repository_owner }}
TAG=${{ gitea.ref_name }}
ASPNETCORE_ENVIRONMENT=${{ env.ASPNETCORE_ENVIRONMENT }}
replicas=8
run: |
echo "$env_file">.env
@ -59,7 +60,7 @@ jobs:
username: ${{ secrets.PUBLISH_USER_NAME }}
password: ${{ secrets.PUBLISH_PASSWORD }}
target: ${{ env.PUBLISH_PATH }}
source: docker-compose.yaml,.env
source: docker-swarm.yaml,.env
- name: 部署到服务器
uses: docker://appleboy/drone-ssh
@ -74,7 +75,7 @@ jobs:
[ -f .env ] && export $(sed '/^#/d' .env)
docker stack deploy -c docker-compose.yaml --with-registry-auth mk
docker stack deploy -c docker-swarm.yaml --with-registry-auth mk
- name: 发送构建通知
if: ${{ always() }}
@ -93,6 +94,7 @@ jobs:
>**代码分支**: ${{ gitea.ref_name }}
>**提交标识**: ${{ gitea.sha }}
>**提交发起**: ${{ gitea.actor }}
>**提交信息**: ${{ gitea.event.head_commit.message }}\n
"
}
}

View File

@ -27,11 +27,11 @@ jobs:
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"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30000"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30001"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30002"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30003"
start Dolphin.ExamPictureCut.HttpApi.Host.exe --URLS="http://*:30004"
steps:
- name: 下载源码
@ -132,6 +132,7 @@ jobs:
>**代码分支**: ${{ gitea.ref_name }}
>**提交标识**: ${{ gitea.sha }}
>**提交发起**: ${{ gitea.actor }}
>**提交信息**: ${{ gitea.event.release.target_commitish }}\n
"
}
}

View File

@ -391,8 +391,6 @@ dotPenOriginalImg:
var skPointMode = SKPointMode.Polygon;
if (points.Length == 1)
skPointMode = SKPointMode.Points;
else if (points.Length == 2)
skPointMode = SKPointMode.Lines;
canvas.DrawPoints(skPointMode, points, skPaint);
}
@ -413,11 +411,19 @@ dotPenOriginalImg:
await DbBiz.BeginTranAsync();
// 删除
await DbBiz.Deleteable<MkExamResult>().Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentNo == penSerial).ExecuteCommandAsync();
var delObjectiveIds = await DbBiz.Queryable<MkExamResult>()
.Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentNo == penSerial)
.Select(s => s.Id).ToListAsync();
await DbBiz.Deleteable<MkExamResult>().Where(w => delObjectiveIds.Contains(w.Id)).ExecuteCommandAsync();
var delSubjectiveIds = await DbBiz.Queryable<SubjectiveMarkingResult>()
.Where(w => w.ExamSubjectId == eto.ExamSubjectId && w.StudentExamNum == penSerial && w.IsDeleted == false)
.Select(s => s.Id).ToListAsync();
await DbBiz.Updateable<SubjectiveMarkingResult>()
.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();
@ -437,6 +443,7 @@ dotPenOriginalImg:
catch (Exception ex)
{
Logger.LogError("{ExamSubjectId} {penSerial} 收集失败! {error}", eto.ExamSubjectId, penSerial, ex);
await NotifyExt.DingTalk($"{eto.ExamSubjectId} {penSerial} 收集失败! 异常:{ex.Message}");
}
finally
{

View File

@ -1,4 +1,5 @@
using Dolphin.ExamPictureCut.Exams;
using Dolphin.ExamPictureCut.Extensions;
namespace Dolphin.ExamPictureCut.Services;
@ -14,4 +15,9 @@ public class ExamAppService : DolphinAppService
{
await _examManager.ExamStudentGather(new() { SchoolId = 3, StudentExamNum = "BP2-3G3-07K-C1", BookId = 529493484986437, ExamSubjectSchoolId = 530151338438726, ExamSubjectId = 530151329325125, LastCollectTime = DateTime.Now });
}
public async Task NotifyTest()
{
await NotifyExt.DingTalk($"{530151329325125} {"BP2-3G3-07K-C1"} 收集失败! 异常: {""}");
}
}

View File

@ -0,0 +1,19 @@
using Flurl.Http;
namespace Dolphin.ExamPictureCut.Extensions;
public class NotifyExt
{
public static async Task DingTalk(string text)
{
await "https://oapi.dingtalk.com/robot/send?access_token=6ddafcada8f44f4bad4a7314c4d9bd19a895ded0a1ba1afdaff5dd01a5af6781".PostJsonAsync(new
{
msgtype = "markdown",
markdown = new
{
title = "异常通知",
text = $"dotpan,{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}异常\n > 来源:Dplphin.ExamPictureCut\n > 详情:" + text,
}
}).ReceiveString();
}
}

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM dotnet/aspnet:8.0
ENV TZ=Asia/Shanghai \
DEBIAN_FRONTEND=noninteractive

View File

@ -63,7 +63,7 @@ public class DolphinExamPictureCutHttpApiHostModule : AbpModule
},
db =>
{
db.QueryFilter.AddTableFilter<ISoftDelete>(s => s.IsDeleted == false);
//db.QueryFilter.AddTableFilter<ISoftDelete>(s => s.IsDeleted == false);
var config = new SqlSugarConfig();
db.Aop.DataExecuting = config.DataExecuting(context.Services);

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\Dolphin.ExamPictureCut.HttpApi.Host.dll" stdoutLogEnabled="false" stdoutLogFile=".\Logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="x-powered-by" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

View File

@ -12,4 +12,4 @@ services:
# - 9925:80
deploy:
mode: replicated
replicas: 1
replicas: ${replicas:-1}