123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using LeaRun.Application.Entity.WaterWellManage;
- using LeaRun.Application.Service.WaterWellManage;
- using LeaRun.Util;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace LeaRun.Application.Busines.WaterWell
- {
- /// <summary>
- /// 实时图表
- /// </summary>
- public class RealCurveBLL
- {
- RealCurveService service = new RealCurveService();
- #region 获取实时图表
- /// <summary>
- /// 获取实时图表
- /// </summary>
- /// <param name="tableNames"></param>
- /// <param name="type"></param>
- /// <returns></returns>
- public string GetRealCurve(string tableNames, string type)
- {
- var tables = Json.ToList<string>(tableNames);
- List<RealCurveEntity> list = service.GetRealCurve(tables, type);
- StringBuilder sb = new StringBuilder("[");
- Dictionary<string, List<RealCurveEntity>> d = new Dictionary<string, List<RealCurveEntity>>();
- for (int i = 0; i < tables.Count; i++)
- {
- d.Add(tables[i], new List<RealCurveEntity>());
- }
- for (int i = 0; i < list.Count; i++)
- {
- d["WaterWell_" + list[i].WaterWellId].Add(list[i]);
- }
- return Json.ToJson(d);
- }
- #endregion
- }
- }
|