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;