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.
177 lines
5.7 KiB
177 lines
5.7 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMAPP.KB.Entity;
|
|
using QMAPP.BLL;
|
|
using QMFrameWork.Data;
|
|
using QMFrameWork.Log;
|
|
using QMAPP.FJC.Entity;
|
|
using QMAPP.FJC.DAL.SendManage;
|
|
using QMAPP.FJC.Entity.SendManage;
|
|
using QMAPP.FJC.BLL.Dict;
|
|
using System.Data;
|
|
|
|
namespace QMAPP.FJC.BLL.SendManage
|
|
{
|
|
/// <summary>
|
|
/// 模块编号:
|
|
/// 作 用:
|
|
/// 作 者:
|
|
/// 编写日期:
|
|
///</summary>
|
|
public class SendPlanRecordBLL : BaseBLL
|
|
{
|
|
#region 获取列表
|
|
/// <summary>
|
|
/// 获取列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <param name="page">数据页</param>
|
|
/// <returns>数据页</returns>
|
|
public DataResult<DataPage> GetList(PastCard condition, DataPage page)
|
|
{
|
|
DataResult<DataPage> result = new DataResult<DataPage>();
|
|
try
|
|
{
|
|
DataPage dataPage = new SendPlanRecordDAL().GetList(condition, page);
|
|
List<PastCard> materielList = dataPage.Result as List<PastCard>;
|
|
DictManageBLL dictColorTypeBll = new DictManageBLL(DictKind.COLOR);
|
|
//foreach (PastCard m in materielList)
|
|
//{
|
|
// //颜色
|
|
// m.COLORCODE = dictColorTypeBll.GetDictValue(m.COLORCODE);
|
|
// m.STARTCREATEDATE = m.CREATEDATE;
|
|
|
|
//}
|
|
result.Result = dataPage;
|
|
result.IsSuccess = true;
|
|
return result;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "贴车单查询信息逻辑层-获取列表!"
|
|
});
|
|
result.IsSuccess = false;
|
|
result.Msg = Resource.SystemException;
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 获取详细列表
|
|
/// <summary>
|
|
/// 获取详细列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <param name="page">数据页</param>
|
|
/// <returns>数据页</returns>
|
|
public DataResult<DataTable> GetItem(PastCard condition)
|
|
{
|
|
DataResult<DataTable> dataResult = new DataResult<DataTable>();
|
|
try
|
|
{
|
|
DataTable dt = new SendPlanRecordDAL().GetItemsData(condition);
|
|
|
|
#region 转换颜色、出库标记显示类型
|
|
|
|
//DictManageBLL dictColorTypeBll = new DictManageBLL(DictKind.COLOR);
|
|
//DictManageBLL dictOutFlagTypeBll = new DictManageBLL(DictKind.OUTFLAG);
|
|
//foreach (DataRow item in dt.Rows)
|
|
//{
|
|
// //颜色类别
|
|
// item["COLOR"] = dictColorTypeBll.GetDictValue(item["COLOR"].ToString());
|
|
// item["OUTFLAG"] = dictOutFlagTypeBll.GetDictValue(item["OUTFLAG"].ToString());
|
|
//}
|
|
|
|
#endregion
|
|
|
|
dataResult.Result = dt;
|
|
dataResult.IsSuccess = true;
|
|
return dataResult;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "贴车单查询信息逻辑层-获取列表!"
|
|
});
|
|
dataResult.IsSuccess = false;
|
|
dataResult.Msg = Resource.SystemException;
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 导出数据
|
|
/// <summary>
|
|
/// 获取导出的数据
|
|
/// </summary>
|
|
/// <param name="user">查询条件</param>
|
|
/// <returns>数据</returns>
|
|
public DataResult<DataTable> GetExportData(PastCard model)
|
|
{
|
|
DataResult<DataTable> result = new DataResult<DataTable>();
|
|
try
|
|
{
|
|
DataTable dt = new SendPlanRecordDAL().GetExportData(model);
|
|
|
|
result.Result = dt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "贴车单查询逻辑层-导出数据!"
|
|
});
|
|
result.IsSuccess = false;
|
|
result.Msg = Resource.SystemException;
|
|
throw ex;
|
|
}
|
|
result.IsSuccess = true;
|
|
return result;
|
|
}
|
|
#endregion
|
|
|
|
#region 导出数据详细信息
|
|
/// <summary>
|
|
/// 获取导出的数据
|
|
/// </summary>
|
|
/// <param name="user">查询条件</param>
|
|
/// <returns>数据</returns>
|
|
public DataTable GetExportData2(PastCardDetail model)
|
|
{
|
|
try
|
|
{
|
|
DataTable dt = new SendPlanRecordDAL().GetExportData2(model);
|
|
|
|
//根据所选信息进行导出
|
|
//if (string.IsNullOrEmpty(model.PASTECARDNO_List) == false)
|
|
//{
|
|
// model.PASTECARDNO_List = "'" + model.PASTECARDNO_List.Replace(":", "','") + "'";
|
|
// DataView dv = new DataView(dt);
|
|
// dv.RowFilter = "PID in (" + model.PASTECARDNO_List + ")";
|
|
|
|
// dt = dv.ToTable();
|
|
//}
|
|
return dt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
}
|
|
}
|
|
|