111 lines
4.4 KiB
C#
111 lines
4.4 KiB
C#
using DataLinkMesWork;
|
||
using System;
|
||
using System.Data;
|
||
using System.Data.SqlClient;
|
||
//using BizDataAccess;
|
||
|
||
namespace MesServerFunctions
|
||
{
|
||
partial class Functions_BASE_07
|
||
{
|
||
//针对“MIS.BizFacade.Dll”中没有的存储过程,在此类中新建
|
||
//新建原则:所有的函数用private,只允许在内部使用
|
||
//针对单个工艺特殊,需要新建存储过程,但是存储过程不能被加入到“MIS.BizFacade.Dll”中
|
||
|
||
/// <summary>
|
||
/// 电子看板_发动机号_返修线首工位_查询工件编号
|
||
/// </summary>
|
||
/// <param name="OpName"></param>
|
||
/// <param name="QRcode"></param>
|
||
/// <param name="barcode"></param>
|
||
/// <param name="enigetype"></param>
|
||
/// <returns></returns>
|
||
public bool SelectRepairBarcode(string OpName, string QRcode, out string barcode, out string enigetype)
|
||
{
|
||
|
||
barcode = "";
|
||
enigetype = "";
|
||
string procedureName = "电子看板_发动机号_返修线首工位_查询工件编号";
|
||
SqlParameter[] thisParms = new SqlParameter[4];
|
||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", OpName);
|
||
thisParms[1] = new System.Data.SqlClient.SqlParameter("@barcode_QR", QRcode);
|
||
thisParms[2] = new System.Data.SqlClient.SqlParameter("@barcode", SqlDbType.NVarChar, 50, "barcode");
|
||
thisParms[3] = new System.Data.SqlClient.SqlParameter("@enigetype", SqlDbType.NVarChar, 50, "enigetype");
|
||
thisParms[2].Direction = ParameterDirection.Output;
|
||
thisParms[3].Direction = ParameterDirection.Output;
|
||
if (DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms))
|
||
{
|
||
if (thisParms[2].Value != null)
|
||
{
|
||
barcode = thisParms[2].Value.ToString();
|
||
enigetype = thisParms[3].Value.ToString();
|
||
return true;
|
||
}
|
||
else
|
||
{
|
||
barcode = "-1";
|
||
enigetype = "-1";
|
||
return false;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
return false;
|
||
}
|
||
|
||
}
|
||
|
||
/// <summary>
|
||
/// 返修上线工位_监控系统_MOBY_增加
|
||
/// </summary>
|
||
/// <param name="OpName"></param>
|
||
/// <param name="QRcode"></param>
|
||
/// <param name="barcode"></param>
|
||
/// <param name="enigetype"></param>
|
||
/// <returns></returns>
|
||
public static bool InsertControl(string OpName, string barcode, string enigetype)
|
||
{
|
||
|
||
string produceName = "返修上线工位_监控系统_MOBY_增加";
|
||
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("@发动机型号", enigetype);
|
||
|
||
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 机型代码查询
|
||
/// </summary>
|
||
/// <param name="OpName"></param>
|
||
/// <param name="dt"></param>
|
||
static int EngineTypeIDSelect(string EngineType)
|
||
{
|
||
DataTable dt = null;
|
||
string procedureName;
|
||
procedureName = "MES_基本变量_机型标志_根据机型_查询";
|
||
SqlParameter[] thisParms = new SqlParameter[1];
|
||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@产品型号", EngineType);
|
||
DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms, out dt);
|
||
|
||
return Convert.ToInt32(dt.Rows[0]["机型代码"]);
|
||
|
||
}
|
||
|
||
/// <summary>
|
||
/// 返修上线_返修工位及返修路径_查询
|
||
/// </summary>
|
||
/// <param name="engineID"></param>
|
||
/// <param name="dt"></param>
|
||
static public void GetEngineID_RepairSelect(string engineID, out DataTable dt)
|
||
{
|
||
string procedureName;
|
||
procedureName = "返修上线_返修工位及返修路径_查询";
|
||
SqlParameter[] thisParms = new SqlParameter[1];
|
||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@总成编号", engineID);
|
||
DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms, out dt);
|
||
}
|
||
}
|
||
}
|