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.
222 lines
5.4 KiB
222 lines
5.4 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMFrameWork.Common.Encrypt;
|
|
using QMFrameWork.Data;
|
|
using QMAPP.FJC.DAL.Operation;
|
|
using QMAPP.FJC.Entity.Operation;
|
|
using QMAPP.BLL;
|
|
using QMAPP.Entity;
|
|
using QMAPP.FJC.BLL.Dict;
|
|
using QMAPP.FJC.Entity.CCParameters;
|
|
using QMAPP.FJC.DAL.CCParameters;
|
|
|
|
namespace QMAPP.FJC.BLL.CCParameters
|
|
{
|
|
/// <summary>
|
|
/// 作 用:加工参数采集
|
|
/// 作 者:张松男
|
|
/// 编写日期:2023年01月16日
|
|
///</summary>
|
|
public class SYSCONFIGBLL : BaseBLL
|
|
{
|
|
|
|
|
|
#region 获取信息
|
|
/// <summary>
|
|
/// 获取信息
|
|
/// </summary>
|
|
/// <param name="">条件</param>
|
|
/// <returns>信息</returns>
|
|
public DataResult<SYSCONFIG> Get(SYSCONFIG model)
|
|
{
|
|
DataResult<SYSCONFIG> result = new DataResult<SYSCONFIG>();
|
|
try
|
|
{
|
|
result.Result = new SYSCONFIGDAL().Get(model);
|
|
|
|
result.IsSuccess = true;
|
|
return result;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 获取列表
|
|
/// <summary>
|
|
/// 获取列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <param name="page">数据页</param>
|
|
/// <returns>数据页</returns>
|
|
public DataResult<DataPage> GetList(SYSCONFIG condition, DataPage page)
|
|
{
|
|
DataResult<DataPage> result = new DataResult<DataPage>();
|
|
try
|
|
{
|
|
//获取物料信息列表
|
|
DataPage dataPage = new SYSCONFIGDAL().GetList(condition, page);
|
|
|
|
result.Result = dataPage;
|
|
result.IsSuccess = true;
|
|
return result;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
#region 插入信息
|
|
/// <summary>
|
|
/// 插入信息(单表)
|
|
/// </summary>
|
|
/// <param name="">信息</param>
|
|
/// <returns>插入行数</returns>
|
|
public DataResult<int> Insert(SYSCONFIG model)
|
|
{
|
|
DataResult<int> result = new DataResult<int>();
|
|
try
|
|
{
|
|
result.Result = new SYSCONFIGDAL().Insert(model);
|
|
result.IsSuccess = true;
|
|
return result;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 更新信息
|
|
/// <summary>
|
|
/// 更新信息
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <returns>更新行数</returns>
|
|
public DataResult<int> Update(SYSCONFIG model)
|
|
{
|
|
try
|
|
{
|
|
DataResult<int> result = new DataResult<int>();
|
|
result.Result = new SYSCONFIGDAL().Update(model);
|
|
|
|
result.IsSuccess = true;
|
|
return result;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 信息是否重复
|
|
/// <summary>
|
|
/// 判断名称是否存在
|
|
/// </summary>
|
|
/// <param name="">信息</param>
|
|
/// <returns>true:已存在;fasel:不存在。</returns>
|
|
public bool Exists(SYSCONFIG info)
|
|
{
|
|
try
|
|
{
|
|
return new SYSCONFIGDAL().Exists(info);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 删除
|
|
/// <summary>
|
|
/// 删除信息
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <returns>删除个数</returns>
|
|
public DataResult<int> Delete(string strs)
|
|
{
|
|
DataResult<int> result = new DataResult<int>();
|
|
int count = 0;
|
|
string[] list = strs.Split(":".ToCharArray());
|
|
try
|
|
{
|
|
foreach (string str in list)
|
|
{
|
|
count += this.DeleteMainProduct(new SYSCONFIG { CODE = str });
|
|
}
|
|
result.Result = count;
|
|
result.IsSuccess = true;
|
|
return result;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 删除信息
|
|
/// </summary>
|
|
/// <param name="">信息</param>
|
|
/// <returns>删除个数</returns>
|
|
public int DeleteMainProduct(SYSCONFIG model)
|
|
{
|
|
int count = 0;
|
|
try
|
|
{
|
|
count = new SYSCONFIGDAL().Delete(model);
|
|
return count;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 导出数据
|
|
/// <summary>
|
|
/// 获取导出的数据
|
|
/// </summary>
|
|
/// <param name="user">查询条件</param>
|
|
/// <returns>数据</returns>
|
|
public DataTable GetExportData(SYSCONFIG model)
|
|
{
|
|
try
|
|
{
|
|
return new SYSCONFIGDAL().GetExportData(model);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|