public List <AnalyzeData> QueryAnalyzeStatistics(string level, string tag, string type) { tag = BizCommon.ProcessWeekend(tag); int level_val = 1; //DateTime end_date = DateTime.Now; if (!string.IsNullOrEmpty(level)) { level_val = Int32.Parse(level); } if (!string.IsNullOrEmpty(tag)) { tag = BizCommon.ParseToString(DateTime.Now); } if (string.IsNullOrEmpty(type)) { return(BizApi.QueryAnalyzeStatisticsByName(tag, level_val)); } if (type.Equals("name")) { return(BizApi.QueryAnalyzeStatisticsByName(tag, level_val)); } if (type.Equals("industry")) { return(BizApi.QueryAnalyzeStatisticsByIndustry(tag, level_val)); } return(null); }
public List <AnalyzeData> QueryAnalyze(string level, string tag, string old, string daybefore, string industry, string location, string type) { tag = BizCommon.ProcessWeekend(tag); int level_val = 1; DateTime now = DateTime.Now; int days_before = Constant.DAYS_BEFORE; int o = -12; if (string.IsNullOrEmpty(tag)) { tag = BizCommon.ParseToString(now); } else { now = BizCommon.ParseToDate(tag); } if (!string.IsNullOrEmpty(daybefore)) { days_before = Int32.Parse(daybefore); } if (!string.IsNullOrEmpty(level)) { level_val = Int32.Parse(level); } if (!string.IsNullOrEmpty(old)) { o = -Int32.Parse(old); } DateTime end_date = now.AddDays((double)(-days_before)); DateTime start_date = end_date.AddMonths(o); return(BizApi.QueryAnalyzeData(tag, start_date, end_date, level_val, industry, location, type)); }
public string QueryAnalyze1(string sid, string level, string tag, string old, string daybefore) { tag = BizCommon.ProcessWeekend(tag); int level_val = 1; DateTime now = DateTime.Now; int i_daybeofre = 0; if (string.IsNullOrEmpty(tag)) { tag = BizCommon.ParseToString(now); } else { now = BizCommon.ParseToDate(tag); } if (string.IsNullOrEmpty(daybefore)) { i_daybeofre = 0; } else { i_daybeofre = int.Parse(daybefore); } if (!string.IsNullOrEmpty(level)) { level_val = Int32.Parse(level); } if (string.IsNullOrEmpty(old)) { old = Constant.ANALYZE_TIME; } string vv = ""; string[] list = old.Split('-'); foreach (string v in list) { int o = -Int32.Parse(v); DateTime end_date = now.AddDays(-i_daybeofre); DateTime start_date = end_date.AddMonths(o); vv += BizApi.QueryAnalyzeDataValue(sid, tag, start_date, end_date, level_val) + ","; } return(vv.Substring(0, vv.Length - 1));; }
public IList <BasicData> QueryData(string id, string big, string type, string start, string end) { DateTime endDate, startDate; IList <BasicData> list; if (string.IsNullOrEmpty(end)) { endDate = DateTime.Now; } else { endDate = BizCommon.ParseToDate(end); } if (string.IsNullOrEmpty(big)) { big = "1000"; } if (string.IsNullOrEmpty(type)) { type = "w"; } if (string.IsNullOrEmpty(start)) { startDate = new DateTime(2014, 1, 1); } else { startDate = BizCommon.ParseToDate(start); } switch (type) { case "m": list = BizApi.QueryByMonth(id, Int32.Parse(big), startDate, endDate); break; case "d": list = BizApi.QueryByDay(id, Int32.Parse(big), startDate, endDate); break; default: list = BizApi.QueryByWeek(id, Int32.Parse(big), startDate, endDate); break; } return(list); }
public string QueryLineDataForQingyou(string date, string stockno, string type) { return(BizApi.QueryStockDataForQingyou(BizCommon.ParseToDate(date), stockno, type)); }
public string QueryLastUpdate(string id) { return(BizCommon.ParseToString(BizApi.QueryExtractLastUpdate(id))); }