diff --git a/Admin.Core.Repository/Repository_New/PerfusionDeviceStatusRepository.cs b/Admin.Core.Repository/Repository_New/PerfusionDeviceStatusRepository.cs index 122bcdcc..8fc3919e 100644 --- a/Admin.Core.Repository/Repository_New/PerfusionDeviceStatusRepository.cs +++ b/Admin.Core.Repository/Repository_New/PerfusionDeviceStatusRepository.cs @@ -1,4 +1,5 @@ -using Admin.Core.Model.Model_New; +using Admin.Core.IRepository; +using Admin.Core.Model.Model_New; namespace Admin.Core.Repository { diff --git a/Admin.Core.Service/Service_New/CodeBindingRecordServices.cs b/Admin.Core.Service/Service_New/CodeBindingRecordServices.cs index 16f5866a..66f12ae2 100644 --- a/Admin.Core.Service/Service_New/CodeBindingRecordServices.cs +++ b/Admin.Core.Service/Service_New/CodeBindingRecordServices.cs @@ -53,12 +53,12 @@ namespace Admin.Core.Service // 默认查询最近三天的数据,防止信息过多 if (string.IsNullOrEmpty(time1) && string.IsNullOrEmpty(time2)) { - list = await _codeBindingRecordRepository.QueryAsync(d => d.RecordTime1 >= System.DateTime.Now.AddDays(-3)); + list = await _codeBindingRecordRepository.QueryAsync(d => d.RecordTime2 >= System.DateTime.Now.AddDays(-3)); } else if (!string.IsNullOrEmpty(time1) && string.IsNullOrEmpty(time2)) { DateTime BeginTime = Convert.ToDateTime(Convert.ToDateTime(time1).ToString("yyyy-MM-dd")); - list = await _codeBindingRecordRepository.QueryAsync(d => d.RecordTime1 >= BeginTime); + list = await _codeBindingRecordRepository.QueryAsync(d => d.RecordTime2 >= BeginTime); } else if (string.IsNullOrEmpty(time1) && !string.IsNullOrEmpty(time2)) { diff --git a/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs b/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs index a681d77b..a4b115c7 100644 --- a/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs +++ b/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs @@ -65,7 +65,7 @@ namespace Aucma.Core.CodeBinding.ViewModels BindingInfo = "条码[B236000007811023002]和SN条码[B236000007811023002]绑定成功!"; LoadCharts(); List records = null; - records = await _codeBindingRecordServices.QueryAsync(x => x.BoxCode != null && x.RecordTime1 >= System.DateTime.Now.AddDays(-3), "RECORD_TIME1 desc"); + records = await _codeBindingRecordServices.QueryAsync(x => x.BoxCode != null && x.RecordTime2 >= System.DateTime.Now.AddDays(-3), "RECORD_TIME1 desc"); if (records != null) { foreach (CodeBindingRecord record in records) diff --git a/Aucma.Core.PLc/IPlc.cs b/Aucma.Core.PLc/IPlc.cs index db6d2258..a89b3ad5 100644 --- a/Aucma.Core.PLc/IPlc.cs +++ b/Aucma.Core.PLc/IPlc.cs @@ -67,7 +67,7 @@ namespace Aucma.Core.PLc /// /// /// - float ReadDouble(string address); + double ReadDouble(string address); /// /// 写入int16 /// diff --git a/Aucma.Core.PLc/Impl/MelsecPlc.cs b/Aucma.Core.PLc/Impl/MelsecPlc.cs index 44f83781..39e4744a 100644 --- a/Aucma.Core.PLc/Impl/MelsecPlc.cs +++ b/Aucma.Core.PLc/Impl/MelsecPlc.cs @@ -275,7 +275,6 @@ namespace Aucma.Core.PLc #endregion #region 读取Double - /// /// 读取Double /// diff --git a/Aucma.Core.PLc/Impl/SiemensPlc.cs b/Aucma.Core.PLc/Impl/SiemensPlc.cs index 0075af6d..c5e41131 100644 --- a/Aucma.Core.PLc/Impl/SiemensPlc.cs +++ b/Aucma.Core.PLc/Impl/SiemensPlc.cs @@ -270,6 +270,33 @@ namespace Aucma.Core.PLc #endregion + #region 读取Double + + /// + /// 读取double + /// + /// + /// + public double ReadDouble(string address) + { + double flag = 0; + try + { + OperateResult read = siemensS7Net.ReadDouble(address); + if (read.IsSuccess) + { + flag = read.Content; + } + } + catch (Exception ex) + { + log.Error("ReadString方法异常" + ex.ToString()); + } + return flag; + } + + #endregion + #region 写入int16 /// /// 写入int16 @@ -277,7 +304,7 @@ namespace Aucma.Core.PLc /// /// /// - public bool WriteInt16(string address, string value) + public bool WriteInt16(string address, string value) { bool iflag = false; try