From 683688c4c35c09d0b97b4b5706f2fbb031118349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E8=89=B3?= <2836604403@qq.com> Date: Thu, 18 Jul 2024 14:30:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=9A=E5=8A=A1=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLL/v_business_statistics.cs | 186 +++++++++ .../DAL/v_business_statistics.cs | 358 ++++++++++++++++++ .../Model/v_business_statistics.cs | 105 +++++ .../CompetitionAPI/CompetitionAPI.csproj.user | 4 +- .../DownloadBusinessStatisticsController.cs | 11 + .../GetBusinessStatisticsController.cs | 11 + .../GetBusinessStatisticsListController.cs | 46 +++ .../ImportBusinessStatisticsController.cs | 11 + .../FolderProfile1.pubxml.user | 2 +- 9 files changed, 731 insertions(+), 3 deletions(-) create mode 100644 CompetitionAPI/CompetitionAPI/Competition.Mysql/BLL/v_business_statistics.cs create mode 100644 CompetitionAPI/CompetitionAPI/Competition.Mysql/DAL/v_business_statistics.cs create mode 100644 CompetitionAPI/CompetitionAPI/Competition.Mysql/Model/v_business_statistics.cs create mode 100644 CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/DownloadBusinessStatisticsController.cs create mode 100644 CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/GetBusinessStatisticsController.cs create mode 100644 CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/GetBusinessStatisticsListController.cs create mode 100644 CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/ImportBusinessStatisticsController.cs diff --git a/CompetitionAPI/CompetitionAPI/Competition.Mysql/BLL/v_business_statistics.cs b/CompetitionAPI/CompetitionAPI/Competition.Mysql/BLL/v_business_statistics.cs new file mode 100644 index 0000000..c6849e2 --- /dev/null +++ b/CompetitionAPI/CompetitionAPI/Competition.Mysql/BLL/v_business_statistics.cs @@ -0,0 +1,186 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* v_business_statistics.cs +* +* 功 能: N/A +* 类 名: v_business_statistics +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/7/18 14:01:07 N/A 初版 +* +* Copyright (c) 2012 Maticsoft Corporation. All rights reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 版权所有:动软卓越(北京)科技有限公司              │ +*└──────────────────────────────────┘ +*/ +using System; +using System.Data; +using System.Collections.Generic; +using Maticsoft.Common; +using Competition.Mysql.Model; +namespace Competition.Mysql.BLL +{ + /// + /// v_business_statistics + /// + public partial class v_business_statistics + { + private readonly Competition.Mysql.DAL.v_business_statistics dal=new Competition.Mysql.DAL.v_business_statistics(); + public v_business_statistics() + {} + #region BasicMethod + /// + /// 是否存在该记录 + /// + public bool Exists(string StatisticsId) + { + return dal.Exists(StatisticsId); + } + + /// + /// 增加一条数据 + /// + public bool Add(Competition.Mysql.Model.v_business_statistics model) + { + return dal.Add(model); + } + + /// + /// 更新一条数据 + /// + public bool Update(Competition.Mysql.Model.v_business_statistics model) + { + return dal.Update(model); + } + + /// + /// 删除一条数据 + /// + public bool Delete(string StatisticsId) + { + + return dal.Delete(StatisticsId); + } + /// + /// 删除一条数据 + /// + public bool DeleteList(string StatisticsIdlist ) + { + return dal.DeleteList(StatisticsIdlist ); + } + + /// + /// 得到一个对象实体 + /// + public Competition.Mysql.Model.v_business_statistics GetModel(string StatisticsId) + { + + return dal.GetModel(StatisticsId); + } + + /// + /// 得到一个对象实体,从缓存中 + /// + public Competition.Mysql.Model.v_business_statistics GetModelByCache(string StatisticsId) + { + + string CacheKey = "v_business_statisticsModel-" + StatisticsId; + object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey); + if (objModel == null) + { + try + { + objModel = dal.GetModel(StatisticsId); + if (objModel != null) + { + int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache"); + Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero); + } + } + catch{} + } + return (Competition.Mysql.Model.v_business_statistics)objModel; + } + + /// + /// 获得数据列表 + /// + public DataSet GetList(string strWhere) + { + return dal.GetList(strWhere); + } + /// + /// 获得前几行数据 + /// + public DataSet GetList(int Top,string strWhere,string filedOrder) + { + return dal.GetList(Top,strWhere,filedOrder); + } + /// + /// 获得数据列表 + /// + 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) + { + Competition.Mysql.Model.v_business_statistics 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/CompetitionAPI/CompetitionAPI/Competition.Mysql/DAL/v_business_statistics.cs b/CompetitionAPI/CompetitionAPI/Competition.Mysql/DAL/v_business_statistics.cs new file mode 100644 index 0000000..acd7f72 --- /dev/null +++ b/CompetitionAPI/CompetitionAPI/Competition.Mysql/DAL/v_business_statistics.cs @@ -0,0 +1,358 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* v_business_statistics.cs +* +* 功 能: N/A +* 类 名: v_business_statistics +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/7/18 14:01:07 N/A 初版 +* +* Copyright (c) 2012 Maticsoft Corporation. All rights reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 版权所有:动软卓越(北京)科技有限公司              │ +*└──────────────────────────────────┘ +*/ +using System; +using System.Data; +using System.Text; +using System.Data.SqlClient; +using Maticsoft.DBUtility;//Please add references +namespace Competition.Mysql.DAL +{ + /// + /// 数据访问类:v_business_statistics + /// + public partial class v_business_statistics + { + public v_business_statistics() + {} + #region BasicMethod + + /// + /// 是否存在该记录 + /// + public bool Exists(string StatisticsId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select count(1) from v_business_statistics"); + strSql.Append(" where StatisticsId=@StatisticsId "); + SqlParameter[] parameters = { + new SqlParameter("@StatisticsId", SqlDbType.VarChar,50) }; + parameters[0].Value = StatisticsId; + + return DbHelperSQL.Exists(strSql.ToString(),parameters); + } + + + /// + /// 增加一条数据 + /// + public bool Add(Competition.Mysql.Model.v_business_statistics model) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into v_business_statistics("); + strSql.Append("StatisticsId,TitleName,StatisticsTime,StatisticsContent,CreateTime,Remark1,Remark2,Remark3)"); + strSql.Append(" values ("); + strSql.Append("@StatisticsId,@TitleName,@StatisticsTime,@StatisticsContent,@CreateTime,@Remark1,@Remark2,@Remark3)"); + SqlParameter[] parameters = { + new SqlParameter("@StatisticsId", SqlDbType.VarChar,50), + new SqlParameter("@TitleName", SqlDbType.VarChar,255), + new SqlParameter("@StatisticsTime", SqlDbType.DateTime), + new SqlParameter("@StatisticsContent", SqlDbType.Text), + new SqlParameter("@CreateTime", SqlDbType.DateTime), + new SqlParameter("@Remark1", SqlDbType.VarChar,255), + new SqlParameter("@Remark2", SqlDbType.VarChar,255), + new SqlParameter("@Remark3", SqlDbType.VarChar,255)}; + parameters[0].Value = model.StatisticsId; + parameters[1].Value = model.TitleName; + parameters[2].Value = model.StatisticsTime; + parameters[3].Value = model.StatisticsContent; + parameters[4].Value = model.CreateTime; + parameters[5].Value = model.Remark1; + parameters[6].Value = model.Remark2; + parameters[7].Value = model.Remark3; + + int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + /// + /// 更新一条数据 + /// + public bool Update(Competition.Mysql.Model.v_business_statistics model) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("update v_business_statistics set "); + strSql.Append("TitleName=@TitleName,"); + strSql.Append("StatisticsTime=@StatisticsTime,"); + strSql.Append("StatisticsContent=@StatisticsContent,"); + strSql.Append("CreateTime=@CreateTime,"); + strSql.Append("Remark1=@Remark1,"); + strSql.Append("Remark2=@Remark2,"); + strSql.Append("Remark3=@Remark3"); + strSql.Append(" where StatisticsId=@StatisticsId "); + SqlParameter[] parameters = { + new SqlParameter("@TitleName", SqlDbType.VarChar,255), + new SqlParameter("@StatisticsTime", SqlDbType.DateTime), + new SqlParameter("@StatisticsContent", SqlDbType.Text), + new SqlParameter("@CreateTime", SqlDbType.DateTime), + new SqlParameter("@Remark1", SqlDbType.VarChar,255), + new SqlParameter("@Remark2", SqlDbType.VarChar,255), + new SqlParameter("@Remark3", SqlDbType.VarChar,255), + new SqlParameter("@StatisticsId", SqlDbType.VarChar,50)}; + parameters[0].Value = model.TitleName; + parameters[1].Value = model.StatisticsTime; + parameters[2].Value = model.StatisticsContent; + parameters[3].Value = model.CreateTime; + parameters[4].Value = model.Remark1; + parameters[5].Value = model.Remark2; + parameters[6].Value = model.Remark3; + parameters[7].Value = model.StatisticsId; + + int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + + /// + /// 删除一条数据 + /// + public bool Delete(string StatisticsId) + { + + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete from v_business_statistics "); + strSql.Append(" where StatisticsId=@StatisticsId "); + SqlParameter[] parameters = { + new SqlParameter("@StatisticsId", SqlDbType.VarChar,50) }; + parameters[0].Value = StatisticsId; + + int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + /// + /// 批量删除数据 + /// + public bool DeleteList(string StatisticsIdlist ) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete from v_business_statistics "); + strSql.Append(" where StatisticsId in ("+StatisticsIdlist + ") "); + int rows=DbHelperSQL.ExecuteSql(strSql.ToString()); + if (rows > 0) + { + return true; + } + else + { + return false; + } + } + + + /// + /// 得到一个对象实体 + /// + public Competition.Mysql.Model.v_business_statistics GetModel(string StatisticsId) + { + + StringBuilder strSql=new StringBuilder(); + strSql.Append("select top 1 StatisticsId,TitleName,StatisticsTime,StatisticsContent,CreateTime,Remark1,Remark2,Remark3 from v_business_statistics "); + strSql.Append(" where StatisticsId=@StatisticsId "); + SqlParameter[] parameters = { + new SqlParameter("@StatisticsId", SqlDbType.VarChar,50) }; + parameters[0].Value = StatisticsId; + + Competition.Mysql.Model.v_business_statistics model=new Competition.Mysql.Model.v_business_statistics(); + DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters); + if(ds.Tables[0].Rows.Count>0) + { + return DataRowToModel(ds.Tables[0].Rows[0]); + } + else + { + return null; + } + } + + + /// + /// 得到一个对象实体 + /// + public Competition.Mysql.Model.v_business_statistics DataRowToModel(DataRow row) + { + Competition.Mysql.Model.v_business_statistics model=new Competition.Mysql.Model.v_business_statistics(); + if (row != null) + { + if(row["StatisticsId"]!=null) + { + model.StatisticsId=row["StatisticsId"].ToString(); + } + if(row["TitleName"]!=null) + { + model.TitleName=row["TitleName"].ToString(); + } + if(row["StatisticsTime"]!=null && row["StatisticsTime"].ToString()!="") + { + model.StatisticsTime=DateTime.Parse(row["StatisticsTime"].ToString()); + } + if(row["StatisticsContent"]!=null) + { + model.StatisticsContent=row["StatisticsContent"].ToString(); + } + if(row["CreateTime"]!=null && row["CreateTime"].ToString()!="") + { + model.CreateTime=DateTime.Parse(row["CreateTime"].ToString()); + } + if(row["Remark1"]!=null) + { + model.Remark1=row["Remark1"].ToString(); + } + if(row["Remark2"]!=null) + { + model.Remark2=row["Remark2"].ToString(); + } + if(row["Remark3"]!=null) + { + model.Remark3=row["Remark3"].ToString(); + } + } + return model; + } + + /// + /// 获得数据列表 + /// + public DataSet GetList(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select StatisticsId,TitleName,StatisticsTime,StatisticsContent,CreateTime,Remark1,Remark2,Remark3 "); + strSql.Append(" FROM v_business_statistics "); + if(strWhere.Trim()!="") + { + strSql.Append(" where "+strWhere); + } + return DbHelperSQL.Query(strSql.ToString()); + } + + /// + /// 获得前几行数据 + /// + public DataSet GetList(int Top,string strWhere,string filedOrder) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + if(Top>0) + { + strSql.Append(" top "+Top.ToString()); + } + strSql.Append(" StatisticsId,TitleName,StatisticsTime,StatisticsContent,CreateTime,Remark1,Remark2,Remark3 "); + strSql.Append(" FROM v_business_statistics "); + if(strWhere.Trim()!="") + { + strSql.Append(" where "+strWhere); + } + strSql.Append(" order by " + filedOrder); + return DbHelperSQL.Query(strSql.ToString()); + } + + /// + /// 获取记录总数 + /// + public int GetRecordCount(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select count(1) FROM v_business_statistics "); + 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.StatisticsId desc"); + } + strSql.Append(")AS Row, T.* from v_business_statistics 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 DbHelperSQL.Query(strSql.ToString()); + } + + /* + /// + /// 分页获取数据列表 + /// + public DataSet GetList(int PageSize,int PageIndex,string strWhere) + { + SqlParameter[] parameters = { + new SqlParameter("@tblName", SqlDbType.VarChar, 255), + new SqlParameter("@fldName", SqlDbType.VarChar, 255), + new SqlParameter("@PageSize", SqlDbType.Int), + new SqlParameter("@PageIndex", SqlDbType.Int), + new SqlParameter("@IsReCount", SqlDbType.Bit), + new SqlParameter("@OrderType", SqlDbType.Bit), + new SqlParameter("@strWhere", SqlDbType.VarChar,1000), + }; + parameters[0].Value = "v_business_statistics"; + parameters[1].Value = "StatisticsId"; + parameters[2].Value = PageSize; + parameters[3].Value = PageIndex; + parameters[4].Value = 0; + parameters[5].Value = 0; + parameters[6].Value = strWhere; + return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds"); + }*/ + + #endregion BasicMethod + #region ExtensionMethod + + #endregion ExtensionMethod + } +} + diff --git a/CompetitionAPI/CompetitionAPI/Competition.Mysql/Model/v_business_statistics.cs b/CompetitionAPI/CompetitionAPI/Competition.Mysql/Model/v_business_statistics.cs new file mode 100644 index 0000000..91ebd56 --- /dev/null +++ b/CompetitionAPI/CompetitionAPI/Competition.Mysql/Model/v_business_statistics.cs @@ -0,0 +1,105 @@ +/** 版本信息模板在安装目录下,可自行修改。 +* v_business_statistics.cs +* +* 功 能: N/A +* 类 名: v_business_statistics +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +* V0.01 2024/7/18 14:01:07 N/A 初版 +* +* Copyright (c) 2012 Maticsoft Corporation. All rights reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 版权所有:动软卓越(北京)科技有限公司              │ +*└──────────────────────────────────┘ +*/ +using System; +namespace Competition.Mysql.Model +{ + /// + /// v_business_statistics:实体类(属性说明自动提取数据库字段的描述信息) + /// + [Serializable] + public partial class v_business_statistics + { + public v_business_statistics() + {} + #region Model + private string _statisticsid; + private string _titlename; + private DateTime _statisticstime; + private string _statisticscontent; + private DateTime _createtime; + private string _remark1; + private string _remark2; + private string _remark3; + /// + /// 编号 + /// + public string StatisticsId + { + set{ _statisticsid=value;} + get{return _statisticsid;} + } + /// + /// 标题 + /// + public string TitleName + { + set{ _titlename=value;} + get{return _titlename;} + } + /// + /// 统计时间 + /// + public DateTime StatisticsTime + { + set{ _statisticstime=value;} + get{return _statisticstime;} + } + /// + /// 内容 + /// + public string StatisticsContent + { + set{ _statisticscontent=value;} + get{return _statisticscontent;} + } + /// + /// 创建时间 + /// + public DateTime CreateTime + { + set{ _createtime=value;} + get{return _createtime;} + } + /// + /// 备用1 + /// + public string Remark1 + { + set{ _remark1=value;} + get{return _remark1;} + } + /// + /// 备用2 + /// + public string Remark2 + { + set{ _remark2=value;} + get{return _remark2;} + } + /// + /// 备用3 + /// + public string Remark3 + { + set{ _remark3=value;} + get{return _remark3;} + } + #endregion Model + + } +} + diff --git a/CompetitionAPI/CompetitionAPI/CompetitionAPI/CompetitionAPI.csproj.user b/CompetitionAPI/CompetitionAPI/CompetitionAPI/CompetitionAPI.csproj.user index a97e507..e8efefa 100644 --- a/CompetitionAPI/CompetitionAPI/CompetitionAPI/CompetitionAPI.csproj.user +++ b/CompetitionAPI/CompetitionAPI/CompetitionAPI/CompetitionAPI.csproj.user @@ -2,8 +2,8 @@ CompetitionAPI - MvcControllerEmptyScaffolder - root/Common/MVC/Controller + ApiControllerEmptyScaffolder + root/Common/Api F:\项目\福州海关散货系统\项目\FuZhou_Custom_BulkCargo_Server\CompetitionAPI\CompetitionAPI\CompetitionAPI\Properties\PublishProfiles\FolderProfile1.pubxml diff --git a/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/DownloadBusinessStatisticsController.cs b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/DownloadBusinessStatisticsController.cs new file mode 100644 index 0000000..6e14283 --- /dev/null +++ b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/DownloadBusinessStatisticsController.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace CompetitionAPI.Controllers.statistics +{ + [Route("api/[controller]")] + [ApiController] + public class DownloadBusinessStatisticsController : Controller + { + } +} diff --git a/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/GetBusinessStatisticsController.cs b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/GetBusinessStatisticsController.cs new file mode 100644 index 0000000..4597f14 --- /dev/null +++ b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/GetBusinessStatisticsController.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace CompetitionAPI.Controllers.statistics +{ + [Route("api/[controller]")] + [ApiController] + public class GetBusinessStatisticsController : ControllerBase + { + } +} diff --git a/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/GetBusinessStatisticsListController.cs b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/GetBusinessStatisticsListController.cs new file mode 100644 index 0000000..1e2d361 --- /dev/null +++ b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/GetBusinessStatisticsListController.cs @@ -0,0 +1,46 @@ +using Competition.Common.Util; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Text; + +namespace CompetitionAPI.Controllers.statistics +{ + [Route("api/[controller]")] + [ApiController] + public class GetBusinessStatisticsListController : Controller + { + Competition.Mysql.BLL.v_business_statistics bll = new Competition.Mysql.BLL.v_business_statistics(); + + public GetBusinessStatisticsListController() + { + + } + + /// + /// 获取业务统计列表接口 + /// + /// 统计时间/param> + /// 页码/param> + /// 每页数量/param> + /// + [HttpGet] + public JsonResult Index(int PageIndex, int PageSize, string StatisticsTime = "") + { + var query = new StringBuilder(" 1 = 1 "); + var total_query = new StringBuilder(" 1 = 1 "); + + if (!string.IsNullOrWhiteSpace(StatisticsTime)) + { + query.AppendFormat(" AND StatisticsTime='{0}' ", StatisticsTime); + total_query.AppendFormat(" AND StatisticsTime='{0}' ", StatisticsTime); + } + + var offset = (PageIndex - 1) * PageSize; + query.AppendFormat(" order by CreateTime desc OFFSET {0} ROWS FETCH NEXT {1} ROWS ONLY; ", offset, PageSize); + + var total = bll.GetRecordCount(total_query.ToString()); + var list = bll.GetModelList(query.ToString()); + return Json(Tool.GetJsonWithCode(APICode.Success, new { total = total, list = list })); + } + } +} diff --git a/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/ImportBusinessStatisticsController.cs b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/ImportBusinessStatisticsController.cs new file mode 100644 index 0000000..156863c --- /dev/null +++ b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Controllers/statistics/ImportBusinessStatisticsController.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace CompetitionAPI.Controllers.statistics +{ + [Route("api/[controller]")] + [ApiController] + public class ImportBusinessStatisticsController : Controller + { + } +} diff --git a/CompetitionAPI/CompetitionAPI/CompetitionAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user index d4db7b3..d230481 100644 --- a/CompetitionAPI/CompetitionAPI/CompetitionAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/CompetitionAPI/CompetitionAPI/CompetitionAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>F:\项目\福州海关散货系统\项目\FuZhou_Custom_BulkCargo_Server\CompetitionAPI\CompetitionAPI\CompetitionAPI\bin\Release\net6.0\publish\ - True|2024-07-11T08:15:57.1832176Z;True|2024-07-10T19:40:12.0560772+08:00;True|2024-07-03T08:34:47.9012194+08:00;True|2024-07-02T13:27:08.8864811+08:00;True|2024-06-30T10:44:01.4199530+08:00;True|2024-06-27T17:04:34.5042782+08:00;True|2024-06-26T15:13:55.0392343+08:00;True|2024-06-26T09:36:09.9993202+08:00;True|2024-06-25T18:55:08.1751359+08:00;True|2024-06-25T18:47:04.7420194+08:00;True|2024-06-25T18:44:23.4689695+08:00;True|2024-06-25T18:19:40.9912935+08:00;True|2024-06-25T08:44:00.2470909+08:00;False|2024-06-25T08:43:35.7645713+08:00;False|2024-06-19T09:51:07.8834743+08:00;False|2024-06-19T09:50:19.8828059+08:00;False|2024-06-19T09:49:31.4782067+08:00;True|2024-06-19T09:48:29.2943012+08:00;False|2024-06-19T09:48:02.6516665+08:00;True|2024-06-19T09:47:33.8215337+08:00;True|2024-06-17T13:24:10.4995074+08:00;False|2024-06-17T13:21:44.7372628+08:00;False|2024-06-17T13:21:10.7509626+08:00;True|2024-06-17T09:13:25.9817638+08:00;True|2024-06-17T09:00:04.5016133+08:00; + True|2024-07-18T05:19:55.4659060Z;True|2024-07-11T16:15:57.1832176+08:00;True|2024-07-10T19:40:12.0560772+08:00;True|2024-07-03T08:34:47.9012194+08:00;True|2024-07-02T13:27:08.8864811+08:00;True|2024-06-30T10:44:01.4199530+08:00;True|2024-06-27T17:04:34.5042782+08:00;True|2024-06-26T15:13:55.0392343+08:00;True|2024-06-26T09:36:09.9993202+08:00;True|2024-06-25T18:55:08.1751359+08:00;True|2024-06-25T18:47:04.7420194+08:00;True|2024-06-25T18:44:23.4689695+08:00;True|2024-06-25T18:19:40.9912935+08:00;True|2024-06-25T08:44:00.2470909+08:00;False|2024-06-25T08:43:35.7645713+08:00;False|2024-06-19T09:51:07.8834743+08:00;False|2024-06-19T09:50:19.8828059+08:00;False|2024-06-19T09:49:31.4782067+08:00;True|2024-06-19T09:48:29.2943012+08:00;False|2024-06-19T09:48:02.6516665+08:00;True|2024-06-19T09:47:33.8215337+08:00;True|2024-06-17T13:24:10.4995074+08:00;False|2024-06-17T13:21:44.7372628+08:00;False|2024-06-17T13:21:10.7509626+08:00;True|2024-06-17T09:13:25.9817638+08:00;True|2024-06-17T09:00:04.5016133+08:00; \ No newline at end of file