|
|
@ -37,6 +37,13 @@ namespace GuideScreen.Common.Services.Impl
|
|
|
|
public PageModel<List<PLCPointModel>> GetPLCPointList(string deviceName, string note, int pageSize, int pageIndex)
|
|
|
|
public PageModel<List<PLCPointModel>> GetPLCPointList(string deviceName, string note, int pageSize, int pageIndex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var pageModel = plcPointRepository.GetPLCPointList(deviceName, note, pageSize, pageIndex);
|
|
|
|
var pageModel = plcPointRepository.GetPLCPointList(deviceName, note, pageSize, pageIndex);
|
|
|
|
|
|
|
|
if (pageModel.Content != null && pLCMonitorService.IsRun)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
foreach (var model in pageModel.Content)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
model.PointValue = pLCMonitorService.ReadValue(model.PointAddress, Type.GetType(model.PointDataType))?.ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return pageModel;
|
|
|
|
return pageModel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|