| | |
| | | public Model.CurrentRecordBundle GetCurrentRecord(long CorpID, long StationID, out string error_info) |
| | | { |
| | | error_info = null; |
| | | var monitor_ids = new List<long>() { 70, 71, 72, 73, 76, 77, 79 }; |
| | | var monitor_ids = new List<long>() { _montiro_id_water_level, _monitor_id_ä¸é´éé¨ç¶æ, _monitor_id_pipe_press1, _monitor_id_pipe_flow1, |
| | | _monitor_id_pipe_press2, _monitor_id_pipe_flow2, 79 }; |
| | | var monitor_records = new Service.MonitorRecord().GetLastRecord(_corpID, monitor_ids); |
| | | |
| | | Model.CurrentRecordBundle bundle = new Model.CurrentRecordBundle(); |
| | | |
| | | var water_level = monitor_records.Find(x => x.MonitorPointID == 70); |
| | | var water_level = monitor_records.Find(x => x.MonitorPointID == _montiro_id_water_level); |
| | | if (water_level != null) |
| | | { |
| | | bundle.WaterLevelList = new List<Model.CurrentRecordBundle.RecordValue>(); |
| | | bundle.WaterLevelList.Add(new Model.CurrentRecordBundle.RecordValue("è¿æ°´æ¶²ä½", water_level, 2)); |
| | | } |
| | | |
| | | var pipe_press1 = monitor_records.Find(x => x.MonitorPointID == 72); |
| | | var pipe_press2 = monitor_records.Find(x => x.MonitorPointID == 76); |
| | | var pipe_press1 = monitor_records.Find(x => x.MonitorPointID == _monitor_id_pipe_press1); |
| | | var pipe_press2 = monitor_records.Find(x => x.MonitorPointID == _monitor_id_pipe_press2); |
| | | if (pipe_press1 != null && pipe_press2 != null) |
| | | { |
| | | bundle.PressList = new List<Model.CurrentRecordBundle.RecordValue>(); |
| | |
| | | bundle.PressList.Add(new Model.CurrentRecordBundle.RecordValue("äºå·ç®¡", pipe_press2, 4)); |
| | | } |
| | | |
| | | var pipe_flow1 = monitor_records.Find(x => x.MonitorPointID == 73); |
| | | var pipe_flow2 = monitor_records.Find(x => x.MonitorPointID == 77); |
| | | var pipe_flow1 = monitor_records.Find(x => x.MonitorPointID == _monitor_id_pipe_flow1); |
| | | var pipe_flow2 = monitor_records.Find(x => x.MonitorPointID == _monitor_id_pipe_flow2); |
| | | if (pipe_flow1 != null && pipe_flow2 != null) |
| | | { |
| | | bundle.FlowList = new List<Model.CurrentRecordBundle.RecordValue>(); |
| | | bundle.FlowList.Add(new Model.CurrentRecordBundle.RecordValue("ä¸å·ç®¡", pipe_flow1, 0)); |
| | | bundle.FlowList.Add(new Model.CurrentRecordBundle.RecordValue("äºå·ç®¡", pipe_flow2, 0)); |
| | | |
| | | var middle_valve = monitor_records.Find(x => x.MonitorPointID == 71); |
| | | var middle_valve = monitor_records.Find(x => x.MonitorPointID == _monitor_id_ä¸é´éé¨ç¶æ); |
| | | if (middle_valve != null) |
| | | { |
| | | bundle.VavleOpenList = new List<Model.CurrentRecordBundle.RecordValue>(); |