Exemple #1
0
        /// <summary>
        /// 将数据对标信息从EXCEL中插入到数据库中。
        /// </summary>
        /// <param name="statisticList"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public bool InsertData(List <DataInfo> dataList, out string errMsg)
        {
            errMsg = string.Empty;
            ArrayList sqlList = new ArrayList();

            foreach (var info in dataList)
            {
                string sql = "insert into T_INFO_DATASTANDARD(T_COMPANY,T_DATATYPE,T_900_SL,T_900_KL,T_600_HJ,T_600_CCL,T_600_CLS,T_600_CLK,T_600_YLS,T_600_YLK,T_600_J,T_350_HJ,T_350_CNHJ,T_350_CLJ,T_350_YLJ,T_350_GRHJ,T_350_RCLJ,T_350_RYLJ,T_300_HJ,T_300_CGSL,T_300_CGKL,T_300_LHC,T_300_SL,T_300_KL,T_200_HJ,T_200_SL,T_200_KL,T_200_LHC,T_200_J,T_120_HJ,T_120_J,T_120_LHC,T_120_KL,T_120_JC,T_135_LHC,T_100_HJ,T_100_CG,T_100_LHC,T_100_J,T_90_HJ,T_90_NJ,T_90_LHC,T_90_RJ,T_TIME) values( '" + info.T_COMPANY + "','" + info.T_DATATYPE + "','" + info.T_900_SL + "','" + info.T_900_KL + "','" + info.T_600_HJ + "','" + info.T_600_CCL + "','" + info.T_600_CLS + "','" + info.T_600_CLK + "','" + info.T_600_YLS + "','" + info.T_600_YLK + "','" + info.T_600_J + "','" + info.T_350_HJ + "','" + info.T_350_CNHJ + "','" + info.T_350_CLJ + "','" + info.T_350_YLJ + "','" + info.T_350_GRHJ + "','" + info.T_350_RCLJ + "','" + info.T_350_RYLJ + "','" + info.T_300_HJ + "','" + info.T_300_CGSL + "','" + info.T_300_CGKL + "','" + info.T_300_LHC + "','" + info.T_300_SL + "','" + info.T_300_KL + "','" + info.T_200_HJ + "','" + info.T_200_SL + "','" + info.T_200_KL + "','" + info.T_200_LHC + "','" + info.T_200_J + "','" + info.T_120_HJ + "','" + info.T_120_J + "','" + info.T_120_LHC + "','" + info.T_120_KL + "','" + info.T_120_JC + "','" + info.T_135_LHC + "','" + info.T_100_HJ + "','" + info.T_100_CG + "','" + info.T_100_LHC + "','" + info.T_100_J + "','" + info.T_90_HJ + "','" + info.T_90_NJ + "','" + info.T_90_LHC + "','" + info.T_90_RJ + "','" + info.T_TIME + "')";
                sqlList.Add(sql);
            }
            try
            {
                DBdb2.ExecuteSqlTran(sqlList);
                return(true);
            }
            catch
            {
                return(false);
            }
        }
Exemple #2
0
        /// <summary>
        /// 将机组信息从EXCEL中插入到数据库中。
        /// </summary>
        /// <param name="unitId"></param>
        /// <param name="professionalId"></param>
        /// <param name="reasonId"></param>
        /// <param name="eventDesc"></param>
        /// <param name="reasonAnalyse"></param>
        /// <param name="dealCondition"></param>
        /// <returns></returns>
        public bool InsertUnit(List <UnitInfo> unitList, out string errMsg)
        {
            errMsg = string.Empty;
            ArrayList sqlList = new ArrayList();

            foreach (var info in unitList)
            {
                string sql = "insert into T_INFO_UNIT(T_CODE,T_TIME,I_PH,I_GAAG,I_PUMPPOWER,I_UTH,I_SH,I_RH,I_AH,I_POH,I_BPOH,I_SPOH,I_HPPOH,I_IACTH,I_FOH,I_UOH,I_ERFDH,I_EFDH,I_EUNDH,I_RT,I_SST,I_UST,I_POT,I_BPOT,I_SPOT,I_HPOT,I_IACTT,I_FOT,I_UOT,I_FUOT,I_LOSEPOWER,D_SF,D_AF,D_UF,D_EAF,D_POF,D_UOF,D_FOF,D_UDF,D_OF,D_GCF,D_UTF,D_FOR,D_EFOR,D_UOR,D_SR,D_EXR,D_FOOR,S_MTBS,S_CAH,S_MTBF,S_MTTPO,S_MTTUO,D_MPOD,D_MUOD,S_BMTTPO,S_SMTTPO,D_BMPOD,D_SMPOD,D_KWZJ,I_GEH,I_PWH,I_GMH,I_PMH,I_GET,I_PWT,I_GMT,I_PMT,I_MOE,I_TOE,I_FMOE,I_CMOE,I_MOET,I_TOET,I_FMOET,I_CMOET) values('" + info.T_CODE + "','" + info.T_TIME + "'," + info.I_PH + "," + info.I_GAAG + "," + info.I_PUMPPOWER + "," + info.I_UTH + "," + info.I_SH + "  ," + info.I_RH + "  ," + info.I_AH + " ," + info.I_POH + "  ," + info.I_BPOH + " ," + info.I_SPOH + "," + info.I_HPPOH + "," + info.I_IACTH + "," + info.I_FOH + "," + info.I_UOH + "," + info.I_ERFDH + "," + info.I_EFDH + "," + info.I_EUNDH + " ," + info.I_RT + "," + info.I_SST + "," + info.I_UST + "," + info.I_POT + "," + info.I_BPOT + "," + info.I_SPOT + "," + info.I_HPOT + "," + info.I_IACTT + "," + info.I_FOT + "," + info.I_UOT + "," + info.I_FUOT + "," + info.I_LOSEPOWER + "," + info.D_SF + "," + info.D_AF + "," + info.D_UF + "," + info.D_EAF + "," + info.D_POF + "," + info.D_UOF + "," + info.D_FOF + "," + info.D_UDF + "," + info.D_OF + "," + info.D_GCF + " ," + info.D_UTF + "," + info.D_FOR + "," + info.D_EFOR + "," + info.D_UOR + "," + info.D_SR + "," + info.D_EXR + "," + info.D_FOOR + ",'" + info.S_MTBS + "','" + info.S_CAH + "','" + info.S_MTBF + "','" + info.S_MTTPO + "','" + info.S_MTTUO + "'," + info.D_MPOD + "," + info.D_MUOD + ",'" + info.S_BMTTPO + "','" + info.S_SMTTPO + "'," + info.D_BMPOD + "," + info.D_SMPOD + "," + info.D_KWZJ + "," + info.I_GEH + "," + info.I_PWH + "," + info.I_GMH + "," + info.I_PMH + "," + info.I_GET + "," + info.I_PWT + "," + info.I_GMT + "," + info.I_PMT + "," + info.I_MOE + "," + info.I_TOE + "," + info.I_FMOE + "," + info.I_CMOE + "," + info.I_MOET + "," + info.I_TOET + "," + info.I_FMOET + "," + info.I_CMOET + ")";
                sqlList.Add(sql);
            }
            try
            {
                DBdb2.ExecuteSqlTran(sqlList);
                return(true);
            }
            catch
            {
                return(false);
            }
        }
