From 3e94825c8a7566788d14d84bd2bf3a56f4088f44 Mon Sep 17 00:00:00 2001 From: liuwf Date: Tue, 2 Jul 2024 17:00:54 +0800 Subject: [PATCH] =?UTF-8?q?ADD-=E6=B7=BB=E5=8A=A0=E5=B7=A5=E4=BD=8D?= =?UTF-8?q?=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.Business/LogoBusiness.cs | 1 + SlnMesnac.Config/DebugConfig.cs | 9 +++++++++ SlnMesnac.Model/domain/LogoIdentify.cs | 6 +++++- SlnMesnac.Repository/service/Impl/LogoIdentifyImpl.cs | 4 ++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/SlnMesnac.Business/LogoBusiness.cs b/SlnMesnac.Business/LogoBusiness.cs index bca40e8..c2728c6 100644 --- a/SlnMesnac.Business/LogoBusiness.cs +++ b/SlnMesnac.Business/LogoBusiness.cs @@ -220,6 +220,7 @@ namespace SlnMesnac.Business record.isChecked = logoConfig.IsChecked; record.Result = hikFlag ? 1 : 0; record.RecordTime = DateTime.Now; + record.ProductLine = config.ProductLine; if (compressedImageData != null) { record.Picture = compressedImageData; diff --git a/SlnMesnac.Config/DebugConfig.cs b/SlnMesnac.Config/DebugConfig.cs index f5d18de..c7cbcca 100644 --- a/SlnMesnac.Config/DebugConfig.cs +++ b/SlnMesnac.Config/DebugConfig.cs @@ -26,6 +26,15 @@ namespace SlnMesnac.Config } + /// + ///工位编号 + /// + public string ProductLine + { + get { return iniHelper.IniReadValue("system", "ProductLine"); } + set { iniHelper.IniWriteValue("system", "ProductLine", value); } + } + /// /// 海康扫码器--IP /// diff --git a/SlnMesnac.Model/domain/LogoIdentify.cs b/SlnMesnac.Model/domain/LogoIdentify.cs index 8ad4a38..9f3325c 100644 --- a/SlnMesnac.Model/domain/LogoIdentify.cs +++ b/SlnMesnac.Model/domain/LogoIdentify.cs @@ -58,6 +58,10 @@ namespace SlnMesnac.Model.domain [SugarColumn(ColumnName = "PICTURE")] public Byte[]? Picture { get; set; } - + /// + /// 工位编号 + /// + [SugarColumn(ColumnName = "PRODUCT_LINE")] + public string ProductLine { get; set; } } } diff --git a/SlnMesnac.Repository/service/Impl/LogoIdentifyImpl.cs b/SlnMesnac.Repository/service/Impl/LogoIdentifyImpl.cs index a8324b2..3a6457a 100644 --- a/SlnMesnac.Repository/service/Impl/LogoIdentifyImpl.cs +++ b/SlnMesnac.Repository/service/Impl/LogoIdentifyImpl.cs @@ -28,7 +28,7 @@ namespace SlnMesnac.Repository.service.Impl //return list; List list = null; - list = await _rep.Context.Ado.SqlQueryAsync("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME from LOGO_IDENTIFY where RECORD_TIME >= @RecordTime ", new { RecordTime = DateTime.Now.AddDays(-3) }); + list = await _rep.Context.Ado.SqlQueryAsync("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME,PRODUCT_LINE from LOGO_IDENTIFY where RECORD_TIME >= @RecordTime ", new { RecordTime = DateTime.Now.AddDays(-3) }); return list; } @@ -45,7 +45,7 @@ namespace SlnMesnac.Repository.service.Impl List list = null; - list = await _rep.Context.Ado.SqlQueryAsync("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME from LOGO_IDENTIFY where RECORD_TIME >= @RecordTime1 AND RECORD_TIME <= @RecordTime2 ", new { RecordTime1 = time1, RecordTime2 = time2 }); + list = await _rep.Context.Ado.SqlQueryAsync("select ID,PRODUCT_CODE,MATERIAL_TYPE,IS_CHECKED,RESULT,RECORD_TIME,MATERIAL_NAME,PRODUCT_LINE from LOGO_IDENTIFY where RECORD_TIME >= @RecordTime1 AND RECORD_TIME <= @RecordTime2 ", new { RecordTime1 = time1, RecordTime2 = time2 }); return list;