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.
71 lines
2.4 KiB
71 lines
2.4 KiB
4 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using QMAPP.BLL;
|
||
|
using QMAPP.Entity;
|
||
|
using System.Data;
|
||
|
using QMAPP.FJC.Entity.Basic;
|
||
|
using QMAPP.FJC.DAL.Basic;
|
||
|
using QMFrameWork.Log;
|
||
|
using QMAPP.FJC.Entity;
|
||
|
|
||
|
namespace QMAPP.FJC.BLL.IPC
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 描述:SPC监控
|
||
|
/// 作者:单雨春
|
||
|
/// 时间:2015年6月2日18:30:18
|
||
|
/// </summary>
|
||
|
public class SPCControlBLL : BaseBLL
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 获取加工参数值
|
||
|
/// </summary>
|
||
|
/// <param name="condition">条件</param>
|
||
|
/// <returns>加工参数表返回值</returns>
|
||
|
public DataResult<DataTable> GetData(ProcessParameter condition)
|
||
|
{
|
||
|
DataResult<DataTable> dataResult = new DataResult<DataTable>();
|
||
|
try
|
||
|
{
|
||
|
//获得加工参数标准值
|
||
|
ProcessParameter entityParameter = new ProcessParameterDAL().Get(condition);
|
||
|
|
||
|
//初始化选择列
|
||
|
entityParameter.SelectColumn = condition.SelectColumn;
|
||
|
entityParameter.MonitorCount = condition.MonitorCount;
|
||
|
entityParameter.MVStart = condition.MVStart;
|
||
|
entityParameter.MVEnd = condition.MVEnd;
|
||
|
|
||
|
//获得加工参数数据
|
||
|
dataResult.Result = new ProcessParameterDAL().GetData(entityParameter);
|
||
|
|
||
|
//增加列
|
||
|
dataResult.Result.Columns.Add("STEP", typeof(double));
|
||
|
dataResult.Result.Columns.Add("MAX", typeof(double));
|
||
|
dataResult.Result.Columns.Add("MIN", typeof(double));
|
||
|
foreach (var row in dataResult.Result.AsEnumerable())
|
||
|
{
|
||
|
row["STEP"] = entityParameter.STEP;
|
||
|
row["MAX"] = entityParameter.MAXVALUE;
|
||
|
row["MIN"] = entityParameter.MINVALUE;
|
||
|
}
|
||
|
dataResult.IsSuccess = true;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogManager.LogHelper.Error(new LogInfo()
|
||
|
{
|
||
|
ErrorInfo = ex,
|
||
|
Tag = ex.StackTrace,
|
||
|
Info = "SPC监控-获取加工参数标准值"
|
||
|
});
|
||
|
dataResult.IsSuccess = false;
|
||
|
dataResult.Msg = Resource.SystemException;
|
||
|
}
|
||
|
return dataResult;
|
||
|
}
|
||
|
}
|
||
|
}
|