|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using QMAPP.BLL;
|
|
|
|
using QMAPP.FJC.Entity.Basic;
|
|
|
|
using QMAPP.FJC.DAL.Basic;
|
|
|
|
using QMFrameWork.Data;
|
|
|
|
using QMAPP.FJC.Entity;
|
|
|
|
using QMAPP.FJC.BLL.Dict;
|
|
|
|
using QMAPP.Entity;
|
|
|
|
using QMFrameWork.Log;
|
|
|
|
using System.Data;
|
|
|
|
using QMAPP.FJC.DAL.MD;
|
|
|
|
using QMAPP.FJC.Entity.MD;
|
|
|
|
|
|
|
|
namespace QMAPP.FJC.BLL.Basic
|
|
|
|
{
|
|
|
|
/// </summary>
|
|
|
|
/// 模块名称:配置表
|
|
|
|
/// 作 者:张松男
|
|
|
|
/// 编写日期:2021年03月17日
|
|
|
|
/// </summary>
|
|
|
|
public class AppConfigBLL : BaseBLL
|
|
|
|
{
|
|
|
|
|
|
|
|
#region 获取信息
|
|
|
|
/// <summary>
|
|
|
|
/// 获取信息
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="">条件</param>
|
|
|
|
/// <returns>信息</returns>
|
|
|
|
public AppConfig Get(string code)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
return new AppConfigDAL().Get(code);
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
throw ex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
|
|
/// 获取信息
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="">条件</param>
|
|
|
|
/// <returns>信息</returns>
|
|
|
|
public DataResult<int> UpdateAppConfig(string pConfigCode, string pConfigValue)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
DataResult<int> result = new DataResult<int>();
|
|
|
|
result.Result = new AppConfigDAL().UpdateAppConfig(pConfigCode, pConfigValue);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
throw ex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 获取信息
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="">条件</param>
|
|
|
|
/// <returns>信息</returns>
|
|
|
|
public AppConfig GetPID(AppConfig code)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
return new AppConfigDAL().GetPID(code);
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
throw ex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
public DataResult<DataPage> GetList(AppConfig condition, DataPage page)
|
|
|
|
{
|
|
|
|
DataResult<DataPage> result = new DataResult<DataPage>();
|
|
|
|
result.IsSuccess = true;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
result.Result = new AppConfigDAL().GetList(condition,page);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
throw ex;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public DataResult<int> Update(AppConfig info)
|
|
|
|
{
|
|
|
|
DataResult<int> result = new DataResult<int>();
|
|
|
|
try
|
|
|
|
{
|
|
|
|
result.IsSuccess = true;
|
|
|
|
result.Result = new AppConfigDAL().Update(info);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
throw ex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 获取信息
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="">条件</param>
|
|
|
|
/// <returns>信息</returns>
|
|
|
|
public MaterialClass GetMATERIAL(string code)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
//查找物料号
|
|
|
|
var MATERIAL = new MaterialDAL().Get(code);
|
|
|
|
var msg = "";
|
|
|
|
var mater = new AppConfigDAL().GetMATERIAL(MATERIAL.MATERIAL_TYPE_CODE,ref msg);
|
|
|
|
mater.MATERIAL_TYPE_NAME = msg;
|
|
|
|
return mater;
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
throw ex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|