示例#1
0
 /// <summary>
 /// 通过报告期获取二维表的数数据
 /// 获取某一个子报表的的报表
 ///命令:
 ///String tcmd = "$-edbrpt\r\n$BIVRPT(name=SONREPORTID)\r\n";
 ///SONREPORTID 是子报表的ID,格式是PARENTREPORTID_DATE  例如:RPT00004_2012-06-01
 /// </summary>
 /// <param name="param"></param>
 /// <returns></returns>
 public static DataSet QueryMacroByParentReportDate(MacroIndicateParam param)
 {
     try
     {
         DateTime dt = DateTime.Now;
         DataSet  ds = (DataSet)IDataQuery.QueryMacroIndicate("$-edbrpt\r\n$BIVRPT(name=" + param.ToString() + ")\r\n");
         LogHelper.WriteDebugLog("宏观指标服务---通过报告期获取二维表的数数据:$-edbrpt\r\n$BIVRPT(name=" + param.ToString() + ")\r\n;查询时间:" + (DateTime.Now - dt));
         return(ds);
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog("查询条件:$-edbrpt\r\n$BIVRPT(name=" + param.ToString() + ")\r\n,获取宏观二维表异常:", ex);
         throw new Exception("获取宏观二维表异常:" + ex.ToString());
     }
 }
示例#2
0
 /// <summary>
 /// 宏观指标
 /// </summary>
 /// <param name="cmd">$-edbrpt\r\n$rpt(name=RPT000002)\r\n</param>
 /// <returns></returns>
 public static DataSet QueryMacroIndicate(MacroIndicateParam param)
 {
     try
     {
         //DataQuery _DQ = new DataQuery();
         DateTime dt = DateTime.Now;
         DataSet  ds = (DataSet)IDataQuery.QueryMacroIndicate("$-edbrpt\r\n$rpt(" + param.ToString() + ")\r\n");
         LogHelper.WriteDebugLog("宏观指标服务获取数据条件:$-edbrpt\r\n$rpt(" + param.ToString() + ")\r\n;查询时间:" + (DateTime.Now - dt));
         return(ds);
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog("宏观指标异常:", ex);
         throw new Exception("宏观指标异常:" + ex.ToString());
     }
 }
示例#3
0
 /// <summary>
 /// 获取二维表的报告期
 /// 获取二维表父报表下所有时间报告期:
 ///String tcmd = "$-edbrpt\r\n$BIVRPTIDS(name=PARENTREPORTID)\r\n";
 ///BIVRPTIDS 为获取父报表的命令,返回为所有子报表的时间,返回DataTable,table名PARENTREPORTID
 ///例如:$-edbrpt\r\n$BIVRPTIDS(name=RPT00004)\r\n
 ///返回datatable  里面值为  2012-06-01
 /// </summary>
 /// <param name="cmd">$-edbrpt\r\n$BIVRPTIDS(name=RPT00004)\r\n</param>
 /// <returns>2012-06-01</returns>
 public static List <String> QueryMacroParentReportDate(MacroIndicateParam param)
 {
     try
     {
         //DataQuery _DQ = new DataQuery();
         DateTime      dt      = DateTime.Now;
         List <String> strList = new List <String>();
         DataSet       ds      = (DataSet)IDataQuery.QueryMacroIndicate("$-edbrpt\r\n$BIVRPTIDS(name=" + param.ToString() + ")\r\n");
         foreach (DataRow row in ds.Tables[0].Rows)
         {
             strList.Add(row[0].ToString());
         }
         LogHelper.WriteDebugLog("宏观指标服务获取获取二维表的报告期:$-edbrpt\r\n$BIVRPTIDS(name=" + param.ToString() + ")\r\n;查询时间:" + (DateTime.Now - dt));
         return(strList);
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog("查询条件:" + param.ToString() + "获取宏观二维表异常:", ex);
         throw new Exception("获取宏观二维表异常:" + ex.ToString());
     }
 }