Merge branch 'dev' of ssh://gitea.23544.com:10222/marking/Picture.Cut.Service into dev
部署到开发环境 / 编译发布 (push) Has been cancelled
Details
部署到开发环境 / 编译发布 (push) Has been cancelled
Details
This commit is contained in:
commit
3dced8764e
|
|
@ -47,7 +47,7 @@ public class ExamManager : DomainService, IExamManager
|
||||||
public async Task ExamStudentGather(ExamStudentGatherEto eto)
|
public async Task ExamStudentGather(ExamStudentGatherEto eto)
|
||||||
{
|
{
|
||||||
var penSerial = eto.StudentExamNum;
|
var penSerial = eto.StudentExamNum;
|
||||||
Logger.LogInformation("{ExamSubjectId} {penSerial} 开始收集...", eto.ExamSubjectId, penSerial);
|
Logger.LogInformation($"开始收集... 参数:{JsonConvert.SerializeObject(eto)}");
|
||||||
var guid = GuidGenerator.Create().ToString("N");
|
var guid = GuidGenerator.Create().ToString("N");
|
||||||
|
|
||||||
var templates = await Db.Queryable<GroupBookPaperTemplate>().Where(w => w.BookId == eto.BookId)
|
var templates = await Db.Queryable<GroupBookPaperTemplate>().Where(w => w.BookId == eto.BookId)
|
||||||
|
|
@ -70,7 +70,7 @@ public class ExamManager : DomainService, IExamManager
|
||||||
var paperIds = templates.Select(s => s.PaperId).ToList();
|
var paperIds = templates.Select(s => s.PaperId).ToList();
|
||||||
|
|
||||||
// 获取点阵数据
|
// 获取点阵数据
|
||||||
var timespan = (long)(eto.LastCollectTime - new DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds;
|
var timespan = (long)(eto.LastCollectTime - TimeZoneInfo.ConvertTimeFromUtc(new DateTime(1970, 1, 1), TimeZoneInfo.Local)).TotalMilliseconds;
|
||||||
var lattices = await DbPenOffline.Queryable<PenOfflineData>()
|
var lattices = await DbPenOffline.Queryable<PenOfflineData>()
|
||||||
.Where(w => w.PenSerial == penSerial && paperIds.Contains(w.PageSerial) && w.logType == LogType.作业 && w.Time <= timespan)
|
.Where(w => w.PenSerial == penSerial && paperIds.Contains(w.PageSerial) && w.logType == LogType.作业 && w.Time <= timespan)
|
||||||
.Select(s => new PenOfflineData
|
.Select(s => new PenOfflineData
|
||||||
|
|
@ -87,7 +87,7 @@ public class ExamManager : DomainService, IExamManager
|
||||||
if (lattices.Count == 0)
|
if (lattices.Count == 0)
|
||||||
{
|
{
|
||||||
await DbBiz.Updateable<ExamSubjectSchoolStudent>().SetColumns(s => s.CollectStatus == 2).Where(w => w.ExamSubjectSchoolId == eto.ExamSubjectSchoolId && w.StudentExamNum == penSerial).ExecuteCommandAsync();
|
await DbBiz.Updateable<ExamSubjectSchoolStudent>().SetColumns(s => s.CollectStatus == 2).Where(w => w.ExamSubjectSchoolId == eto.ExamSubjectSchoolId && w.StudentExamNum == penSerial).ExecuteCommandAsync();
|
||||||
Logger.LogInformation("{ExamSubjectId} {penSerial} 无点阵数据", eto.ExamSubjectId, penSerial);
|
Logger.LogInformation($"{eto.ExamSubjectId} {penSerial} {string.Join(',', paperIds)} {timespan} 无点阵数据");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,6 @@ public class ExamAppService : DolphinAppService
|
||||||
|
|
||||||
public async Task Test()
|
public async Task Test()
|
||||||
{
|
{
|
||||||
await _examManager.ExamStudentGather(new() { SchoolId = 1, StudentExamNum = "BP2-3G3-07K-BZ", BookId = 528102717276229, ExamSubjectSchoolId = 528066671910982, ExamSubjectId = 528066655817797, LastCollectTime = DateTime.Now });
|
await _examManager.ExamStudentGather(new() { SchoolId = 3, StudentExamNum = "BP2-3G3-07K-C1", BookId = 529493484986437, ExamSubjectSchoolId = 530151338438726, ExamSubjectId = 530151329325125, LastCollectTime = DateTime.Now });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
|
||||||
namespace Dolphin.ExamPictureCut;
|
namespace Dolphin.ExamPictureCut;
|
||||||
|
|
@ -28,6 +28,7 @@ public class Program
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.Information("Starting Dolphin.ExamPictureCut.HttpApi.Host.");
|
Log.Information("Starting Dolphin.ExamPictureCut.HttpApi.Host.");
|
||||||
|
Log.Information("Current Env:" + Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"));
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
builder.Host.AddAppSettingsSecretsJson()
|
builder.Host.AddAppSettingsSecretsJson()
|
||||||
.UseAutofac()
|
.UseAutofac()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
"App": {
|
||||||
|
"CorsOrigins": "https://*.23544.com"
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"marking_basic": "Server=102553.23544.com;Port=3306;Database=marking_basic;Uid=marking;Pwd=qwe123!@#;AllowLoadLocalInfile=true;",
|
||||||
|
"penoffline": "host=47.108.209.28;port=8812;username=zhjs;password=zhjsniubi;database=qdb;ServerCompatibilityMode=NoTypeLoading;"
|
||||||
|
},
|
||||||
|
"Redis": {
|
||||||
|
"Configuration": "102553.23544.com,password=qwe123!@#,defaultDatabase=1,idleTimeout=3000,poolsize=5,prefix=marking"
|
||||||
|
},
|
||||||
|
"StringEncryption": {
|
||||||
|
"DefaultPassPhrase": "LB6Ts3T0sdE5VSNq"
|
||||||
|
},
|
||||||
|
"RabbitMQ": {
|
||||||
|
"Connections": {
|
||||||
|
"Default": {
|
||||||
|
"HostName": "102553.23544.com",
|
||||||
|
"Port": "5672",
|
||||||
|
"UserName": "mkadmin",
|
||||||
|
"Password": "poiuyt)(*&^%",
|
||||||
|
"VirtualHost": "marking"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"EventBus": {
|
||||||
|
"ClientName": "collect_queue",
|
||||||
|
"ExchangeName": "exam_gather_ex"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Aliyun": {
|
||||||
|
"AccessKeyId": "LTAI5tJ6stiMWGhVU3TtRyAf",
|
||||||
|
"AccessKeySecret": "A3pwnGx2SW1orvraCkXta6Lx4sV06e",
|
||||||
|
"Endpoint": "https://oss-cn-chengdu.aliyuncs.com",
|
||||||
|
"RegionId": "oss-cn-chengdu",
|
||||||
|
"ContainerName": "mk-xk-test",
|
||||||
|
"Host": "//mk-xk-test.23544.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
"CorsOrigins": "https://*.23544.com"
|
"CorsOrigins": "https://*.23544.com"
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"marking_basic": "Server=192.168.2.9;Port=3306;Database=marking_basic;Uid=root;Pwd=qwe123!@#;AllowLoadLocalInfile=true;",
|
"marking_basic": "Server=mk-rds.23544.com;Port=33306;Database=marking_basic;Uid=marking;Pwd=poiuytPOIUYT098765)(*&^%;AllowLoadLocalInfile=true;",
|
||||||
"penoffline": "host=47.108.209.28;port=8812;username=zhjs;password=zhjsniubi;database=qdb;ServerCompatibilityMode=NoTypeLoading;"
|
"penoffline": "host=47.108.209.28;port=8812;username=zhjs;password=zhjsniubi;database=qdb;ServerCompatibilityMode=NoTypeLoading;"
|
||||||
},
|
},
|
||||||
"Redis": {
|
"Redis": {
|
||||||
"Configuration": "192.168.2.7:6379,password=qwe123!@#,defaultDatabase=14,idleTimeout=3000,poolsize=5,prefix=marking"
|
"Configuration": "47.109.67.254:16379,password=poiuyt)(*&^%,defaultDatabase=0,idleTimeout=3000,poolsize=5,prefix=marking"
|
||||||
},
|
},
|
||||||
"StringEncryption": {
|
"StringEncryption": {
|
||||||
"DefaultPassPhrase": "LB6Ts3T0sdE5VSNq"
|
"DefaultPassPhrase": "LB6Ts3T0sdE5VSNq"
|
||||||
|
|
@ -15,10 +15,10 @@
|
||||||
"RabbitMQ": {
|
"RabbitMQ": {
|
||||||
"Connections": {
|
"Connections": {
|
||||||
"Default": {
|
"Default": {
|
||||||
"HostName": "192.168.2.7",
|
"HostName": "47.109.67.254",
|
||||||
"Port": "5672",
|
"Port": "5672",
|
||||||
"UserName": "rabbit",
|
"UserName": "mkadmin",
|
||||||
"Password": "qwe123!@#",
|
"Password": "poiuyt)(*&^%",
|
||||||
"VirtualHost": "marking"
|
"VirtualHost": "marking"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue