You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
4.2 KiB
145 lines
4.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using QMAPP.BLL;
|
|
using QMAPP.Entity;
|
|
using QMAPP.FJC.BLL.Dict;
|
|
using QMAPP.FJC.DAL.ProduceManage;
|
|
using QMAPP.FJC.Entity.ProduceManage;
|
|
using QMFrameWork.Data;
|
|
using QMFrameWork.Log;
|
|
using QMAPP.FJC.Entity;
|
|
using QMAPP.MD.Entity.Bucket;
|
|
using QMAPP.FJC.DAL.Bucket;
|
|
|
|
namespace QMAPP.FJC.BLL.Bucket
|
|
{
|
|
/// <summary>
|
|
/// 模块名称:搪塑称重记录
|
|
/// 作 者:张松男
|
|
/// 编写日期:2021年08月23日
|
|
/// </summary>
|
|
public class TSWeighRecoreBLL : BaseBLL
|
|
{
|
|
#region 获取信息
|
|
/// <summary>
|
|
/// 获取信息
|
|
/// </summary>
|
|
/// <param name="">条件</param>
|
|
/// <returns>信息</returns>
|
|
public DataResult<TSWeighRecore> Get(TSWeighRecore model)
|
|
{
|
|
DataResult<TSWeighRecore> result = new DataResult<TSWeighRecore>();
|
|
try
|
|
{
|
|
result.Result = new TSWeighRecoreDAL().Get(model);
|
|
result.IsSuccess = true;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "获取异常!"
|
|
});
|
|
result.IsSuccess = false;
|
|
result.Ex = ex;
|
|
result.Msg = "获取异常";
|
|
}
|
|
|
|
return result;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取列表
|
|
/// <summary>
|
|
/// 获取列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <param name="page">数据页</param>
|
|
/// <returns>数据页</returns>
|
|
public DataResult<DataPage> GetList(TSWeighRecore condition, DataPage page)
|
|
{
|
|
DataResult<DataPage> result = new DataResult<DataPage>();
|
|
try
|
|
{
|
|
DataPage dataPage = new TSWeighRecoreDAL().GetList(condition, page);
|
|
|
|
result.IsSuccess = true;
|
|
result.Result = dataPage;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "获取列表异常!"
|
|
});
|
|
result.IsSuccess = false;
|
|
result.Ex = ex;
|
|
result.Msg = "获取列表异常!";
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <returns>全部集合</returns>
|
|
public List<TSWeighRecore> GetAllList()
|
|
{
|
|
try
|
|
{
|
|
//获取信息列表
|
|
return new TSWeighRecoreDAL().GetALL();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "获取列表异常!"
|
|
});
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region 插入信息
|
|
/// <summary>
|
|
/// 插入信息(单表)
|
|
/// </summary>
|
|
/// <param name="">信息</param>
|
|
/// <returns>插入行数</returns>
|
|
public DataResult<int> Insert(TSWeighRecore info)
|
|
{
|
|
DataResult<int> result = new DataResult<int>();
|
|
try
|
|
{
|
|
//基本信息
|
|
info.PID = Guid.NewGuid().ToString();
|
|
info.CREATEUSER = this.LoginUser.UserID;
|
|
info.CREATEDATE = DateTime.Now.ToString();
|
|
info.UPDATEUSER = info.CREATEUSER;
|
|
info.UPDATEDATE = info.CREATEDATE;
|
|
TSWeighRecoreDAL cmdDAL = new TSWeighRecoreDAL();
|
|
result.Result = cmdDAL.Insert(info);
|
|
result.IsSuccess = true;
|
|
return result;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
}
|
|
|