public HttpResponseMessage GetOneHour_data(string vname, string btype, string strwhere)
        {
            string json = "[{data: ";

            try
            {
                RuletblEQIW_R_HourData_Auto rules = new RuletblEQIW_R_HourData_Auto();
                if (strwhere == null || strwhere == "undefind")
                {
                    strwhere = ""
                    ;
                }
                DataTable dt        = rules.getOneHour_Data(vname, strwhere);
                string    sql1      = "select *  from tblEQIW_R_Item_Auto";
                DataTable tableitem = rule.getdt(sql1);
                DataRow   dr        = dt.NewRow();
                dr["fldSTName"] = "城市名称";
                dr["fldRName"]  = "河流名称";
                dr["fldRSName"] = "断面名称";
                dr["fldDate"]   = "监测日期";
                dr["fldTime"]   = "监测时间";
                for (int i = 6; i < dt.Columns.Count; i++)
                {
                    DataRow[] dataRows = tableitem.Select("fldItemCode='" + dt.Columns[i].ToString().Substring(3) + "'");
                    if (dataRows.Length > 0)
                    {
                        dr[dt.Columns[i].ToString()] = dataRows[0]["fldUnit"].ToString();
                    }
                }
                dt.Rows.InsertAt(dr, 0);
                string jsondt = JsonHelper.SerializeObject(dt);

                json += jsondt;
                #region 拼数据对应列名
                json += ",head: [";
                RuletblEQIA_R_Item itemnames = new RuletblEQIA_R_Item();
                //拼标题并汉化
                for (int i = 0; i < dt.Columns.Count; i++)
                {
                    string    engname = "'" + dt.Columns[i].ColumnName + "'";
                    DataTable dtDesc  = rule.ChinesizeTitleNamebyViewName(vname, engname);//根据视图名称在字典表中查出对应字段的中文名称

                    if (dtDesc.Rows.Count > 0)
                    {
                        if (i == dt.Columns.Count - 1)
                        {
                            json += "'" + dtDesc.Rows[0]["fldFieldDesc"].ToString() + "']}]";
                        }
                        else
                        {
                            json += "'" + dtDesc.Rows[0]["fldFieldDesc"].ToString() + "',";
                        }
                    }
                    else
                    {
                        string         itemcode = dt.Columns[i].ColumnName.Substring(3);
                        tblEQIA_R_Item name     = itemnames.ByItemCodes(itemcode, btype, "");
                        if (i == dt.Columns.Count - 1)
                        {
                            //最后一列的时候添加“]”↓
                            json += "'" + name.fldItemName + "']}]";
                        }
                        else
                        {
                            json += "'" + name.fldItemName + "',";
                        }
                    }
                }
                #endregion
                if (dt.Rows.Count > 0)
                {
                    json = rule.JsonStr("ok", "", json.ToString());//有数据
                }
                else
                {
                    json = rule.JsonStr("nodata", "没有数据", json.ToString());//没数据
                }
            }
            catch (Exception e)
            {
                json = rule.JsonStr("error", e.Message, "");
            }
            return(new HttpResponseMessage {
                Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
            });
        }
        //
        public HttpResponseMessage Geteqicom_data(string type, string wherequery, string pageshow, string cityid)
        {
            string returnjson = "[{data: ";

            try
            {
                string sbtype = type;
                #region 拼接原始条件
                string defaultwhere = "";//原始条件
                if (wherequery == "undefined" || wherequery == "" || wherequery == null)
                {
                    wherequery = " and fldSource=0";
                }
                if (pageshow == "1")
                {
                    defaultwhere = "  fldImport=1 and fldFlag=0 and fldCityID_Operate=" + cityid;
                }
                if (pageshow == "0")
                {
                    defaultwhere = " fldFlag=1 ";
                }
                #endregion

                #region 基本数据获取
                RuletblDictionary           dic               = new RuletblDictionary();
                string                      list              = dic.ByParentIDAndValue("数据审核视图", sbtype);//获取需要的视图名称
                RuleEQIV_WaitTable_Auditing rulAud            = new RuleEQIV_WaitTable_Auditing();
                string                      ViewName          = list.Split(',')[0].ToString();
                string                      ChinesizeViewName = list.Split(',')[1].ToString(); //汉化表头需要的视图名称
                wherequery = defaultwhere + HttpUtility.UrlDecode(wherequery);
                DataTable dt = rulAud.GetEqiv_AuditingData(ViewName, wherequery, sbtype);      //需要的数据数据
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    dt.Rows[i]["fldAutoID"] = dt.Rows[i]["fldAutoID"].ToString().Replace(',', '_');
                }
                #endregion


                #region 数据源转化为Json格式
                string json = JsonHelper.SerializeObject(dt);
                returnjson += json;
                #endregion

                #region 拼数据对应列名
                returnjson += ",head: [";
                //拼标题并汉化
                for (int i = 0; i < dt.Columns.Count; i++)
                {
                    string    engname = "'" + dt.Columns[i].ColumnName + "'";
                    DataTable dtDesc  = rule.ChinesizeTitleNamebyViewName(ChinesizeViewName, engname);//根据视图名称在字典表中查出对应字段的中文名称

                    if (dtDesc.Rows.Count > 0)
                    {
                        if (i == dt.Columns.Count - 1)
                        {
                            returnjson += "'" + dtDesc.Rows[0]["fldFieldDesc"].ToString() + "'";
                        }
                        else
                        {
                            returnjson += "'" + dtDesc.Rows[0]["fldFieldDesc"].ToString() + "',";
                        }
                    }
                }
                #endregion

                returnjson += "]}]";
                #region 最后返回数据给前台
                if (dt.Rows.Count > 0)
                {
                    returnjson = rule.JsonStr("ok", "", returnjson.ToString());//有数据
                }
                else
                {
                    returnjson = rule.JsonStr("nodata", "没有数据", returnjson.ToString());//没数据
                }
            }
            catch (Exception e)
            {
                returnjson = rule.JsonStr("error", e.Message, "");
            }
            return(new HttpResponseMessage {
                Content = new StringContent(returnjson, System.Text.Encoding.UTF8, "application/json")
            });

            #endregion
        }