diff --git a/.vs/DongYingAPI/FileContentIndex/231d8966-ad58-48e0-84e1-27edad717de5.vsidx b/.vs/DongYingAPI/FileContentIndex/231d8966-ad58-48e0-84e1-27edad717de5.vsidx deleted file mode 100644 index 67346bb..0000000 Binary files a/.vs/DongYingAPI/FileContentIndex/231d8966-ad58-48e0-84e1-27edad717de5.vsidx and /dev/null differ diff --git a/.vs/DongYingAPI/FileContentIndex/d4e6f3be-d5d8-4da3-9662-6f1811d2f5f8.vsidx b/.vs/DongYingAPI/FileContentIndex/4f23690c-4b1d-41bf-86d0-d2ec388fd6e7.vsidx similarity index 100% rename from .vs/DongYingAPI/FileContentIndex/d4e6f3be-d5d8-4da3-9662-6f1811d2f5f8.vsidx rename to .vs/DongYingAPI/FileContentIndex/4f23690c-4b1d-41bf-86d0-d2ec388fd6e7.vsidx diff --git a/.vs/DongYingAPI/FileContentIndex/6e73553f-a210-4cae-b830-646510ea1e6e.vsidx b/.vs/DongYingAPI/FileContentIndex/6e73553f-a210-4cae-b830-646510ea1e6e.vsidx new file mode 100644 index 0000000..5a8f93c Binary files /dev/null and b/.vs/DongYingAPI/FileContentIndex/6e73553f-a210-4cae-b830-646510ea1e6e.vsidx differ diff --git a/.vs/DongYingAPI/FileContentIndex/92d65a5b-9d17-44d5-b40c-8cb12478df3f.vsidx b/.vs/DongYingAPI/FileContentIndex/92d65a5b-9d17-44d5-b40c-8cb12478df3f.vsidx new file mode 100644 index 0000000..e99c43f Binary files /dev/null and b/.vs/DongYingAPI/FileContentIndex/92d65a5b-9d17-44d5-b40c-8cb12478df3f.vsidx differ diff --git a/.vs/DongYingAPI/FileContentIndex/b16d4c82-5c70-4566-9397-97d42fd6cb06.vsidx b/.vs/DongYingAPI/FileContentIndex/b16d4c82-5c70-4566-9397-97d42fd6cb06.vsidx deleted file mode 100644 index b909402..0000000 Binary files a/.vs/DongYingAPI/FileContentIndex/b16d4c82-5c70-4566-9397-97d42fd6cb06.vsidx and /dev/null differ diff --git a/.vs/DongYingAPI/v17/.suo b/.vs/DongYingAPI/v17/.suo index 16c5a66..2ed63f8 100644 Binary files a/.vs/DongYingAPI/v17/.suo and b/.vs/DongYingAPI/v17/.suo differ diff --git a/DataServer/BLL/electricity_data.cs b/DataServer/BLL/electricity_data.cs new file mode 100644 index 0000000..edbf834 --- /dev/null +++ b/DataServer/BLL/electricity_data.cs @@ -0,0 +1,215 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* electricity_data.cs +* +* 功 能: N/A +* 类 名: electricity_data +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/1/8 18:26:17 N/A 初版 +* +* Copyright (c) 2012 Maticsoft Corporation. All rights reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 版权所有:动软卓越(北京)科技有限公司              │ +*└──────────────────────────────────┘ +*/ +using System; +using System.Data; +using System.Collections.Generic; +using Maticsoft.Common; +using DataServer.Model; +namespace DataServer.BLL +{ + /// + /// electricity_data + /// + public partial class electricity_data + { + private readonly DataServer.DAL.electricity_data dal=new DataServer.DAL.electricity_data(); + public electricity_data() + {} + #region BasicMethod + /// + /// 是否存在该记录 + /// + public bool Exists(string ElectricityId) + { + return dal.Exists(ElectricityId); + } + + /// + /// 增加一条数据 + /// + public bool Add(DataServer.Model.electricity_data model) + { + return dal.Add(model); + } + + /// + /// 更新一条数据 + /// + public bool Update(DataServer.Model.electricity_data model) + { + return dal.Update(model); + } + + /// + /// 删除一条数据 + /// + public bool Delete(string ElectricityId) + { + + return dal.Delete(ElectricityId); + } + /// + /// 删除一条数据 + /// + public bool DeleteList(string ElectricityIdlist) + { + return dal.DeleteList(ElectricityIdlist); + } + + /// + /// 得到一个对象实体 + /// + public DataServer.Model.electricity_data GetModel(string ElectricityId) + { + + return dal.GetModel(ElectricityId); + } + + /// + /// 得到一个对象实体,从缓存中 + /// + public DataServer.Model.electricity_data GetModelByCache(string ElectricityId) + { + + string CacheKey = "electricity_dataModel-" + ElectricityId; + object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey); + if (objModel == null) + { + try + { + objModel = dal.GetModel(ElectricityId); + if (objModel != null) + { + int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache"); + Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero); + } + } + catch { } + } + return (DataServer.Model.electricity_data)objModel; + } + + /// + /// 获得数据列表 + /// + public DataSet GetList(string strWhere) + { + return dal.GetList(strWhere); + } + /// + /// 获得数据列表 + /// + public List GetModelList(string strWhere) + { + DataSet ds = dal.GetList(strWhere); + return DataTableToList(ds.Tables[0]); + } + /// + /// 获得数据列表 + /// + public List DataTableToList(DataTable dt) + { + List modelList = new List(); + int rowsCount = dt.Rows.Count; + if (rowsCount > 0) + { + DataServer.Model.electricity_data model; + for (int n = 0; n < rowsCount; n++) + { + model = dal.DataRowToModel(dt.Rows[n]); + if (model != null) + { + modelList.Add(model); + } + } + } + return modelList; + } + + /// + /// 获得数据列表 + /// + public DataSet GetAllList() + { + return GetList(""); + } + + /// + /// 分页获取数据列表 + /// + public int GetRecordCount(string strWhere) + { + return dal.GetRecordCount(strWhere); + } + /// + /// 分页获取数据列表 + /// + public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex) + { + return dal.GetListByPage(strWhere, orderby, startIndex, endIndex); + } + /// + /// 分页获取数据列表 + /// + //public DataSet GetList(int PageSize,int PageIndex,string strWhere) + //{ + //return dal.GetList(PageSize,PageIndex,strWhere); + //} + + #endregion BasicMethod + #region ExtensionMethod + /// + /// 表是否存在 + /// + /// 数据库名 + /// 表名 格式:表名_yyyyMMdd + /// + public bool IsExistsTable(string dbName, string tableName) + { + return dal.IsExistsTable(dbName, tableName); + } + + /// + /// 增加一条数据 + /// + public bool AddDate(DataServer.Model.electricity_data model,string date) + { + return dal.AddDate(model,date); + } + + /// + /// 添加表 + /// + /// 日期 格式:yyyyMMdd + /// + public void CreateTable(string date) + { + dal.CreateTable(date); + } + + /// + /// 获得数据列表 + /// + public List GetModelListDate(string strWhere,string date) + { + DataSet ds = dal.GetListDate(strWhere,date); + return DataTableToList(ds.Tables[0]); + } + #endregion ExtensionMethod + } +} + diff --git a/DataServer/DAL/electricity_data.cs b/DataServer/DAL/electricity_data.cs new file mode 100644 index 0000000..392a282 --- /dev/null +++ b/DataServer/DAL/electricity_data.cs @@ -0,0 +1,559 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* electricity_data.cs +* +* 功 能: N/A +* 类 名: electricity_data +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/1/8 18:26:16 N/A 初版 +* +* Copyright (c) 2012 Maticsoft Corporation. All rights reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 版权所有:动软卓越(北京)科技有限公司              │ +*└──────────────────────────────────┘ +*/ +using System; +using System.Data; +using System.Text; +using MySql.Data.MySqlClient; +using Maticsoft.DBUtility;//Please add references +namespace DataServer.DAL +{ + /// + /// 数据访问类:electricity_data + /// + public partial class electricity_data + { + public electricity_data() + {} + #region BasicMethod + + /// + /// 是否存在该记录 + /// + public bool Exists(string ElectricityId) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select count(1) from electricity_data"); + strSql.Append(" where ElectricityId=@ElectricityId "); + MySqlParameter[] parameters = { + new MySqlParameter("@ElectricityId", MySqlDbType.VarChar,255) }; + parameters[0].Value = ElectricityId; + + return DbHelperMySQL.Exists(strSql.ToString(), parameters); + } + + + /// + /// 增加一条数据 + /// + public bool Add(DataServer.Model.electricity_data model) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into electricity_data("); + strSql.Append("ElectricityId,DeviceId,EH,P,Kvar,Ia,Ib,Ic,Ua,Ub,Uc,ServiceRating,CreateTime,EntireTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5)"); + strSql.Append(" values ("); + strSql.Append("@ElectricityId,@DeviceId,@EH,@P,@Kvar,@Ia,@Ib,@Ic,@Ua,@Ub,@Uc,@ServiceRating,@CreateTime,@EntireTime,@Reserve1,@Reserve2,@Reserve3,@Reserve4,@Reserve5)"); + MySqlParameter[] parameters = { + new MySqlParameter("@ElectricityId", MySqlDbType.VarChar,255), + new MySqlParameter("@DeviceId", MySqlDbType.VarChar,255), + new MySqlParameter("@EH", MySqlDbType.Float,255), + new MySqlParameter("@P", MySqlDbType.Float,255), + new MySqlParameter("@Kvar", MySqlDbType.Float,255), + new MySqlParameter("@Ia", MySqlDbType.Float,255), + new MySqlParameter("@Ib", MySqlDbType.Float,255), + new MySqlParameter("@Ic", MySqlDbType.Float,255), + new MySqlParameter("@Ua", MySqlDbType.Float,255), + new MySqlParameter("@Ub", MySqlDbType.Float,255), + new MySqlParameter("@Uc", MySqlDbType.Float,255), + new MySqlParameter("@ServiceRating", MySqlDbType.Float,255), + new MySqlParameter("@CreateTime", MySqlDbType.DateTime), + new MySqlParameter("@EntireTime", MySqlDbType.DateTime), + new MySqlParameter("@Reserve1", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve2", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve3", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve4", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve5", MySqlDbType.VarChar,255)}; + parameters[0].Value = model.ElectricityId; + parameters[1].Value = model.DeviceId; + parameters[2].Value = model.EH; + parameters[3].Value = model.P; + parameters[4].Value = model.Kvar; + parameters[5].Value = model.Ia; + parameters[6].Value = model.Ib; + parameters[7].Value = model.Ic; + parameters[8].Value = model.Ua; + parameters[9].Value = model.Ub; + parameters[10].Value = model.Uc; + parameters[11].Value = model.ServiceRating; + parameters[12].Value = model.CreateTime; + parameters[13].Value = model.EntireTime; + parameters[14].Value = model.Reserve1; + parameters[15].Value = model.Reserve2; + parameters[16].Value = model.Reserve3; + parameters[17].Value = model.Reserve4; + parameters[18].Value = model.Reserve5; + + int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + /// + /// 更新一条数据 + /// + public bool Update(DataServer.Model.electricity_data model) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("update electricity_data set "); + strSql.Append("DeviceId=@DeviceId,"); + strSql.Append("EH=@EH,"); + strSql.Append("P=@P,"); + strSql.Append("Kvar=@Kvar,"); + strSql.Append("Ia=@Ia,"); + strSql.Append("Ib=@Ib,"); + strSql.Append("Ic=@Ic,"); + strSql.Append("Ua=@Ua,"); + strSql.Append("Ub=@Ub,"); + strSql.Append("Uc=@Uc,"); + strSql.Append("ServiceRating=@ServiceRating,"); + strSql.Append("CreateTime=@CreateTime,"); + strSql.Append("EntireTime=@EntireTime,"); + strSql.Append("Reserve1=@Reserve1,"); + strSql.Append("Reserve2=@Reserve2,"); + strSql.Append("Reserve3=@Reserve3,"); + strSql.Append("Reserve4=@Reserve4,"); + strSql.Append("Reserve5=@Reserve5"); + strSql.Append(" where ElectricityId=@ElectricityId "); + MySqlParameter[] parameters = { + new MySqlParameter("@DeviceId", MySqlDbType.VarChar,255), + new MySqlParameter("@EH", MySqlDbType.Float,255), + new MySqlParameter("@P", MySqlDbType.Float,255), + new MySqlParameter("@Kvar", MySqlDbType.Float,255), + new MySqlParameter("@Ia", MySqlDbType.Float,255), + new MySqlParameter("@Ib", MySqlDbType.Float,255), + new MySqlParameter("@Ic", MySqlDbType.Float,255), + new MySqlParameter("@Ua", MySqlDbType.Float,255), + new MySqlParameter("@Ub", MySqlDbType.Float,255), + new MySqlParameter("@Uc", MySqlDbType.Float,255), + new MySqlParameter("@ServiceRating", MySqlDbType.Float,255), + new MySqlParameter("@CreateTime", MySqlDbType.DateTime), + new MySqlParameter("@EntireTime", MySqlDbType.DateTime), + new MySqlParameter("@Reserve1", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve2", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve3", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve4", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve5", MySqlDbType.VarChar,255), + new MySqlParameter("@ElectricityId", MySqlDbType.VarChar,255)}; + parameters[0].Value = model.DeviceId; + parameters[1].Value = model.EH; + parameters[2].Value = model.P; + parameters[3].Value = model.Kvar; + parameters[4].Value = model.Ia; + parameters[5].Value = model.Ib; + parameters[6].Value = model.Ic; + parameters[7].Value = model.Ua; + parameters[8].Value = model.Ub; + parameters[9].Value = model.Uc; + parameters[10].Value = model.ServiceRating; + parameters[11].Value = model.CreateTime; + parameters[12].Value = model.EntireTime; + parameters[13].Value = model.Reserve1; + parameters[14].Value = model.Reserve2; + parameters[15].Value = model.Reserve3; + parameters[16].Value = model.Reserve4; + parameters[17].Value = model.Reserve5; + parameters[18].Value = model.ElectricityId; + + int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + + /// + /// 删除一条数据 + /// + public bool Delete(string ElectricityId) + { + + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete from electricity_data "); + strSql.Append(" where ElectricityId=@ElectricityId "); + MySqlParameter[] parameters = { + new MySqlParameter("@ElectricityId", MySqlDbType.VarChar,255) }; + parameters[0].Value = ElectricityId; + + int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + /// + /// 批量删除数据 + /// + public bool DeleteList(string ElectricityIdlist) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete from electricity_data "); + strSql.Append(" where ElectricityId in (" + ElectricityIdlist + ") "); + int rows = DbHelperMySQL.ExecuteSql(strSql.ToString()); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + + + /// + /// 得到一个对象实体 + /// + public DataServer.Model.electricity_data GetModel(string ElectricityId) + { + + StringBuilder strSql = new StringBuilder(); + strSql.Append("select ElectricityId,DeviceId,EH,P,Kvar,Ia,Ib,Ic,Ua,Ub,Uc,ServiceRating,CreateTime,EntireTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 from electricity_data "); + strSql.Append(" where ElectricityId=@ElectricityId "); + MySqlParameter[] parameters = { + new MySqlParameter("@ElectricityId", MySqlDbType.VarChar,255) }; + parameters[0].Value = ElectricityId; + + DataServer.Model.electricity_data model = new DataServer.Model.electricity_data(); + DataSet ds = DbHelperMySQL.Query(strSql.ToString(), parameters); + if (ds.Tables[0].Rows.Count > 0) + { + return DataRowToModel(ds.Tables[0].Rows[0]); + } + else + { + return null; + } + } + + + /// + /// 得到一个对象实体 + /// + public DataServer.Model.electricity_data DataRowToModel(DataRow row) + { + DataServer.Model.electricity_data model = new DataServer.Model.electricity_data(); + if (row != null) + { + if (row["ElectricityId"] != null) + { + model.ElectricityId = row["ElectricityId"].ToString(); + } + if (row["DeviceId"] != null) + { + model.DeviceId = row["DeviceId"].ToString(); + } + if (row["EH"] != null && row["EH"].ToString() != "") + { + model.EH = decimal.Parse(row["EH"].ToString()); + } + if (row["P"] != null && row["P"].ToString() != "") + { + model.P = decimal.Parse(row["P"].ToString()); + } + if (row["Kvar"] != null && row["Kvar"].ToString() != "") + { + model.Kvar = decimal.Parse(row["Kvar"].ToString()); + } + if (row["Ia"] != null && row["Ia"].ToString() != "") + { + model.Ia = decimal.Parse(row["Ia"].ToString()); + } + if (row["Ib"] != null && row["Ib"].ToString() != "") + { + model.Ib = decimal.Parse(row["Ib"].ToString()); + } + if (row["Ic"] != null && row["Ic"].ToString() != "") + { + model.Ic = decimal.Parse(row["Ic"].ToString()); + } + if (row["Ua"] != null && row["Ua"].ToString() != "") + { + model.Ua = decimal.Parse(row["Ua"].ToString()); + } + if (row["Ub"] != null && row["Ub"].ToString() != "") + { + model.Ub = decimal.Parse(row["Ub"].ToString()); + } + if (row["Uc"] != null && row["Uc"].ToString() != "") + { + model.Uc = decimal.Parse(row["Uc"].ToString()); + } + if (row["ServiceRating"] != null && row["ServiceRating"].ToString() != "") + { + model.ServiceRating = decimal.Parse(row["ServiceRating"].ToString()); + } + if (row["CreateTime"] != null && row["CreateTime"].ToString() != "") + { + model.CreateTime = DateTime.Parse(row["CreateTime"].ToString()); + } + if (row["EntireTime"] != null && row["EntireTime"].ToString() != "") + { + model.EntireTime = DateTime.Parse(row["EntireTime"].ToString()); + } + if (row["Reserve1"] != null) + { + model.Reserve1 = row["Reserve1"].ToString(); + } + if (row["Reserve2"] != null) + { + model.Reserve2 = row["Reserve2"].ToString(); + } + if (row["Reserve3"] != null) + { + model.Reserve3 = row["Reserve3"].ToString(); + } + if (row["Reserve4"] != null) + { + model.Reserve4 = row["Reserve4"].ToString(); + } + if (row["Reserve5"] != null) + { + model.Reserve5 = row["Reserve5"].ToString(); + } + } + return model; + } + + /// + /// 获得数据列表 + /// + public DataSet GetList(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select ElectricityId,DeviceId,EH,P,Kvar,Ia,Ib,Ic,Ua,Ub,Uc,ServiceRating,CreateTime,EntireTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 "); + strSql.Append(" FROM electricity_data "); + if (strWhere.Trim() != "") + { + strSql.Append(" where " + strWhere); + } + return DbHelperMySQL.Query(strSql.ToString()); + } + + /// + /// 获取记录总数 + /// + public int GetRecordCount(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select count(1) FROM electricity_data "); + if (strWhere.Trim() != "") + { + strSql.Append(" where " + strWhere); + } + object obj = DbHelperSQL.GetSingle(strSql.ToString()); + if (obj == null) + { + return 0; + } + else + { + return Convert.ToInt32(obj); + } + } + /// + /// 分页获取数据列表 + /// + public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("SELECT * FROM ( "); + strSql.Append(" SELECT ROW_NUMBER() OVER ("); + if (!string.IsNullOrEmpty(orderby.Trim())) + { + strSql.Append("order by T." + orderby); + } + else + { + strSql.Append("order by T.ElectricityId desc"); + } + strSql.Append(")AS Row, T.* from electricity_data T "); + if (!string.IsNullOrEmpty(strWhere.Trim())) + { + strSql.Append(" WHERE " + strWhere); + } + strSql.Append(" ) TT"); + strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex); + return DbHelperMySQL.Query(strSql.ToString()); + } + + /* + /// + /// 分页获取数据列表 + /// + public DataSet GetList(int PageSize,int PageIndex,string strWhere) + { + MySqlParameter[] parameters = { + new MySqlParameter("@tblName", MySqlDbType.VarChar, 255), + new MySqlParameter("@fldName", MySqlDbType.VarChar, 255), + new MySqlParameter("@PageSize", MySqlDbType.Int32), + new MySqlParameter("@PageIndex", MySqlDbType.Int32), + new MySqlParameter("@IsReCount", MySqlDbType.Bit), + new MySqlParameter("@OrderType", MySqlDbType.Bit), + new MySqlParameter("@strWhere", MySqlDbType.VarChar,1000), + }; + parameters[0].Value = "electricity_data"; + parameters[1].Value = "ElectricityId"; + parameters[2].Value = PageSize; + parameters[3].Value = PageIndex; + parameters[4].Value = 0; + parameters[5].Value = 0; + parameters[6].Value = strWhere; + return DbHelperMySQL.RunProcedure("UP_GetRecordByPage",parameters,"ds"); + }*/ + + #endregion BasicMethod + #region ExtensionMethod + /// + /// 表是否存在 + /// + /// 数据库名 + /// 表名 格式:表名_yyyyMMdd + /// + public bool IsExistsTable(string dbName, string tableName) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append(string.Format("select count(1) from information_schema.tables where table_schema='{0}' and table_name='{1}' ", dbName, tableName)); + return DbHelperMySQL.Exists(strSql.ToString()); + } + + /// + /// 添加表 + /// + /// 日期 格式:yyyyMM + /// + public void CreateTable(string date) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("CREATE TABLE `electricity_data_" + date + "` ("); + strSql.Append("`ElectricityId` varchar(255) NOT NULL COMMENT '用电Id',"); + strSql.Append("`DeviceId` varchar(255) DEFAULT NULL COMMENT '设备Id',"); + strSql.Append("`EH` float(255,3) DEFAULT NULL COMMENT '用电量',"); + strSql.Append("`P` float(255,3) DEFAULT NULL COMMENT '实时负荷',"); + strSql.Append("`Kvar` float(255,3) DEFAULT NULL COMMENT '总无工功率',"); + strSql.Append("`Ia` float(255,3) DEFAULT NULL COMMENT 'A相电流',"); + strSql.Append("`Ib` float(255,3) DEFAULT NULL COMMENT 'B相电流',"); + strSql.Append("`Ic` float(255,3) DEFAULT NULL COMMENT 'C相电流',"); + strSql.Append("`Ua` float(255,3) DEFAULT NULL COMMENT 'A相电压',"); + strSql.Append("`Ub` float(255,3) DEFAULT NULL COMMENT 'B相电压',"); + strSql.Append("`Uc` float(255,3) DEFAULT NULL COMMENT 'C相电压',"); + strSql.Append("`ServiceRating` float(255,3) DEFAULT NULL COMMENT '运行功率',"); + strSql.Append("`CreateTime` datetime DEFAULT NULL COMMENT '添加时间',"); + strSql.Append("`EntireTime` datetime DEFAULT NULL COMMENT '整点时间',"); + strSql.Append("`Reserve1` varchar(255) DEFAULT NULL,"); + strSql.Append("`Reserve2` varchar(255) DEFAULT NULL,"); + strSql.Append("`Reserve3` varchar(255) DEFAULT NULL,"); + strSql.Append("`Reserve4` varchar(255) DEFAULT NULL,"); + strSql.Append("`Reserve5` varchar(255) DEFAULT NULL,"); + strSql.Append("PRIMARY KEY (`ElectricityId`)"); + strSql.Append(") ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + DbHelperMySQL.ExecuteSql(strSql.ToString()); + } + + /// + ///添加数据 + /// + /// + /// + /// + public bool AddDate(DataServer.Model.electricity_data model,string date) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into electricity_data_" + date + "("); + strSql.Append("ElectricityId,DeviceId,EH,P,Kvar,Ia,Ib,Ic,Ua,Ub,Uc,ServiceRating,CreateTime,EntireTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5)"); + strSql.Append(" values ("); + strSql.Append("@ElectricityId,@DeviceId,@EH,@P,@Kvar,@Ia,@Ib,@Ic,@Ua,@Ub,@Uc,@ServiceRating,@CreateTime,@EntireTime,@Reserve1,@Reserve2,@Reserve3,@Reserve4,@Reserve5)"); + MySqlParameter[] parameters = { + new MySqlParameter("@ElectricityId", MySqlDbType.VarChar,255), + new MySqlParameter("@DeviceId", MySqlDbType.VarChar,255), + new MySqlParameter("@EH", MySqlDbType.Float,255), + new MySqlParameter("@P", MySqlDbType.Float,255), + new MySqlParameter("@Kvar", MySqlDbType.Float,255), + new MySqlParameter("@Ia", MySqlDbType.Float,255), + new MySqlParameter("@Ib", MySqlDbType.Float,255), + new MySqlParameter("@Ic", MySqlDbType.Float,255), + new MySqlParameter("@Ua", MySqlDbType.Float,255), + new MySqlParameter("@Ub", MySqlDbType.Float,255), + new MySqlParameter("@Uc", MySqlDbType.Float,255), + new MySqlParameter("@ServiceRating", MySqlDbType.Float,255), + new MySqlParameter("@CreateTime", MySqlDbType.DateTime), + new MySqlParameter("@EntireTime", MySqlDbType.DateTime), + new MySqlParameter("@Reserve1", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve2", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve3", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve4", MySqlDbType.VarChar,255), + new MySqlParameter("@Reserve5", MySqlDbType.VarChar,255)}; + parameters[0].Value = model.ElectricityId; + parameters[1].Value = model.DeviceId; + parameters[2].Value = model.EH; + parameters[3].Value = model.P; + parameters[4].Value = model.Kvar; + parameters[5].Value = model.Ia; + parameters[6].Value = model.Ib; + parameters[7].Value = model.Ic; + parameters[8].Value = model.Ua; + parameters[9].Value = model.Ub; + parameters[10].Value = model.Uc; + parameters[11].Value = model.ServiceRating; + parameters[12].Value = model.CreateTime; + parameters[13].Value = model.EntireTime; + parameters[14].Value = model.Reserve1; + parameters[15].Value = model.Reserve2; + parameters[16].Value = model.Reserve3; + parameters[17].Value = model.Reserve4; + parameters[18].Value = model.Reserve5; + + int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + + /// + /// 获得数据列表 + /// + public DataSet GetListDate(string strWhere,string date) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select ElectricityId,DeviceId,EH,P,Kvar,Ia,Ib,Ic,Ua,Ub,Uc,ServiceRating,CreateTime,EntireTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 "); + strSql.Append(" FROM electricity_data_ "+date); + if (strWhere.Trim() != "") + { + strSql.Append(" where " + strWhere); + } + return DbHelperMySQL.Query(strSql.ToString()); + } + #endregion ExtensionMethod + } +} + diff --git a/DataServer/DataServer.csproj b/DataServer/DataServer.csproj index 1d01cd6..0bd3cf1 100644 --- a/DataServer/DataServer.csproj +++ b/DataServer/DataServer.csproj @@ -73,9 +73,12 @@ + + + diff --git a/DataServer/Model/electricity_data.cs b/DataServer/Model/electricity_data.cs new file mode 100644 index 0000000..31603e5 --- /dev/null +++ b/DataServer/Model/electricity_data.cs @@ -0,0 +1,204 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* electricity_data.cs +* +* 功 能: N/A +* 类 名: electricity_data +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/1/9 10:31:42 N/A 初版 +* +* Copyright (c) 2012 Maticsoft Corporation. All rights reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 版权所有:动软卓越(北京)科技有限公司              │ +*└──────────────────────────────────┘ +*/ +using System; +namespace DataServer.Model +{ + /// + /// electricity_data:实体类(属性说明自动提取数据库字段的描述信息) + /// + [Serializable] + public partial class electricity_data + { + public electricity_data() + {} + #region Model + private string _electricityid; + private string _deviceid; + private decimal? _eh; + private decimal? _p; + private decimal? _kvar; + private decimal? _ia; + private decimal? _ib; + private decimal? _ic; + private decimal? _ua; + private decimal? _ub; + private decimal? _uc; + private decimal? _servicerating; + private DateTime? _createtime; + private DateTime? _entiretime; + private string _reserve1; + private string _reserve2; + private string _reserve3; + private string _reserve4; + private string _reserve5; + /// + /// + /// + public string ElectricityId + { + set{ _electricityid=value;} + get{return _electricityid;} + } + /// + /// + /// + public string DeviceId + { + set{ _deviceid=value;} + get{return _deviceid;} + } + /// + /// + /// + public decimal? EH + { + set{ _eh=value;} + get{return _eh;} + } + /// + /// + /// + public decimal? P + { + set{ _p=value;} + get{return _p;} + } + /// + /// + /// + public decimal? Kvar + { + set{ _kvar=value;} + get{return _kvar;} + } + /// + /// + /// + public decimal? Ia + { + set{ _ia=value;} + get{return _ia;} + } + /// + /// + /// + public decimal? Ib + { + set{ _ib=value;} + get{return _ib;} + } + /// + /// + /// + public decimal? Ic + { + set{ _ic=value;} + get{return _ic;} + } + /// + /// + /// + public decimal? Ua + { + set{ _ua=value;} + get{return _ua;} + } + /// + /// + /// + public decimal? Ub + { + set{ _ub=value;} + get{return _ub;} + } + /// + /// + /// + public decimal? Uc + { + set{ _uc=value;} + get{return _uc;} + } + /// + /// + /// + public decimal? ServiceRating + { + set{ _servicerating=value;} + get{return _servicerating;} + } + /// + /// + /// + public DateTime? CreateTime + { + set{ _createtime=value;} + get{return _createtime;} + } + /// + /// + /// + public DateTime? EntireTime + { + set{ _entiretime=value;} + get{return _entiretime;} + } + /// + /// + /// + public string Reserve1 + { + set{ _reserve1=value;} + get{return _reserve1;} + } + /// + /// + /// + public string Reserve2 + { + set{ _reserve2=value;} + get{return _reserve2;} + } + /// + /// + /// + public string Reserve3 + { + set{ _reserve3=value;} + get{return _reserve3;} + } + /// + /// + /// + public string Reserve4 + { + set{ _reserve4=value;} + get{return _reserve4;} + } + /// + /// + /// + public string Reserve5 + { + set{ _reserve5=value;} + get{return _reserve5;} + } + #endregion Model + + } +} + diff --git a/DataServer/bin/Debug/DataServer.dll b/DataServer/bin/Debug/DataServer.dll index c39a649..999360d 100644 Binary files a/DataServer/bin/Debug/DataServer.dll and b/DataServer/bin/Debug/DataServer.dll differ diff --git a/DataServer/bin/Debug/DataServer.pdb b/DataServer/bin/Debug/DataServer.pdb index d94d545..1225438 100644 Binary files a/DataServer/bin/Debug/DataServer.pdb and b/DataServer/bin/Debug/DataServer.pdb differ diff --git a/DataServer/obj/Debug/DataServer.csproj.CoreCompileInputs.cache b/DataServer/obj/Debug/DataServer.csproj.CoreCompileInputs.cache index b61b7a6..be11251 100644 --- a/DataServer/obj/Debug/DataServer.csproj.CoreCompileInputs.cache +++ b/DataServer/obj/Debug/DataServer.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -79c32f87fb0acba6d359a5e1073537ed069eb160 +d88e5927d0223dfdd2a01652495a02c4a12712a0 diff --git a/DataServer/obj/Debug/DataServer.csproj.FileListAbsolute.txt b/DataServer/obj/Debug/DataServer.csproj.FileListAbsolute.txt index 4538626..7c0a2d1 100644 --- a/DataServer/obj/Debug/DataServer.csproj.FileListAbsolute.txt +++ b/DataServer/obj/Debug/DataServer.csproj.FileListAbsolute.txt @@ -8,3 +8,13 @@ E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\DataServer\bin\Debug E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\DataServer\bin\Debug\Maticsoft.DBUtility.dll E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\DataServer\bin\Debug\MySql.Data.dll E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\DataServer\obj\Debug\DataServer.csproj.CopyComplete +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\bin\Debug\DataServer.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\bin\Debug\DataServer.pdb +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\bin\Debug\Maticsoft.Common.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\bin\Debug\Maticsoft.DBUtility.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\bin\Debug\MySql.Data.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\obj\Debug\DataServer.csproj.AssemblyReference.cache +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\obj\Debug\DataServer.csproj.CoreCompileInputs.cache +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\obj\Debug\DataServer.csproj.CopyComplete +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\obj\Debug\DataServer.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DataServer\obj\Debug\DataServer.pdb diff --git a/DataServer/obj/Debug/DataServer.dll b/DataServer/obj/Debug/DataServer.dll index c39a649..999360d 100644 Binary files a/DataServer/obj/Debug/DataServer.dll and b/DataServer/obj/Debug/DataServer.dll differ diff --git a/DataServer/obj/Debug/DataServer.pdb b/DataServer/obj/Debug/DataServer.pdb index d94d545..1225438 100644 Binary files a/DataServer/obj/Debug/DataServer.pdb and b/DataServer/obj/Debug/DataServer.pdb differ diff --git a/DongYingAPI/bin/DataServer.dll b/DongYingAPI/bin/DataServer.dll index c39a649..ed044e0 100644 Binary files a/DongYingAPI/bin/DataServer.dll and b/DongYingAPI/bin/DataServer.dll differ diff --git a/DongYingAPI/bin/DataServer.pdb b/DongYingAPI/bin/DataServer.pdb index 3c4fd98..42ad147 100644 Binary files a/DongYingAPI/bin/DataServer.pdb and b/DongYingAPI/bin/DataServer.pdb differ diff --git a/DongYingAPI/bin/DongYingAPI.dll b/DongYingAPI/bin/DongYingAPI.dll index 9b340b2..b01e601 100644 Binary files a/DongYingAPI/bin/DongYingAPI.dll and b/DongYingAPI/bin/DongYingAPI.dll differ diff --git a/DongYingAPI/bin/DongYingAPI.pdb b/DongYingAPI/bin/DongYingAPI.pdb index df46745..400e846 100644 Binary files a/DongYingAPI/bin/DongYingAPI.pdb and b/DongYingAPI/bin/DongYingAPI.pdb differ diff --git a/DongYingAPI/obj/Debug/DongYingAPI.csproj.AssemblyReference.cache b/DongYingAPI/obj/Debug/DongYingAPI.csproj.AssemblyReference.cache index cddc2d3..6ef0202 100644 Binary files a/DongYingAPI/obj/Debug/DongYingAPI.csproj.AssemblyReference.cache and b/DongYingAPI/obj/Debug/DongYingAPI.csproj.AssemblyReference.cache differ diff --git a/DongYingAPI/obj/Debug/DongYingAPI.csproj.CoreCompileInputs.cache b/DongYingAPI/obj/Debug/DongYingAPI.csproj.CoreCompileInputs.cache index 7d22727..743b203 100644 --- a/DongYingAPI/obj/Debug/DongYingAPI.csproj.CoreCompileInputs.cache +++ b/DongYingAPI/obj/Debug/DongYingAPI.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -d18cef7fac424a3532ac4631b487947fb1318071 +b526cf08f7ad4fa5d3dbc021cd0796d7b46d7433 diff --git a/DongYingAPI/obj/Debug/DongYingAPI.csproj.FileListAbsolute.txt b/DongYingAPI/obj/Debug/DongYingAPI.csproj.FileListAbsolute.txt index 427902d..76c3c08 100644 --- a/DongYingAPI/obj/Debug/DongYingAPI.csproj.FileListAbsolute.txt +++ b/DongYingAPI/obj/Debug/DongYingAPI.csproj.FileListAbsolute.txt @@ -98,3 +98,103 @@ E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\DongYingAPI\bin\MySq E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\DongYingAPI\bin\Maticsoft.DBUtility.dll E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\DongYingAPI\bin\Maticsoft.Common.dll E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\DongYingAPI\bin\DataServer.pdb +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\DongYingAPI.dll.config +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\DongYingAPI.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\DongYingAPI.pdb +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\csc.exe +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\csc.exe.config +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\csc.rsp +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\csi.exe +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\csi.exe.config +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\csi.rsp +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.CodeAnalysis.CSharp.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.CodeAnalysis.CSharp.Scripting.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.CodeAnalysis.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.CodeAnalysis.Scripting.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.CSharp.Core.targets +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.DiaSymReader.Native.amd64.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.DiaSymReader.Native.x86.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.Managed.Core.targets +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.VisualBasic.Core.targets +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\Microsoft.Win32.Primitives.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.AppContext.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Collections.Immutable.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Console.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Diagnostics.DiagnosticSource.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Diagnostics.FileVersionInfo.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Diagnostics.StackTrace.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Globalization.Calendars.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.IO.Compression.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.IO.Compression.ZipFile.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.IO.FileSystem.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.IO.FileSystem.Primitives.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Net.Http.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Net.Sockets.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Reflection.Metadata.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Runtime.InteropServices.RuntimeInformation.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Security.Cryptography.Algorithms.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Security.Cryptography.Encoding.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Security.Cryptography.Primitives.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Security.Cryptography.X509Certificates.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Text.Encoding.CodePages.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Threading.Tasks.Extensions.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.ValueTuple.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Xml.ReaderWriter.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Xml.XmlDocument.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Xml.XPath.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\System.Xml.XPath.XDocument.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\vbc.exe +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\vbc.exe.config +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\vbc.rsp +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\VBCSCompiler.exe +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\roslyn\VBCSCompiler.exe.config +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Antlr3.Runtime.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\DataServer.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Microsoft.Web.Infrastructure.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Newtonsoft.Json.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Net.Http.Formatting.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Helpers.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Http.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Http.WebHost.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Mvc.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Optimization.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Razor.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.WebPages.Deployment.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.WebPages.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.WebPages.Razor.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\WebGrease.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\MySql.Data.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Maticsoft.DBUtility.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Maticsoft.Common.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\DataServer.pdb +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Newtonsoft.Json.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Net.Http.Formatting.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Helpers.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Http.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Http.WebHost.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Mvc.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Optimization.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.Razor.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.WebPages.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.WebPages.Deployment.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\System.Web.WebPages.Razor.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Antlr3.Runtime.pdb +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Net.Http.Formatting.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.Helpers.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.Http.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.Http.WebHost.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.Mvc.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.Optimization.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.Razor.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.WebPages.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.WebPages.Deployment.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\bin\zh-Hans\System.Web.WebPages.Razor.resources.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\obj\Debug\DongYingAPI.csproj.AssemblyReference.cache +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\obj\Debug\DongYingAPI.csproj.CoreCompileInputs.cache +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\obj\Debug\DongYingAPI.csproj.CopyComplete +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\obj\Debug\DongYingAPI.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\DongYingAPI\obj\Debug\DongYingAPI.pdb diff --git a/DongYingAPI/obj/Debug/DongYingAPI.dll b/DongYingAPI/obj/Debug/DongYingAPI.dll index 9b340b2..b01e601 100644 Binary files a/DongYingAPI/obj/Debug/DongYingAPI.dll and b/DongYingAPI/obj/Debug/DongYingAPI.dll differ diff --git a/DongYingAPI/obj/Debug/DongYingAPI.pdb b/DongYingAPI/obj/Debug/DongYingAPI.pdb index df46745..400e846 100644 Binary files a/DongYingAPI/obj/Debug/DongYingAPI.pdb and b/DongYingAPI/obj/Debug/DongYingAPI.pdb differ diff --git a/Security/ServiceSecurity.cs b/Security/ServiceSecurity.cs index 4450993..a74b6c7 100644 --- a/Security/ServiceSecurity.cs +++ b/Security/ServiceSecurity.cs @@ -7,6 +7,7 @@ using HslCommunication.MQTT; using HslCommunication; using DataServer.api; using System.Collections.Generic; +using System.Runtime.Remoting.Channels; namespace Security { @@ -18,7 +19,8 @@ namespace Security static MqttClient mqtt_client; static MqttClient mqtt_client2; - static DataServer.BLL.device_data bll = new DataServer.BLL.device_data(); + //static DataServer.BLL.device_data bll = new DataServer.BLL.device_data(); + static DataServer.BLL.electricity_data bll = new DataServer.BLL.electricity_data(); public ServiceSecurity() { InitializeComponent(); @@ -185,19 +187,25 @@ namespace Security if (topic.Contains("data")) { + var date = DateTime.Now.ToString("yyyyMM"); + var a = bll.IsExistsTable("dongying", "electricity_data_"+date); + if (a == false) + { + bll.CreateTable(date); + } var data = JsonConvert.DeserializeObject(msg); log.Info("数据1data" + msg); if (data.devs != null) { - var model = new DataServer.Model.device_data(); + var model = new DataServer.Model.electricity_data(); foreach (var item in data.devs) { - model.DeviceId=Guid.NewGuid().ToString("N"); - model.DeviceNumber = item.dev; - var name=GetDeviceName(item.dev); - var name1=GetFloorName(item.dev); - model.DeviceName = name; - model.FloorName = name1; + model.ElectricityId=Guid.NewGuid().ToString("N"); + model.DeviceId =item.dev; + //var name=GetDeviceName(item.dev); + //var name1=GetFloorName(item.dev); + //model.DeviceName = name; + //model.FloorName = name1; foreach (var aitem in item.d) { #region 数据添加 @@ -241,7 +249,8 @@ namespace Security } model.CreateTime= DateTime.Now; - bll.Add(model); + model.EntireTime =Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:00:00")); + bll.AddDate(model,date); } } diff --git a/Security/bin/Debug/App_Data/Logs_20240109.txt b/Security/bin/Debug/App_Data/Logs_20240109.txt new file mode 100644 index 0000000..8802955 --- /dev/null +++ b/Security/bin/Debug/App_Data/Logs_20240109.txt @@ -0,0 +1,202 @@ + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 09:46:59,368 [3] INFO loginfo - ʼ +2024-01-09 09:46:59,506 [3] INFO loginfo - ʼ +2024-01-09 09:46:59,641 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 09:46:59,644 [3] INFO loginfo - ʼ +2024-01-09 09:46:59,645 [3] INFO loginfo - ӳɹ +2024-01-09 09:48:59,750 [25] INFO loginfo - 뷽 +2024-01-09 09:49:12,754 [25] INFO loginfo - 1data{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} + +2024-01-09 09:49:12,772 [25] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭֵ Int32 ̫̫С +2024-01-09 09:50:08,077 [18] INFO loginfo - 뷽 +2024-01-09 09:50:29,323 [18] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭTable 'electricity_data_2024-01' already exists +2024-01-09 09:50:36,665 [18] INFO loginfo - 뷽 + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 09:52:22,872 [3] INFO loginfo - ʼ +2024-01-09 09:52:22,997 [3] INFO loginfo - ʼ +2024-01-09 09:52:23,092 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 09:52:23,094 [3] INFO loginfo - ʼ +2024-01-09 09:52:23,095 [3] INFO loginfo - ӳɹ +2024-01-09 09:52:31,801 [5] INFO loginfo - 뷽 + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 09:53:51,784 [3] INFO loginfo - ʼ +2024-01-09 09:53:51,904 [3] INFO loginfo - ʼ +2024-01-09 09:53:51,998 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 09:53:52,001 [3] INFO loginfo - ʼ +2024-01-09 09:53:52,002 [3] INFO loginfo - ӳɹ +2024-01-09 09:54:00,524 [9] INFO loginfo - 뷽 +2024-01-09 09:54:02,032 [9] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭTable 'electricity_data_2024-01' already exists +2024-01-09 09:54:28,925 [15] INFO loginfo - 뷽 +2024-01-09 09:56:42,782 [15] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭTable 'electricity_data_2024-01' already exists +2024-01-09 09:56:42,785 [21] INFO loginfo - 쳣׼10ӡ +2024-01-09 09:56:42,914 [18] INFO loginfo - 쳣׼10ӡ +2024-01-09 09:56:56,931 [21] INFO loginfo - ׼ӷ... +2024-01-09 09:56:56,931 [25] INFO loginfo - 뷽 +2024-01-09 09:56:56,931 [18] INFO loginfo - ׼ӷ... + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 09:57:44,738 [3] INFO loginfo - ʼ +2024-01-09 09:57:44,876 [3] INFO loginfo - ʼ +2024-01-09 09:57:44,972 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 09:57:44,973 [3] INFO loginfo - ʼ +2024-01-09 09:57:44,974 [3] INFO loginfo - ӳɹ +2024-01-09 09:57:58,085 [9] INFO loginfo - 뷽 +2024-01-09 09:59:27,463 [9] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭUnknown database 'electricity_data' + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:03:19,468 [3] INFO loginfo - ʼ +2024-01-09 10:03:19,588 [3] INFO loginfo - ʼ +2024-01-09 10:03:19,702 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:03:19,704 [3] INFO loginfo - ʼ +2024-01-09 10:03:19,705 [3] INFO loginfo - ӳɹ +2024-01-09 10:03:37,573 [9] INFO loginfo - 뷽 +2024-01-09 10:03:45,023 [9] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭUnknown database 'electricity_data' +2024-01-09 10:03:58,637 [8] INFO loginfo - 뷽 +2024-01-09 10:04:15,419 [8] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭUnknown database 'electricity_data' +2024-01-09 10:04:29,628 [17] INFO loginfo - 뷽 + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:11:52,876 [3] INFO loginfo - ʼ +2024-01-09 10:11:53,023 [3] INFO loginfo - ʼ +2024-01-09 10:11:53,147 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:11:53,149 [3] INFO loginfo - ʼ +2024-01-09 10:11:53,151 [3] INFO loginfo - ӳɹ +2024-01-09 10:12:09,689 [13] INFO loginfo - 뷽 +2024-01-09 10:26:00,129 [15] INFO loginfo - 쳣׼10ӡ +2024-01-09 10:26:00,130 [16] INFO loginfo - 쳣׼10ӡ + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:26:31,580 [3] INFO loginfo - ʼ +2024-01-09 10:26:31,686 [3] INFO loginfo - ʼ +2024-01-09 10:26:36,778 [3] INFO loginfo - ʧ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:26:36,779 [3] INFO loginfo - ʼ +2024-01-09 10:26:36,828 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:26:54,114 [3] INFO loginfo - ʼ +2024-01-09 10:26:54,246 [3] INFO loginfo - ʼ +2024-01-09 10:26:57,616 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:26:57,618 [3] INFO loginfo - ʼ +2024-01-09 10:26:57,619 [3] INFO loginfo - ӳɹ +2024-01-09 10:27:07,060 [12] INFO loginfo - 뷽 +2024-01-09 10:27:25,013 [12] INFO loginfo - 1data{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} + + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:38:21,181 [3] INFO loginfo - ʼ +2024-01-09 10:38:21,285 [3] INFO loginfo - ʼ +2024-01-09 10:38:21,384 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:38:21,386 [3] INFO loginfo - ʼ +2024-01-09 10:38:21,387 [3] INFO loginfo - ӳɹ +2024-01-09 10:38:38,004 [8] INFO loginfo - 뷽 +2024-01-09 10:40:12,120 [8] INFO loginfo - 1data{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} + +2024-01-09 10:40:15,799 [18] INFO loginfo - 쳣׼10ӡ +2024-01-09 10:40:40,021 [18] INFO loginfo - ׼ӷ... +2024-01-09 10:40:46,546 [18] INFO loginfo - ӷɹ +2024-01-09 10:40:46,576 [8] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭֵ Int32 ̫̫С +2024-01-09 10:40:46,581 [8] INFO loginfo - 쳣׼10ӡ +2024-01-09 10:40:56,582 [8] INFO loginfo - ׼ӷ... +2024-01-09 10:40:56,590 [8] INFO loginfo - ӷɹ +2024-01-09 10:40:56,601 [22] INFO loginfo - 쳣׼10ӡ +2024-01-09 10:41:06,603 [22] INFO loginfo - ׼ӷ... +2024-01-09 10:41:06,604 [22] INFO loginfo - ӷɹ +2024-01-09 10:41:06,613 [20] INFO loginfo - 쳣׼10ӡ +2024-01-09 10:41:13,378 [22] INFO loginfo - 뷽 +2024-01-09 10:41:19,253 [20] INFO loginfo - ׼ӷ... +2024-01-09 10:41:19,255 [20] INFO loginfo - ӷɹ +2024-01-09 10:41:19,281 [22] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭTable 'electricity_data__202401' already exists +2024-01-09 10:41:19,285 [22] INFO loginfo - 쳣׼10ӡ +2024-01-09 10:41:33,382 [22] INFO loginfo - ׼ӷ... +2024-01-09 10:41:33,558 [18] INFO loginfo - 뷽 +2024-01-09 10:41:34,283 [22] INFO loginfo - ӷɹ +2024-01-09 10:42:16,308 [18] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭTable 'electricity_data__202401' already exists +2024-01-09 10:42:16,316 [18] INFO loginfo - 쳣׼10ӡ +2024-01-09 10:42:26,319 [18] INFO loginfo - ׼ӷ... +2024-01-09 10:42:26,322 [18] INFO loginfo - ӷɹ +2024-01-09 10:42:45,854 [18] INFO loginfo - 뷽 +2024-01-09 10:43:00,993 [18] INFO loginfo - 1data{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} + +2024-01-09 10:43:40,036 [18] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭֵ Int32 ̫̫С +2024-01-09 10:43:47,200 [33] INFO loginfo - 뷽 +2024-01-09 10:44:04,239 [33] INFO loginfo - ʧܣݣ{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} +ԭTable 'electricity_data__202401' already exists +2024-01-09 10:44:10,643 [33] INFO loginfo - 뷽 + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:44:52,197 [3] INFO loginfo - ʼ +2024-01-09 10:44:52,321 [3] INFO loginfo - ʼ +2024-01-09 10:44:52,408 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:44:52,410 [3] INFO loginfo - ʼ +2024-01-09 10:44:52,411 [3] INFO loginfo - ӳɹ +2024-01-09 10:44:57,041 [12] INFO loginfo - 뷽 + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:46:28,574 [3] INFO loginfo - ʼ +2024-01-09 10:46:28,713 [3] INFO loginfo - ʼ +2024-01-09 10:46:33,806 [3] INFO loginfo - ʧ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:46:33,807 [3] INFO loginfo - ʼ +2024-01-09 10:46:33,846 [3] INFO loginfo - ӳɹ +2024-01-09 10:46:49,640 [8] INFO loginfo - 뷽 +2024-01-09 10:47:01,938 [8] INFO loginfo - 1data{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} + + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:50:00,648 [3] INFO loginfo - ʼ +2024-01-09 10:50:00,775 [3] INFO loginfo - ʼ +2024-01-09 10:50:01,888 [3] INFO loginfo - ӳɹ + ------------------------------------------------ + ------------------------------------------------ +2024-01-09 10:50:01,891 [3] INFO loginfo - ʼ +2024-01-09 10:50:01,893 [3] INFO loginfo - ӳɹ +2024-01-09 10:50:07,243 [7] INFO loginfo - 뷽 +2024-01-09 10:50:08,636 [7] INFO loginfo - 1data{"devs":[{"d":[{"dq":192,"m":"010400051","ts":1704342327,"v":88.667},{"dq":192,"m":"01040005","ts":1704342327,"v":5.000},{"dq":192,"m":"1040006","ts":1704342327,"v":4.000},{"dq":192,"m":"1040007","ts":1704342327,"v":3.000},{"dq":192,"m":"1040008","ts":1704342327,"v":2.000},{"dq":192,"m":"1040009","ts":1704342327,"v":1.000}],"dev":"310510043001"}],"pKey":"data","sn":"6e352ec4-82fc-4db4-80fd-6699871dd1d2","ts":1704342327,"ver":"2.0.0"} + diff --git a/Security/bin/Debug/DataServer.dll b/Security/bin/Debug/DataServer.dll index c39a649..999360d 100644 Binary files a/Security/bin/Debug/DataServer.dll and b/Security/bin/Debug/DataServer.dll differ diff --git a/Security/bin/Debug/DataServer.pdb b/Security/bin/Debug/DataServer.pdb index d94d545..1225438 100644 Binary files a/Security/bin/Debug/DataServer.pdb and b/Security/bin/Debug/DataServer.pdb differ diff --git a/Security/bin/Debug/ServiceSecurity.application b/Security/bin/Debug/ServiceSecurity.application index 691e16c..44443ae 100644 --- a/Security/bin/Debug/ServiceSecurity.application +++ b/Security/bin/Debug/ServiceSecurity.application @@ -14,7 +14,7 @@ - J0tTq3mxGG7wonr3/aIYzgMap5+sS1Z+uD0hKIVt6YY= + eHplheXohStLfcRjvGonNGrTP62CVZF04TweIowb6KA= diff --git a/Security/bin/Debug/ServiceSecurity.exe b/Security/bin/Debug/ServiceSecurity.exe index d3d42ce..1f07314 100644 Binary files a/Security/bin/Debug/ServiceSecurity.exe and b/Security/bin/Debug/ServiceSecurity.exe differ diff --git a/Security/bin/Debug/ServiceSecurity.exe.manifest b/Security/bin/Debug/ServiceSecurity.exe.manifest index 9310757..c9a89d4 100644 --- a/Security/bin/Debug/ServiceSecurity.exe.manifest +++ b/Security/bin/Debug/ServiceSecurity.exe.manifest @@ -42,14 +42,14 @@ - + - 5ys3FX0GwC5HbQQsJ01Um+KJ1sFYZimJviQ4EsvPty0= + 95yQC5xWwWknnVT5WmQt+ovDi6utCSBiLGtaV4WtWYM= @@ -138,14 +138,14 @@ - + - AbKS0+JSVPlZR8uzUbbRI1ytNc4cHXFjp0FGtyZNKoM= + b7bJqDqIliuUbju1w2YkDRMyG9ErRnhvTZORdOTarU8= diff --git a/Security/bin/Debug/ServiceSecurity.pdb b/Security/bin/Debug/ServiceSecurity.pdb index 180ec2a..f6da23a 100644 Binary files a/Security/bin/Debug/ServiceSecurity.pdb and b/Security/bin/Debug/ServiceSecurity.pdb differ diff --git a/Security/bin/Debug/app.publish/ServiceSecurity.exe b/Security/bin/Debug/app.publish/ServiceSecurity.exe index efe73c4..65bf737 100644 Binary files a/Security/bin/Debug/app.publish/ServiceSecurity.exe and b/Security/bin/Debug/app.publish/ServiceSecurity.exe differ diff --git a/Security/obj/Debug/Security.csproj.AssemblyReference.cache b/Security/obj/Debug/Security.csproj.AssemblyReference.cache index 1e86bbd..507157c 100644 Binary files a/Security/obj/Debug/Security.csproj.AssemblyReference.cache and b/Security/obj/Debug/Security.csproj.AssemblyReference.cache differ diff --git a/Security/obj/Debug/Security.csproj.CoreCompileInputs.cache b/Security/obj/Debug/Security.csproj.CoreCompileInputs.cache index 64b9994..9610b55 100644 --- a/Security/obj/Debug/Security.csproj.CoreCompileInputs.cache +++ b/Security/obj/Debug/Security.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -a042ae5e10c88f431d83088528db5952b0a78fa9 +9188912aea4f3bf964cf72ec7e5362953260c83a diff --git a/Security/obj/Debug/Security.csproj.FileListAbsolute.txt b/Security/obj/Debug/Security.csproj.FileListAbsolute.txt index bc52abb..f27a567 100644 --- a/Security/obj/Debug/Security.csproj.FileListAbsolute.txt +++ b/Security/obj/Debug/Security.csproj.FileListAbsolute.txt @@ -25,3 +25,30 @@ E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\Security\obj\Debug\S E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\Security\bin\Debug\MySql.Data.dll E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\Security\bin\Debug\Maticsoft.DBUtility.dll E:\林谷项目\东营两馆一宫\后端框架\DongYingAPI\Security\bin\Debug\Maticsoft.Common.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\ServiceSecurity.exe.config +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\ServiceSecurity.exe.manifest +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\ServiceSecurity.application +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\ServiceSecurity.exe +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\ServiceSecurity.pdb +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\DataServer.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\HslCommunication.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\LitJSON.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\log4net.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\Newtonsoft.Json.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\MySql.Data.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\Maticsoft.DBUtility.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\Maticsoft.Common.dll +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\DataServer.pdb +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\HslCommunication.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\log4net.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\bin\Debug\Newtonsoft.Json.xml +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\Security.csproj.AssemblyReference.cache +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\Security.csproj.SuggestedBindingRedirects.cache +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\Security.ProjectInstaller.resources +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\Security.csproj.GenerateResource.cache +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\Security.csproj.CoreCompileInputs.cache +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\ServiceSecurity.exe.manifest +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\ServiceSecurity.application +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\Security.csproj.CopyComplete +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\ServiceSecurity.exe +E:\林谷项目\东营两馆一宫\后端框架\DongYing\Security\obj\Debug\ServiceSecurity.pdb diff --git a/Security/obj/Debug/ServiceSecurity.application b/Security/obj/Debug/ServiceSecurity.application index 691e16c..44443ae 100644 --- a/Security/obj/Debug/ServiceSecurity.application +++ b/Security/obj/Debug/ServiceSecurity.application @@ -14,7 +14,7 @@ - J0tTq3mxGG7wonr3/aIYzgMap5+sS1Z+uD0hKIVt6YY= + eHplheXohStLfcRjvGonNGrTP62CVZF04TweIowb6KA= diff --git a/Security/obj/Debug/ServiceSecurity.exe b/Security/obj/Debug/ServiceSecurity.exe index d3d42ce..1f07314 100644 Binary files a/Security/obj/Debug/ServiceSecurity.exe and b/Security/obj/Debug/ServiceSecurity.exe differ diff --git a/Security/obj/Debug/ServiceSecurity.exe.manifest b/Security/obj/Debug/ServiceSecurity.exe.manifest index 9310757..c9a89d4 100644 --- a/Security/obj/Debug/ServiceSecurity.exe.manifest +++ b/Security/obj/Debug/ServiceSecurity.exe.manifest @@ -42,14 +42,14 @@ - + - 5ys3FX0GwC5HbQQsJ01Um+KJ1sFYZimJviQ4EsvPty0= + 95yQC5xWwWknnVT5WmQt+ovDi6utCSBiLGtaV4WtWYM= @@ -138,14 +138,14 @@ - + - AbKS0+JSVPlZR8uzUbbRI1ytNc4cHXFjp0FGtyZNKoM= + b7bJqDqIliuUbju1w2YkDRMyG9ErRnhvTZORdOTarU8= diff --git a/Security/obj/Debug/ServiceSecurity.pdb b/Security/obj/Debug/ServiceSecurity.pdb index 180ec2a..f6da23a 100644 Binary files a/Security/obj/Debug/ServiceSecurity.pdb and b/Security/obj/Debug/ServiceSecurity.pdb differ