同步最新程序
This commit is contained in:
@@ -176,6 +176,34 @@ namespace MisDataFunDll
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 写入 保存完成和工作完成 并且对此进行一定判断校验
|
||||
/// </summary>
|
||||
/// <param name="isOver"></param>
|
||||
public static void WriteMesReadOver(string OpName, bool isOver)
|
||||
{
|
||||
if (isOver)
|
||||
{
|
||||
MIS_BASE.Read_WorkStart(OpName, out bool isWorkStart);
|
||||
if (!isWorkStart)
|
||||
{
|
||||
MisDataFun.LogRecording_OP(OpName, "WARNING", "WriteMesReadOver", "产品未在位 不予写入工作完成");
|
||||
return;
|
||||
}
|
||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
||||
}
|
||||
else
|
||||
{
|
||||
MIS_BASE.Write_FalseGO(OpName, false); // 不合格放行(MES)
|
||||
MIS_BASE.Write_ConfirmOkGo(OpName, false); // 合格放行(MES)
|
||||
}
|
||||
//通知PLC,MES工作完成
|
||||
MIS_BASE.Write_MesWorkFinish(OpName, isOver);
|
||||
//通知PLC,MES保存完成
|
||||
MIS_BASE.Write_MesReadOver(OpName, isOver);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上盖装配新产品 根据工位扫码 写入产品信息至PLC
|
||||
/// </summary>
|
||||
@@ -211,26 +239,5 @@ namespace MisDataFunDll
|
||||
MisDataFun.LogRecording_OP(OpName, "WARNING", "MOM", msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 写入 保存完成和工作完成 并且对此进行一定判断校验
|
||||
/// </summary>
|
||||
/// <param name="isOver"></param>
|
||||
public static void WriteMesReadOver(string OpName,bool isOver)
|
||||
{
|
||||
if (isOver)
|
||||
{
|
||||
MIS_BASE.Read_WorkStart(OpName,out bool isWorkStart);
|
||||
if(!isWorkStart)
|
||||
{
|
||||
MisDataFun.LogRecording_OP(OpName, "WARNING", "WriteMesReadOver", "产品未在位 不予写入工作完成");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//通知PLC,MES工作完成
|
||||
MIS_BASE.Write_MesWorkFinish(OpName, isOver);
|
||||
//通知PLC,MES保存完成
|
||||
MIS_BASE.Write_MesReadOver(OpName, isOver);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,10 +284,6 @@ namespace MisDataFunDll
|
||||
/// <returns></returns>
|
||||
public static bool GetSpecialOpExist(string opName, string type)
|
||||
{
|
||||
if (PP.SpecialOpList == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (PP.SpecialOpList.ContainsKey(type))
|
||||
{
|
||||
return PP.SpecialOpList[type].Contains(opName);
|
||||
@@ -295,30 +291,6 @@ namespace MisDataFunDll
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从启动缓存中读取特殊工位规则配置。
|
||||
/// </summary>
|
||||
public static string GetSpecialOpRuleValue(string opName, string type, string ruleKey, string defaultValue = "")
|
||||
{
|
||||
if (PP.SpecialOpRuleConfig == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (!PP.SpecialOpRuleConfig.ContainsKey(type))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (!PP.SpecialOpRuleConfig[type].ContainsKey(opName))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (!PP.SpecialOpRuleConfig[type][opName].ContainsKey(ruleKey))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
return PP.SpecialOpRuleConfig[type][opName][ruleKey];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 这是一个防错方法 判断200扫码工位 如果出现 产品到位 传递机型未完成时扫码 无物料与拧紧的情况下 会直接跳到出站 给两秒缓冲时间 确保物料已入库
|
||||
/// </summary>
|
||||
@@ -544,15 +516,15 @@ namespace MisDataFunDll
|
||||
string targetField;
|
||||
if (OpName.StartsWith("OP450"))
|
||||
{
|
||||
targetField = "TEXT1";
|
||||
targetField = "TEXT2";
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (EngineTypeID)
|
||||
{
|
||||
case 1: case 5: targetField = "TEXT9"; break;
|
||||
case 2: case 3: case 6: case 7: targetField = "TEXT14"; break;
|
||||
case 4: targetField = "TEXT16"; break;
|
||||
case 2: case 3: targetField = "TEXT14"; break;
|
||||
case 4: case 6: case 7: targetField = "TEXT16"; break;
|
||||
default: targetField = ""; break;
|
||||
}
|
||||
}
|
||||
@@ -1827,6 +1799,31 @@ namespace MisDataFunDll
|
||||
DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存 OP420 静置B位开始记录,同一产品只保留最新一条。
|
||||
/// </summary>
|
||||
public static bool SaveManualStaticBRecord(string engineID, string engineType, int engineTypeID, out string message)
|
||||
{
|
||||
message = "";
|
||||
SqlParameter[] sqlParameters = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@产品编号", engineID),
|
||||
new SqlParameter("@产品型号", engineType),
|
||||
new SqlParameter("@产品型号代码", engineTypeID),
|
||||
new SqlParameter("@静置开始时间", DateTime.Now)
|
||||
};
|
||||
|
||||
string errorMessage;
|
||||
DataAccess.ExecuteStoredProcedure("线下手动静置_记录_保存", ref sqlParameters, out errorMessage);
|
||||
if (!string.IsNullOrWhiteSpace(errorMessage))
|
||||
{
|
||||
message = "保存线下手动静置记录失败:" + errorMessage;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工位打码记录 增加
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user