同步最新程序
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);
|
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, "涂胶时间差校验"))
|
if (MisDataFun.GetSpecialOpExist(opName, "涂胶时间差校验"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -176,6 +176,34 @@ namespace MisDataFunDll
|
|||||||
return false;
|
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>
|
/// <summary>
|
||||||
/// 上盖装配新产品 根据工位扫码 写入产品信息至PLC
|
/// 上盖装配新产品 根据工位扫码 写入产品信息至PLC
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -211,26 +239,5 @@ namespace MisDataFunDll
|
|||||||
MisDataFun.LogRecording_OP(OpName, "WARNING", "MOM", msg);
|
MisDataFun.LogRecording_OP(OpName, "WARNING", "MOM", msg);
|
||||||
return false;
|
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>
|
/// <returns></returns>
|
||||||
public static bool GetSpecialOpExist(string opName, string type)
|
public static bool GetSpecialOpExist(string opName, string type)
|
||||||
{
|
{
|
||||||
if (PP.SpecialOpList == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (PP.SpecialOpList.ContainsKey(type))
|
if (PP.SpecialOpList.ContainsKey(type))
|
||||||
{
|
{
|
||||||
return PP.SpecialOpList[type].Contains(opName);
|
return PP.SpecialOpList[type].Contains(opName);
|
||||||
@@ -295,30 +291,6 @@ namespace MisDataFunDll
|
|||||||
return false;
|
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>
|
/// <summary>
|
||||||
/// 这是一个防错方法 判断200扫码工位 如果出现 产品到位 传递机型未完成时扫码 无物料与拧紧的情况下 会直接跳到出站 给两秒缓冲时间 确保物料已入库
|
/// 这是一个防错方法 判断200扫码工位 如果出现 产品到位 传递机型未完成时扫码 无物料与拧紧的情况下 会直接跳到出站 给两秒缓冲时间 确保物料已入库
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -544,15 +516,15 @@ namespace MisDataFunDll
|
|||||||
string targetField;
|
string targetField;
|
||||||
if (OpName.StartsWith("OP450"))
|
if (OpName.StartsWith("OP450"))
|
||||||
{
|
{
|
||||||
targetField = "TEXT1";
|
targetField = "TEXT2";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (EngineTypeID)
|
switch (EngineTypeID)
|
||||||
{
|
{
|
||||||
case 1: case 5: targetField = "TEXT9"; break;
|
case 1: case 5: targetField = "TEXT9"; break;
|
||||||
case 2: case 3: case 6: case 7: targetField = "TEXT14"; break;
|
case 2: case 3: targetField = "TEXT14"; break;
|
||||||
case 4: targetField = "TEXT16"; break;
|
case 4: case 6: case 7: targetField = "TEXT16"; break;
|
||||||
default: targetField = ""; break;
|
default: targetField = ""; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1827,6 +1799,31 @@ namespace MisDataFunDll
|
|||||||
DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
|
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>
|
||||||
/// 工位打码记录 增加
|
/// 工位打码记录 增加
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -515,13 +515,11 @@ namespace MesServerWork
|
|||||||
// -99 是复位
|
// -99 是复位
|
||||||
if (qualityMask == -99)
|
if (qualityMask == -99)
|
||||||
{
|
{
|
||||||
Write_TagValueByTagTypeID(51, opName, false);
|
MIS_BASE.Write_FalseGO(opName, false); // 不合格放行(MES)
|
||||||
Write_TagValueByTagTypeID(8, opName, false);
|
MIS_BASE.Write_ConfirmOkGo(opName, false); // 合格放行(MES)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Write_TagValueByTagTypeID(51, opName, false);
|
|
||||||
//Write_TagValueByTagTypeID(8, opName, false);
|
|
||||||
Write_TagValueByTagTypeID(qualityMask == 1 ? 51 : 8, opName, true);
|
Write_TagValueByTagTypeID(qualityMask == 1 ? 51 : 8, opName, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -13,7 +13,6 @@ namespace MesDataFunction
|
|||||||
public static string PrintURL { get; set; }
|
public static string PrintURL { get; set; }
|
||||||
public static int IsDemoMesServer { get; set; }
|
public static int IsDemoMesServer { get; set; }
|
||||||
public static Dictionary<string, string[]> SpecialOpList { get; set; }
|
public static Dictionary<string, string[]> SpecialOpList { get; set; }
|
||||||
public static Dictionary<string, Dictionary<string, Dictionary<string, string>>> SpecialOpRuleConfig { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1563,8 +1563,9 @@ namespace MisDataSaveDate
|
|||||||
if (EngineTypeID == 2) dataCollectForResourceInspect.dcSequence = "B1";
|
if (EngineTypeID == 2) dataCollectForResourceInspect.dcSequence = "B1";
|
||||||
if (EngineTypeID == 3) dataCollectForResourceInspect.dcSequence = "B2";
|
if (EngineTypeID == 3) dataCollectForResourceInspect.dcSequence = "B2";
|
||||||
if (EngineTypeID == 4) dataCollectForResourceInspect.dcSequence = "B3";
|
if (EngineTypeID == 4) dataCollectForResourceInspect.dcSequence = "B3";
|
||||||
if (EngineTypeID == 5) dataCollectForResourceInspect.dcSequence = "B4";
|
if (EngineTypeID == 5) dataCollectForResourceInspect.dcSequence = "B5";
|
||||||
if (EngineTypeID == 6) dataCollectForResourceInspect.dcSequence = "B5";
|
if (EngineTypeID == 6) dataCollectForResourceInspect.dcSequence = "B4";
|
||||||
|
if (EngineTypeID == 7) dataCollectForResourceInspect.dcSequence = "B4";
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ParametricData> parametricDataArray = new List<ParametricData>();
|
List<ParametricData> parametricDataArray = new List<ParametricData>();
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Function1061", "MisDataFunc
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Function1065", "MisDataFunction\Function1065\Function1065.csproj", "{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Function1065", "MisDataFunction\Function1065\Function1065.csproj", "{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Function1062", "MisDataFunction\Function1062\Function1062.csproj", "{304A54D1-63AD-44DE-B573-772EE533C47F}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -163,6 +165,14 @@ Global
|
|||||||
{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC}.Release|x86.ActiveCfg = Release|Any CPU
|
{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC}.Release|x86.Build.0 = Release|Any CPU
|
{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -180,6 +190,7 @@ Global
|
|||||||
{D5DC93C7-91DD-4C82-9444-64180F15A9C9} = {4BF576F8-7AFE-41D3-A998-2AE62375DEC6}
|
{D5DC93C7-91DD-4C82-9444-64180F15A9C9} = {4BF576F8-7AFE-41D3-A998-2AE62375DEC6}
|
||||||
{9ACE8658-5E01-4323-8A59-D43CFFCB47F3} = {4BF576F8-7AFE-41D3-A998-2AE62375DEC6}
|
{9ACE8658-5E01-4323-8A59-D43CFFCB47F3} = {4BF576F8-7AFE-41D3-A998-2AE62375DEC6}
|
||||||
{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC} = {4BF576F8-7AFE-41D3-A998-2AE62375DEC6}
|
{ABE98FA8-80EB-40E8-A93A-D70F14EB80DC} = {4BF576F8-7AFE-41D3-A998-2AE62375DEC6}
|
||||||
|
{304A54D1-63AD-44DE-B573-772EE533C47F} = {4BF576F8-7AFE-41D3-A998-2AE62375DEC6}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {9BB32B35-134E-4853-B853-73A014D416DF}
|
SolutionGuid = {9BB32B35-134E-4853-B853-73A014D416DF}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DataLinkMesWork;
|
using DataLinkMesWork;
|
||||||
using MesDataFunction;
|
using MesDataFunction;
|
||||||
using MesServerWork;
|
using MesServerWork;
|
||||||
using MesWork.PLC;
|
using MesWork.PLC;
|
||||||
@@ -138,7 +138,7 @@ namespace MisDataSaveDate
|
|||||||
var dt_Device = MisDataFunDll.MisDataFun.dt_Device();
|
var dt_Device = MisDataFunDll.MisDataFun.dt_Device();
|
||||||
var dt_TagTypeDataType = MisDataFunDll.MisDataFun.dt_TagTypeDataType();
|
var dt_TagTypeDataType = MisDataFunDll.MisDataFun.dt_TagTypeDataType();
|
||||||
|
|
||||||
ReloadSpecialConfig();
|
Get_SpecialOpList();
|
||||||
|
|
||||||
var sql =
|
var sql =
|
||||||
$" SELECT [工位号],[工位名称],[PLC],[PLC代码],[MesDll]" +
|
$" SELECT [工位号],[工位名称],[PLC],[PLC代码],[MesDll]" +
|
||||||
@@ -221,13 +221,6 @@ namespace MisDataSaveDate
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重新加载特殊工位及硬编码规则配置缓存
|
|
||||||
static public void ReloadSpecialConfig()
|
|
||||||
{
|
|
||||||
Get_SpecialOpList();
|
|
||||||
Get_SpecialOpRuleConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取特殊工位列表
|
// 获取特殊工位列表
|
||||||
static public void Get_SpecialOpList()
|
static public void Get_SpecialOpList()
|
||||||
{
|
{
|
||||||
@@ -245,35 +238,6 @@ namespace MisDataSaveDate
|
|||||||
PP.SpecialOpList = specialOpList;
|
PP.SpecialOpList = specialOpList;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取特殊工位规则配置,缓存结构:type -> opName -> ruleKey -> ruleValue
|
|
||||||
static public void Get_SpecialOpRuleConfig()
|
|
||||||
{
|
|
||||||
string procedureName = "MES_特殊工位规则配置表_查询";
|
|
||||||
SqlParameter[] thisParms = new SqlParameter[0];
|
|
||||||
DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms, out DataTable dt);
|
|
||||||
var ruleConfig = new Dictionary<string, Dictionary<string, Dictionary<string, string>>>();
|
|
||||||
foreach (DataRow row in dt.Rows)
|
|
||||||
{
|
|
||||||
string type = row["type"].ToString();
|
|
||||||
string opName = row["opName"].ToString();
|
|
||||||
string ruleKey = row["ruleKey"].ToString();
|
|
||||||
string ruleValue = row["ruleValue"].ToString();
|
|
||||||
|
|
||||||
if (!ruleConfig.ContainsKey(type))
|
|
||||||
{
|
|
||||||
ruleConfig[type] = new Dictionary<string, Dictionary<string, string>>();
|
|
||||||
}
|
|
||||||
if (!ruleConfig[type].ContainsKey(opName))
|
|
||||||
{
|
|
||||||
ruleConfig[type][opName] = new Dictionary<string, string>();
|
|
||||||
}
|
|
||||||
|
|
||||||
ruleConfig[type][opName][ruleKey] = ruleValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
PP.SpecialOpRuleConfig = ruleConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void SaveData_Load(object sender, EventArgs e)
|
public void SaveData_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -1110,8 +1074,7 @@ namespace MisDataSaveDate
|
|||||||
|
|
||||||
private void button19_Click_1(object sender, EventArgs e)
|
private void button19_Click_1(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ReloadSpecialConfig();
|
Get_SpecialOpList();
|
||||||
MessageBox.Show("特殊工位和规则配置已重新加载!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button21_Click(object sender, EventArgs e)
|
private void button21_Click(object sender, EventArgs e)
|
||||||
|
|||||||
@@ -275,6 +275,10 @@
|
|||||||
<Project>{9ace8658-5e01-4323-8a59-d43cffcb47f3}</Project>
|
<Project>{9ace8658-5e01-4323-8a59-d43cffcb47f3}</Project>
|
||||||
<Name>Function1061</Name>
|
<Name>Function1061</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\MisDataFunction\Function1062\Function1062.csproj">
|
||||||
|
<Project>{304a54d1-63ad-44de-b573-772ee533c47f}</Project>
|
||||||
|
<Name>Function1062</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\MisDataFunction\Function1065\Function1065.csproj">
|
<ProjectReference Include="..\..\MisDataFunction\Function1065\Function1065.csproj">
|
||||||
<Project>{abe98fa8-80eb-40e8-a93a-d70f14eb80dc}</Project>
|
<Project>{abe98fa8-80eb-40e8-a93a-d70f14eb80dc}</Project>
|
||||||
<Name>Function1065</Name>
|
<Name>Function1065</Name>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace MisDataSaveDate
|
|||||||
readonly string headUrl = "WebSend/";
|
readonly string headUrl = "WebSend/";
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|
||||||
[Route("ApiFailRetry")]
|
[Route("ApiFailRetry")]
|
||||||
public HttpResponseMessage ReceiveMomPlanData([FromBody] JObject jobj)
|
public HttpResponseMessage ReceiveMomPlanData([FromBody] JObject jobj)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -861,8 +861,9 @@ namespace MisDataSaveDate
|
|||||||
/// 产品型号代码
|
/// 产品型号代码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int EngineTypeID { get; set; }
|
public int EngineTypeID { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工位号
|
/// 工位号,如 OP120
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string OpName { get; set; }
|
public string OpName { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
19
MisDataFun_Exe/Function1062.dll.config
Normal file
19
MisDataFun_Exe/Function1062.dll.config
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="MQTTnet" publicKeyToken="b69712f52770c0a7" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-3.0.13.0" newVersion="3.0.13.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using MesDataFunction;
|
|
||||||
using MesServerWork;
|
using MesServerWork;
|
||||||
using MisDataFunDll;
|
using MisDataFunDll;
|
||||||
using MisDataSaveDate;
|
using MisDataSaveDate;
|
||||||
@@ -85,15 +84,11 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存完成工作完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, true);
|
|
||||||
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "PLC允许保存数据取消!");
|
||||||
|
|||||||
@@ -124,16 +124,11 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存完成工作完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, true);
|
|
||||||
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
|
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "PLC允许保存数据取消!");
|
||||||
|
|||||||
@@ -79,9 +79,9 @@
|
|||||||
<Compile Include="OpcServer\FalseGO.cs" />
|
<Compile Include="OpcServer\FalseGO.cs" />
|
||||||
<Compile Include="OpcServer\FixOK.cs" />
|
<Compile Include="OpcServer\FixOK.cs" />
|
||||||
<Compile Include="OpcServer\FixOver.cs" />
|
<Compile Include="OpcServer\FixOver.cs" />
|
||||||
|
<Compile Include="OpcServer\ManualStaticBSave.cs" />
|
||||||
<Compile Include="OpcServer\MesSaveNowData.cs" />
|
<Compile Include="OpcServer\MesSaveNowData.cs" />
|
||||||
<Compile Include="OpcServer\HeartBeat.cs" />
|
<Compile Include="OpcServer\HeartBeat.cs" />
|
||||||
<Compile Include="OpcServer\ManualStaticBSave.cs" />
|
|
||||||
<Compile Include="OpcServer\MesRead.cs" />
|
<Compile Include="OpcServer\MesRead.cs" />
|
||||||
<Compile Include="OpcServer\MesReadOver.cs" />
|
<Compile Include="OpcServer\MesReadOver.cs" />
|
||||||
<Compile Include="OpcServer\PartLoad.cs" />
|
<Compile Include="OpcServer\PartLoad.cs" />
|
||||||
|
|||||||
@@ -187,6 +187,16 @@ namespace MesServerFunctions
|
|||||||
ThreadPool.QueueUserWorkItem(FalseGO, e);
|
ThreadPool.QueueUserWorkItem(FalseGO, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OP420 静置B位产品信息保存
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="OpName"></param>
|
||||||
|
/// <param name="tagValue"></param>
|
||||||
|
public void fun_ManualStaticBSave(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||||
|
{
|
||||||
|
ThreadPool.QueueUserWorkItem(ManualStaticBSave, e);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 允许保存
|
/// 允许保存
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -258,16 +268,6 @@ namespace MesServerFunctions
|
|||||||
ThreadPool.QueueUserWorkItem(MesSaveNowData, e);
|
ThreadPool.QueueUserWorkItem(MesSaveNowData, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// OP420 静置B位产品信息保存
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="OpName"></param>
|
|
||||||
/// <param name="tagValue"></param>
|
|
||||||
public void fun_ManualStaticBSave(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
|
||||||
{
|
|
||||||
ThreadPool.QueueUserWorkItem(ManualStaticBSave, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 拧紧完成
|
/// 拧紧完成
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DataLinkMesWork1;
|
using DataLinkMesWork1;
|
||||||
using MesServerWork;
|
using MesServerWork;
|
||||||
using MisDataFunDll;
|
using MisDataFunDll;
|
||||||
using System;
|
using System;
|
||||||
@@ -12,13 +12,13 @@ namespace MesServerFunctions
|
|||||||
/// OP420 静置B位产品信息保存:64=1 保存开始静置信息,64=0 复位保存完成点位。
|
/// OP420 静置B位产品信息保存:64=1 保存开始静置信息,64=0 复位保存完成点位。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void ManualStaticBSave(object e)
|
private void ManualStaticBSave(object e)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
string opName = Convert.ToString(msgEvent.OpName);
|
string opName = Convert.ToString(msgEvent.OpName);
|
||||||
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if (opName != "OP420")
|
if (opName != "OP420")
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -45,16 +45,21 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PLC 当前产品区已是最终 PACK 码,只补查订单和产品型号。
|
// PLC 可能只给产品码和机型代码,补查数据库中的产品型号。
|
||||||
MisDataFun.Moby_Select_PDC(engineID, out orderForm, out engineType, out engineTypeID);
|
string dbEngineType;
|
||||||
if (engineTypeID <= 0)
|
int dbEngineTypeID;
|
||||||
|
MisDataFun.Moby_Select_PDC(engineID, out orderForm, out dbEngineType, out dbEngineTypeID);
|
||||||
|
if (dbEngineTypeID > 0)
|
||||||
{
|
{
|
||||||
WriteManualStaticBSaveError(opName, "未查询到产品执行信息:" + engineID);
|
engineTypeID = dbEngineTypeID;
|
||||||
return;
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(dbEngineType))
|
||||||
|
{
|
||||||
|
engineType = dbEngineType;
|
||||||
}
|
}
|
||||||
|
|
||||||
string message;
|
string message;
|
||||||
if (!SaveManualStaticBRecord(engineID, engineType, engineTypeID, out message))
|
if (!MisDataFun.SaveManualStaticBRecord(engineID, engineType, engineTypeID, out message))
|
||||||
{
|
{
|
||||||
WriteManualStaticBSaveError(opName, message);
|
WriteManualStaticBSaveError(opName, message);
|
||||||
return;
|
return;
|
||||||
@@ -66,34 +71,11 @@ namespace MesServerFunctions
|
|||||||
catch (Exception err)
|
catch (Exception err)
|
||||||
{
|
{
|
||||||
MyLog4Net.MyLogHelper.Error("Function1055.ManualStaticBSave", err.Message);
|
MyLog4Net.MyLogHelper.Error("Function1055.ManualStaticBSave", err.Message);
|
||||||
WriteManualStaticBSaveError("OP420", err.Message);
|
WriteManualStaticBSaveError(opName, err.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 保存 OP420 静置B位开始记录,同一产品只保留最新一条。
|
|
||||||
/// </summary>
|
|
||||||
private 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>
|
||||||
/// OP420 静置B位保存失败时复位完成点位并通知页面。
|
/// OP420 静置B位保存失败时复位完成点位并通知页面。
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MesDataFunction;
|
|
||||||
//using SystemFramework;
|
//using SystemFramework;
|
||||||
using MesServerWork;
|
using MesServerWork;
|
||||||
using MisDataFunDll;
|
using MisDataFunDll;
|
||||||
@@ -100,7 +99,8 @@ namespace MesServerFunctions
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, false);
|
MIS_BASE.Write_MesReadOver(OpName, false);
|
||||||
|
MIS_BASE.Write_MesWorkFinish(OpName, false);
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,14 +111,11 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存完成工作完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, true);
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using MesServerWork;
|
using MesServerWork;
|
||||||
using MesDataFunction;
|
|
||||||
using MisDataFunDll;
|
using MisDataFunDll;
|
||||||
using MisDataSaveDate;
|
using MisDataSaveDate;
|
||||||
using System;
|
using System;
|
||||||
@@ -128,16 +127,19 @@ namespace MesServerFunctions
|
|||||||
// 都出站成功了 才给PLC信号
|
// 都出站成功了 才给PLC信号
|
||||||
if (part1_IsOk && part2_IsOk)
|
if (part1_IsOk && part2_IsOk)
|
||||||
{
|
{
|
||||||
// 保存完成工作完成
|
//通知PLC,MES工作完成
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, true);
|
MIS_BASE.Write_MesWorkFinish(OpName, true);
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES保存数据完成!");
|
//通知PLC,MES保存完成
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES工作完成!");
|
MIS_BASE.Write_MesReadOver(OpName, true);
|
||||||
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
||||||
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
//using SystemFramework;
|
//using SystemFramework;
|
||||||
using MesDataFunction;
|
|
||||||
using MesServerWork;
|
using MesServerWork;
|
||||||
using MisDataFunDll;
|
using MisDataFunDll;
|
||||||
|
|
||||||
@@ -66,16 +65,20 @@ namespace MesServerFunctions
|
|||||||
}
|
}
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, qualityMask);
|
MIS_BASE.Write_OpNameIsOk(OpName, qualityMask);
|
||||||
// 保存完成工作完成
|
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, true);
|
//通知PLC,MES工作完成
|
||||||
|
MIS_BASE.Write_MesWorkFinish(OpName, true);
|
||||||
|
//通知PLC,MES保存完成
|
||||||
|
MIS_BASE.Write_MesReadOver(OpName, true);
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "PLC允许保存数据取消!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
//using SystemFramework;
|
//using SystemFramework;
|
||||||
using MesDataFunction;
|
|
||||||
using MesServerWork;
|
using MesServerWork;
|
||||||
using MisDataFunDll;
|
using MisDataFunDll;
|
||||||
using MisDataSaveDate;
|
using MisDataSaveDate;
|
||||||
@@ -100,10 +99,7 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存完成工作完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, true);
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -119,7 +115,7 @@ namespace MesServerFunctions
|
|||||||
{
|
{
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,19 +49,13 @@ namespace MesServerFunctions
|
|||||||
|
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, qualityMask);
|
MIS_BASE.Write_OpNameIsOk(OpName, qualityMask);
|
||||||
//通知PLC,MES保存完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
MIS_BASE.Write_MesReadOver(OpName, true);
|
|
||||||
//通知PLC,MES工作完成
|
|
||||||
MIS_BASE.Write_MesWorkFinish(OpName, true);
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
||||||
MIS_BASE.Write_MesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MIS_BASE.Write_MesWorkFinish(OpName, false);
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "PLC允许保存数据取消!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace MesServerFunctions
|
|||||||
//InitWorkStep(OpName, EngineTypeID, EngineType, EngineID);
|
//InitWorkStep(OpName, EngineTypeID, EngineType, EngineID);
|
||||||
//更新订单完工数量及物料
|
//更新订单完工数量及物料
|
||||||
SendMessageFun.SendMessage("2", "11", OpName);
|
SendMessageFun.SendMessage("2", "11", OpName);
|
||||||
if(EngineTypeID == 2 || EngineTypeID == 3 || EngineTypeID == 6 || EngineTypeID == 7) PrinterCommandCenter.PrintToPrinter(OpName, EngineID); // 打印PACK条码
|
if(EngineTypeID == 2 || EngineTypeID == 3) PrinterCommandCenter.PrintToPrinter(OpName, EngineID); // 打印PACK条码
|
||||||
MIS_BASE.Write_FixAllow(OpName, true); // 允许工作
|
MIS_BASE.Write_FixAllow(OpName, true); // 允许工作
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "Barcode", "物料验证完成 允许工作!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "Barcode", "物料验证完成 允许工作!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using MesDataFunction;
|
|
||||||
using MesServerWork;
|
using MesServerWork;
|
||||||
using MisDataFunDll;
|
using MisDataFunDll;
|
||||||
using MisDataSaveDate;
|
using MisDataSaveDate;
|
||||||
@@ -82,15 +81,11 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存完成工作完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, true);
|
|
||||||
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MisDataBaseFun.WriteMesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
MIS_BASE.Write_OpNameIsOk(OpName, -99);
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
||||||
|
|||||||
Binary file not shown.
@@ -5,7 +5,7 @@
|
|||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProductVersion>8.0.30703</ProductVersion>
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{B5A0BAA3-C1A7-4AAB-9486-2E650ADACA7E}</ProjectGuid>
|
<ProjectGuid>{304A54D1-63AD-44DE-B573-772EE533C47F}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Function1062</RootNamespace>
|
<RootNamespace>Function1062</RootNamespace>
|
||||||
|
|||||||
Reference in New Issue
Block a user