| | |
| | | { |
| | | foreach (var monitor in allMonitorList) |
| | | { |
| | | if (allVisualDict.ContainsKey(monitor.Relation)) |
| | | if (allVisualDict.ContainsKey(monitor.Parter)) |
| | | { |
| | | var visual = allVisualDict[monitor.Relation]; |
| | | var visual = allVisualDict[monitor.Parter]; |
| | | double? propValue = null; |
| | | var calcuVisualResult = _calcuResultHelper.GetVisual(monitor.Relation); |
| | | var calcuVisualResult = _calcuResultHelper.GetVisual(monitor.Parter); |
| | | if (calcuVisualResult != null) |
| | | { |
| | | propValue = calcuVisualResult.GetCalcuValue(monitor.PropName); |
| | |
| | | { |
| | | if (!item.PropValue.HasValue) |
| | | { |
| | | var calcuVisualResult = _calcuResultHelper.GetVisual(item.Vmo.Relation); |
| | | var calcuVisualResult = _calcuResultHelper.GetVisual(item.Vmo.Parter); |
| | | if (calcuVisualResult != null) |
| | | { |
| | | var propValue = calcuVisualResult.GetCalcuValue(item.Vmo.PropName); |
| | |
| | | public async Task Update(string code, eSourceType sourceType, List<HydroMonitorValueViewModel> valueList) |
| | | { |
| | | var all = await GetAll(); |
| | | all.RemoveAll(x => x.Vmo.Relation == code && x.Vmo.SourceType == sourceType); |
| | | all.RemoveAll(x => x.Vmo.Parter == code && x.Vmo.SourceType == sourceType); |
| | | if (valueList != null && valueList.Count > 0) |
| | | { |
| | | all.AddRange(valueList); |