添加业务统计相关文件
This commit is contained in:
parent
5391a8241a
commit
683688c4c3
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// v_business_statistics
|
||||
/// </summary>
|
||||
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
|
||||
/// <summary>
|
||||
/// 是否存在该记录
|
||||
/// </summary>
|
||||
public bool Exists(string StatisticsId)
|
||||
{
|
||||
return dal.Exists(StatisticsId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加一条数据
|
||||
/// </summary>
|
||||
public bool Add(Competition.Mysql.Model.v_business_statistics model)
|
||||
{
|
||||
return dal.Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一条数据
|
||||
/// </summary>
|
||||
public bool Update(Competition.Mysql.Model.v_business_statistics model)
|
||||
{
|
||||
return dal.Update(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一条数据
|
||||
/// </summary>
|
||||
public bool Delete(string StatisticsId)
|
||||
{
|
||||
|
||||
return dal.Delete(StatisticsId);
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除一条数据
|
||||
/// </summary>
|
||||
public bool DeleteList(string StatisticsIdlist )
|
||||
{
|
||||
return dal.DeleteList(StatisticsIdlist );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 得到一个对象实体
|
||||
/// </summary>
|
||||
public Competition.Mysql.Model.v_business_statistics GetModel(string StatisticsId)
|
||||
{
|
||||
|
||||
return dal.GetModel(StatisticsId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 得到一个对象实体,从缓存中
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public DataSet GetList(string strWhere)
|
||||
{
|
||||
return dal.GetList(strWhere);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获得前几行数据
|
||||
/// </summary>
|
||||
public DataSet GetList(int Top,string strWhere,string filedOrder)
|
||||
{
|
||||
return dal.GetList(Top,strWhere,filedOrder);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public List<Competition.Mysql.Model.v_business_statistics> GetModelList(string strWhere)
|
||||
{
|
||||
DataSet ds = dal.GetList(strWhere);
|
||||
return DataTableToList(ds.Tables[0]);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public List<Competition.Mysql.Model.v_business_statistics> DataTableToList(DataTable dt)
|
||||
{
|
||||
List<Competition.Mysql.Model.v_business_statistics> modelList = new List<Competition.Mysql.Model.v_business_statistics>();
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public DataSet GetAllList()
|
||||
{
|
||||
return GetList("");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页获取数据列表
|
||||
/// </summary>
|
||||
public int GetRecordCount(string strWhere)
|
||||
{
|
||||
return dal.GetRecordCount(strWhere);
|
||||
}
|
||||
/// <summary>
|
||||
/// 分页获取数据列表
|
||||
/// </summary>
|
||||
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
|
||||
{
|
||||
return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
|
||||
}
|
||||
/// <summary>
|
||||
/// 分页获取数据列表
|
||||
/// </summary>
|
||||
//public DataSet GetList(int PageSize,int PageIndex,string strWhere)
|
||||
//{
|
||||
//return dal.GetList(PageSize,PageIndex,strWhere);
|
||||
//}
|
||||
|
||||
#endregion BasicMethod
|
||||
#region ExtensionMethod
|
||||
|
||||
#endregion ExtensionMethod
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据访问类:v_business_statistics
|
||||
/// </summary>
|
||||
public partial class v_business_statistics
|
||||
{
|
||||
public v_business_statistics()
|
||||
{}
|
||||
#region BasicMethod
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在该记录
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 增加一条数据
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新一条数据
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一条数据
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 得到一个对象实体
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 得到一个对象实体
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
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());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得前几行数据
|
||||
/// </summary>
|
||||
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());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取记录总数
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 分页获取数据列表
|
||||
/// </summary>
|
||||
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());
|
||||
}
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// 分页获取数据列表
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// v_business_statistics:实体类(属性说明自动提取数据库字段的描述信息)
|
||||
/// </summary>
|
||||
[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;
|
||||
/// <summary>
|
||||
/// 编号
|
||||
/// </summary>
|
||||
public string StatisticsId
|
||||
{
|
||||
set{ _statisticsid=value;}
|
||||
get{return _statisticsid;}
|
||||
}
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
public string TitleName
|
||||
{
|
||||
set{ _titlename=value;}
|
||||
get{return _titlename;}
|
||||
}
|
||||
/// <summary>
|
||||
/// 统计时间
|
||||
/// </summary>
|
||||
public DateTime StatisticsTime
|
||||
{
|
||||
set{ _statisticstime=value;}
|
||||
get{return _statisticstime;}
|
||||
}
|
||||
/// <summary>
|
||||
/// 内容
|
||||
/// </summary>
|
||||
public string StatisticsContent
|
||||
{
|
||||
set{ _statisticscontent=value;}
|
||||
get{return _statisticscontent;}
|
||||
}
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
set{ _createtime=value;}
|
||||
get{return _createtime;}
|
||||
}
|
||||
/// <summary>
|
||||
/// 备用1
|
||||
/// </summary>
|
||||
public string Remark1
|
||||
{
|
||||
set{ _remark1=value;}
|
||||
get{return _remark1;}
|
||||
}
|
||||
/// <summary>
|
||||
/// 备用2
|
||||
/// </summary>
|
||||
public string Remark2
|
||||
{
|
||||
set{ _remark2=value;}
|
||||
get{return _remark2;}
|
||||
}
|
||||
/// <summary>
|
||||
/// 备用3
|
||||
/// </summary>
|
||||
public string Remark3
|
||||
{
|
||||
set{ _remark3=value;}
|
||||
get{return _remark3;}
|
||||
}
|
||||
#endregion Model
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ActiveDebugProfile>CompetitionAPI</ActiveDebugProfile>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
|
||||
<NameOfLastUsedPublishProfile>F:\项目\福州海关散货系统\项目\FuZhou_Custom_BulkCargo_Server\CompetitionAPI\CompetitionAPI\CompetitionAPI\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompetitionAPI.Controllers.statistics
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class DownloadBusinessStatisticsController : Controller
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompetitionAPI.Controllers.statistics
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class GetBusinessStatisticsController : ControllerBase
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取业务统计列表接口
|
||||
/// </summary>
|
||||
/// <param name="StatisticsTime">统计时间/param>
|
||||
/// <param name="PageIndex">页码/param>
|
||||
/// <param name="PageSize">每页数量/param>
|
||||
/// <returns></returns>
|
||||
[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 }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompetitionAPI.Controllers.statistics
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ImportBusinessStatisticsController : Controller
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<_PublishTargetUrl>F:\项目\福州海关散货系统\项目\FuZhou_Custom_BulkCargo_Server\CompetitionAPI\CompetitionAPI\CompetitionAPI\bin\Release\net6.0\publish\</_PublishTargetUrl>
|
||||
<History>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;</History>
|
||||
<History>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;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue