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

80 lines
2.6 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.MESReport.Entity.LineQTY;
using QMAPP.MESReport.DAL.LineQTY;
using QMAPP.BLL;
using QMFrameWork.Data;
using QMAPP.Entity;
using System.Data;
using QMAPP.MD.BLL;
using QMAPP.MD.Entity;
using QMAPP.MESReport.Entity.Tables;
namespace QMAPP.MESReport.BLL.LineQTY
{
/// <summary>
/// 合格率分析
/// 于子清
/// 2017-10-13
/// </summary>
public class StandardRateCountBLL : BaseBLL
{
/// <summary>
/// 获取合格率图表主数据
/// </summary>
/// <param name="condition"></param>
/// <returns></returns>
public DataResult<List<StandardRateDModel>> GetMainList(StandardRateDModel condition)
{
DataResult<List<StandardRateDModel>> result = new DataResult<List<StandardRateDModel>>();
try
{
result.Result = new StandardRateCountDAL().GetAllList(condition);
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
result.IsSuccess = false;
result.Msg = ex.ToString();
return result;
}
}
/// <summary>
/// 获取不合格率图表主数据
/// </summary>
/// <param name="condition"></param>
/// <returns></returns>
public DataResult<List<StandardRateDModel>> GetMainListNot(StandardRateDModel condition)
{
DataResult<List<StandardRateDModel>> result = new DataResult<List<StandardRateDModel>>();
try
{
result.Result = new StandardRateCountDAL().GetAllListNot(condition);
var workCells = new WorkCellBLL().GetWorkCellList(new WorkCell());
foreach (StandardRateDModel item in result.Result)
{
//处理人
if (!string.IsNullOrEmpty(item.WORKCELL_CODE))
{
var workCell = workCells.FirstOrDefault(x => x.WORKCELL_CODE == item.WORKCELL_CODE);
if (workCell != null)
{
item.WORKCELL_NAME = workCell.WORKCELL_NAME;
}
}
}
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
result.IsSuccess = false;
result.Msg = ex.ToString();
return result;
}
}
}
}