using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Data.OleDb;
using DataLinkMesWork;
//using SystemFramework;
namespace bizFacade
{
public class MobyTagType
{
///
/// 配方号
///
public static string PLCRcipe = "配方号";
///
/// 工位号
///
public static string OpName = "工位号";
///
/// 订单号
///
public static string OrderForm = "订单号";
///
/// 订单号
///
public static string OrderForm_MES = "订单号_MES";
///
/// 产品型号代码
///
public static string EngineTypeID = "产品型号代码";
///
/// 变速器序列号
/// 变速器序列号
public static string EngineID = "变速器序列号";
///
/// 发动机型号
///
public static string EngineType = "发动机型号";
///
/// 机型基本代码
///
public static string EngineTypeBasicID = "机型基本代码";
///
/// 机型基本代码
///
public static string EngineTypeBasic = "基本机型";
///
/// 变速器总成号
///
public static string EngineIDPrinte = "变速器总成号";
///
/// 托盘号
///
public static string PartPallet_Code = "托盘号";
///
/// 产品型号代码_MES
///
public static string EngineTypeID_MES = "产品型号代码_MES";
///
/// 变速器序列号_MES
///
public static string EngineID_MES = "变速器序列号_MES";
///
/// 发动机型号_MES
///
public static string EngineType_MES = "发动机型号_MES";
///
/// 到达时间线外工位
///
public static string WorkStartOutSideIn = "到达时间线外工位";
///
/// 离开时间线外工位
///
public static string WorkStartOutSideOut = "离开时间线外工位";
///
/// 到达时间
///
public static string WorkStartIn = "到达时间";
///
/// 离开时间
///
public static string WorkStartOut = "离开时间";
///
/// 持续时间
///
public static string WorkStartTime = "持续时间";
///
/// 扫描条码
///
public static string BarCode = "扫描条码";
///
/// 工件到位 2
///
public static string WorkStart = "工件到位";
///
/// 传递机型 44
///
public static string EngineTypeGetOverPLC = "传递机型";
///
/// 申请上件 43
///
public static string PartLoad = "申请上件";
///
/// 允许保存 19
///
public static string MesRead = "允许保存";
///
/// 保存完成 20
///
public static string MesReadOver = "保存完成";
/// [机床上电],[循环开始],[机床故障],[上料无件],[下料堵塞],[工件到位]
/// [传递机型],[申请上件],[允许保存],[保存完成],[合格标志],[前序合格]
/// [工号],[班次],[是否返修件],[合格放行],[不合格放行]
/// [到达时间],[离开时间],[持续时间]
// engineTypeID = Convert.ToInt32(thisParms[2].Value);
//engineType = thisParms[3].Value.ToString();
//engineID = thisParms[4].Value.ToString();
//palletCode = thisParms[5].Value.ToString();
}
public partial class BaseDataSystemMES
{
///
/// 测量数据工位_监控系统_MOBY_查询
///
///
///
///
///
///
///
///
///
///
public static bool OpName_MIS_Moby_Select(string opName,
out string orderForm, out int engineTypeID, out string engineType,
out string engineID, out string palletCode, out int isRepair, out string repairCode)
{
orderForm = "";
engineTypeID = 0;
engineType = "";
engineID = "";
palletCode = "";
isRepair = 0;
repairCode = "";
string produceName = "测量数据工位_监控系统_MOBY_查询";
SqlParameter[] thisParms = new SqlParameter[8];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@订单号", SqlDbType.NVarChar, 50);
thisParms[1].Direction = ParameterDirection.Output;
thisParms[2] = new System.Data.SqlClient.SqlParameter("@产品型号代码", SqlDbType.Int, 4);
thisParms[2].Direction = ParameterDirection.Output;
thisParms[3] = new System.Data.SqlClient.SqlParameter("@发动机型号", SqlDbType.NVarChar, 50);
thisParms[3].Direction = ParameterDirection.Output;
thisParms[4] = new System.Data.SqlClient.SqlParameter("@发动机号", SqlDbType.NVarChar, 50);
thisParms[4].Direction = ParameterDirection.Output;
thisParms[5] = new System.Data.SqlClient.SqlParameter("@托盘号", SqlDbType.NVarChar, 50);
thisParms[5].Direction = ParameterDirection.Output;
thisParms[6] = new System.Data.SqlClient.SqlParameter("@拆解标志", SqlDbType.Int, 4);
thisParms[6].Direction = ParameterDirection.Output;
thisParms[7] = new System.Data.SqlClient.SqlParameter("@拆解返修条码", SqlDbType.NVarChar, 50);
thisParms[7].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
orderForm = thisParms[1].Value.ToString();
engineTypeID = Convert.ToInt32(thisParms[2].Value);
engineType = thisParms[3].Value.ToString();
engineID = thisParms[4].Value.ToString();
palletCode = thisParms[5].Value.ToString();
isRepair = Convert.ToInt32(thisParms[6].Value);
repairCode = thisParms[7].Value.ToString();
return true;
}
return false;
}
///
/// 测量数据工位_获得订单_查询
///
///
///
///
///
///
///
///
///
///
public static bool OrderFormByOpName_Select(string opName,
out string orderForm, out int engineTypeID, out string engineType,
out string engineID, out string palletCode, out int isRepair, out string repairCode)
{
orderForm = "";
engineTypeID = 0;
engineType = "";
engineID = "";
palletCode = "";
isRepair = 0;
repairCode = "";
string produceName = "测量数据工位_获得订单_查询";
SqlParameter[] thisParms = new SqlParameter[8];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@订单号", SqlDbType.NVarChar, 50);
thisParms[1].Direction = ParameterDirection.Output;
thisParms[2] = new System.Data.SqlClient.SqlParameter("@产品型号代码", SqlDbType.Int, 4);
thisParms[2].Direction = ParameterDirection.Output;
thisParms[3] = new System.Data.SqlClient.SqlParameter("@发动机型号", SqlDbType.NVarChar, 50);
thisParms[3].Direction = ParameterDirection.Output;
thisParms[4] = new System.Data.SqlClient.SqlParameter("@发动机号", SqlDbType.NVarChar, 50);
thisParms[4].Direction = ParameterDirection.Output;
thisParms[5] = new System.Data.SqlClient.SqlParameter("@托盘号", SqlDbType.NVarChar, 50);
thisParms[5].Direction = ParameterDirection.Output;
thisParms[6] = new System.Data.SqlClient.SqlParameter("@拆解标志", SqlDbType.Int, 4);
thisParms[6].Direction = ParameterDirection.Output;
thisParms[7] = new System.Data.SqlClient.SqlParameter("@拆解返修条码", SqlDbType.NVarChar, 50);
thisParms[7].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
orderForm = thisParms[1].Value.ToString();
engineTypeID = Convert.ToInt32(thisParms[2].Value);
engineType = thisParms[3].Value.ToString();
engineID = thisParms[4].Value.ToString();
palletCode = thisParms[5].Value.ToString();
isRepair = Convert.ToInt32(thisParms[6].Value);
repairCode = thisParms[7].Value.ToString();
return true;
}
return false;
}
///
/// 北汽福田工位状态监控MOBY_增加
/// 工位号],[订单号],[产品型号代码],[变速器序列号],[发动机型号],[机型基本代码],[变速器总成号] ,[托盘号]
/// [产品型号代码_MES],[变速器序列号_MES],[发动机型号_MES]
/// [机床上电],[循环开始],[机床故障],[上料无件],[下料堵塞],[工件到位]
/// [传递机型],[申请上件],[允许保存],[保存完成],[合格标志],[前序合格]
/// [工号],[班次],[是否返修件],[合格放行],[不合格放行],[扫描条码]
/// [到达时间],[离开时间],[持续时间]
///
///
///
///
///
public static bool OpName_MIS_MOBY_Insert(string opName, string tagType, string tagValue)
{
string produceName = "北汽福田工位状态监控MOBY_增加";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@变量类型", tagType);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@变量值", tagValue);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据工位_监控系统_MOBY_增加
///
///
///
///
///
///
///
///
///
///
///
public static bool OpName_MIS_MOBY_Insert(string opName, string orderForm,
int engineTypeID, string engineType, string engineID, int palletCode, int repairCode, int Is_repairBarcode, string repairBarcode)
{
string produceName = "测量数据工位_监控系统_MOBY_增加";
SqlParameter[] thisParms = new SqlParameter[9];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@订单号", orderForm);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@产品型号代码", engineTypeID);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@发动机型号", engineType);
thisParms[4] = new System.Data.SqlClient.SqlParameter("@发动机号", engineID);
thisParms[5] = new System.Data.SqlClient.SqlParameter("@托盘号", palletCode);
thisParms[6] = new System.Data.SqlClient.SqlParameter("@返修标志", repairCode);
thisParms[7] = new System.Data.SqlClient.SqlParameter("@拆解标志", Is_repairBarcode);
thisParms[8] = new System.Data.SqlClient.SqlParameter("@拆解返修条码", repairBarcode);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
public static bool OpName_MIS_MOBY_Insert_FirstOpName(string opName,
int engineTypeID, string engineType, string engineID, int palletCode, int repairCode, int Is_repairBarcode, string repairBarcode)
{
string produceName = "测量数据工位_监控系统_MOBY_线首_增加";
SqlParameter[] thisParms = new SqlParameter[8];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@产品型号代码", engineTypeID);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@发动机型号", engineType);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@发动机号", engineID);
thisParms[4] = new System.Data.SqlClient.SqlParameter("@托盘号", palletCode);
thisParms[5] = new System.Data.SqlClient.SqlParameter("@返修标志", repairCode);
thisParms[6] = new System.Data.SqlClient.SqlParameter("@拆解标志", Is_repairBarcode);
thisParms[7] = new System.Data.SqlClient.SqlParameter("@拆解返修条码", repairBarcode);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据工位_监控系统_订单号_增加
///
///
///
///
public static bool OpName_MIS_OrderForm_Insert(string opName, string orderForm)
{
string produceName = "测量数据工位_监控系统_订单号_增加";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@订单号", orderForm);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据工位_监控系统_操作者工号_增加
///
///
///
///
public static bool OpName_MIS_Operator_Insert(string opName, string opperatorCode)
{
string produceName = "AMES_物料拉动_测量数据工位_监控系统_操作者工号_增加";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@操作者工号", opperatorCode);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据工位_监控系统_发动机号_增加
///
///
///
///
public static bool OpName_MIS_EngineID_Insert(string opName, string engineID)
{
string produceName = "测量数据工位_监控系统_发动机号_增加";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@发动机号", engineID);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据工位_监控系统_订单号_发动机型号_修改
///
///
///
///
///
///
public static bool OpName_MIS_OrderForm_EngineType_Update(string opName, int engineTypeID, string engineType, string engineID)
{
string produceName = "测量数据工位_监控系统_订单号_发动机型号_修改";
SqlParameter[] thisParms = new SqlParameter[4];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@产品型号代码", engineTypeID);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@发动机型号", engineType);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@发动机号", engineID);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据工位_监控系统_发动机型号_增加
///
///
///
///
///
public static bool OpName_MIS_EngineType_Insert(string opName, int engineTypeID, string engineType)
{
string produceName = "测量数据工位_监控系统_发动机型号_增加";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@产品型号代码", engineTypeID);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@发动机型号", engineType);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据工位_监控系统_托盘号_增加
///
///
///
///
public static bool OpName_MIS_PalletCode_Insert(string opName, int palletCode)
{
string produceName = "测量数据工位_监控系统_托盘号_增加";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@托盘号", palletCode);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据工位_监控系统_返修_增加
///
///
///
///
///
public static bool OpName_MIS_Repair_Insert(string opName, int repairCode, int Is_repairBarcode, string repairBarcode)
{
string produceName = "测量数据工位_监控系统_返修_增加";
SqlParameter[] thisParms = new SqlParameter[4];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@返修标志", repairCode);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@拆解标志", Is_repairBarcode);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@拆解返修条码", repairBarcode);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 电子看板_装配零件_临时表_增加
///
///
///
public static bool MesServer_Process_EngineTypeOver(string opName)
{
string produceName = "电子看板_装配零件_临时表_增加";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// [电子看板_装配零件_临时表_增加_北汽]
///
///
///
public static bool MesServer_Process_EngineTypeOverBQ(string opName)
{
string produceName = "电子看板_装配零件_临时表_增加_北汽";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// [电子看板_装配零件_临时表_增加_北汽线首]
///
///
///
public static bool MesServer_Process_EngineTypeOver_BQ_FirstOP(string opName)
{
string produceName = "电子看板_装配零件_临时表_增加_北汽线首";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 电子看板_装配零件_临时表_线首_增加
///
///
///
public static bool MesServer_Process_EngineTypeOver_FirstOpName(string opName)
{
string produceName = "电子看板_装配零件_临时表_线首_增加";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
public static bool GetEngineTypeByEngineID(string engineID, out DataTable dt)
{
string procedureName = "测量数据发动机在线状态_下线工位_是否存在_查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@EngineID", engineID);
//return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms, out dt);
}
//测量数据发动机在线状态_下线工位_是否存在_查询
///
/// 测量数据发动机在线状态_跟踪发动机条码状态_增加
///
///
///
public static bool MaterialPush_EngineIDStatus_Insert(string opName)
{
string produceName = "测量数据发动机在线状态_跟踪发动机条码状态_增加";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 物料拉动_电子看板_装配零件_修改
///
///
///
public static bool PartMaterialUseNum_Update(string opName)
{
string produceName = "物料拉动_电子看板_装配零件_修改";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 电子看板_装配零件_临时表_判断_是否允许工作
///
///
///
///
public static bool MesServer_Judge_IsCanWork(string opName, out int IsAllowWork)
{
IsAllowWork = 0;
string produceName = "电子看板_装配零件_临时表_判断_是否允许工作";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@是否允许工作", IsAllowWork);
thisParms[1].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
IsAllowWork = Convert.ToInt32(thisParms[1].Value);
return true;
}
return false;
}
///
///[北汽福田工位J07MA40_验证线外工位零件是否与工位J07MA20匹配] @EngineID nvarchar(50),@BarCode nvarchar(50)
///
///
///
///
///
public static bool MesServer_J07MA20_Judge_IsCanWork(string EngineID, string BarCode, out int IsAllowWork)
{
IsAllowWork = 0;
string produceName = "北汽福田工位J07MA40_验证线外工位零件是否与工位J07MA20匹配";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@EngineID", EngineID);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@BarCode", BarCode);
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out DataTable dt))
{
IsAllowWork = Convert.ToInt32(dt.Rows[0][0]);
return true;
}
return false;
}
///
/// 条码扫描_判断条码类型
///
///
///
///
///
public static bool GetBarcodeType(string opName, string barCode, out string barCodeType)
{
barCodeType = "";
string produceName = "条码扫描_判断条码类型";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@条码", barCode);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@条码类型", barCodeType);
thisParms[2].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
barCodeType = thisParms[2].Value.ToString();
return true;
}
return false;
}
///
/// 物料拉动_线边库存_修改
///
///
///
///
///
///
///
///
///
///
public static bool ReceiveCard_Update(string OpName, string barcode,
out bool MaterialIsExsit, out bool BarCodeIsExsit, out bool IsBillOk, out bool IsCanUpdateBetch, out bool IsScaningMulti, out bool IsMultiPC)
{
MaterialIsExsit = true;//@物料是否存在
BarCodeIsExsit = true;//@条码是否存在
IsBillOk = true;//@扫描是否符合订单
IsCanUpdateBetch = true;//@是否可以更新批次
IsScaningMulti = false;//@是否重复扫描
IsMultiPC = false;//是否多箱追踪批次
string produceName = "物料拉动_线边库存_修改";
SqlParameter[] thisParms = new SqlParameter[8];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", OpName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@卡片条码", barcode);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@物料是否存在", MaterialIsExsit);
thisParms[2].Direction = ParameterDirection.Output;
thisParms[3] = new System.Data.SqlClient.SqlParameter("@条码是否存在", BarCodeIsExsit);
thisParms[3].Direction = ParameterDirection.Output;
thisParms[4] = new System.Data.SqlClient.SqlParameter("@扫描是否符合订单", IsBillOk);
thisParms[4].Direction = ParameterDirection.Output;
thisParms[5] = new System.Data.SqlClient.SqlParameter("@是否可以更新批次", IsCanUpdateBetch);
thisParms[5].Direction = ParameterDirection.Output;
thisParms[6] = new System.Data.SqlClient.SqlParameter("@是否重复扫描", IsScaningMulti);
thisParms[6].Direction = ParameterDirection.Output;
thisParms[7] = new System.Data.SqlClient.SqlParameter("@是否多箱消耗", IsMultiPC);
thisParms[7].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
MaterialIsExsit = Convert.ToBoolean(thisParms[2].Value);
BarCodeIsExsit = Convert.ToBoolean(thisParms[3].Value);
IsBillOk = Convert.ToBoolean(thisParms[4].Value);
IsCanUpdateBetch = Convert.ToBoolean(thisParms[5].Value);
IsScaningMulti = Convert.ToBoolean(thisParms[6].Value);
IsMultiPC = Convert.ToBoolean(thisParms[7].Value);
return true;
}
return false;
}
///
/// 电子看板_装配零件_临时表_修改_零件条码
///
///
///
///
///
public static bool PartMaterial_DM_Update(string opName, string barCode, out bool IsSuccess)
{
IsSuccess = false;
string produceName = "电子看板_装配零件_临时表_修改_零件条码";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@条码", barCode);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@条码是否符合", IsSuccess);
thisParms[2].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
IsSuccess = Convert.ToBoolean(thisParms[2].Value);
return true;
}
return false;
}
public static DataTable J07ET050_BarCode_Check(string BarCode, int Type)
{
DataTable dt = new DataTable();
string produceName = "TCU刷写_校验";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("BarCode", BarCode);
thisParms[1] = new System.Data.SqlClient.SqlParameter("Type", Type);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 铭牌二维码记录_增加
///
///
///
///
///
public static bool BarCodeCheck_Add(string opName, string EngineID, string EngineType, int EngineTypeID, string barcode, int SaveBarCodeStatusType)
{
string produceName = "铭牌二维码记录_增加";
SqlParameter[] thisParms = new SqlParameter[6];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@机型", EngineType);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@机型编号", EngineTypeID);
thisParms[4] = new System.Data.SqlClient.SqlParameter("@条码信息", barcode);
thisParms[5] = new System.Data.SqlClient.SqlParameter("@校验状态", SaveBarCodeStatusType);
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
return true;
}
return false;
}
///
/// MES界面显示_功能区_显示隐藏_设置
///
/// 工位号
/// 按钮ID
/// 是否启用
/// 是否设置按钮2
/// 按钮2ID
/// 按钮2是否启用
///
public static bool SetButtomShouOrHide(string opName, string ButtomID, int isEnable, int Buttom2_check = 0, string Buttom2ID = null, int isEnable2 = 0)
{
string produceName = "MES界面显示_功能区_显示隐藏_设置";
SqlParameter[] thisParms = new SqlParameter[6];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@按钮ID", ButtomID);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@是否启用", isEnable);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@按钮2_check", Buttom2_check);
thisParms[4] = new System.Data.SqlClient.SqlParameter("@按钮ID2", Buttom2ID);
thisParms[5] = new System.Data.SqlClient.SqlParameter("@是否启用2", isEnable2);
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
return true;
}
return false;
}
///
/// 从持久化表中获取数据 北汽福田_持久化数据记录表_查询
///
/// 数据名
/// 工位号
/// 返回数据集合
public static void Get_TempData(string opName, string DataName, out DataTable dt)
{
string produceName = "北汽福田_持久化数据记录表_查询";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("名称", DataName);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
}
///
/// 从持久化表中获取数据 北汽福田_持久化数据记录表_增加修改
///
/// 数据名
/// 工位号
/// 返回数据集合
public static void Set_TempData(string opName, string DataName, string DataValue)
{
string produceName = "北汽福田_持久化数据记录表_增加修改";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@名称", DataName);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@数值", DataValue);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 从持久化表中获取数据 北汽福田_持久化数据记录表_查询
///
/// 数据名
/// 工位号
/// 返回数据集合
public static void Get_NowWorkOrder(string opName, out DataTable dt)
{
string produceName = "生产计划_派工订单_查询当前生产订单";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
}
///
/// 北汽福田_持久化数据记录表_扫码失败次数存储
/// type : 1 增加失败次数 2 清空失败次数 返回result 字段 1 为需要弹窗 0 为不需要
///
///
///
public static Boolean Check_BarCodeNGTemp(string opName, int type)
{
DataTable dt = new DataTable();
string produceName = "北汽福田_持久化数据记录表_扫码失败次数存储";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("type", type);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
if (Convert.ToInt32(dt.Rows[0]["result"]) == 1) { return true; }
else { return false; }
}
static public DataTable Check_DataBaind(string EngineID, string OpName)
{
DataTable dt = new DataTable();
string procedureName;
procedureName = "北汽福田_总分线对应表_主线_查询";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("主线总成号", EngineID);
thisParms[1] = new System.Data.SqlClient.SqlParameter("工位号", OpName);
DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms, out dt);
return dt;
}
///
/// 测量数据发动机在线状态_抽取记录_设置
///
/// 工位号
/// 总成号
///
public static void Set_TrayID(string opName, string EngineID)
{
string produceName = "测量数据发动机在线状态_抽取记录_设置";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 测量数据发动机在线状态_抽取记录_设置_来源设备
///
/// 工位号
/// 总成号
///
public static void Set_TrayIDByBackWork(string opName, string EngineID)
{
string produceName = "测量数据发动机在线状态_抽取记录_设置_来源设备";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 北汽福田_总分线对应表_验证
///
///
///
///
///
public static bool BusPartLine_Check(string PartCode, string OpName, string EngineID, out bool IsSuccess)
{
IsSuccess = false;
string produceName = "北汽福田_总分线对应表_验证";
SqlParameter[] thisParms = new SqlParameter[4];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@分线总成号", PartCode);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@工位号", OpName);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@主线总成号", EngineID);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@Count", IsSuccess);
thisParms[3].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
IsSuccess = Convert.ToBoolean(thisParms[3].Value);
return true;
}
return false;
}
///
/// 北汽福田_总分线对应表_增加
///
///
///
///
///
public static DataTable BusPartLine_Add(string EngineID, string PartCode, string opName, string orderForm, string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田_总分线对应表_增加";
SqlParameter[] thisParms = new SqlParameter[5];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@主线总成号", EngineID);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@分线总成号", PartCode);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@订单号", orderForm);
thisParms[4] = new System.Data.SqlClient.SqlParameter("@机型号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田_总分线对应表_扫码校验
///
///
///
///
///
public static DataTable BusPartLine_BarCodeCheck(string EngineID, string PartCode, string opName)
{
DataTable dt = new DataTable();
string produceName = "北汽福田_总分线对应表_扫码校验";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("总成号", EngineID);
thisParms[1] = new System.Data.SqlClient.SqlParameter("前壳码", PartCode);
thisParms[2] = new System.Data.SqlClient.SqlParameter("工位号", opName);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// AMES_MES_装配数据_零部件追溯_增加
///
///
///
///
public static bool Material_Insert(string opName, int m_ConfirmOkGo)
{
string produceName = "MES_装配数据_零部件追溯_增加";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@放行方式", m_ConfirmOkGo);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 试验台数据_新增
///
///
///
public static bool TestStandDataSave()
{
string produceName = "试验台数据_新增";
SqlParameter[] thisParms = new SqlParameter[0];
//thisParms[0] = new System.Data.SqlClient.SqlParameter("总成号", EngineID);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 北汽福田返工_记录_试验台_增加
///
///
public static bool TestStandBackWorkData(string EngineID, string EngineType, string OrderFrom)
{
string produceName = "北汽福田返工_记录_试验台_增加";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("总成号", EngineID);
thisParms[1] = new System.Data.SqlClient.SqlParameter("机型", EngineType);
thisParms[2] = new System.Data.SqlClient.SqlParameter("订单号", OrderFrom);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 拧紧工位完工弹窗_判断
///
///
///
public static DataTable WorkOver_IsShowWindow(string OpName, int EngineTypeID)
{
DataTable dt = new DataTable();
string produceName = "拧紧工位完工弹窗_判断";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("工位号", OpName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("机型代码", EngineTypeID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田BOM_拧紧程序_保存_查询
///
///
///
public static DataTable BOMScrewUpSave_Select(string OpName, string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田BOM_拧紧程序_保存_查询";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("工位号", OpName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("机型编号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田工位BOM换型比对
///
///
/// 新零件号(机型)
///
public static DataTable EngineTypeChange(string opName, string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田工位BOM换型比对";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@新机型", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田工位BOM换型比对_MA020
///
///
///
///
public static DataTable EngineTypeChange_MA020(string opName, string engineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田工位BOM换型比对_MA020";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@新零件号", engineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田工位BOM换型比对_MA020_刻度比对
///
///
///
///
public static DataTable EngineTypeChange_MA020_KeDu(string opName, string engineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田工位BOM换型比对_MA020_刻度比对";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@新零件号", engineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田工位BOM换型比对_MA050
///
///
/// 新零件号(机型)
///
public static DataTable EngineTypeChange_MA050(string engineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田工位BOM换型比对_MA050";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@新零件号", engineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 测量数据发动机在线状态_查询_是否已工作
///
///
/// 新零件号(机型)
///
public static DataTable EngineIsTwoWork(string opName, string OrderForm, string EngineID)
{
DataTable dt = new DataTable();
string produceName = "测量数据发动机在线状态_查询_是否已工作";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@订单号", OrderForm);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 测量数据发动机在线状态_查询_是否二次确认是否工作
///
/// 工位号
/// 订单号
/// 总成号
///
public static DataTable EngineIsNeedTwoWorkConfirm(string opName, string OrderForm, string EngineID)
{
DataTable dt = new DataTable();
string produceName = "测量数据发动机在线状态_查询_是否二次确认是否工作";
SqlParameter[] thisParms = new SqlParameter[3];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@订单号", OrderForm);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田_工位是否允许工作_判断
///
///
/// 新零件号(机型)
///
public static DataTable OpNameIsAllowWork(string opName)
{
DataTable dt = new DataTable();
string produceName = "北汽福田_工位是否允许工作_判断";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 测量数据发动机在线状态_查询_是否已工作
///
///
/// 新零件号(机型)
///
public static DataTable Get_IsBackWork(string opName, string EngineID)
{
DataTable dt = new DataTable();
string produceName = "北汽福田返工_记录_是否返修_判断查询";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// ET060弹窗表_判断查询
///
/// 新零件号(机型)
///
public static DataTable Get_IsET060BackWork(string EngineID)
{
DataTable dt = new DataTable();
string produceName = "ET060弹窗表_判断查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 铭牌二维码记录_校验
///
///
/// 新零件号(机型)
///
public static DataTable Check_MA080BarCode(string EngineID, string BarCode)
{
DataTable dt = new DataTable();
string produceName = "铭牌二维码记录_校验";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@铭牌码", BarCode);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
public static DataTable Get_IsBarCodeBackWork(string opName, string EngineID)
{
DataTable dt = new DataTable();
string produceName = "北汽福田返工_记录_是否返修_判断查询_上线工位";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 拧紧位置记录表_工位_查询
///
///
/// 新零件号(机型)
///
public static DataTable Get_WorkPositionSize(string opName, int EngineTypeID, int CodeNumber)
{
DataTable dt = new DataTable();
string produceName = "拧紧位置记录表_工位_查询";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@机型", EngineTypeID);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@程序号", CodeNumber);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田BOM_拧紧程序_查询
///
///
/// 新零件号(机型)
///
public static DataTable Get_WorkPositionSizeByPBOM(string opName, string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田BOM_拧紧程序_查询";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@机型编号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田BOM_上线需要数据_法兰类型_查询
///
///
/// 新零件号(机型)
///
public static DataTable Get_EngineFlangeType(string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田BOM_上线需要数据_法兰类型_查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@零件号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田BOM_上线需要数据_售后机型_查询
///
///
/// 新零件号(机型)
///
public static DataTable Get_EngineAftermarketType(string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田BOM_上线需要数据_售后机型_查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@零件号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田BOM_上线需要数据_细一轴_查询
///
///
/// 新零件号(机型)
///
public static DataTable Get_EngineOneAxle(string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田BOM_上线需要数据_细一轴_查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@零件号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田BOM_上线需要数据_脉冲轮类型_查询
///
///
///
public static DataTable Get_ImpulseWheelMeter(string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田BOM_上线需要数据_脉冲轮类型_查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@零件号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田BOM_上线需要数据_空挡开关_常开常闭_查询
///
///
///
public static DataTable Get_EmptySwitch_ONOFF(string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田BOM_上线需要数据_空挡开关_常开常闭_查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@零件号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田BOM_上线需要数据_测试台工装_查询
///
///
///
public static DataTable Get_Test_FrockType(string EngineType)
{
DataTable dt = new DataTable();
string produceName = "北汽福田BOM_上线需要数据_测试台工装_查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@零件号", EngineType);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田_是否当天第一次工作
///
///
/// 新零件号(机型)
///
public static DataTable ToDayIsWork(string opName)
{
DataTable dt = new DataTable();
string produceName = "北汽福田_是否当天第一次工作";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田返工_记录_查询
///
///
///
public static DataTable Get_BackWorkData(string EngineID)
{
DataTable dt = new DataTable();
string produceName = "北汽福田返工_记录_查询";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@总成号", EngineID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
///
/// 北汽福田_TCU_增加
///
///
///
///
///
///
public static DataTable TCU_Add(string opName, string nameplate, string EngineID, string EngineTypeID)
{
DataTable dt = new DataTable();
string produceName = "北汽福田_TCU_增加";
SqlParameter[] thisParms = new SqlParameter[4];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@变速器总成码", EngineID);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@物料码", nameplate);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@机型代码", EngineTypeID);
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt);
return dt;
}
//
///
/// MES_装配数据_零部件追溯_增加
///
///
///
public static bool Material_Insert(string opName)
{
string produceName = "MES_装配数据_零部件追溯_增加";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 电子看板_工位机型_质量数据测量位置_临时表_增加
///
///
///
public static bool MesServer_ShaftPosition_EngineTypeOver(string opName)
{
string produceName = "电子看板_工位机型_质量数据测量位置_临时表_增加";
SqlParameter[] thisParms = new SqlParameter[1];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
///
/// 电子看板_工位机型_质量数据测量位置_临时表_查询_完成情况
///
///
///
///
///
///
public static bool MesServer_ShaftPosition_Select_FinishResult(string opName, out int workGroupIndex, out string BoltCode, out bool sn_WorkingStepIsOver)
{
workGroupIndex = 0;
BoltCode = "";
sn_WorkingStepIsOver = true;
string produceName = "电子看板_工位机型_质量数据测量位置_临时表_查询_完成情况";
SqlParameter[] thisParms = new SqlParameter[4];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@组号", SqlDbType.Int, 4);
thisParms[1].Direction = ParameterDirection.Output;
thisParms[2] = new System.Data.SqlClient.SqlParameter("@套筒号", SqlDbType.NVarChar, 50);
thisParms[2].Direction = ParameterDirection.Output;
thisParms[3] = new System.Data.SqlClient.SqlParameter("@是否全部完成", SqlDbType.Int, 4);
thisParms[3].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
workGroupIndex = Convert.ToInt32(thisParms[1].Value);
BoltCode = thisParms[2].Value.ToString();
sn_WorkingStepIsOver = Convert.ToBoolean(thisParms[3].Value);
return true;
}
return false;
}
///
/// 电子看板_工位机型_质量数据测量位置_临时表_修改
///
///
///
///
///
///
public static bool MesServer_ShaftPosition_Update(string opName, int workGroupIndex, int IsOK, out bool IsFinish)
{
IsFinish = true;
string produceName = "电子看板_工位机型_质量数据测量位置_临时表_修改";
SqlParameter[] thisParms = new SqlParameter[4];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@组号", workGroupIndex);
thisParms[2] = new System.Data.SqlClient.SqlParameter("@合格标志", IsOK);
thisParms[3] = new System.Data.SqlClient.SqlParameter("@是否全部完成", SqlDbType.Int, 4);
thisParms[3].Direction = ParameterDirection.Output;
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
{
IsFinish = Convert.ToBoolean(thisParms[3].Value);
return true;
}
return false;
}
///
/// MES界面显示_弹窗消息_增加
///
///
///
///
public static bool Web_Notice_Insert(string opName, string notice)
{
string produceName = "MES界面显示_弹窗消息_增加";
SqlParameter[] thisParms = new SqlParameter[2];
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
thisParms[1] = new System.Data.SqlClient.SqlParameter("@Notice", notice);
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
}
}
}