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 { //[北汽福田变速器序列号总线上线_是否重号] /// /// /// /// /// public static bool EngineTypeID_IsNotRepeatedNumber(string sn) { DataTable dt = new DataTable(); int count; string produceName = "北汽福田变速器序列号总线上线_是否重号"; SqlParameter[] thisParms = new SqlParameter[1]; thisParms[0] = new System.Data.SqlClient.SqlParameter("@变速器序列号", sn); if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt)) { if (dt.Rows.Count > 0) { count = Convert.ToInt32(dt.Rows[0]["数量"]); if(count==0) { return true ; } else { return false ; } } } return true; } /// /// 北汽福田变速器序列号总线上线_获得机型信息 /// /// /// /// /// /// /// /// /// public static bool GetEngineTypeUpLoadOpName(string opName,out int EngineTypeID, out string EngineType, out string OrderForm, out int Recipe1, out int Recipe2) { DataTable dt = new DataTable(); EngineTypeID = 0; EngineType = ""; OrderForm = ""; Recipe1 = 0; Recipe2 = 0; string produceName = "北汽福田变速器序列号总线上线_获得机型信息"; SqlParameter[] thisParms = new SqlParameter[1]; thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName); if (DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt)) { if (dt.Rows.Count > 0) { EngineTypeID = Convert.ToInt32(dt.Rows[0]["产品型号代码_MES"]); EngineType = dt.Rows[0]["发动机型号_MES"].ToString(); OrderForm = dt.Rows[0]["订单号_MES"].ToString(); return true; } } return false; } //MES_计划BOM_工位与名称_查询_MQTT监控工位 public static DataTable GetCheckOpName_BQ() { DataTable dt = new DataTable(); string produceName = "MES_计划BOM_工位与名称_查询_MQTT监控工位"; SqlParameter[] thisParms = null; DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt); return dt; } public static DataTable GetCheckOpName_SY() { DataTable dt = new DataTable(); string produceName = "MES_计划BOM_工位与名称_查询_工位号"; SqlParameter[] thisParms = null; DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt); return dt; } /// /// 测量数据工位_监控系统_MOBY_查询 /// /// /// /// /// /// /// /// /// /// public static DataTable GetOrder_BQ() { DataTable dt = new DataTable(); string produceName = "北汽福田生产订单计划_查询"; SqlParameter[] thisParms = null; DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt); return dt; } public static DataTable GetOrderOpName_BQ() { DataTable dt = new DataTable(); string produceName = "MES_计划BOM_工位与名称_上线工位号查询"; SqlParameter[] thisParms = null; DataAccess.ExecuteStoredProcedure(produceName, ref thisParms, out dt); return dt; } /// /// 北汽福田工位状态监控MOBY_增加_线首工位订单下达 /// /// /// /// public static void DownOrderToOpName(string orderForm,string opName) { string produceName = "北汽福田工位状态监控MOBY_增加_线首工位订单下达"; SqlParameter[] thisParms = new SqlParameter[2]; thisParms[0] = new SqlParameter("@订单号", orderForm); thisParms[1] = new SqlParameter("@工位号", opName); DataAccess.ExecuteStoredProcedure(produceName, ref thisParms); } public static DataTable DownOrderToOpNameMobyList() { DataTable dt = new DataTable(); string produceName = "北汽福田工位状态监控MOBY_查询_订单下达用"; SqlParameter[] thisParms = null; DataAccess.ExecuteStoredProcedure(produceName, ref thisParms,out dt); return dt; } /// /// 北汽福田工位状态监控MOBY历史数据_增加 /// /// /// public static void MobySaveData(string opName) { string produceName = "北汽福田工位状态监控MOBY历史数据_增加"; SqlParameter[] thisParms = new SqlParameter[1]; thisParms[0] = new SqlParameter("@工位号", opName); DataAccess.ExecuteStoredProcedure(produceName, ref thisParms); } } }