public BasicResponse <DataTable> GetPointKzList(GetPointKzListRequest request)
        {
            var responseStr = HttpClientHelper.Post(Webapi + "/v1/Chart/GetPointKzList?token=" + Token,
                                                    JSONHelper.ToJSONString(request));
            var res   = JSONHelper.ParseJSONString <BasicResponse <string> >(responseStr);
            var resZh = ObjectConverter.FromBase64String <DataTable>(res.Data);

            return(new BasicResponse <DataTable>
            {
                Data = resZh
            });
        }
Exemplo n.º 2
0
        /// <summary>
        ///     获取所有被控测点(包括本地、交叉控制的点)
        /// </summary>
        /// <param name="SzNameS"></param>
        /// <param name="SzNameE"></param>
        /// <param name="PointID"></param>
        /// <param name="PointIDList"></param>
        /// <param name="DevList"></param>
        /// <param name="WzList"></param>
        /// <returns></returns>
        public List <string> GetPointKzList(DateTime SzNameS, DateTime SzNameE, string PointID,
                                            ref List <string> PointIDList, ref List <string> DevList, ref List <string> WzList)
        {
            var ReturnStr = new List <string>();
            var dt        = new DataTable();

            SzNameS = Convert.ToDateTime(SzNameS.ToShortDateString());
            SzNameE = Convert.ToDateTime(SzNameE.ToShortDateString() + " 23:59:59");
            try
            {
                PointIDList.Clear();
                DevList.Clear();
                WzList.Clear();
                //dt = ServiceFactory.CreateService<IChartService>().GetPointKzList(SzNameS, SzNameE, PointID);
                var req = new GetPointKzListRequest
                {
                    SzNameS = SzNameS,
                    SzNameE = SzNameE,
                    PointID = PointID
                };
                var res = _chartService.GetPointKzList(req);
                if (!res.IsSuccess)
                {
                    throw new Exception(res.Message);
                }
                dt = res.Data;

                DataView dataView = dt.DefaultView;
                dataView.Sort = "point asc";
                dt            = dataView.ToTable();

                foreach (DataRow Dr in dt.Rows)
                {
                    ReturnStr.Add(Dr["point"] + "." + Dr["wz"] + "[" + Dr["name"] + "]");
                    PointIDList.Add(Dr["PointID"].ToString());
                    DevList.Add(Dr["devid"].ToString());
                    WzList.Add(Dr["wzid"].ToString());
                }
            }
            catch (Exception Ex)
            {
                LogHelper.Error("QueryConditions_GetPointList" + Ex.Message + Ex.StackTrace);
            }
            return(ReturnStr);
        }