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.
104 lines
3.2 KiB
104 lines
3.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMAPP.Entity;
|
|
using QMFrameWork.Data;
|
|
using QMAPP.FJC.BLL.Dict;
|
|
using QMFrameWork.Log;
|
|
using System.Data;
|
|
using QMAPP.FJC.DAL.FeedInManage;
|
|
using QMAPP.FJC.Entity.Operation;
|
|
using QMAPP.FJC.DAL.Basic;
|
|
using QMAPP.BLL;
|
|
|
|
namespace QMAPP.FJC.BLL.Basic
|
|
{
|
|
/// <summary>
|
|
/// 不合格品数量查询
|
|
/// </summary>
|
|
public class UnQualityProductBLL : BaseBLL
|
|
{
|
|
#region 获取列表
|
|
/// <summary>
|
|
/// 获取列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <param name="page">数据页</param>
|
|
/// <returns>数据页</returns>
|
|
public DataResult<DataPage> GetList(Product condition, DataPage page)
|
|
{
|
|
DataResult<DataPage> result = new DataResult<DataPage>();
|
|
try
|
|
{
|
|
result.IsSuccess = true;
|
|
|
|
page = new UnQualityProductDAL().GetList(condition, page);
|
|
|
|
List<Product> list = page.Result as List<Product>;
|
|
|
|
//处理字典信息
|
|
DictManageBLL dictPRODUCTTYPE = new DictManageBLL(DictKind.PRODUCTTYPE);
|
|
|
|
foreach (var info in list)
|
|
{
|
|
//替换零件类别显示值
|
|
info.PRODUCTTYPE = dictPRODUCTTYPE.GetDictValue(info.PRODUCTTYPE);
|
|
}
|
|
|
|
result.Result = page;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "不合格品信息获取列表错误!"
|
|
});
|
|
result.IsSuccess = false;
|
|
result.Msg = "不合格品信息获取列表错误!";
|
|
}
|
|
return result;
|
|
}
|
|
#endregion
|
|
|
|
#region 导出数据
|
|
/// <summary>
|
|
/// 获取导出的数据
|
|
/// </summary>
|
|
/// <param name="user">查询条件</param>
|
|
/// <returns>数据</returns>
|
|
public DataResult<DataTable> GetExportData(Product model)
|
|
{
|
|
DataResult<DataTable> result = new DataResult<DataTable>();
|
|
try
|
|
{
|
|
result.IsSuccess = true;
|
|
result.Result = new UnQualityProductDAL().GetExportData(model);
|
|
|
|
//处理字典信息
|
|
DictManageBLL dictPRODUCTTYPE = new DictManageBLL(DictKind.PRODUCTTYPE);
|
|
|
|
foreach (DataRow dr in result.Result.Rows)
|
|
{
|
|
//替换零件类别显示值
|
|
dr["PRODUCTTYPE"] = dictPRODUCTTYPE.GetDictValue(dr["PRODUCTTYPE"].ToString());
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "不合格品信息导出错误!"
|
|
});
|
|
result.IsSuccess = false;
|
|
result.Msg = "不合格品信息导出错误!";
|
|
}
|
|
return result;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|
|
|