天津投入产出系统后端
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.

113 lines
3.4 KiB

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 ��ȡ�б�
/// <summary>
/// ��ȡ�б�
/// </summary>
/// <param name="condition">����</param>
/// <param name="page">����ҳ</param>
/// <returns>����ҳ</returns>
public DataResult<DataPage> GetList(Meter condition, DataPage page)
{
DataResult<DataPage> result = new DataResult<DataPage>();
try
{
//��ȡ��Ϣ�б�
DataPage dataPage = new MeterReadingsDAL().GetList(condition, page);
#region ת��״̬��ʾ����
//List<Meter> fisOrderList = page.Result as List<Meter>;
////�����ֵ���Ϣ
//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 ��������
/// <summary>
/// ��ȡ����������
/// </summary>
/// <param name="user">��ѯ����</param>
/// <returns>����</returns>
public DataResult<DataTable> GetExportData(Meter model)
{
DataResult<DataTable> result = new DataResult<DataTable>();
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();
}
}
}