Exemple #3
0
        /// <summary>
        /// 将各个类型机组能耗信息从EXCEL中插入到数据库中。
        /// </summary>
        /// <param name="statisticList"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public bool InsertChartDetailData(List <UnitConsumeInfo> dataList, out string errMsg)
        {
            errMsg = string.Empty;
            ArrayList sqlList = new ArrayList();

            foreach (var info in dataList)
            {
                string sql = "insert into T_INFO_UNITCONSUME(T_DWNAME,T_UNITCODE,T_TIME,T_COUNT,T_USEHOUR,T_OF,T_RDB,T_CYDL,T_GDMH,T_DBMH,T_GDL,T_JTPJB) VALUES('" + info.T_DWNAME + "','" + info.T_UNITCODE + "','" + info.T_TIME.ToString().Replace("/", "-") + "','" + info.T_COUNT + "','" + info.T_USEHOUR + "','" + info.T_OF + "','" + info.T_RDB + "','" + info.T_CYDL + "','" + info.T_GDMH + "','" + info.T_DBMH + "','" + info.T_GDL + "','" + info.T_JTPJB + "')";
                sqlList.Add(sql);
            }
            try
            {
                DBdb2.ExecuteSqlTran(sqlList);
                return(true);
            }
            catch
            {
                return(false);
            }
        }
Exemple #4
0
        /// <summary>
        /// 将生产统计信息从EXCEL中插入到数据库中。
        /// </summary>
        /// <param name="statisticList"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public bool InsertHomeData(List <StatisticInfo> statisticList, out string errMsg)
        {
            errMsg = string.Empty;
            ArrayList sqlList = new ArrayList();

            foreach (var info in statisticList)
            {
                string sql = "insert into T_INFO_STATISTIC(T_INDICATORNAME,T_UNITNAME,T_TIME,D_HNALL,D_HNADD,D_DTALL,D_DTADD,D_HDALL,D_HDADD,D_GDALL,D_GDADD,D_ZDTALL,D_ZDTADD) values('" + info.T_INDICATORNAME + "','" + info.T_UNITNAME + "','" + info.T_TIME + "'," + info.D_HNALL + "," + info.D_HNADD + "," + info.D_DTALL + "," + info.D_DTADD + "," + info.D_HDALL + "," + info.D_HDADD + "," + info.D_GDALL + "," + info.D_GDADD + "," + info.D_ZDTALL + "," + info.D_ZDTADD + ")";

                sqlList.Add(sql);
            }
            try
            {
                DBdb2.ExecuteSqlTran(sqlList);
                return(true);
            }
            catch
            {
                return(false);
            }
        }
Exemple #5
0
        public bool InsertExcelData(List <Entity.ProPara.ProductionProPara> dataList, out string errMsg)
        {
            errMsg = string.Empty;
            ArrayList sqlList = new ArrayList();

            foreach (var info in dataList)
            {
                string sql = "";
                for (int i = 0; i < info.T_UNITID.Split('、').Length; i++)
                {
                    sql = "insert into T_INFO_PROCPARA_COAL_PROX(T_TIME,D_M_AR_PROX,D_M_AD,D_A_AD,D_V_DAF,D_A_AR_PROX,D_QNET_AR_PROX,D_ST_AD,D_ST_AR,D_CFH_C_PROX,D_CLZ_C_PROX,T_UNITID) VALUES('" + info.T_TIME + "'," + info.D_M_AR_PROX + "," + info.D_M_AD + "," + info.D_A_AD + "," + info.D_V_DAF + "," + info.D_A_AR_PROX + "," + info.D_QNET_AR_PROX + "," + info.D_ST_AD + "," + info.D_ST_AR + "," + info.D_CFH_C_PROX + "," + info.D_CLZ_C_PROX + ",'" + info.T_UNITID.Split('、')[i] + "')";
                    sqlList.Add(sql);
                }
            }
            try
            {
                DBdb2.ExecuteSqlTran(sqlList);
                return(true);
            }
            catch
            {
                return(false);
            }
        }