init: 导入项目到 meswork Gitea
This commit is contained in:
@@ -0,0 +1,865 @@
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 工位号
|
||||
/// </summary>
|
||||
public static string OpName = "工位号";
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
public static string OrderForm = "订单号";
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
public static string OrderForm_MES = "订单号_MES";
|
||||
/// <summary>
|
||||
/// 产品型号代码
|
||||
/// </summary>
|
||||
public static string EngineTypeID = "产品型号代码";
|
||||
/// <summary>
|
||||
/// 变速器序列号
|
||||
/// </summary>变速器序列号
|
||||
public static string EngineID = "变速器序列号";
|
||||
|
||||
/// <summary>
|
||||
/// 发动机型号
|
||||
/// </summary>
|
||||
public static string EngineType = "发动机型号";
|
||||
/// <summary>
|
||||
/// 机型基本代码
|
||||
/// </summary>
|
||||
public static string EngineTypeBasicID = "机型基本代码";
|
||||
/// <summary>
|
||||
/// 变速器总成号
|
||||
/// </summary>
|
||||
public static string EngineIDPrinte = "变速器总成号";
|
||||
/// <summary>
|
||||
/// 托盘号
|
||||
/// </summary>
|
||||
public static string PartPallet_Code = "托盘号";
|
||||
/// <summary>
|
||||
/// 产品型号代码_MES
|
||||
/// </summary>
|
||||
public static string EngineTypeID_MES = "产品型号代码_MES";
|
||||
/// <summary>
|
||||
/// 变速器序列号_MES
|
||||
/// </summary>
|
||||
public static string EngineID_MES = "变速器序列号_MES";
|
||||
/// <summary>
|
||||
/// 发动机型号_MES
|
||||
/// </summary>
|
||||
public static string EngineType_MES = "发动机型号_MES";
|
||||
/// <summary>
|
||||
/// 到达时间
|
||||
/// </summary>
|
||||
public static string WorkStartIn = "到达时间";
|
||||
/// <summary>
|
||||
/// 离开时间
|
||||
/// </summary>
|
||||
public static string WorkStartOut = "离开时间";
|
||||
/// <summary>
|
||||
/// 持续时间
|
||||
/// </summary>
|
||||
public static string WorkStartTime = "持续时间";
|
||||
/// <summary>
|
||||
/// 扫描条码
|
||||
/// </summary>
|
||||
public static string BarCode = "扫描条码";
|
||||
/// <summary>
|
||||
/// 工件到位 2
|
||||
/// </summary>
|
||||
public static string WorkStart = "工件到位";
|
||||
/// <summary>
|
||||
/// 传递机型 44
|
||||
/// </summary>
|
||||
public static string EngineTypeGetOverPLC = "传递机型";
|
||||
/// <summary>
|
||||
/// 申请上件 43
|
||||
/// </summary>
|
||||
public static string PartLoad = "申请上件";
|
||||
/// <summary>
|
||||
/// 允许保存 19
|
||||
/// </summary>
|
||||
public static string MesRead = "允许保存";
|
||||
/// <summary>
|
||||
/// 保存完成 20
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_MOBY_查询
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="orderForm"></param>
|
||||
/// <param name="engineTypeID"></param>
|
||||
/// <param name="engineType"></param>
|
||||
/// <param name="engineID"></param>
|
||||
/// <param name="palletCode"></param>
|
||||
/// <param name="isRepair"></param>
|
||||
/// <param name="repairCode"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测量数据工位_获得订单_查询
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="orderForm"></param>
|
||||
/// <param name="engineTypeID"></param>
|
||||
/// <param name="engineType"></param>
|
||||
/// <param name="engineID"></param>
|
||||
/// <param name="palletCode"></param>
|
||||
/// <param name="isRepair"></param>
|
||||
/// <param name="repairCode"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 北汽福田工位状态监控MOBY_增加
|
||||
/// 工位号],[订单号],[产品型号代码],[变速器序列号],[发动机型号],[机型基本代码],[变速器总成号] ,[托盘号]
|
||||
/// [产品型号代码_MES],[变速器序列号_MES],[发动机型号_MES]
|
||||
/// [机床上电],[循环开始],[机床故障],[上料无件],[下料堵塞],[工件到位]
|
||||
/// [传递机型],[申请上件],[允许保存],[保存完成],[合格标志],[前序合格]
|
||||
/// [工号],[班次],[是否返修件],[合格放行],[不合格放行],[扫描条码]
|
||||
/// [到达时间],[离开时间],[持续时间]
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="tagType"></param>
|
||||
/// <param name="tagValue"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_MOBY_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="orderForm"></param>
|
||||
/// <param name="engineTypeID"></param>
|
||||
/// <param name="engineType"></param>
|
||||
/// <param name="engineID"></param>
|
||||
/// <param name="palletCode"></param>
|
||||
/// <param name="repairCode"></param>
|
||||
/// <param name="Is_repairBarcode"></param>
|
||||
/// <param name="repairBarcode"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_订单号_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="orderForm"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_操作者工号_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="opperatorCode"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_发动机号_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="engineID"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_订单号_发动机型号_修改
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="engineTypeID"></param>
|
||||
/// <param name="engineType"></param>
|
||||
/// <param name="engineID"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_发动机型号_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="engineTypeID"></param>
|
||||
/// <param name="engineType"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_托盘号_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="palletCode"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测量数据工位_监控系统_返修_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="repairCode"></param>
|
||||
/// <param name="repairBarcode"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子看板_装配零件_临时表_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
public static bool MesServer_Process_EngineTypeOver(string opName,int isSelect = 0)
|
||||
{
|
||||
string produceName = "电子看板_装配零件_临时表_增加";
|
||||
SqlParameter[] thisParms = new SqlParameter[2];
|
||||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
|
||||
thisParms[1] = new System.Data.SqlClient.SqlParameter("@是否选中", isSelect);
|
||||
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子看板_装配零件_临时表_线首_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// 电子看板_装配零件_临时表_线首_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
public static void MesServer_Process_OrderAdd_FirstOpName(string opName, string partCode, out string result)
|
||||
{
|
||||
result = "2";
|
||||
string produceName = "SY_测量数据工位_监控系统_订单号_增加";
|
||||
SqlParameter[] thisParms = new SqlParameter[3];
|
||||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
|
||||
thisParms[1] = new System.Data.SqlClient.SqlParameter("@壳体码", partCode);
|
||||
thisParms[2] = new System.Data.SqlClient.SqlParameter("@验证结果", result);
|
||||
thisParms[2].Direction = ParameterDirection.Output;
|
||||
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
|
||||
{
|
||||
result = thisParms[2].Value.ToString();
|
||||
}
|
||||
}
|
||||
public static bool GetEngineTypeByEngineID(string engineID, string opName, out DataTable dt)
|
||||
{
|
||||
string procedureName = "测量数据发动机在线状态_下线工位_是否存在_查询";
|
||||
SqlParameter[] thisParms = new SqlParameter[2];
|
||||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@EngineID", engineID);
|
||||
thisParms[1] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
|
||||
//return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
|
||||
return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms, out dt);
|
||||
|
||||
|
||||
}
|
||||
//测量数据发动机在线状态_下线工位_是否存在_查询
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 测量数据发动机在线状态_跟踪发动机条码状态_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 物料拉动_电子看板_装配零件_修改
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子看板_装配零件_临时表_判断_是否允许工作
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="IsAllowWork"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MES_装配数据_零部件追溯_是否扫码完成_查询
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="IsAllowWork"></param>
|
||||
/// <returns></returns>
|
||||
public static bool MesServer_Judge_IsCanWorkLineOut(string opName,string OrderForm,string EngineID, out int IsAllowWork)
|
||||
{
|
||||
IsAllowWork = 0;
|
||||
DataTable dt = new DataTable();
|
||||
string produceName = "MES_装配数据_零部件追溯_分线数据_是否扫码完成_查询";
|
||||
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);
|
||||
IsAllowWork = Convert.ToInt32(dt.Rows[0]["IsOk"]);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MES_装配数据_零部件追溯_是否清除
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="IsAllowWork"></param>
|
||||
/// <returns></returns>
|
||||
public static bool MesServer_Judge_IsClearOld(string opName,string OrderForm, out int IsClear)
|
||||
{
|
||||
IsClear = 0;
|
||||
string produceName = "MES_装配数据_零部件追溯_是否清除";
|
||||
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("@是否删除", IsClear);
|
||||
thisParms[2].Direction = ParameterDirection.Output;
|
||||
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
|
||||
{
|
||||
IsClear = Convert.ToInt32(thisParms[2].Value);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MES_装配数据_零部件追溯_是否清除_分线
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="IsAllowWork"></param>
|
||||
/// <returns></returns>
|
||||
public static bool MesServer_Judge_IsMatch(string opName, string OrderForm,string EngineType, out int IsMatch)
|
||||
{
|
||||
IsMatch = 0;
|
||||
string produceName = "MES_装配数据_零部件追溯_是否清除_分线";
|
||||
SqlParameter[] thisParms = new SqlParameter[4];
|
||||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
|
||||
thisParms[1] = new System.Data.SqlClient.SqlParameter("@订单号", OrderForm);
|
||||
thisParms[2] = new System.Data.SqlClient.SqlParameter("@发动机型号", EngineType);
|
||||
thisParms[3] = new System.Data.SqlClient.SqlParameter("@是否删除", IsMatch);
|
||||
thisParms[3].Direction = ParameterDirection.Output;
|
||||
if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms))
|
||||
{
|
||||
IsMatch = Convert.ToInt32(thisParms[3].Value);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 条码扫描_判断条码类型
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="barCode"></param>
|
||||
/// <param name="barCodeType"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工件壳体码_修改
|
||||
/// </summary>
|
||||
/// <param name="opName">工位号</param>
|
||||
/// <param name="barCode">壳体码</param>
|
||||
/// <param name="OrderFrom">订单号</param>
|
||||
/// <returns></returns>
|
||||
public static void WorkNumber_Edit(string opName, string barCode, string OrderFrom)
|
||||
{
|
||||
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("@订单号", OrderFrom);
|
||||
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生产计划_派工订单_间隔号_修改
|
||||
/// </summary>
|
||||
/// <param name="distanceNumber"></param>
|
||||
/// <param name="OrderFrom"></param>
|
||||
public static void distanceNumber_Edit(string distanceNumber, string OrderFrom)
|
||||
{
|
||||
string produceName = "生产计划_派工订单_间隔号_修改";
|
||||
SqlParameter[] thisParms = new SqlParameter[2];
|
||||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@间隔号", distanceNumber);
|
||||
thisParms[1] = new System.Data.SqlClient.SqlParameter("@订单号", OrderFrom);
|
||||
DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 物料拉动_线边库存_修改
|
||||
/// </summary>
|
||||
/// <param name="OpName"></param>
|
||||
/// <param name="barcode"></param>
|
||||
/// <param name="MaterialIsExsit"></param>
|
||||
/// <param name="BarCodeIsExsit"></param>
|
||||
/// <param name="IsBillOk"></param>
|
||||
/// <param name="IsCanUpdateBetch"></param>
|
||||
/// <param name="IsScaningMulti"></param>
|
||||
/// <param name="IsMultiPC"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子看板_装配零件_临时表_修改_零件条码
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="barCode"></param>
|
||||
/// <param name="IsSuccess"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// AMES_MES_装配数据_零部件追溯_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="m_ConfirmOkGo"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// MES_装配数据_零部件追溯_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MES_日志_保存信号_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="m_ConfirmOkGo"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Save_saveLog(string opName, int m_ConfirmOkGo, string orderFrom, string engineCount, string workpieceCount)
|
||||
{
|
||||
string produceName = "MES_日志_保存信号_增加";
|
||||
SqlParameter[] thisParms = new SqlParameter[5];
|
||||
thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
|
||||
thisParms[1] = new System.Data.SqlClient.SqlParameter("@是否合格", m_ConfirmOkGo);
|
||||
thisParms[2] = new System.Data.SqlClient.SqlParameter("@订单号", orderFrom);
|
||||
thisParms[3] = new System.Data.SqlClient.SqlParameter("@机型编号", engineCount);
|
||||
thisParms[4] = new System.Data.SqlClient.SqlParameter("@工件编号", workpieceCount);
|
||||
return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子看板_工位机型_质量数据测量位置_临时表_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子看板_工位机型_质量数据测量位置_临时表_查询_完成情况
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="workGroupIndex"></param>
|
||||
/// <param name="BoltCode"></param>
|
||||
/// <param name="sn_WorkingStepIsOver"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 电子看板_工位机型_质量数据测量位置_临时表_修改
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="workGroupIndex"></param>
|
||||
/// <param name="IsOK"></param>
|
||||
/// <param name="IsFinish"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// MES界面显示_弹窗消息_增加
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="notice"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存 触发保存信号后的日志信息
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="m_ConfirmOkGo"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SaveLog_Save(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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user