diff --git a/Admin.Core.Model/Model_New/TemperatureHistory.cs b/Admin.Core.Model/Model_New/TemperatureHistory.cs index 08e1edc4..fead2a15 100644 --- a/Admin.Core.Model/Model_New/TemperatureHistory.cs +++ b/Admin.Core.Model/Model_New/TemperatureHistory.cs @@ -177,5 +177,10 @@ namespace Admin.Core.Model /// [SugarColumn(ColumnName = "SYNC_DATETIME")] public DateTime SyncDate { get; set; } + /// + /// 是否同步给质检 + /// + [SugarColumn(ColumnName = "ISFLAG")] + public int IsFlag { get; set; } } } diff --git a/Aucma.Core.TemperatureTask/AucamTemperatureMeasurementService.cs b/Aucma.Core.TemperatureTask/AucamTemperatureMeasurementService.cs index f4150150..1c459284 100644 --- a/Aucma.Core.TemperatureTask/AucamTemperatureMeasurementService.cs +++ b/Aucma.Core.TemperatureTask/AucamTemperatureMeasurementService.cs @@ -106,7 +106,7 @@ namespace Aucma.Core.TemperatureTask { InsertToCompleteAndCheck(query);//保存过点数据 //发送post 请求 - PostToMes(query); + ToMes(); Console.WriteLine($"【{DateTime.Now}】保存测温数据成功!保存数量:{query.Count}"); } @@ -170,8 +170,9 @@ namespace Aucma.Core.TemperatureTask /// /// /// - public bool PostToMes(List list) + public async Task ToMes() { + var list=await _temperatureHistoryServices.QueryAsync(); Console.WriteLine($"【{DateTime.Now}】开始向质检发送测温数据"); string address = Appsettings.app("Common", "TemperatureApiAddRess");//测温地址 Console.WriteLine($"【{DateTime.Now}】请求路径:{address}/report/qualityInspection/temperatureApi");