diff --git a/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/0e5c0035-d385-4fdf-a9bd-68cc16c26030.vsidx b/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/0e5c0035-d385-4fdf-a9bd-68cc16c26030.vsidx new file mode 100644 index 0000000..d300d64 Binary files /dev/null and b/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/0e5c0035-d385-4fdf-a9bd-68cc16c26030.vsidx differ diff --git a/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/64619b89-4359-4407-8e29-4841799bd3b9.vsidx b/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/64619b89-4359-4407-8e29-4841799bd3b9.vsidx new file mode 100644 index 0000000..1ef16a7 Binary files /dev/null and b/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/64619b89-4359-4407-8e29-4841799bd3b9.vsidx differ diff --git a/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/92556cfa-82df-492b-a9df-ff5a62fa3e25.vsidx b/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/92556cfa-82df-492b-a9df-ff5a62fa3e25.vsidx new file mode 100644 index 0000000..3aa7a6e Binary files /dev/null and b/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/92556cfa-82df-492b-a9df-ff5a62fa3e25.vsidx differ diff --git a/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/fe2a6bfd-3ec2-45bc-9519-068d9e34aff0.vsidx b/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/fe2a6bfd-3ec2-45bc-9519-068d9e34aff0.vsidx new file mode 100644 index 0000000..3a3448b Binary files /dev/null and b/.vs/LonglslandExhibitionCenterAPI/FileContentIndex/fe2a6bfd-3ec2-45bc-9519-068d9e34aff0.vsidx differ diff --git a/.vs/LonglslandExhibitionCenterAPI/v17/.suo b/.vs/LonglslandExhibitionCenterAPI/v17/.suo index e0c91a0..23f066f 100644 Binary files a/.vs/LonglslandExhibitionCenterAPI/v17/.suo and b/.vs/LonglslandExhibitionCenterAPI/v17/.suo differ diff --git a/.vs/LonglslandExhibitionCenterAPI/v17/HierarchyCache.v1.txt b/.vs/LonglslandExhibitionCenterAPI/v17/HierarchyCache.v1.txt index 3aec915..5677602 100644 Binary files a/.vs/LonglslandExhibitionCenterAPI/v17/HierarchyCache.v1.txt and b/.vs/LonglslandExhibitionCenterAPI/v17/HierarchyCache.v1.txt differ diff --git a/DataService/BLL/electricity_month.cs b/DataService/BLL/electricity_month.cs new file mode 100644 index 0000000..92e1661 --- /dev/null +++ b/DataService/BLL/electricity_month.cs @@ -0,0 +1,179 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* electricity_month.cs +* +* 功 能: N/A +* 类 名: electricity_month +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/8/16 14:46:53 N/A 初版 +* +* Copyright (c) 2012 Maticsoft Corporation. All rights reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 版权所有:动软卓越(北京)科技有限公司              │ +*└──────────────────────────────────┘ +*/ +using System; +using System.Data; +using System.Collections.Generic; +using Maticsoft.Common; +using DataService.Model; +namespace DataService.BLL +{ + /// + /// electricity_month + /// + public partial class electricity_month + { + private readonly DataService.DAL.electricity_month dal=new DataService.DAL.electricity_month(); + public electricity_month() + {} + #region BasicMethod + /// + /// 是否存在该记录 + /// + public bool Exists(string MonthId) + { + return dal.Exists(MonthId); + } + + /// + /// 增加一条数据 + /// + public bool Add(DataService.Model.electricity_month model) + { + return dal.Add(model); + } + + /// + /// 更新一条数据 + /// + public bool Update(DataService.Model.electricity_month model) + { + return dal.Update(model); + } + + /// + /// 删除一条数据 + /// + public bool Delete(string MonthId) + { + + return dal.Delete(MonthId); + } + /// + /// 删除一条数据 + /// + public bool DeleteList(string MonthIdlist ) + { + return dal.DeleteList(MonthIdlist ); + } + + /// + /// 得到一个对象实体 + /// + public DataService.Model.electricity_month GetModel(string MonthId) + { + + return dal.GetModel(MonthId); + } + + /// + /// 得到一个对象实体,从缓存中 + /// + public DataService.Model.electricity_month GetModelByCache(string MonthId) + { + + string CacheKey = "electricity_monthModel-" + MonthId; + object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey); + if (objModel == null) + { + try + { + objModel = dal.GetModel(MonthId); + if (objModel != null) + { + int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache"); + Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero); + } + } + catch{} + } + return (DataService.Model.electricity_month)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) + { + DataService.Model.electricity_month 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 + + #endregion ExtensionMethod + } +} + diff --git a/DataService/BLL/electricity_rate.cs b/DataService/BLL/electricity_rate.cs index 8ee2fc7..258a842 100644 --- a/DataService/BLL/electricity_rate.cs +++ b/DataService/BLL/electricity_rate.cs @@ -6,7 +6,7 @@ * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── -* V0.01 2024/2/27 11:02:52 N/A 初版 +* V0.01 2024/8/16 13:52:17 N/A 初版 * * Copyright (c) 2012 Maticsoft Corporation. All rights reserved. *┌──────────────────────────────────┐ diff --git a/DataService/DAL/electricity_month.cs b/DataService/DAL/electricity_month.cs new file mode 100644 index 0000000..c85a36f --- /dev/null +++ b/DataService/DAL/electricity_month.cs @@ -0,0 +1,382 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* electricity_month.cs +* +* 功 能: N/A +* 类 名: electricity_month +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/8/16 14:46:53 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 DataService.DAL +{ + /// + /// 数据访问类:electricity_month + /// + public partial class electricity_month + { + public electricity_month() + {} + #region BasicMethod + + /// + /// 是否存在该记录 + /// + public bool Exists(string MonthId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select count(1) from electricity_month"); + strSql.Append(" where MonthId=@MonthId "); + MySqlParameter[] parameters = { + new MySqlParameter("@MonthId", MySqlDbType.VarChar,32) }; + parameters[0].Value = MonthId; + + return DbHelperMySQL.Exists(strSql.ToString(),parameters); + } + + + /// + /// 增加一条数据 + /// + public bool Add(DataService.Model.electricity_month model) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into electricity_month("); + strSql.Append("MonthId,Needle,Peak,Flat,Grain,Deep,EntireTime,CreateTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5)"); + strSql.Append(" values ("); + strSql.Append("@MonthId,@Needle,@Peak,@Flat,@Grain,@Deep,@EntireTime,@CreateTime,@Reserve1,@Reserve2,@Reserve3,@Reserve4,@Reserve5)"); + MySqlParameter[] parameters = { + new MySqlParameter("@MonthId", MySqlDbType.VarChar,32), + new MySqlParameter("@Needle", MySqlDbType.VarChar,255), + new MySqlParameter("@Peak", MySqlDbType.VarChar,255), + new MySqlParameter("@Flat", MySqlDbType.VarChar,255), + new MySqlParameter("@Grain", MySqlDbType.VarChar,255), + new MySqlParameter("@Deep", MySqlDbType.VarChar,255), + new MySqlParameter("@EntireTime", MySqlDbType.DateTime), + new MySqlParameter("@CreateTime", 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.MonthId; + parameters[1].Value = model.Needle; + parameters[2].Value = model.Peak; + parameters[3].Value = model.Flat; + parameters[4].Value = model.Grain; + parameters[5].Value = model.Deep; + parameters[6].Value = model.EntireTime; + parameters[7].Value = model.CreateTime; + parameters[8].Value = model.Reserve1; + parameters[9].Value = model.Reserve2; + parameters[10].Value = model.Reserve3; + parameters[11].Value = model.Reserve4; + parameters[12].Value = model.Reserve5; + + int rows=DbHelperMySQL.ExecuteSql(strSql.ToString(),parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + /// + /// 更新一条数据 + /// + public bool Update(DataService.Model.electricity_month model) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("update electricity_month set "); + strSql.Append("Needle=@Needle,"); + strSql.Append("Peak=@Peak,"); + strSql.Append("Flat=@Flat,"); + strSql.Append("Grain=@Grain,"); + strSql.Append("Deep=@Deep,"); + strSql.Append("EntireTime=@EntireTime,"); + strSql.Append("CreateTime=@CreateTime,"); + strSql.Append("Reserve1=@Reserve1,"); + strSql.Append("Reserve2=@Reserve2,"); + strSql.Append("Reserve3=@Reserve3,"); + strSql.Append("Reserve4=@Reserve4,"); + strSql.Append("Reserve5=@Reserve5"); + strSql.Append(" where MonthId=@MonthId "); + MySqlParameter[] parameters = { + new MySqlParameter("@Needle", MySqlDbType.VarChar,255), + new MySqlParameter("@Peak", MySqlDbType.VarChar,255), + new MySqlParameter("@Flat", MySqlDbType.VarChar,255), + new MySqlParameter("@Grain", MySqlDbType.VarChar,255), + new MySqlParameter("@Deep", MySqlDbType.VarChar,255), + new MySqlParameter("@EntireTime", MySqlDbType.DateTime), + new MySqlParameter("@CreateTime", 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("@MonthId", MySqlDbType.VarChar,32)}; + parameters[0].Value = model.Needle; + parameters[1].Value = model.Peak; + parameters[2].Value = model.Flat; + parameters[3].Value = model.Grain; + parameters[4].Value = model.Deep; + parameters[5].Value = model.EntireTime; + parameters[6].Value = model.CreateTime; + parameters[7].Value = model.Reserve1; + parameters[8].Value = model.Reserve2; + parameters[9].Value = model.Reserve3; + parameters[10].Value = model.Reserve4; + parameters[11].Value = model.Reserve5; + parameters[12].Value = model.MonthId; + + int rows=DbHelperMySQL.ExecuteSql(strSql.ToString(),parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + + /// + /// 删除一条数据 + /// + public bool Delete(string MonthId) + { + + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete from electricity_month "); + strSql.Append(" where MonthId=@MonthId "); + MySqlParameter[] parameters = { + new MySqlParameter("@MonthId", MySqlDbType.VarChar,32) }; + parameters[0].Value = MonthId; + + int rows=DbHelperMySQL.ExecuteSql(strSql.ToString(),parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + /// + /// 批量删除数据 + /// + public bool DeleteList(string MonthIdlist ) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete from electricity_month "); + strSql.Append(" where MonthId in ("+MonthIdlist + ") "); + int rows=DbHelperMySQL.ExecuteSql(strSql.ToString()); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + + + /// + /// 得到一个对象实体 + /// + public DataService.Model.electricity_month GetModel(string MonthId) + { + + StringBuilder strSql=new StringBuilder(); + strSql.Append("select MonthId,Needle,Peak,Flat,Grain,Deep,EntireTime,CreateTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 from electricity_month "); + strSql.Append(" where MonthId=@MonthId "); + MySqlParameter[] parameters = { + new MySqlParameter("@MonthId", MySqlDbType.VarChar,32) }; + parameters[0].Value = MonthId; + + DataService.Model.electricity_month model=new DataService.Model.electricity_month(); + 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 DataService.Model.electricity_month DataRowToModel(DataRow row) + { + DataService.Model.electricity_month model=new DataService.Model.electricity_month(); + if (row != null) + { + if(row["MonthId"]!=null) + { + model.MonthId=row["MonthId"].ToString(); + } + if(row["Needle"]!=null) + { + model.Needle=row["Needle"].ToString(); + } + if(row["Peak"]!=null) + { + model.Peak=row["Peak"].ToString(); + } + if(row["Flat"]!=null) + { + model.Flat=row["Flat"].ToString(); + } + if(row["Grain"]!=null) + { + model.Grain=row["Grain"].ToString(); + } + if(row["Deep"]!=null) + { + model.Deep=row["Deep"].ToString(); + } + if(row["EntireTime"]!=null && row["EntireTime"].ToString()!="") + { + model.EntireTime=DateTime.Parse(row["EntireTime"].ToString()); + } + if(row["CreateTime"]!=null && row["CreateTime"].ToString()!="") + { + model.CreateTime=DateTime.Parse(row["CreateTime"].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 MonthId,Needle,Peak,Flat,Grain,Deep,EntireTime,CreateTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 "); + strSql.Append(" FROM electricity_month "); + 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_month "); + if(strWhere.Trim()!="") + { + strSql.Append(" where "+strWhere); + } + object obj = DbHelperMySQL.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.MonthId desc"); + } + strSql.Append(")AS Row, T.* from electricity_month 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_month"; + parameters[1].Value = "MonthId"; + 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 + + #endregion ExtensionMethod + } +} + diff --git a/DataService/DAL/electricity_rate.cs b/DataService/DAL/electricity_rate.cs index a665b8f..7163491 100644 --- a/DataService/DAL/electricity_rate.cs +++ b/DataService/DAL/electricity_rate.cs @@ -6,7 +6,7 @@ * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── -* V0.01 2024/2/27 11:02:52 N/A 初版 +* V0.01 2024/8/16 13:52:17 N/A 初版 * * Copyright (c) 2012 Maticsoft Corporation. All rights reserved. *┌──────────────────────────────────┐ @@ -53,30 +53,36 @@ namespace DataService.DAL { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into electricity_rate("); - strSql.Append("ElectricityId,Electricity,Electrovalence,CreateTime,EntireTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5)"); + strSql.Append("ElectricityId,Year,Month,StartPeriodTime,EndPeriodTime,Type,UnitPrice,CreateTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5)"); strSql.Append(" values ("); - strSql.Append("@ElectricityId,@Electricity,@Electrovalence,@CreateTime,@EntireTime,@Reserve1,@Reserve2,@Reserve3,@Reserve4,@Reserve5)"); + strSql.Append("@ElectricityId,@Year,@Month,@StartPeriodTime,@EndPeriodTime,@Type,@UnitPrice,@CreateTime,@Reserve1,@Reserve2,@Reserve3,@Reserve4,@Reserve5)"); MySqlParameter[] parameters = { new MySqlParameter("@ElectricityId", MySqlDbType.VarChar,255), - new MySqlParameter("@Electricity", MySqlDbType.Float,255), - new MySqlParameter("@Electrovalence", MySqlDbType.Float,255), + new MySqlParameter("@Year", MySqlDbType.Int32), + new MySqlParameter("@Month", MySqlDbType.Int32), + new MySqlParameter("@StartPeriodTime", MySqlDbType.VarChar,255), + new MySqlParameter("@EndPeriodTime", MySqlDbType.VarChar,255), + new MySqlParameter("@Type", MySqlDbType.VarChar,255), + new MySqlParameter("@UnitPrice", MySqlDbType.Decimal,10), 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.Electricity; - parameters[2].Value = model.Electrovalence; - parameters[3].Value = model.CreateTime; - parameters[4].Value = model.EntireTime; - parameters[5].Value = model.Reserve1; - parameters[6].Value = model.Reserve2; - parameters[7].Value = model.Reserve3; - parameters[8].Value = model.Reserve4; - parameters[9].Value = model.Reserve5; + parameters[1].Value = model.Year; + parameters[2].Value = model.Month; + parameters[3].Value = model.StartPeriodTime; + parameters[4].Value = model.EndPeriodTime; + parameters[5].Value = model.Type; + parameters[6].Value = model.UnitPrice; + parameters[7].Value = model.CreateTime; + parameters[8].Value = model.Reserve1; + parameters[9].Value = model.Reserve2; + parameters[10].Value = model.Reserve3; + parameters[11].Value = model.Reserve4; + parameters[12].Value = model.Reserve5; int rows=DbHelperMySQL.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) @@ -95,10 +101,13 @@ namespace DataService.DAL { StringBuilder strSql=new StringBuilder(); strSql.Append("update electricity_rate set "); - strSql.Append("Electricity=@Electricity,"); - strSql.Append("Electrovalence=@Electrovalence,"); + strSql.Append("Year=@Year,"); + strSql.Append("Month=@Month,"); + strSql.Append("StartPeriodTime=@StartPeriodTime,"); + strSql.Append("EndPeriodTime=@EndPeriodTime,"); + strSql.Append("Type=@Type,"); + strSql.Append("UnitPrice=@UnitPrice,"); strSql.Append("CreateTime=@CreateTime,"); - strSql.Append("EntireTime=@EntireTime,"); strSql.Append("Reserve1=@Reserve1,"); strSql.Append("Reserve2=@Reserve2,"); strSql.Append("Reserve3=@Reserve3,"); @@ -106,26 +115,32 @@ namespace DataService.DAL strSql.Append("Reserve5=@Reserve5"); strSql.Append(" where ElectricityId=@ElectricityId "); MySqlParameter[] parameters = { - new MySqlParameter("@Electricity", MySqlDbType.Float,255), - new MySqlParameter("@Electrovalence", MySqlDbType.Float,255), + new MySqlParameter("@Year", MySqlDbType.Int32), + new MySqlParameter("@Month", MySqlDbType.Int32), + new MySqlParameter("@StartPeriodTime", MySqlDbType.VarChar,255), + new MySqlParameter("@EndPeriodTime", MySqlDbType.VarChar,255), + new MySqlParameter("@Type", MySqlDbType.VarChar,255), + new MySqlParameter("@UnitPrice", MySqlDbType.Decimal,10), 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.Electricity; - parameters[1].Value = model.Electrovalence; - parameters[2].Value = model.CreateTime; - parameters[3].Value = model.EntireTime; - parameters[4].Value = model.Reserve1; - parameters[5].Value = model.Reserve2; - parameters[6].Value = model.Reserve3; - parameters[7].Value = model.Reserve4; - parameters[8].Value = model.Reserve5; - parameters[9].Value = model.ElectricityId; + parameters[0].Value = model.Year; + parameters[1].Value = model.Month; + parameters[2].Value = model.StartPeriodTime; + parameters[3].Value = model.EndPeriodTime; + parameters[4].Value = model.Type; + parameters[5].Value = model.UnitPrice; + parameters[6].Value = model.CreateTime; + parameters[7].Value = model.Reserve1; + parameters[8].Value = model.Reserve2; + parameters[9].Value = model.Reserve3; + parameters[10].Value = model.Reserve4; + parameters[11].Value = model.Reserve5; + parameters[12].Value = model.ElectricityId; int rows=DbHelperMySQL.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) @@ -188,7 +203,7 @@ namespace DataService.DAL { StringBuilder strSql=new StringBuilder(); - strSql.Append("select ElectricityId,Electricity,Electrovalence,CreateTime,EntireTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 from electricity_rate "); + strSql.Append("select ElectricityId,Year,Month,StartPeriodTime,EndPeriodTime,Type,UnitPrice,CreateTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 from electricity_rate "); strSql.Append(" where ElectricityId=@ElectricityId "); MySqlParameter[] parameters = { new MySqlParameter("@ElectricityId", MySqlDbType.VarChar,255) }; @@ -219,22 +234,34 @@ namespace DataService.DAL { model.ElectricityId=row["ElectricityId"].ToString(); } - if(row["Electricity"]!=null && row["Electricity"].ToString()!="") + if(row["Year"]!=null && row["Year"].ToString()!="") { - model.Electricity=decimal.Parse(row["Electricity"].ToString()); + model.Year=int.Parse(row["Year"].ToString()); } - if(row["Electrovalence"]!=null && row["Electrovalence"].ToString()!="") + if(row["Month"]!=null && row["Month"].ToString()!="") { - model.Electrovalence=decimal.Parse(row["Electrovalence"].ToString()); + model.Month=int.Parse(row["Month"].ToString()); + } + if(row["StartPeriodTime"]!=null) + { + model.StartPeriodTime=row["StartPeriodTime"].ToString(); + } + if(row["EndPeriodTime"]!=null) + { + model.EndPeriodTime=row["EndPeriodTime"].ToString(); + } + if(row["Type"]!=null) + { + model.Type=row["Type"].ToString(); + } + if(row["UnitPrice"]!=null && row["UnitPrice"].ToString()!="") + { + model.UnitPrice=decimal.Parse(row["UnitPrice"].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(); @@ -265,7 +292,7 @@ namespace DataService.DAL public DataSet GetList(string strWhere) { StringBuilder strSql=new StringBuilder(); - strSql.Append("select ElectricityId,Electricity,Electrovalence,CreateTime,EntireTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 "); + strSql.Append("select ElectricityId,Year,Month,StartPeriodTime,EndPeriodTime,Type,UnitPrice,CreateTime,Reserve1,Reserve2,Reserve3,Reserve4,Reserve5 "); strSql.Append(" FROM electricity_rate "); if(strWhere.Trim()!="") { @@ -285,7 +312,7 @@ namespace DataService.DAL { strSql.Append(" where "+strWhere); } - object obj = DbHelperSQL.GetSingle(strSql.ToString()); + object obj = DbHelperMySQL.GetSingle(strSql.ToString()); if (obj == null) { return 0; diff --git a/DataService/DataService.csproj b/DataService/DataService.csproj index a559ff4..98dd65b 100644 --- a/DataService/DataService.csproj +++ b/DataService/DataService.csproj @@ -100,6 +100,7 @@ + @@ -110,6 +111,7 @@ + @@ -120,6 +122,7 @@ + diff --git a/DataService/Model/electricity_month.cs b/DataService/Model/electricity_month.cs new file mode 100644 index 0000000..559a5b5 --- /dev/null +++ b/DataService/Model/electricity_month.cs @@ -0,0 +1,150 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* electricity_month.cs +* +* 功 能: N/A +* 类 名: electricity_month +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/8/16 14:46:53 N/A 初版 +* +* Copyright (c) 2012 Maticsoft Corporation. All rights reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 版权所有:动软卓越(北京)科技有限公司              │ +*└──────────────────────────────────┘ +*/ +using System; +namespace DataService.Model +{ + /// + /// electricity_month:实体类(属性说明自动提取数据库字段的描述信息) + /// + [Serializable] + public partial class electricity_month + { + public electricity_month() + {} + #region Model + private string _monthid; + private string _needle; + private string _peak; + private string _flat; + private string _grain; + private string _deep; + private DateTime? _entiretime; + private DateTime? _createtime; + private string _reserve1; + private string _reserve2; + private string _reserve3; + private string _reserve4; + private string _reserve5; + /// + /// + /// + public string MonthId + { + set{ _monthid=value;} + get{return _monthid;} + } + /// + /// + /// + public string Needle + { + set{ _needle=value;} + get{return _needle;} + } + /// + /// + /// + public string Peak + { + set{ _peak=value;} + get{return _peak;} + } + /// + /// + /// + public string Flat + { + set{ _flat=value;} + get{return _flat;} + } + /// + /// + /// + public string Grain + { + set{ _grain=value;} + get{return _grain;} + } + /// + /// + /// + public string Deep + { + set{ _deep=value;} + get{return _deep;} + } + /// + /// + /// + public DateTime? EntireTime + { + set{ _entiretime=value;} + get{return _entiretime;} + } + /// + /// + /// + public DateTime? CreateTime + { + set{ _createtime=value;} + get{return _createtime;} + } + /// + /// + /// + 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/DataService/Model/electricity_rate.cs b/DataService/Model/electricity_rate.cs index e2d1b78..fbc146f 100644 --- a/DataService/Model/electricity_rate.cs +++ b/DataService/Model/electricity_rate.cs @@ -6,7 +6,7 @@ * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── -* V0.01 2024/2/27 11:02:52 N/A 初版 +* V0.01 2024/8/16 13:52:17 N/A 初版 * * Copyright (c) 2012 Maticsoft Corporation. All rights reserved. *┌──────────────────────────────────┐ @@ -27,10 +27,13 @@ namespace DataService.Model {} #region Model private string _electricityid; - private decimal? _electricity; - private decimal? _electrovalence; - private DateTime? _createtime; - private DateTime? _entiretime; + private int _year; + private int _month; + private string _startperiodtime; + private string _endperiodtime; + private string _type; + private decimal _unitprice; + private DateTime _createtime; private string _reserve1; private string _reserve2; private string _reserve3; @@ -47,23 +50,55 @@ namespace DataService.Model /// /// /// - public decimal? Electricity + public int Year { - set{ _electricity=value;} - get{return _electricity;} + set{ _year=value;} + get{return _year;} } /// /// /// - public decimal? Electrovalence + public int Month { - set{ _electrovalence=value;} - get{return _electrovalence;} + set{ _month=value;} + get{return _month;} } /// /// /// - public DateTime? CreateTime + public string StartPeriodTime + { + set{ _startperiodtime=value;} + get{return _startperiodtime;} + } + /// + /// + /// + public string EndPeriodTime + { + set{ _endperiodtime=value;} + get{return _endperiodtime;} + } + /// + /// + /// + public string Type + { + set{ _type=value;} + get{return _type;} + } + /// + /// + /// + public decimal UnitPrice + { + set{ _unitprice=value;} + get{return _unitprice;} + } + /// + /// + /// + public DateTime CreateTime { set{ _createtime=value;} get{return _createtime;} @@ -71,14 +106,6 @@ namespace DataService.Model /// /// /// - public DateTime? EntireTime - { - set{ _entiretime=value;} - get{return _entiretime;} - } - /// - /// - /// public string Reserve1 { set{ _reserve1=value;} diff --git a/DataService/bin/Debug/DataService.dll b/DataService/bin/Debug/DataService.dll index 2a6363f..b7005af 100644 Binary files a/DataService/bin/Debug/DataService.dll and b/DataService/bin/Debug/DataService.dll differ diff --git a/DataService/bin/Debug/DataService.pdb b/DataService/bin/Debug/DataService.pdb index cc59960..9188ce0 100644 Binary files a/DataService/bin/Debug/DataService.pdb and b/DataService/bin/Debug/DataService.pdb differ diff --git a/DataService/obj/Debug/DataService.csproj.AssemblyReference.cache b/DataService/obj/Debug/DataService.csproj.AssemblyReference.cache index 4564352..067b899 100644 Binary files a/DataService/obj/Debug/DataService.csproj.AssemblyReference.cache and b/DataService/obj/Debug/DataService.csproj.AssemblyReference.cache differ diff --git a/DataService/obj/Debug/DataService.csproj.CoreCompileInputs.cache b/DataService/obj/Debug/DataService.csproj.CoreCompileInputs.cache index 445ea9c..a77de64 100644 --- a/DataService/obj/Debug/DataService.csproj.CoreCompileInputs.cache +++ b/DataService/obj/Debug/DataService.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -c735eafae718d0a8c51f33001640292d7013548a +8115d22ce0987464b4213cebd23b789f40e0ead7 diff --git a/DataService/obj/Debug/DataService.csproj.FileListAbsolute.txt b/DataService/obj/Debug/DataService.csproj.FileListAbsolute.txt index fb3885b..bb591ca 100644 --- a/DataService/obj/Debug/DataService.csproj.FileListAbsolute.txt +++ b/DataService/obj/Debug/DataService.csproj.FileListAbsolute.txt @@ -18,3 +18,13 @@ E:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debu E:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debug\DataService.csproj.CopyComplete E:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debug\DataService.dll E:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debug\DataService.pdb +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\bin\Debug\DataService.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\bin\Debug\DataService.pdb +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\bin\Debug\Maticsoft.Common.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\bin\Debug\Maticsoft.DBUtility.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\bin\Debug\MySql.Data.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debug\DataService.csproj.AssemblyReference.cache +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debug\DataService.csproj.CoreCompileInputs.cache +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debug\DataService.csproj.CopyComplete +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debug\DataService.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\DataService\obj\Debug\DataService.pdb diff --git a/DataService/obj/Debug/DataService.dll b/DataService/obj/Debug/DataService.dll index 2a6363f..b7005af 100644 Binary files a/DataService/obj/Debug/DataService.dll and b/DataService/obj/Debug/DataService.dll differ diff --git a/DataService/obj/Debug/DataService.pdb b/DataService/obj/Debug/DataService.pdb index cc59960..9188ce0 100644 Binary files a/DataService/obj/Debug/DataService.pdb and b/DataService/obj/Debug/DataService.pdb differ diff --git a/DataService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/DataService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 2b2fc8f..8172f52 100644 Binary files a/DataService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/DataService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/DataService/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/DataService/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..b36a757 Binary files /dev/null and b/DataService/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/LonglslandExhibitionCenter/Controllers/api/GetElectricityRateController.cs b/LonglslandExhibitionCenter/Controllers/api/GetElectricityRateController.cs index 25cf9e5..b0e9fba 100644 --- a/LonglslandExhibitionCenter/Controllers/api/GetElectricityRateController.cs +++ b/LonglslandExhibitionCenter/Controllers/api/GetElectricityRateController.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Configuration; using System.Linq; using System.Net; using System.Net.Http; @@ -15,28 +16,274 @@ namespace LonglslandExhibitionCenter.Controllers.api /// public class GetElectricityRateController : ApiController { - DataService.BLL.electricity_rate bll = new DataService.BLL.electricity_rate(); + DataService.BLL.electricity_rate rate_bll = new DataService.BLL.electricity_rate(); + + DataService.BLL.electricity_data bll = new DataService.BLL.electricity_data(); + + DataService.BLL.electricity_month month_bll = new DataService.BLL.electricity_month(); + public HttpResponseMessage Get() { var res = new get_electricity_rate(); try { - var data=new List(); - var now=DateTime.Now; - var list = bll.GetModelList(""); - var time_count=Convert.ToInt32(now.Month); - for (int i = 0; i < time_count; i++) + var date_base = ConfigurationManager.AppSettings["MySQLDataBase"].ToString(); + var data = new List(); + var now = DateTime.Now; + + var year = now.Year; + var rate_list = rate_bll.GetModelList(string.Format(" Year='{0}' ", year)); + + var list = new List(); + // 查询电表数据 + var startDate = DateTime.Parse(now.ToString("yyyy-01-01")); + var endDate = DateTime.Parse(now.ToString("yyyy-MM-dd HH:00:00")); + + var month_list = month_bll.GetModelList(string.Format(" `EntireTime`>='{0}' AND `EntireTime`<='{1}' ", startDate, endDate)); + + // 处理跨月情况 + var time_count = GetUsedMonth1("月", startDate, endDate); + for (int i = 0; i <= time_count; i++) { - var model = new electricity_rateData() + var time = startDate.AddMonths(i).ToString("yyyyMM"); + if (bll.IsExistsTable(date_base, "electricity_data_" + time)) { - time = now.AddMonths(-i).ToString("MM月"), - Electricity = list.Sum(x => x.Electricity), - Electrovalence = list.Sum(x => x.Electrovalence), - }; - data.Add(model); + var queryData = bll.GetModelListDate(string.Format(" Reserve1='配电室低压' and `EntireTime`>='{0}' AND `EntireTime`<='{1}' ", startDate, endDate), time); + list.AddRange(queryData); + } } - var adata=data.OrderBy(x=>x.time).ToList(); - res.code= 200; + + var month_count = Convert.ToInt32(now.Month); + for (int i = 0; i < month_count; i++) + { + var month = startDate.AddMonths(i); + var next_month = startDate.AddMonths(i + 1); + //当前月 + if (month.ToString("yyyy-MM") == now.ToString("yyyy-MM")) + { + var data_model = new electricity_rateData(); + data_model.time = month.ToString("MM月"); + data_model.Electricity = 0; + data_model.Electrovalence = 0; + + decimal? Needle = 0; + decimal? Peak = 0; + decimal? Flat = 0; + decimal? Grain = 0; + decimal? Deep = 0; + + decimal? NeedlePrice = 0; + decimal? PeakPrice = 0; + decimal? FlatPrice = 0; + decimal? GrainPrice = 0; + decimal? DeepPrice = 0; + + var day_count = (next_month - month).TotalDays; + //循环月里的每一天 + for (int day = 0; day < day_count; day++) + { + var current_day = month.AddDays(day); + if (current_day > now) + { + break; + } + // 遍历24小时 + for (int hour = 0; hour < 24; hour++) + { + var start_hour = current_day.AddHours(hour); + if (start_hour.ToString("yyyy-MM-dd HH:00:00") == now.AddHours(-1).ToString("yyyy-MM-dd HH:00:00")) + { + break; + } + var end_hour = current_day.AddHours(hour + 1); + var start_eh = list.Where(a => a.EntireTime == start_hour).Sum(a => a.EH); + var end_eh = list.Where(a => a.EntireTime == end_hour).Sum(a => a.EH); + var eh = end_eh - start_eh; + var rate_model = rate_list.Where(a => a.Month == start_hour.Month && DateTime.Parse(a.StartPeriodTime).ToString("HH:mm:ss") == start_hour.ToString("HH:mm:ss")).FirstOrDefault(); + if (rate_model != null) + { + if (rate_model.Type == "尖") + { + Needle += eh; + NeedlePrice = rate_model.UnitPrice; + } + else if (rate_model.Type == "峰") + { + Peak += eh; + PeakPrice = rate_model.UnitPrice; + } + else if (rate_model.Type == "平") + { + Flat += eh; + FlatPrice = rate_model.UnitPrice; + } + else if (rate_model.Type == "谷") + { + Grain += eh; + GrainPrice = rate_model.UnitPrice; + } + else if (rate_model.Type == "深") + { + Deep += eh; + DeepPrice = rate_model.UnitPrice; + } + } + } + } + + data_model.Electricity = Math.Round(Convert.ToDecimal((Needle * NeedlePrice) + (Peak * PeakPrice) + (Flat * FlatPrice) + (Grain * GrainPrice) + (Deep * DeepPrice)), 8); + var total = (Needle + Peak + Flat + Grain + Deep); + if (total > 0) + { + data_model.Electrovalence = Math.Round(Convert.ToDecimal(data_model.Electricity / total), 8); + } + data.Add(data_model); + } + else + { + var month_model = month_list.Where(a => a.EntireTime == month).FirstOrDefault(); + if (month_model != null) + { + var model = new electricity_rateData() + { + time = month.ToString("MM月"), + Electricity = 0, + Electrovalence = 0 + }; + + decimal? Needle = Convert.ToDecimal(month_model.Needle); + decimal? Peak = Convert.ToDecimal(month_model.Peak); + decimal? Flat = Convert.ToDecimal(month_model.Flat); + decimal? Grain = Convert.ToDecimal(month_model.Grain); + decimal? Deep = Convert.ToDecimal(month_model.Deep); + + decimal? NeedlePrice = 0; + decimal? PeakPrice = 0; + decimal? FlatPrice = 0; + decimal? GrainPrice = 0; + decimal? DeepPrice = 0; + var rate_model1 = rate_list.Where(a => a.Month == month.Month && a.Type == "尖").FirstOrDefault(); + if (rate_model1 != null) + { + NeedlePrice = rate_model1.UnitPrice; + } + var rate_model2 = rate_list.Where(a => a.Month == month.Month && a.Type == "峰").FirstOrDefault(); + if (rate_model2 != null) + { + PeakPrice = rate_model2.UnitPrice; + } + var rate_model3 = rate_list.Where(a => a.Month == month.Month && a.Type == "平").FirstOrDefault(); + if (rate_model3 != null) + { + FlatPrice = rate_model3.UnitPrice; + } + var rate_model4 = rate_list.Where(a => a.Month == month.Month && a.Type == "谷").FirstOrDefault(); + if (rate_model4 != null) + { + GrainPrice = rate_model4.UnitPrice; + } + var rate_model5 = rate_list.Where(a => a.Month == month.Month && a.Type == "深").FirstOrDefault(); + if (rate_model5 != null) + { + DeepPrice = rate_model5.UnitPrice; + } + + model.Electricity = Math.Round(Convert.ToDecimal((Needle * NeedlePrice) + (Peak * PeakPrice) + (Flat * FlatPrice) + (Grain * GrainPrice) + (Deep * DeepPrice)), 8); + var total = (Needle + Peak + Flat + Grain + Deep); + if (total > 0) + { + model.Electrovalence = Math.Round(Convert.ToDecimal(model.Electricity / total), 8); + } + data.Add(model); + } + else + { + var data_model = new electricity_rateData(); + data_model.time = month.ToString("MM月"); + data_model.Electricity = 0; + data_model.Electrovalence = 0; + + decimal? Needle = 0; + decimal? Peak = 0; + decimal? Flat = 0; + decimal? Grain = 0; + decimal? Deep = 0; + + decimal? NeedlePrice = 0; + decimal? PeakPrice = 0; + decimal? FlatPrice = 0; + decimal? GrainPrice = 0; + decimal? DeepPrice = 0; + + var day_count = (next_month - month).TotalDays; + //循环月里的每一天 + for (int day = 0; day < day_count; day++) + { + var current_day = month.AddDays(day); + // 遍历24小时 + for (int hour = 0; hour < 24; hour++) + { + var start_hour = current_day.AddHours(hour); + var end_hour = current_day.AddHours(hour + 1); + var start_eh = list.Where(a => a.EntireTime == start_hour).Sum(a => a.EH); + var end_eh = list.Where(a => a.EntireTime == end_hour).Sum(a => a.EH); + var eh = end_eh - start_eh; + var rate_model = rate_list.Where(a => a.Month == start_hour.Month && DateTime.Parse(a.StartPeriodTime).ToString("HH:mm:ss") == start_hour.ToString("HH:mm:ss")).FirstOrDefault(); + if (rate_model != null) + { + if (rate_model.Type == "尖") + { + Needle += eh; + NeedlePrice = rate_model.UnitPrice; + } + else if (rate_model.Type == "峰") + { + Peak += eh; + PeakPrice = rate_model.UnitPrice; + } + else if (rate_model.Type == "平") + { + Flat += eh; + FlatPrice = rate_model.UnitPrice; + } + else if (rate_model.Type == "谷") + { + Grain += eh; + GrainPrice = rate_model.UnitPrice; + } + else if (rate_model.Type == "深") + { + Deep += eh; + DeepPrice = rate_model.UnitPrice; + } + } + } + } + + data_model.Electricity = Math.Round(Convert.ToDecimal((Needle * NeedlePrice) + (Peak * PeakPrice) + (Flat * FlatPrice) + (Grain * GrainPrice) + (Deep * DeepPrice)), 8); + var total = (Needle + Peak + Flat + Grain + Deep); + if (total > 0) + { + data_model.Electrovalence = Math.Round(Convert.ToDecimal(data_model.Electricity / total), 8); + } + data.Add(data_model); + + month_bll.Add(new DataService.Model.electricity_month() + { + MonthId = Guid.NewGuid().ToString("N"), + Needle = Needle.ToString(), + Peak = Peak.ToString(), + Flat = Flat.ToString(), + Grain = Grain.ToString(), + Deep = Deep.ToString(), + CreateTime = now, + EntireTime = month + }); + } + } + } + var adata = data.OrderBy(x => x.time).ToList(); + res.code = 200; res.msg = "成功"; res.data = adata; } @@ -48,5 +295,34 @@ namespace LonglslandExhibitionCenter.Controllers.api HttpResponseMessage result = new HttpResponseMessage { Content = new StringContent(JsonConvert.SerializeObject(res), Encoding.GetEncoding("UTF-8"), "application/json") }; return result; } + + /// + /// 计算两个时间年份月份差 + /// + /// + private int GetUsedMonth1(string type, DateTime dynamicTime, DateTime currentDate) + { + try + { + int year = currentDate.Year - dynamicTime.Year; //相差的年份 + int month = (currentDate.Year - dynamicTime.Year) * 12 + (currentDate.Month - dynamicTime.Month); //相差的月份 + //int month1 = currentDate.Year * 12 + currentDate.Month - dynamicTime.Year * 12 - dynamicTime.Month; //相差的月份 + + TimeSpan used = DateTime.Now - dynamicTime; + double totalDays = used.TotalDays; //相差总天数 + if (type == "年") + { + return Convert.ToInt32(year); + } + else + { + return Convert.ToInt32(month); + } + } + catch (Exception) + { + return 0; + } + } } } \ No newline at end of file diff --git a/LonglslandExhibitionCenter/Controllers/api/GetMultiRateController.cs b/LonglslandExhibitionCenter/Controllers/api/GetMultiRateController.cs index 2a32ed0..fb4041c 100644 --- a/LonglslandExhibitionCenter/Controllers/api/GetMultiRateController.cs +++ b/LonglslandExhibitionCenter/Controllers/api/GetMultiRateController.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Configuration; +using System.Drawing; using System.Linq; using System.Net; using System.Net.Http; @@ -17,8 +18,12 @@ namespace LonglslandExhibitionCenter.Controllers.api /// public class GetMultiRateController : ApiController { - DataService.BLL.multi_rate bll = new DataService.BLL.multi_rate(); - // GET api/ + DataService.BLL.electricity_rate rate_bll = new DataService.BLL.electricity_rate(); + + DataService.BLL.electricity_data bll = new DataService.BLL.electricity_data(); + + DataService.BLL.electricity_month month_bll = new DataService.BLL.electricity_month(); + public HttpResponseMessage Get(string date = "") { var res = new get_multi_rate(); @@ -26,58 +31,406 @@ namespace LonglslandExhibitionCenter.Controllers.api { if (!string.IsNullOrEmpty(date)) { + var date_base = ConfigurationManager.AppSettings["MySQLDataBase"].ToString(); var data = new List(); var now = DateTime.Now; - var list = bll.GetModelList(""); if (date == "日") { - var time_count = Convert.ToInt32(now.Day); - for (int i = 0; i < time_count; i++) + var year = now.Year; + var rate_list = rate_bll.GetModelList(string.Format(" Year='{0}' ", year)); + + var list = new List(); + // 查询电表数据 + var startDate = DateTime.Today.AddDays(-7); + var endDate = DateTime.Today; + + // 处理跨月情况 + var time_count = GetUsedMonth1("月", startDate, endDate); + for (int i = 0; i <= time_count; i++) { - var model = new multi_rateData() + var time = startDate.AddMonths(i).ToString("yyyyMM"); + if (bll.IsExistsTable(date_base, "electricity_data_" + time)) { - time = now.AddDays(-i).ToString("MM-dd"), - Needle = list.Sum(x => x.Needle), - Peak = list.Sum(x => x.Peak), - Flat = list.Sum(x => x.Flat), - Grain = list.Sum(x => x.Grain), - Deep = list.Sum(x => x.Deep), - }; - data.Add(model); + var queryData = bll.GetModelListDate(string.Format(" Reserve1='配电室低压' and `EntireTime`>='{0}' AND `EntireTime`<='{1}' ", startDate, endDate), time); + list.AddRange(queryData); + } + } + + // 处理跨月情况 + while (startDate < endDate) + { + var data_model = new multi_rateData(); + data_model.time = startDate.ToString("MM-dd"); + data_model.Needle = 0; + data_model.Peak = 0; + data_model.Flat = 0; + data_model.Grain = 0; + data_model.Deep = 0; + // 遍历24小时 + for (int hour = 0; hour < 24; hour++) + { + var start_hour = startDate.AddHours(hour); + var end_hour = startDate.AddHours(hour + 1); + var start_eh = list.Where(a => a.EntireTime == start_hour).Sum(a => a.EH); + var end_eh = list.Where(a => a.EntireTime == end_hour).Sum(a => a.EH); + var eh = end_eh - start_eh; + var rate_model = rate_list.Where(a => a.Month == start_hour.Month && DateTime.Parse(a.StartPeriodTime).ToString("HH:mm:ss") == start_hour.ToString("HH:mm:ss")).FirstOrDefault(); + if (rate_model != null) + { + if (rate_model.Type == "尖") + { + data_model.Needle += eh; + } + else if (rate_model.Type == "峰") + { + data_model.Peak += eh; + } + else if (rate_model.Type == "平") + { + data_model.Flat += eh; + } + else if (rate_model.Type == "谷") + { + data_model.Grain += eh; + } + else if (rate_model.Type == "深") + { + data_model.Deep += eh; + } + } + } + data.Add(data_model); + startDate = startDate.AddDays(1); } } if (date == "月") { - var time_count = Convert.ToInt32(now.Month); - for (int i = 0; i < time_count; i++) + var year = now.Year; + var rate_list = rate_bll.GetModelList(string.Format(" Year='{0}' ", year)); + + var list = new List(); + // 查询电表数据 + var startDate = DateTime.Parse(now.ToString("yyyy-01-01")); + var endDate = DateTime.Parse(now.ToString("yyyy-MM-dd HH:00:00")); + + var month_list = month_bll.GetModelList(string.Format(" `EntireTime`>='{0}' AND `EntireTime`<='{1}' ", startDate, endDate)); + + // 处理跨月情况 + var time_count = GetUsedMonth1("月", startDate, endDate); + for (int i = 0; i <= time_count; i++) { - var model = new multi_rateData() + var time = startDate.AddMonths(i).ToString("yyyyMM"); + if (bll.IsExistsTable(date_base, "electricity_data_" + time)) { - time = now.AddMonths(-i).ToString("MM月"), - Needle = list.Sum(x => x.Needle), - Peak = list.Sum(x => x.Peak), - Flat = list.Sum(x => x.Flat), - Grain = list.Sum(x => x.Grain), - Deep = list.Sum(x => x.Deep), - }; - data.Add(model); + var queryData = bll.GetModelListDate(string.Format(" Reserve1='配电室低压' and `EntireTime`>='{0}' AND `EntireTime`<='{1}' ", startDate, endDate), time); + list.AddRange(queryData); + } + } + + var month_count = Convert.ToInt32(now.Month); + for (int i = 0; i < month_count; i++) + { + var month = startDate.AddMonths(i); + var next_month = startDate.AddMonths(i + 1); + //当前月 + if (month.ToString("yyyy-MM") == now.ToString("yyyy-MM")) + { + var data_model = new multi_rateData(); + data_model.time = month.ToString("MM月"); + data_model.Needle = 0; + data_model.Peak = 0; + data_model.Flat = 0; + data_model.Grain = 0; + data_model.Deep = 0; + var day_count = (next_month - month).TotalDays; + //循环月里的每一天 + for (int day = 0; day < day_count; day++) + { + var current_day = month.AddDays(day); + if (current_day > now) + { + break; + } + // 遍历24小时 + for (int hour = 0; hour < 24; hour++) + { + var start_hour = current_day.AddHours(hour); + if (start_hour.ToString("yyyy-MM-dd HH:00:00") == now.AddHours(-1).ToString("yyyy-MM-dd HH:00:00")) + { + break; + } + var end_hour = current_day.AddHours(hour + 1); + var start_eh = list.Where(a => a.EntireTime == start_hour).Sum(a => a.EH); + var end_eh = list.Where(a => a.EntireTime == end_hour).Sum(a => a.EH); + var eh = end_eh - start_eh; + var rate_model = rate_list.Where(a => a.Month == start_hour.Month && DateTime.Parse(a.StartPeriodTime).ToString("HH:mm:ss") == start_hour.ToString("HH:mm:ss")).FirstOrDefault(); + if (rate_model != null) + { + if (rate_model.Type == "尖") + { + data_model.Needle += eh; + } + else if (rate_model.Type == "峰") + { + data_model.Peak += eh; + } + else if (rate_model.Type == "平") + { + data_model.Flat += eh; + } + else if (rate_model.Type == "谷") + { + data_model.Grain += eh; + } + else if (rate_model.Type == "深") + { + data_model.Deep += eh; + } + } + } + } + data.Add(data_model); + } + else + { + var month_model = month_list.Where(a => a.EntireTime == month).FirstOrDefault(); + if (month_model != null) + { + var model = new multi_rateData() + { + time = month.ToString("MM月"), + Needle = Convert.ToDecimal(month_model.Needle), + Peak = Convert.ToDecimal(month_model.Peak), + Flat = Convert.ToDecimal(month_model.Flat), + Grain = Convert.ToDecimal(month_model.Grain), + Deep = Convert.ToDecimal(month_model.Deep) + }; + data.Add(model); + } + else + { + var data_model = new multi_rateData(); + data_model.time = month.ToString("MM月"); + data_model.Needle = 0; + data_model.Peak = 0; + data_model.Flat = 0; + data_model.Grain = 0; + data_model.Deep = 0; + var day_count = (next_month - month).TotalDays; + //循环月里的每一天 + for (int day = 0; day < day_count; day++) + { + var current_day = month.AddDays(day); + // 遍历24小时 + for (int hour = 0; hour < 24; hour++) + { + var start_hour = current_day.AddHours(hour); + var end_hour = current_day.AddHours(hour + 1); + var start_eh = list.Where(a => a.EntireTime == start_hour).Sum(a => a.EH); + var end_eh = list.Where(a => a.EntireTime == end_hour).Sum(a => a.EH); + var eh = end_eh - start_eh; + var rate_model = rate_list.Where(a => a.Month == start_hour.Month && DateTime.Parse(a.StartPeriodTime).ToString("HH:mm:ss") == start_hour.ToString("HH:mm:ss")).FirstOrDefault(); + if (rate_model != null) + { + if (rate_model.Type == "尖") + { + data_model.Needle += eh; + } + else if (rate_model.Type == "峰") + { + data_model.Peak += eh; + } + else if (rate_model.Type == "平") + { + data_model.Flat += eh; + } + else if (rate_model.Type == "谷") + { + data_model.Grain += eh; + } + else if (rate_model.Type == "深") + { + data_model.Deep += eh; + } + } + } + } + data.Add(data_model); + + month_bll.Add(new DataService.Model.electricity_month() + { + MonthId = Guid.NewGuid().ToString("N"), + Needle = data_model.Needle.ToString(), + Peak = data_model.Peak.ToString(), + Flat = data_model.Flat.ToString(), + Grain = data_model.Grain.ToString(), + Deep = data_model.Deep.ToString(), + CreateTime = now, + EntireTime = month + }); + } + } } } if (date == "年") { - var time_count = Convert.ToInt32(now.Year)-2023; - for (int i = 0; i < time_count; i++) + var list = new List(); + // 查询电表数据 + var startDate = DateTime.Parse("2024-01-01 00:00:00"); + var endDate = DateTime.Parse(now.ToString("yyyy-MM-dd HH:00:00")); + + var month_list = month_bll.GetModelList(string.Format(" `EntireTime`>='{0}' AND `EntireTime`<='{1}' ", startDate, endDate)); + + // 处理跨月情况 + var time_count = GetUsedMonth1("月", startDate, endDate); + for (int i = 0; i <= time_count; i++) { - var model = new multi_rateData() + var time = startDate.AddMonths(i).ToString("yyyyMM"); + if (bll.IsExistsTable(date_base, "electricity_data_" + time)) { - time = now.AddYears(-i).ToString("yyyy"), - Needle = list.Sum(x => x.Needle), - Peak = list.Sum(x => x.Peak), - Flat = list.Sum(x => x.Flat), - Grain = list.Sum(x => x.Grain), - Deep = list.Sum(x => x.Deep), - }; - data.Add(model); + var queryData = bll.GetModelListDate(string.Format(" Reserve1='配电室低压' and `EntireTime`>='{0}' AND `EntireTime`<='{1}' ", startDate, endDate), time); + list.AddRange(queryData); + } + } + var year_count = Convert.ToInt32(now.Year) - 2023; + for (int j = 0; j < year_count; j++) + { + var year = startDate.AddYears(j); + var data_model = new multi_rateData(); + data_model.time = year.ToString("yyyy年"); + data_model.Needle = 0; + data_model.Peak = 0; + data_model.Flat = 0; + data_model.Grain = 0; + data_model.Deep = 0; + var rate_list = rate_bll.GetModelList(string.Format(" Year='{0}' ", year.Year)); + for (int i = 0; i < 12; i++) + { + var month = year.AddMonths(i); + var next_month = year.AddMonths(i + 1); + if (month > now) + { + break; + } + //当前月 + if (month.ToString("yyyy-MM") == now.ToString("yyyy-MM")) + { + var day_count = (next_month - month).TotalDays; + //循环月里的每一天 + for (int day = 0; day < day_count; day++) + { + var current_day = month.AddDays(day); + if (current_day > now) + { + break; + } + // 遍历24小时 + for (int hour = 0; hour < 24; hour++) + { + var start_hour = current_day.AddHours(hour); + if (start_hour.ToString("yyyy-MM-dd HH:00:00") == now.AddHours(-1).ToString("yyyy-MM-dd HH:00:00")) + { + break; + } + var end_hour = current_day.AddHours(hour + 1); + var start_eh = list.Where(a => a.EntireTime == start_hour).Sum(a => a.EH); + var end_eh = list.Where(a => a.EntireTime == end_hour).Sum(a => a.EH); + var eh = end_eh - start_eh; + var rate_model = rate_list.Where(a => a.Month == start_hour.Month && DateTime.Parse(a.StartPeriodTime).ToString("HH:mm:ss") == start_hour.ToString("HH:mm:ss")).FirstOrDefault(); + if (rate_model != null) + { + if (rate_model.Type == "尖") + { + data_model.Needle += eh; + } + else if (rate_model.Type == "峰") + { + data_model.Peak += eh; + } + else if (rate_model.Type == "平") + { + data_model.Flat += eh; + } + else if (rate_model.Type == "谷") + { + data_model.Grain += eh; + } + else if (rate_model.Type == "深") + { + data_model.Deep += eh; + } + } + } + } + } + else + { + var month_model = month_list.Where(a => a.EntireTime == month).FirstOrDefault(); + if (month_model != null) + { + data_model.Needle += Convert.ToDecimal(month_model.Needle); + data_model.Peak += Convert.ToDecimal(month_model.Peak); + data_model.Flat += Convert.ToDecimal(month_model.Flat); + data_model.Grain += Convert.ToDecimal(month_model.Grain); + data_model.Deep += Convert.ToDecimal(month_model.Deep); + } + else + { + var day_count = (next_month - month).TotalDays; + //循环月里的每一天 + for (int day = 0; day < day_count; day++) + { + var current_day = month.AddDays(day); + // 遍历24小时 + for (int hour = 0; hour < 24; hour++) + { + var start_hour = current_day.AddHours(hour); + var end_hour = current_day.AddHours(hour + 1); + var start_eh = list.Where(a => a.EntireTime == start_hour).Sum(a => a.EH); + var end_eh = list.Where(a => a.EntireTime == end_hour).Sum(a => a.EH); + var eh = end_eh - start_eh; + var rate_model = rate_list.Where(a => a.Month == start_hour.Month && DateTime.Parse(a.StartPeriodTime).ToString("HH:mm:ss") == start_hour.ToString("HH:mm:ss")).FirstOrDefault(); + if (rate_model != null) + { + if (rate_model.Type == "尖") + { + data_model.Needle += eh; + } + else if (rate_model.Type == "峰") + { + data_model.Peak += eh; + } + else if (rate_model.Type == "平") + { + data_model.Flat += eh; + } + else if (rate_model.Type == "谷") + { + data_model.Grain += eh; + } + else if (rate_model.Type == "深") + { + data_model.Deep += eh; + } + } + } + } + + month_bll.Add(new DataService.Model.electricity_month() + { + MonthId = Guid.NewGuid().ToString("N"), + Needle = data_model.Needle.ToString(), + Peak = data_model.Peak.ToString(), + Flat = data_model.Flat.ToString(), + Grain = data_model.Grain.ToString(), + Deep = data_model.Deep.ToString(), + CreateTime = now, + EntireTime = month + }); + } + } + } + data.Add(data_model); } } var adata = data.OrderBy(x => x.time).ToList(); @@ -99,5 +452,34 @@ namespace LonglslandExhibitionCenter.Controllers.api HttpResponseMessage result = new HttpResponseMessage { Content = new StringContent(JsonConvert.SerializeObject(res), Encoding.GetEncoding("UTF-8"), "application/json") }; return result; } + + /// + /// 计算两个时间年份月份差 + /// + /// + private int GetUsedMonth1(string type, DateTime dynamicTime, DateTime currentDate) + { + try + { + int year = currentDate.Year - dynamicTime.Year; //相差的年份 + int month = (currentDate.Year - dynamicTime.Year) * 12 + (currentDate.Month - dynamicTime.Month); //相差的月份 + //int month1 = currentDate.Year * 12 + currentDate.Month - dynamicTime.Year * 12 - dynamicTime.Month; //相差的月份 + + TimeSpan used = DateTime.Now - dynamicTime; + double totalDays = used.TotalDays; //相差总天数 + if (type == "年") + { + return Convert.ToInt32(year); + } + else + { + return Convert.ToInt32(month); + } + } + catch (Exception) + { + return 0; + } + } } } \ No newline at end of file diff --git a/LonglslandExhibitionCenter/LonglslandExhibitionCenter.csproj.user b/LonglslandExhibitionCenter/LonglslandExhibitionCenter.csproj.user index 4a694b4..47578cc 100644 --- a/LonglslandExhibitionCenter/LonglslandExhibitionCenter.csproj.user +++ b/LonglslandExhibitionCenter/LonglslandExhibitionCenter.csproj.user @@ -10,6 +10,9 @@ Release|Any CPU F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\LonglslandExhibitionCenter\Properties\PublishProfiles\FolderProfile.pubxml + ApiControllerEmptyScaffolder + root/Common/Web API + 600 diff --git a/LonglslandExhibitionCenter/Properties/PublishProfiles/FolderProfile.pubxml.user b/LonglslandExhibitionCenter/Properties/PublishProfiles/FolderProfile.pubxml.user index 04b6811..f693605 100644 --- a/LonglslandExhibitionCenter/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/LonglslandExhibitionCenter/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>F:\项目\长岛展览馆\发布文件 - True|2024-08-15T05:20:14.7663530Z;True|2024-08-14T10:07:28.2388461+08:00;True|2024-08-14T10:07:03.3134871+08:00;True|2024-08-14T10:06:43.4199921+08:00;True|2024-08-14T10:05:39.6303984+08:00;True|2024-08-14T10:00:18.4168360+08:00;True|2024-08-14T09:50:15.7791885+08:00;True|2024-08-11T20:53:54.5556138+08:00;True|2024-08-10T16:00:18.6655642+08:00;True|2024-08-10T10:41:02.8962798+08:00;True|2024-08-10T10:31:34.0807175+08:00;True|2024-08-10T10:11:01.4518697+08:00;True|2024-08-09T17:46:23.3977253+08:00;True|2024-08-09T14:57:51.6409237+08:00;True|2024-08-09T14:12:02.8124286+08:00;True|2024-08-09T13:57:09.6566238+08:00;True|2024-08-09T13:55:09.1957591+08:00;True|2024-08-09T13:53:12.0978886+08:00;True|2024-08-09T10:21:25.5364378+08:00;True|2024-08-08T17:30:17.0495176+08:00;True|2024-08-08T14:01:01.6427032+08:00;True|2024-08-08T10:26:20.9380493+08:00;True|2024-08-06T16:16:42.4971554+08:00;True|2024-04-15T08:46:26.1708600+08:00;True|2024-04-15T08:43:47.1675051+08:00;True|2024-03-20T09:52:41.5444999+08:00;True|2024-03-20T09:52:28.9463180+08:00;True|2024-03-19T16:26:27.2407972+08:00;True|2024-03-19T15:50:07.1464827+08:00;True|2024-03-14T15:48:46.0852411+08:00;True|2024-03-12T11:15:35.2934238+08:00;True|2024-03-07T16:29:08.9381292+08:00;True|2024-03-05T14:31:05.6269677+08:00;True|2024-03-04T14:37:08.7040845+08:00;True|2024-02-28T11:11:35.8506164+08:00; + True|2024-08-19T02:17:16.4446095Z;True|2024-08-15T13:20:14.7663530+08:00;True|2024-08-14T10:07:28.2388461+08:00;True|2024-08-14T10:07:03.3134871+08:00;True|2024-08-14T10:06:43.4199921+08:00;True|2024-08-14T10:05:39.6303984+08:00;True|2024-08-14T10:00:18.4168360+08:00;True|2024-08-14T09:50:15.7791885+08:00;True|2024-08-11T20:53:54.5556138+08:00;True|2024-08-10T16:00:18.6655642+08:00;True|2024-08-10T10:41:02.8962798+08:00;True|2024-08-10T10:31:34.0807175+08:00;True|2024-08-10T10:11:01.4518697+08:00;True|2024-08-09T17:46:23.3977253+08:00;True|2024-08-09T14:57:51.6409237+08:00;True|2024-08-09T14:12:02.8124286+08:00;True|2024-08-09T13:57:09.6566238+08:00;True|2024-08-09T13:55:09.1957591+08:00;True|2024-08-09T13:53:12.0978886+08:00;True|2024-08-09T10:21:25.5364378+08:00;True|2024-08-08T17:30:17.0495176+08:00;True|2024-08-08T14:01:01.6427032+08:00;True|2024-08-08T10:26:20.9380493+08:00;True|2024-08-06T16:16:42.4971554+08:00;True|2024-04-15T08:46:26.1708600+08:00;True|2024-04-15T08:43:47.1675051+08:00;True|2024-03-20T09:52:41.5444999+08:00;True|2024-03-20T09:52:28.9463180+08:00;True|2024-03-19T16:26:27.2407972+08:00;True|2024-03-19T15:50:07.1464827+08:00;True|2024-03-14T15:48:46.0852411+08:00;True|2024-03-12T11:15:35.2934238+08:00;True|2024-03-07T16:29:08.9381292+08:00;True|2024-03-05T14:31:05.6269677+08:00;True|2024-03-04T14:37:08.7040845+08:00;True|2024-02-28T11:11:35.8506164+08:00; @@ -79,25 +79,25 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 08/13/2024 17:44:44 - 08/13/2024 17:44:43 + 08/16/2024 14:57:32 - 08/13/2024 17:44:43 + 08/16/2024 14:57:32 08/13/2024 17:44:43 - 08/14/2024 11:25:28 + 08/19/2024 10:17:11 - 08/14/2024 11:25:28 + 08/19/2024 10:17:11 - 08/13/2024 17:44:43 + 08/13/2024 17:44:44 - 08/13/2024 17:44:43 + 08/13/2024 17:44:44 08/13/2024 17:44:44 @@ -109,7 +109,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 08/13/2024 17:44:44 - 08/13/2024 17:44:43 + 08/13/2024 17:44:45 08/13/2024 17:44:45 diff --git a/LonglslandExhibitionCenter/bin/DataService.dll b/LonglslandExhibitionCenter/bin/DataService.dll index 2a6363f..b7005af 100644 Binary files a/LonglslandExhibitionCenter/bin/DataService.dll and b/LonglslandExhibitionCenter/bin/DataService.dll differ diff --git a/LonglslandExhibitionCenter/bin/DataService.pdb b/LonglslandExhibitionCenter/bin/DataService.pdb index cc59960..9188ce0 100644 Binary files a/LonglslandExhibitionCenter/bin/DataService.pdb and b/LonglslandExhibitionCenter/bin/DataService.pdb differ diff --git a/LonglslandExhibitionCenter/bin/LonglslandExhibitionCenter.dll b/LonglslandExhibitionCenter/bin/LonglslandExhibitionCenter.dll index 53b7d7a..85206f5 100644 Binary files a/LonglslandExhibitionCenter/bin/LonglslandExhibitionCenter.dll and b/LonglslandExhibitionCenter/bin/LonglslandExhibitionCenter.dll differ diff --git a/LonglslandExhibitionCenter/bin/LonglslandExhibitionCenter.pdb b/LonglslandExhibitionCenter/bin/LonglslandExhibitionCenter.pdb index 6186fa5..3acc2de 100644 Binary files a/LonglslandExhibitionCenter/bin/LonglslandExhibitionCenter.pdb and b/LonglslandExhibitionCenter/bin/LonglslandExhibitionCenter.pdb differ diff --git a/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.csproj.AssemblyReference.cache b/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.csproj.AssemblyReference.cache index 6591b2e..3c2c4c4 100644 Binary files a/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.csproj.AssemblyReference.cache and b/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.csproj.AssemblyReference.cache differ diff --git a/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.dll b/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.dll index 49fd744..8bbd362 100644 Binary files a/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.dll and b/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.dll differ diff --git a/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.pdb b/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.pdb index c5cbace..73ff8ed 100644 Binary files a/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.pdb and b/LonglslandExhibitionCenter/obj/Debug/LonglslandExhibitionCenter.pdb differ diff --git a/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.csproj.AssemblyReference.cache b/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.csproj.AssemblyReference.cache index be526e8..7167f3a 100644 Binary files a/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.csproj.AssemblyReference.cache and b/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.csproj.AssemblyReference.cache differ diff --git a/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.dll b/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.dll index 53b7d7a..85206f5 100644 Binary files a/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.dll and b/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.dll differ diff --git a/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.pdb b/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.pdb index 6186fa5..3acc2de 100644 Binary files a/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.pdb and b/LonglslandExhibitionCenter/obj/Release/LonglslandExhibitionCenter.pdb differ diff --git a/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/DataService.dll b/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/DataService.dll index 2a6363f..b7005af 100644 Binary files a/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/DataService.dll and b/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/DataService.dll differ diff --git a/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/DataService.pdb b/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/DataService.pdb index cc59960..9188ce0 100644 Binary files a/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/DataService.pdb and b/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/DataService.pdb differ diff --git a/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/LonglslandExhibitionCenter.dll b/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/LonglslandExhibitionCenter.dll index 53b7d7a..85206f5 100644 Binary files a/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/LonglslandExhibitionCenter.dll and b/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/LonglslandExhibitionCenter.dll differ diff --git a/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/LonglslandExhibitionCenter.pdb b/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/LonglslandExhibitionCenter.pdb index 6186fa5..3acc2de 100644 Binary files a/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/LonglslandExhibitionCenter.pdb and b/LonglslandExhibitionCenter/obj/Release/Package/PackageTmp/bin/LonglslandExhibitionCenter.pdb differ diff --git a/Security/bin/Debug/DataService.dll b/Security/bin/Debug/DataService.dll index 2a6363f..b7005af 100644 Binary files a/Security/bin/Debug/DataService.dll and b/Security/bin/Debug/DataService.dll differ diff --git a/Security/bin/Debug/DataService.pdb b/Security/bin/Debug/DataService.pdb index cc59960..9188ce0 100644 Binary files a/Security/bin/Debug/DataService.pdb and b/Security/bin/Debug/DataService.pdb differ diff --git a/Security/bin/Debug/ServiceSecurity.application b/Security/bin/Debug/ServiceSecurity.application index 298be8e..ad91894 100644 --- a/Security/bin/Debug/ServiceSecurity.application +++ b/Security/bin/Debug/ServiceSecurity.application @@ -14,7 +14,7 @@ - cVESGyLcnbCniX0BSs1Pybl1+kduWurzDbuU+fD3kP4= + zl2wHFEv5SRIwogtu2Il7HI0RcdcSOjhNw4f5Ak9Iws= diff --git a/Security/bin/Debug/ServiceSecurity.exe.manifest b/Security/bin/Debug/ServiceSecurity.exe.manifest index d64347e..b1a0279 100644 --- a/Security/bin/Debug/ServiceSecurity.exe.manifest +++ b/Security/bin/Debug/ServiceSecurity.exe.manifest @@ -42,14 +42,14 @@ - + - BNrWQa+xXYUE0+WI/IM+mx8lKb78o0/UqGjOMy5ePCc= + T81EjCCCXxPPRkl+bEilJqRcRyaL2farpXkCB6n3DDU= diff --git a/Security/obj/Debug/Security.csproj.AssemblyReference.cache b/Security/obj/Debug/Security.csproj.AssemblyReference.cache index 723503c..44c2e75 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/ServiceSecurity.application b/Security/obj/Debug/ServiceSecurity.application index 298be8e..ad91894 100644 --- a/Security/obj/Debug/ServiceSecurity.application +++ b/Security/obj/Debug/ServiceSecurity.application @@ -14,7 +14,7 @@ - cVESGyLcnbCniX0BSs1Pybl1+kduWurzDbuU+fD3kP4= + zl2wHFEv5SRIwogtu2Il7HI0RcdcSOjhNw4f5Ak9Iws= diff --git a/Security/obj/Debug/ServiceSecurity.exe.manifest b/Security/obj/Debug/ServiceSecurity.exe.manifest index d64347e..b1a0279 100644 --- a/Security/obj/Debug/ServiceSecurity.exe.manifest +++ b/Security/obj/Debug/ServiceSecurity.exe.manifest @@ -42,14 +42,14 @@ - + - BNrWQa+xXYUE0+WI/IM+mx8lKb78o0/UqGjOMy5ePCc= + T81EjCCCXxPPRkl+bEilJqRcRyaL2farpXkCB6n3DDU= diff --git a/Security/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Security/obj/Release/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..6a47de3 Binary files /dev/null and b/Security/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Security/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/Security/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..6c9df14 Binary files /dev/null and b/Security/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Supplement/bin/Debug/DataService.dll b/Supplement/bin/Debug/DataService.dll index 2a6363f..b7005af 100644 Binary files a/Supplement/bin/Debug/DataService.dll and b/Supplement/bin/Debug/DataService.dll differ diff --git a/Supplement/bin/Debug/DataService.pdb b/Supplement/bin/Debug/DataService.pdb index cc59960..9188ce0 100644 Binary files a/Supplement/bin/Debug/DataService.pdb and b/Supplement/bin/Debug/DataService.pdb differ diff --git a/Supplement/bin/Debug/ServiceSupplement.exe b/Supplement/bin/Debug/ServiceSupplement.exe index be033b2..d2339ba 100644 Binary files a/Supplement/bin/Debug/ServiceSupplement.exe and b/Supplement/bin/Debug/ServiceSupplement.exe differ diff --git a/Supplement/bin/Debug/ServiceSupplement.pdb b/Supplement/bin/Debug/ServiceSupplement.pdb index 2a3c6be..2598f3e 100644 Binary files a/Supplement/bin/Debug/ServiceSupplement.pdb and b/Supplement/bin/Debug/ServiceSupplement.pdb differ diff --git a/Supplement/obj/Debug/ServiceSupplement.exe b/Supplement/obj/Debug/ServiceSupplement.exe index be033b2..d2339ba 100644 Binary files a/Supplement/obj/Debug/ServiceSupplement.exe and b/Supplement/obj/Debug/ServiceSupplement.exe differ diff --git a/Supplement/obj/Debug/ServiceSupplement.pdb b/Supplement/obj/Debug/ServiceSupplement.pdb index 2a3c6be..2598f3e 100644 Binary files a/Supplement/obj/Debug/ServiceSupplement.pdb and b/Supplement/obj/Debug/ServiceSupplement.pdb differ diff --git a/Supplement/obj/Debug/Supplement.csproj.AssemblyReference.cache b/Supplement/obj/Debug/Supplement.csproj.AssemblyReference.cache index 8418522..7374e5b 100644 Binary files a/Supplement/obj/Debug/Supplement.csproj.AssemblyReference.cache and b/Supplement/obj/Debug/Supplement.csproj.AssemblyReference.cache differ diff --git a/Supplement/obj/Debug/Supplement.csproj.CoreCompileInputs.cache b/Supplement/obj/Debug/Supplement.csproj.CoreCompileInputs.cache index 8c90828..f99a36f 100644 --- a/Supplement/obj/Debug/Supplement.csproj.CoreCompileInputs.cache +++ b/Supplement/obj/Debug/Supplement.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -a65f28891728aba044c7b8df335cc0b088a7a2a0 +4b23676b26eb692252a9be2f423b2b1b4ca0ba42 diff --git a/Supplement/obj/Debug/Supplement.csproj.FileListAbsolute.txt b/Supplement/obj/Debug/Supplement.csproj.FileListAbsolute.txt index 0e13302..aa5a54d 100644 --- a/Supplement/obj/Debug/Supplement.csproj.FileListAbsolute.txt +++ b/Supplement/obj/Debug/Supplement.csproj.FileListAbsolute.txt @@ -16,3 +16,21 @@ E:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug E:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\Supplement.csproj.CopyComplete E:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\ServiceSupplement.exe E:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\ServiceSupplement.pdb +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\ServiceSupplement.exe.config +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\ServiceSupplement.exe +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\ServiceSupplement.pdb +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\DataService.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\log4net.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\MySql.Data.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\Maticsoft.DBUtility.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\Maticsoft.Common.dll +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\DataService.pdb +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\bin\Debug\log4net.xml +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\Supplement.csproj.AssemblyReference.cache +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\Supplement.csproj.SuggestedBindingRedirects.cache +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\Supplement.ProjectInstaller.resources +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\Supplement.csproj.GenerateResource.cache +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\Supplement.csproj.CoreCompileInputs.cache +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\Supplement.csproj.CopyComplete +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\ServiceSupplement.exe +F:\项目\长岛展览馆\项目\LonglslandExhibitionCenter\Supplement\obj\Debug\ServiceSupplement.pdb diff --git a/Supplement/obj/Debug/Supplement.csproj.GenerateResource.cache b/Supplement/obj/Debug/Supplement.csproj.GenerateResource.cache index 1d7cd8f..03ae061 100644 Binary files a/Supplement/obj/Debug/Supplement.csproj.GenerateResource.cache and b/Supplement/obj/Debug/Supplement.csproj.GenerateResource.cache differ