public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT KeyID,vDate,ConsumptionFirstTeam,ConsumptionSecondTeam,ConsumptionThirdTeam,ConsumptionAmountto FROM table_ConsumptionMonthlyCoalDust";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "甲班", "乙班", "丙班", "合计" },                                 //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
Example #2
0
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT [KeyID],[vDate],[CementFirstTeam],[CementSecondTeam],[CementThirdTeam],[CementAmountto],[PackagingTransportationFirstTeam],[PackagingTransportationSecondTeam],[PackagingTransportationThirdTeam],[PackagingTransportationAmountto],[DailyFirstTeam],[DailySecondTeam],[DailyThirdTeam],[DailyAmountto] FROM [table_CementMillProductionLineMonthlyElectricityConsumption]";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "水泥制备甲班", "水泥制备乙班", "水泥制备丙班", "水泥制备合计", "水泥包装与输送甲班", "水泥包装与输送乙班", "水泥包装与输送丙班", "水泥包装与输送合计", "合计电量甲班", "合计电量乙班", "合计电量丙班", "合计电量合计" },                                //填写表头及宽度
                ColumnWidth = new int[] { 10, 60, 80, 80, 80, 80, 120, 120, 120, 120, 80, 80, 80, 80 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = @"SELECT KeyID,vDate,ClinkerFirstTeam,ClinkerSecondTeam,ClinkerThirdTeam,ClinkerAmountto,DailyFirstTeam,DailySecondTeam,DailyThirdTeam,
                            DailyAmountto,RawBatchFirstTeam,RawBatchSecondTeam,RawBatchThirdTeam,RawBatchAmountto FROM table_ClinkerProductionLineMonthlyElectricityConsumption";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "甲班生料制备", "乙班生料制备", "丙班生料制备", "合计生料制备", "甲班熟料制备", "乙班熟料制备", "丙班熟料制备", "合计熟料制备", "甲班合计电量", "乙班合计电量", "丙班合计电量", "合计电量" },                                //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT  KeyId,编号,设备名,峰期电耗,谷期电耗,平期电耗,合计电耗 FROM table_AmmeterSummitLowFlatMonth";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "编号", "设备名", "峰期电耗", "谷期电耗", "平期电耗", "合计电耗" },                               //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
