Files
2026-05-29 10:07:05 +08:00

83 lines
3.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using DataLinkMesWork;
//using BizDataAccess;
namespace MesServerFunctions
{
partial class Functions_BASE_10
{
//针对“MIS.BizFacade.Dll”中没有的存储过程在此类中新建
//新建原则所有的函数用private,只允许在内部使用
//针对单个工艺特殊需要新建存储过程但是存储过程不能被加入到“MIS.BizFacade.Dll”中
// DataTable dt_main;
// BaseDataSystemMES.MaterialMain_Select(OpName, EngineType, out dt_main);
// for (int i = 0; i<dt_main.Rows.Count; i++)
// {
// string MainMaterial = dt_main.Rows[i]["物料条码"].ToString();
// BaseDataSystemMES.MailLineAndSubLineData_Insert(EngineID, EngineTypeID, EngineType, MainMaterial);
// }
//返修上线与正常上线区分字段 true 为正常上线 False 为返修上线
bool IsRepaireStatus = false;
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>
/// 返修上线_返修工位及返修路径_查询
/// </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);
}
}
}