视觉设备判定记录
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
using JNPF.Common.Contracts;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entities
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 视觉设备判定结果记录表
|
||||||
|
/// </summary>
|
||||||
|
public class PrdVisionResultRecord : BaseEntity<string>
|
||||||
|
{
|
||||||
|
public string info { get; set; }
|
||||||
|
public string result { get; set; }
|
||||||
|
public int num { get; set; }
|
||||||
|
public DateTime create_time { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3356,6 +3356,13 @@ namespace Tnb.ProductionMgr
|
|||||||
public async Task<dynamic> VisionResult(MarkingLabelInput input)
|
public async Task<dynamic> VisionResult(MarkingLabelInput input)
|
||||||
{
|
{
|
||||||
Log.Information($"视觉设备判定参数:{JsonConvert.SerializeObject(input)}");
|
Log.Information($"视觉设备判定参数:{JsonConvert.SerializeObject(input)}");
|
||||||
|
PrdVisionResultRecord reocrd = new PrdVisionResultRecord();
|
||||||
|
reocrd.id = SnowflakeIdHelper.NextId();
|
||||||
|
reocrd.info = input.mark_code;
|
||||||
|
reocrd.result = input.result;
|
||||||
|
reocrd.create_time = DateTime.Now;
|
||||||
|
reocrd.num = int.Parse(input.station_id);
|
||||||
|
await _db.Insertable(reocrd).ExecuteCommandAsync();
|
||||||
return $"接收到参数:{JsonConvert.SerializeObject(input)}";
|
return $"接收到参数:{JsonConvert.SerializeObject(input)}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class Startup : AppStartup
|
|||||||
services.AddSingleton<BackgroundService, TimedTaskBackgroundService>(sp => new TimedTaskBackgroundService());
|
services.AddSingleton<BackgroundService, TimedTaskBackgroundService>(sp => new TimedTaskBackgroundService());
|
||||||
//var bgSvc = App.GetRequiredService<BackgroundService>();
|
//var bgSvc = App.GetRequiredService<BackgroundService>();
|
||||||
//bgSvc.StartAsync(CancellationToken.None);
|
//bgSvc.StartAsync(CancellationToken.None);
|
||||||
services.AddHostedService<RedisBackGround>();
|
// services.AddHostedService<RedisBackGround>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user