同步最新程序
This commit is contained in:
@@ -228,7 +228,7 @@ namespace MisDataSaveDateMesRead
|
||||
MisDataFun.BaseData_tagTable_QualityData_B5A_Insert_OP170Status(id_tagCF, engineTypeID, engineID, "72300031", MaxUseTime.ToString(), qualityMask, opName);
|
||||
}
|
||||
|
||||
if(!((engineTypeID != 1 && engineTypeID != 5 ) && (opName == "OP120" || opName == "OP140" || opName == "OP160"))) // CC GQ UPS 固定架不涂胶 所以直接跳 PDC 和 W05 需要涂胶校验
|
||||
if(!((engineTypeID != 1 && engineTypeID != 1 ) && (opName == "OP120" || opName == "OP140" || opName == "OP160"))) // CC GQ UPS 固定架不涂胶 所以直接跳 PDC 和 W05 需要涂胶校验
|
||||
{
|
||||
if (MisDataFun.GetSpecialOpExist(opName, "涂胶时间差校验"))
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -515,13 +515,11 @@ namespace MesServerWork
|
||||
// -99 是复位
|
||||
if (qualityMask == -99)
|
||||
{
|
||||
Write_TagValueByTagTypeID(51, opName, false);
|
||||
Write_TagValueByTagTypeID(8, opName, false);
|
||||
MIS_BASE.Write_FalseGO(opName, false); // 不合格放行(MES)
|
||||
MIS_BASE.Write_ConfirmOkGo(opName, false); // 合格放行(MES)
|
||||
}
|
||||
else
|
||||
{
|
||||
//Write_TagValueByTagTypeID(51, opName, false);
|
||||
//Write_TagValueByTagTypeID(8, opName, false);
|
||||
Write_TagValueByTagTypeID(qualityMask == 1 ? 51 : 8, opName, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -13,7 +13,6 @@ namespace MesDataFunction
|
||||
public static string PrintURL { get; set; }
|
||||
public static int IsDemoMesServer { get; set; }
|
||||
public static Dictionary<string, string[]> SpecialOpList { get; set; }
|
||||
public static Dictionary<string, Dictionary<string, Dictionary<string, string>>> SpecialOpRuleConfig { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1560,11 +1560,12 @@ namespace MisDataSaveDate
|
||||
int EngineTypeID = Convert.ToInt32(dt_quality.Rows[0]["产品代码"]);
|
||||
if (opName == "OP320")
|
||||
{
|
||||
if (EngineTypeID == 2 ) dataCollectForResourceInspect.dcSequence = "B1";
|
||||
if (EngineTypeID == 2) dataCollectForResourceInspect.dcSequence = "B1";
|
||||
if (EngineTypeID == 3) dataCollectForResourceInspect.dcSequence = "B2";
|
||||
if (EngineTypeID == 4) dataCollectForResourceInspect.dcSequence = "B3";
|
||||
if (EngineTypeID == 5) dataCollectForResourceInspect.dcSequence = "B4";
|
||||
if (EngineTypeID == 6) dataCollectForResourceInspect.dcSequence = "B5";
|
||||
if (EngineTypeID == 5) dataCollectForResourceInspect.dcSequence = "B5";
|
||||
if (EngineTypeID == 6) dataCollectForResourceInspect.dcSequence = "B4";
|
||||
if (EngineTypeID == 7) dataCollectForResourceInspect.dcSequence = "B4";
|
||||
}
|
||||
|
||||
List<ParametricData> parametricDataArray = new List<ParametricData>();
|
||||
|
||||
Reference in New Issue
Block a user