init: 导入项目到 meswork Gitea
This commit is contained in:
@@ -0,0 +1,412 @@
|
||||
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 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="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);
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
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 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>
|
||||
/// 条码扫描_判断条码类型
|
||||
/// </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="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>
|
||||
/// 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>
|
||||
/// 电子看板_工位机型_质量数据测量位置_临时表_增加
|
||||
/// </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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user