Beispiel #1
0
        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));
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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));;
        }