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.
228 lines
6.2 KiB
228 lines
6.2 KiB
2 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using QMAPP.BLL;
|
||
|
|
||
|
using QMFrameWork.Data;
|
||
|
|
||
|
using QMAPP.Entity;
|
||
|
using QMFrameWork.Log;
|
||
|
using System.Data;
|
||
|
using QMAPP.MD.Entity;
|
||
|
using QMAPP.MD.DAL;
|
||
|
using QMAPP.FJC.Entity.CheckTime;
|
||
|
using QMAPP.FJC.DAL.CheckTime;
|
||
|
using QMAPP.FJC.BLL.BZD;
|
||
|
|
||
|
namespace QMAPP.FJC.BLL.CheckTime
|
||
|
{
|
||
|
/// </summary>
|
||
|
/// 模块名称:本地库无记录的 时间验证
|
||
|
/// 作 者:张松男
|
||
|
/// 编写日期:2020年03月00日
|
||
|
/// </summary>
|
||
|
public class ProductTimeBLL : BaseBLL
|
||
|
{
|
||
|
|
||
|
#region 获取信息
|
||
|
/// <summary>
|
||
|
/// 获取信息
|
||
|
/// </summary>
|
||
|
/// <param name="">条件</param>
|
||
|
/// <returns>信息</returns>
|
||
|
public DataResult<ProductTime> Get(ProductTime model)
|
||
|
{
|
||
|
DataResult<ProductTime> result = new DataResult<ProductTime>();
|
||
|
try
|
||
|
{
|
||
|
result.Result = new ProductTimeDAL().Get(model);
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
result.IsSuccess = false;
|
||
|
result.Msg = Resource.SystemException;
|
||
|
throw ex;
|
||
|
}
|
||
|
result.IsSuccess = true;
|
||
|
return result;
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 获取列表(分页)
|
||
|
/// <summary>
|
||
|
/// 获取列表
|
||
|
/// </summary>
|
||
|
/// <param name="condition">条件</param>
|
||
|
/// <param name="page">数据页</param>
|
||
|
/// <returns>数据页</returns>
|
||
|
public DataResult<DataPage> GetList(ProductTime condition, DataPage page)
|
||
|
{
|
||
|
DataResult<DataPage> result = new DataResult<DataPage>();
|
||
|
try
|
||
|
{
|
||
|
//获取物料信息列表
|
||
|
DataPage dataPage = new ProductTimeDAL().GetList(condition, page);
|
||
|
|
||
|
result.Result = dataPage;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
result.IsSuccess = false;
|
||
|
result.Msg = Resource.SystemException;
|
||
|
throw ex;
|
||
|
}
|
||
|
result.IsSuccess = true;
|
||
|
return result;
|
||
|
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 获取全部条码格式规则
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public List<ProductTime> GetAllList(string str)
|
||
|
{
|
||
|
return new ProductTimeDAL().GetAllList();
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 信息是否重复
|
||
|
/// <summary>
|
||
|
/// 判断名称是否存在
|
||
|
/// </summary>
|
||
|
/// <param name="">信息</param>
|
||
|
/// <returns>true:已存在;fasel:不存在。</returns>
|
||
|
public bool Exists(ProductTime info)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
return new ProductTimeDAL().Exists(info);
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
#region 插入信息
|
||
|
/// <summary>
|
||
|
/// 插入信息(单表)
|
||
|
/// </summary>
|
||
|
/// <param name="">信息</param>
|
||
|
/// <returns>插入行数</returns>
|
||
|
public DataResult<int> Insert(ProductTime info)
|
||
|
{
|
||
|
DataResult<int> result = new DataResult<int>();
|
||
|
try
|
||
|
{
|
||
|
|
||
|
//基本信息
|
||
|
info.PID = Guid.NewGuid().ToString();
|
||
|
info.CREATEUSER = this.LoginUser.UserID;
|
||
|
info.CREATEDATE = DateTime.Now;
|
||
|
info.UPDATEUSER = info.CREATEUSER;
|
||
|
info.UPDATEDATE = info.CREATEDATE;
|
||
|
ProductTimeDAL cmdDAL = new ProductTimeDAL();
|
||
|
result.Result = new ProductTimeDAL().Insert(info);
|
||
|
result.IsSuccess = true;
|
||
|
return result;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 更新信息
|
||
|
/// <summary>
|
||
|
/// 更新信息
|
||
|
/// </summary>
|
||
|
/// <param name="">信息</param>
|
||
|
/// <returns>更新行数</returns>
|
||
|
public DataResult<int> Update(ProductTime info)
|
||
|
{
|
||
|
DataResult<int> result = new DataResult<int>();
|
||
|
try
|
||
|
{
|
||
|
info.UPDATEUSER = this.LoginUser.UserID;
|
||
|
info.UPDATEDATE = DateTime.Now;
|
||
|
result.Result = new ProductTimeDAL().Update(info);
|
||
|
result.IsSuccess = true;
|
||
|
return result;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 删除
|
||
|
/// <summary>
|
||
|
/// 删除信息
|
||
|
/// </summary>
|
||
|
/// <param name="">主键串</param>
|
||
|
/// <returns>删除个数</returns>
|
||
|
public DataResult<int> Delete(string strs)
|
||
|
{
|
||
|
int count = 0;
|
||
|
DataResult<int> result = new DataResult<int>();
|
||
|
string[] list = strs.Split(":".ToCharArray());
|
||
|
try
|
||
|
{
|
||
|
foreach (string str in list)
|
||
|
{
|
||
|
count += this.DeleteBarcodeRules(new ProductTime { PID = str });
|
||
|
}
|
||
|
result.Result = count;
|
||
|
result.IsSuccess = true;
|
||
|
return result;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 删除信息
|
||
|
/// </summary>
|
||
|
/// <param name="">信息</param>
|
||
|
/// <returns>删除个数</returns>
|
||
|
public int DeleteBarcodeRules(ProductTime info)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
return new ProductTimeDAL().Delete(info);
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 导出数据
|
||
|
/// <summary>
|
||
|
/// 获取导出的数据
|
||
|
/// </summary>
|
||
|
/// <param name="user">查询条件</param>
|
||
|
/// <returns>数据</returns>
|
||
|
public DataTable GetExportData(ProductTime model)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
return new ProductTimeDAL().GetExportData(model);
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
#endregion
|
||
|
}
|
||
|
}
|