Example #5
0
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString;
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT [KeyID],vMonth,ElectricityConsumption,CoalDust,Qnet,Diesel,ResidualHeatSupply,ResidualHeatProduction,ResidualHeatSelfUse,ClinkerOutput,ClinkerIntensity,ClinkerIntensityCorrectionFactor,ComprehensiveECC,ComparableComprehensiveECC,ComprehensiveStandardCCC,ComparableComprehensiveStandardCCC,ComprehensiveDCC,ConversionResidualHeatSupply,ComprehensiveEnCC,ComparableComprehensiveEnCC FROM [table_ClinkerYeldPerUnitDistributionEnergyConsumptionYearly]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "月份", "熟料用电量 ", "入窑煤粉量", "煤粉空干基低位发热量", "点火用油", "余热供电量", "余热发电量", "余热自用电", "熟料产量", "熟料强度", "熟料强度修正系数", "熟料综合电耗", "可比熟料综合电耗", "熟料综合煤耗", "可比熟料综合煤耗", "熟料油耗", "余热供电折标", "熟料综合能耗", "可比熟料综合能耗" },                                //填写表头及宽度
                ColumnWidth = new int[] { 10, 40, 70, 70, 130, 60, 70, 70, 70, 60, 60, 110, 80, 110, 80, 110, 60, 80, 80, 110 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT [KeyID],[层次码],[工序名称],峰期电耗,谷期电耗,平期电耗,合计电耗 FROM [table_FormulaDay]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "层次码", "工序名称", "峰期电耗", "谷期电耗", "平期电耗", "合计电耗" },
                ColumnWidth = new int[] { 10, 50, 60, 60, 60, 60, 65 },
                ColumnType  = new string[] { "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
Example #7
0
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT [KeyID],vMonth,CementTypes,Output,ElectricityConsumption,DistributionPowerConsumption,ConversionDistributionPowerConsumption FROM [table_CementYeldPerUnitDistributionPowerConsumptionYearly]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "月份", "水泥品种", "产量", "用电量", "分步电耗", "折算P.O42.5分布电耗", },
                ColumnWidth = new int[] { 10, 40, 60, 40, 50, 60, 140 },
                ColumnType  = new string[] { "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = @"SELECT KeyID,ClinkerAmountto,ClinkerFirstTeam,ClinkerSecondTeam,ClinkerThirdTeam,CoalDustAmountto,CoalDustFirstTeam,CoalDustSecondTeam,CoalDustThirdTeam,
                                    PowerGenerationAmountto,PowerGenerationFirstTeam,PowerGenerationhSecondTeam,PowerGenerationThirdTeam,RawBatchAmountto,RawBatchFirstTeam,RawBatchSecondTeam,
                                   RawBatchThirdTeam,vDate from table_ClinkerProductionLineMonthlyOutput";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "甲班生料生产", "乙班生料生产", "丙班生料生产", "合计生料生产", "甲班熟料生产", "乙班熟料生产", "丙班熟料生产", "合计熟料生产", "甲班发电量", "乙班发电量", "丙班发电量", "合计发电量", "甲班煤粉产量", "乙班煤粉产量", "丙班煤粉产量", "合计煤粉产量" },                            //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
Example #9
0
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT KeyID,StartTime,[TimeSpan],Name,StandardValue,ActualValue,Superscale, Reason FROM [EnergyConsumptionAlarm]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "报警起始时间", "报警范围", "报警设备名称", "标准值", "实际值", "超出范围", "报警原因" },
                ColumnWidth = new int[] { 10, 130, 220, 80, 80, 80, 80, 80 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public string GetFormulaYearTemplateData(Guid id, string tableName)
        {
            ReportDataHelper   dataHelper = new ReportDataHelper();
            DataTable          dt         = dataHelper.GetFormulaYearTable(id, tableName);
            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "KeyID", "ID", "层次码", "工序名称", "峰期电耗", "谷期电耗", "平期电耗", "总计" },
                ColumnWidth = new int[] { 80, 80, 130, 130, 130, 130, 130, 130 },
                ColumnType  = new string[] { "", "", "\"type\":\"text\"", "\"type\":\"text\"",
                                             "\"type\":\"numberbox\", \"options\":{\"precision\":\"0\"}", "\"type\":\"numberbox\", \"options\":{\"precision\":\"0\"}",
                                             "\"type\":\"numberbox\", \"options\":{\"precision\":\"0\"}", "\"type\":\"numberbox\", \"options\":{\"precision\":\"0\"}" }
            };

            return(ReportTemplateHelper.GetDataGridTemplate(dt, columnType));
        }
        public static string GetTreeGridDatas()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString;
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT ID, [名称], [生料制备1], [熟料烧成1], [水泥制备1], [用煤量], [生料制备2], [熟料烧成2], [水泥制备2], [发电量], [生料制备3], [熟料烧成], [水泥制备], [吨熟料综合电耗], [吨熟料实物煤耗], [吨熟料发电量], [_parentId]  FROM [EnergyTotalMonth]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(dt);
            }

            string[] column = { "ID", "名称", "生料制备1", "熟料烧成1", "水泥制备1", "用煤量", "生料制备2", "熟料烧成2", "水泥制备2", "发电量", "生料制备3", "熟料烧成", "水泥制备", "吨熟料综合电耗", "吨熟料实物煤耗", "吨熟料发电量", "_parentId" };
            string   result = ReportTemplateHelper.DataTableToJson(dt, column);

            return(result);
        }