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.
163 lines
5.1 KiB
163 lines
5.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMAPP.BLL;
|
|
using QMAPP.Entity;
|
|
using QMAPP.FJC.Entity.FIS;
|
|
using QMFrameWork.Data;
|
|
using QMAPP.FJC.BLL.Dict;
|
|
using QMFrameWork.Log;
|
|
using QMAPP.FJC.Entity;
|
|
using QMAPP.FJC.DAL.FIS;
|
|
using System.Data;
|
|
using QMAPP.FJC.Entity.FileCopy.FIS;
|
|
|
|
namespace QMAPP.FJC.BLL.FIS
|
|
{
|
|
/// <summary>
|
|
/// FIS计划查询
|
|
/// </summary>
|
|
public class FISOrderBLL : BaseBLL
|
|
{
|
|
#region 获取列表
|
|
/// <summary>
|
|
/// 获取列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <param name="page">数据页</param>
|
|
/// <returns>数据页</returns>
|
|
public DataResult<DataPage> GetList(FISOrder condition, DataPage page)
|
|
{
|
|
DataResult<DataPage> result = new DataResult<DataPage>();
|
|
try
|
|
{
|
|
//获取信息列表
|
|
page = new FISOrderDAL().GetList(condition, page);
|
|
|
|
#region 转换状态显示类型
|
|
List<FISOrder> fisOrderList = page.Result as List<FISOrder>;
|
|
//处理字典信息
|
|
DictManageBLL dictSCANSTATE = new DictManageBLL(DictKind.SCANSTATE);
|
|
|
|
foreach (var info in fisOrderList)
|
|
{
|
|
info.SCANSTATE = dictSCANSTATE.GetDictValue(info.SCANSTATE);
|
|
}
|
|
#endregion
|
|
|
|
result.Result = page;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "FIS 计划信息逻辑层-获取列表!"
|
|
});
|
|
result.IsSuccess = false;
|
|
result.Msg = Resource.SystemException;
|
|
throw ex;
|
|
}
|
|
result.IsSuccess = true;
|
|
return result;
|
|
}
|
|
public List<FISOrder> FISOrderIsNull(FISOrder condition)
|
|
{
|
|
try
|
|
{
|
|
return new FISOrderDAL().FISOrderIsNull(condition);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "FIS 计划信息逻辑层-获取列表!"
|
|
});
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 导出数据
|
|
/// <summary>
|
|
/// 获取导出的数据
|
|
/// </summary>
|
|
/// <param name="user">查询条件</param>
|
|
/// <returns>数据</returns>
|
|
public DataResult<DataTable> GetExportData(FISOrder model)
|
|
{
|
|
DataResult<DataTable> result = new DataResult<DataTable>();
|
|
try
|
|
{
|
|
result.IsSuccess = true;
|
|
result.Result = new FISOrderDAL().GetExportData(model);
|
|
|
|
//处理字典信息
|
|
DictManageBLL dictSCANSTATE = new DictManageBLL(DictKind.SCANSTATE);
|
|
|
|
foreach (DataRow dr in result.Result.Rows)
|
|
{
|
|
//替换状态类别显示值
|
|
dr["SCANSTATE"] = dictSCANSTATE.GetDictValue(dr["SCANSTATE"].ToString());
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "FIS计划查询信息导出错误!"
|
|
});
|
|
result.IsSuccess = false;
|
|
result.Msg = "FIS计划查询信息导出错误!";
|
|
}
|
|
return result;
|
|
}
|
|
#endregion
|
|
|
|
#region 插入信息
|
|
/// <summary>
|
|
/// 插入信息(单表)
|
|
/// </summary>
|
|
/// <param name="">信息</param>
|
|
/// <returns>插入行数</returns>
|
|
public DataResult<int> Insert(FISOrder model)
|
|
{
|
|
DataResult<int> result = new DataResult<int>();
|
|
FISOrderDAL cmdDAL = new FISOrderDAL();
|
|
//基本信息
|
|
//model.PID = Guid.NewGuid().ToString();
|
|
//model.CREATEUSER = this.LoginUser.UserID;
|
|
//model.CREATEDATE = DateTime.Now;
|
|
//model.UPDATEUSER = model.CREATEUSER;
|
|
//model.UPDATEDATE = model.CREATEDATE;
|
|
//model.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString();
|
|
try
|
|
{
|
|
result.Result = new FISOrderDAL().Insert(model);
|
|
}
|
|
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
|
|
|
|
}
|
|
}
|
|
|