using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.BLL;
using QMAPP.Entity;
using QMAPP.FJC.Entity.EnergyManage;
using System.Data;
using QMAPP.FJC.DAL.EnergyManage;
using QMFrameWork.Log;
using QMFrameWork.Data;
using QMAPP.FJC.Entity;
namespace QMAPP.FJC.BLL.EnergyManage
{
public class MeterReadingsBLL : BaseBLL
{
#region 获取列表
///
/// 获取列表
///
/// 条件
/// 数据页
/// 数据页
public DataResult GetList(Meter condition, DataPage page)
{
DataResult result = new DataResult();
try
{
//获取信息列表
DataPage dataPage = new MeterReadingsDAL().GetList(condition, page);
#region 转换状态显示类型
//List fisOrderList = page.Result as List;
////处理字典信息
//DictManageBLL dictSCANSTATE = new DictManageBLL(DictKind.SCANSTATE);
//foreach (var info in fisOrderList)
//{
// info.SCANSTATE = dictSCANSTATE.GetDictValue(info.SCANSTATE);
//}
#endregion
result.Result = dataPage;
}
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 导出数据
///
/// 获取导出的数据
///
/// 查询条件
/// 数据
public DataResult GetExportData(Meter model)
{
DataResult result = new DataResult();
try
{
result.IsSuccess = true;
result.Result = new MeterReadingsDAL().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 = "设备耗能统计信息导出错误!"
});
result.IsSuccess = false;
result.Msg = "FIS设备耗能统计信息导出错误!";
}
return result;
}
#endregion
public MeterReadings GetLastReading(string p)
{
throw new NotImplementedException();
}
public void Insert(MeterReadings newreading)
{
throw new NotImplementedException();
}
}
}