Compare commits
6 Commits
02e3b2f302
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d504245fcf | ||
|
|
ff5249fa75 | ||
|
|
5ef3cf5346 | ||
|
|
4aab62831a | ||
|
|
d1403d22b8 | ||
|
|
92c8f2d68d |
@@ -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>
|
||||||
|
|||||||
@@ -514,12 +514,19 @@ namespace MisDataFunDll
|
|||||||
{
|
{
|
||||||
// 机型代码 对应客户标签字段映射
|
// 机型代码 对应客户标签字段映射
|
||||||
string targetField;
|
string targetField;
|
||||||
switch (EngineTypeID)
|
if (OpName.StartsWith("OP450"))
|
||||||
{
|
{
|
||||||
case 1: case 5: targetField = "TEXT9"; break;
|
targetField = "TEXT2";
|
||||||
case 2: case 3: targetField = "TEXT14"; break;
|
}
|
||||||
case 4: targetField = "TEXT16"; break;
|
else
|
||||||
default: targetField = ""; break;
|
{
|
||||||
|
switch (EngineTypeID)
|
||||||
|
{
|
||||||
|
case 1: case 5: targetField = "TEXT9"; break;
|
||||||
|
case 2: case 3: targetField = "TEXT14"; break;
|
||||||
|
case 4: case 6: case 7: targetField = "TEXT16"; break;
|
||||||
|
default: targetField = ""; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(targetField))
|
if (!string.IsNullOrEmpty(targetField))
|
||||||
@@ -1792,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1405,6 +1405,7 @@ namespace MisDataSaveDate
|
|||||||
}
|
}
|
||||||
getAllLabelContents.sfcList = sfc;
|
getAllLabelContents.sfcList = sfc;
|
||||||
if (opName == "OP490-3") getAllLabelContents.Y = "2";
|
if (opName == "OP490-3") getAllLabelContents.Y = "2";
|
||||||
|
if (opName.StartsWith("OP450")) getAllLabelContents.Y = "3";
|
||||||
MisDataFun.LogRecording_OP(opName, "INFO", "MOM", "调用打印配置接口");
|
MisDataFun.LogRecording_OP(opName, "INFO", "MOM", "调用打印配置接口");
|
||||||
ND_Api.getAllLabelContents(apiName, opName, getAllLabelContents,out string responseContent, out code, out message);
|
ND_Api.getAllLabelContents(apiName, opName, getAllLabelContents,out string responseContent, out code, out message);
|
||||||
if (code == "0")
|
if (code == "0")
|
||||||
@@ -1535,6 +1536,9 @@ namespace MisDataSaveDate
|
|||||||
case "dcGroupRevision":
|
case "dcGroupRevision":
|
||||||
dataCollectForResourceInspect.dcGroupRevision = paramValue?.ToString() ?? "";
|
dataCollectForResourceInspect.dcGroupRevision = paramValue?.ToString() ?? "";
|
||||||
break;
|
break;
|
||||||
|
case "executeMode":
|
||||||
|
dataCollectForResourceInspect.executeMode = paramValue?.ToString() ?? "";
|
||||||
|
break;
|
||||||
case "operation":
|
case "operation":
|
||||||
dataCollectForResourceInspect.operation = operation;
|
dataCollectForResourceInspect.operation = operation;
|
||||||
break;
|
break;
|
||||||
@@ -1559,6 +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 = "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}
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -701,6 +701,10 @@ namespace MisDataSaveDate
|
|||||||
{
|
{
|
||||||
throw new Exception("参数EngineID为空!");
|
throw new Exception("参数EngineID为空!");
|
||||||
}
|
}
|
||||||
|
if (string.IsNullOrWhiteSpace(req.OpName))
|
||||||
|
{
|
||||||
|
throw new Exception("参数OpName为空!");
|
||||||
|
}
|
||||||
if (req.EngineTypeID <= 0)
|
if (req.EngineTypeID <= 0)
|
||||||
{
|
{
|
||||||
throw new Exception("参数EngineTypeID无效!");
|
throw new Exception("参数EngineTypeID无效!");
|
||||||
@@ -708,7 +712,7 @@ namespace MisDataSaveDate
|
|||||||
|
|
||||||
string engineID = req.EngineID.Trim();
|
string engineID = req.EngineID.Trim();
|
||||||
int engineTypeID = req.EngineTypeID;
|
int engineTypeID = req.EngineTypeID;
|
||||||
string opName = "OP490-3";
|
string opName = req.OpName.Trim();
|
||||||
|
|
||||||
string tagValue = MisDataFunDll.MisDataFun.GetMesClientTagValue(opName, engineID, engineTypeID);
|
string tagValue = MisDataFunDll.MisDataFun.GetMesClientTagValue(opName, engineID, engineTypeID);
|
||||||
|
|
||||||
@@ -857,6 +861,11 @@ namespace MisDataSaveDate
|
|||||||
/// 产品型号代码
|
/// 产品型号代码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int EngineTypeID { get; set; }
|
public int EngineTypeID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工位号,如 OP120
|
||||||
|
/// </summary>
|
||||||
|
public string OpName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetClientTagValueRes
|
public class GetClientTagValueRes
|
||||||
|
|||||||
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>
|
||||||
@@ -84,18 +84,11 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//通知PLC,MES工作完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
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工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MIS_BASE.Write_MesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MIS_BASE.Write_MesWorkFinish(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,18 +124,11 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//通知PLC,MES工作完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
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工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MIS_BASE.Write_MesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MIS_BASE.Write_MesWorkFinish(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,6 +79,7 @@
|
|||||||
<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\MesRead.cs" />
|
<Compile Include="OpcServer\MesRead.cs" />
|
||||||
|
|||||||
@@ -100,6 +100,13 @@ namespace MesServerFunctions
|
|||||||
case "65":
|
case "65":
|
||||||
fun_MesSaveNowData(e);
|
fun_MesSaveNowData(e);
|
||||||
break;
|
break;
|
||||||
|
//OP420 静置B位产品信息保存请求
|
||||||
|
case "64":
|
||||||
|
if (m_OpName == "OP420")
|
||||||
|
{
|
||||||
|
fun_ManualStaticBSave(e);
|
||||||
|
}
|
||||||
|
break;
|
||||||
//MES 系统健康心跳
|
//MES 系统健康心跳
|
||||||
case "14":
|
case "14":
|
||||||
fun_HeartBeatMIS(e);
|
fun_HeartBeatMIS(e);
|
||||||
@@ -180,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>
|
||||||
|
|||||||
91
MisDataFunction/Function1055/OpcServer/ManualStaticBSave.cs
Normal file
91
MisDataFunction/Function1055/OpcServer/ManualStaticBSave.cs
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
using DataLinkMesWork1;
|
||||||
|
using MesServerWork;
|
||||||
|
using MisDataFunDll;
|
||||||
|
using System;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
partial class FunctionMES
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OP420 静置B位产品信息保存:64=1 保存开始静置信息,64=0 复位保存完成点位。
|
||||||
|
/// </summary>
|
||||||
|
private void ManualStaticBSave(object e)
|
||||||
|
{
|
||||||
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
|
string opName = Convert.ToString(msgEvent.OpName);
|
||||||
|
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (opName != "OP420")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tagValue != 1)
|
||||||
|
{
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(31, opName, false);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "ManualStaticBSave", "PLC请求保存静置B位产品信息取消!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int engineTypeID;
|
||||||
|
string engineType;
|
||||||
|
string engineID;
|
||||||
|
int palletCode;
|
||||||
|
string orderForm;
|
||||||
|
|
||||||
|
// 从 PLC 当前产品区读取 B 位产品信息,作为线下手动静置开始记录。
|
||||||
|
MIS_BASE.GetEngineTypeFromPLC(opName, out engineTypeID, out engineType, out engineID, out palletCode, out orderForm);
|
||||||
|
if (string.IsNullOrWhiteSpace(engineID))
|
||||||
|
{
|
||||||
|
WriteManualStaticBSaveError(opName, "PLC当前产品码为空,无法记录静置B位产品信息");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PLC 可能只给产品码和机型代码,补查数据库中的产品型号。
|
||||||
|
string dbEngineType;
|
||||||
|
int dbEngineTypeID;
|
||||||
|
MisDataFun.Moby_Select_PDC(engineID, out orderForm, out dbEngineType, out dbEngineTypeID);
|
||||||
|
if (dbEngineTypeID > 0)
|
||||||
|
{
|
||||||
|
engineTypeID = dbEngineTypeID;
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(dbEngineType))
|
||||||
|
{
|
||||||
|
engineType = dbEngineType;
|
||||||
|
}
|
||||||
|
|
||||||
|
string message;
|
||||||
|
if (!MisDataFun.SaveManualStaticBRecord(engineID, engineType, engineTypeID, out message))
|
||||||
|
{
|
||||||
|
WriteManualStaticBSaveError(opName, message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(31, opName, true);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "ManualStaticBSave", "静置B位产品信息保存完成:" + engineID);
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
MyLog4Net.MyLogHelper.Error("Function1055.ManualStaticBSave", err.Message);
|
||||||
|
WriteManualStaticBSaveError(opName, err.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OP420 静置B位保存失败时复位完成点位并通知页面。
|
||||||
|
/// </summary>
|
||||||
|
private void WriteManualStaticBSaveError(string opName, string message)
|
||||||
|
{
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(31, opName, false);
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(34, opName, true);
|
||||||
|
SendMessage.AsyncSendMessage_Notice(opName, "【" + opName + "】" + message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "ManualStaticBSave", message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -111,17 +111,11 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//通知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", "MesRead", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MIS_BASE.Write_MesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MIS_BASE.Write_MesWorkFinish(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允许保存数据取消!");
|
||||||
|
|||||||
@@ -127,18 +127,19 @@ namespace MesServerFunctions
|
|||||||
// 都出站成功了 才给PLC信号
|
// 都出站成功了 才给PLC信号
|
||||||
if (part1_IsOk && part2_IsOk)
|
if (part1_IsOk && part2_IsOk)
|
||||||
{
|
{
|
||||||
// 4.通知PLC,MES保存完成 MES工作完成
|
//通知PLC,MES工作完成
|
||||||
MIS_BASE.Write_MesReadOver(OpName, true);
|
|
||||||
MIS_BASE.Write_MesWorkFinish(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
|
||||||
{
|
{
|
||||||
MIS_BASE.Write_MesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MIS_BASE.Write_MesWorkFinish(OpName, false);
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "PLC允许保存数据取消!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,19 +65,20 @@ namespace MesServerFunctions
|
|||||||
}
|
}
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
MIS_BASE.Write_OpNameIsOk(OpName, qualityMask);
|
MIS_BASE.Write_OpNameIsOk(OpName, qualityMask);
|
||||||
//通知PLC,MES保存完成
|
|
||||||
MIS_BASE.Write_MesReadOver(OpName, true);
|
|
||||||
//通知PLC,MES工作完成
|
//通知PLC,MES工作完成
|
||||||
MIS_BASE.Write_MesWorkFinish(OpName, true);
|
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);
|
||||||
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允许保存数据取消!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,12 +99,7 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//通知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", "MesRead", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -120,8 +115,7 @@ namespace MesServerFunctions
|
|||||||
{
|
{
|
||||||
// 写入加工合格还是不合格 根据工位合格标志写
|
// 写入加工合格还是不合格 根据工位合格标志写
|
||||||
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", "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允许保存数据取消!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,18 +81,11 @@ namespace MesServerFunctions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//通知PLC,MES工作完成
|
MisDataBaseFun.WriteMesReadOver(OpName, true); // 保存完成工作完成
|
||||||
MIS_BASE.Write_MesWorkFinish(OpName, true);
|
|
||||||
//通知PLC,MES保存完成
|
|
||||||
MIS_BASE.Write_MesReadOver(OpName, true);
|
|
||||||
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES保存数据完成!");
|
|
||||||
MisDataFun.LogRecording_OP(OpName, "INFO", "MesRead", "MES工作完成!");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MIS_BASE.Write_MesReadOver(OpName, false);
|
MisDataBaseFun.WriteMesReadOver(OpName, false); // 保存完成工作完成
|
||||||
MIS_BASE.Write_MesWorkFinish(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允许保存数据取消!");
|
||||||
|
|||||||
484
MisDataFunction/Function1062/DataAccess/DataAccess.cs
Normal file
484
MisDataFunction/Function1062/DataAccess/DataAccess.cs
Normal file
@@ -0,0 +1,484 @@
|
|||||||
|
using DataLinkMesWork1;
|
||||||
|
using MesServerWork;
|
||||||
|
using MisDataFunDll;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
partial class FunctionMES
|
||||||
|
{
|
||||||
|
// OP431 手动静置出库固定配置。
|
||||||
|
private const string ManualStaticOutOpName = "OP431";
|
||||||
|
private const string ManualStaticPadTopic = "OP431PAD";
|
||||||
|
private const decimal DefaultManualStaticMinutes = 30m;
|
||||||
|
private const string ManualStaticLocation = "777777";
|
||||||
|
private const string ManualStaticOperator = "PAD";
|
||||||
|
|
||||||
|
// 记录 PAD 确认时使用的最小静置分钟数,保存质量数据时沿用同一标准。
|
||||||
|
private static readonly object ManualStaticMinutesLocker = new object();
|
||||||
|
private static readonly Dictionary<string, decimal> ManualStaticMinutesByEngine = new Dictionary<string, decimal>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OP431 当前产品基础信息。
|
||||||
|
/// </summary>
|
||||||
|
private class ManualStaticOutProduct
|
||||||
|
{
|
||||||
|
public string EngineID { get; set; }
|
||||||
|
public string OrderForm { get; set; }
|
||||||
|
public string EngineType { get; set; }
|
||||||
|
public int EngineTypeID { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OP431 静置质量数据计算结果。
|
||||||
|
/// </summary>
|
||||||
|
private class ManualStaticOutData
|
||||||
|
{
|
||||||
|
public string SourceOpName { get; set; }
|
||||||
|
public DateTime StartTime { get; set; }
|
||||||
|
public DateTime FinishTime { get; set; }
|
||||||
|
public decimal Minutes { get; set; }
|
||||||
|
public int QualityMask { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询产品订单、型号和机型代码。
|
||||||
|
/// </summary>
|
||||||
|
private bool TryGetManualStaticOutProduct(string engineID, out ManualStaticOutProduct product, out string message)
|
||||||
|
{
|
||||||
|
product = null;
|
||||||
|
message = "";
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(engineID))
|
||||||
|
{
|
||||||
|
message = "产品码为空";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PAD 可能扫描箱体码,最终产品编号以存储过程返回的产品编号为准。
|
||||||
|
if (!TrySelectManualStaticPdcProduct(engineID, out string productCode, out string orderForm, out string engineType, out int engineTypeID, out message))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
product = new ManualStaticOutProduct
|
||||||
|
{
|
||||||
|
EngineID = productCode,
|
||||||
|
OrderForm = orderForm,
|
||||||
|
EngineType = engineType,
|
||||||
|
EngineTypeID = engineTypeID
|
||||||
|
};
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询 PDC 产品执行信息,兼容产品码和箱体码输入。
|
||||||
|
/// </summary>
|
||||||
|
private bool TrySelectManualStaticPdcProduct(string scanCode, out string productCode, out string orderForm, out string engineType, out int engineTypeID, out string message)
|
||||||
|
{
|
||||||
|
productCode = "";
|
||||||
|
orderForm = "";
|
||||||
|
engineType = "";
|
||||||
|
engineTypeID = 0;
|
||||||
|
message = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SqlParameter[] sqlParameters = new SqlParameter[1];
|
||||||
|
sqlParameters[0] = new SqlParameter("@发动机号", scanCode);
|
||||||
|
DataAccess.ExecuteStoredProcedure("测量数据工位_监控系统_MOBY_查询_PDC", ref sqlParameters, out DataTable dt, out string errorMessage);
|
||||||
|
if (!string.IsNullOrWhiteSpace(errorMessage))
|
||||||
|
{
|
||||||
|
message = "查询产品执行信息失败:" + errorMessage;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dt == null || dt.Rows.Count == 0)
|
||||||
|
{
|
||||||
|
message = "未查询到产品执行信息:" + scanCode;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
DataRow row = dt.Rows[0];
|
||||||
|
productCode = dt.Columns.Contains("产品编号") ? Convert.ToString(row["产品编号"]) : Convert.ToString(row["发动机号"]);
|
||||||
|
orderForm = Convert.ToString(row["订单号"]);
|
||||||
|
engineType = Convert.ToString(row["产品型号"]);
|
||||||
|
engineTypeID = Convert.ToInt32(row["机型代码"]);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(productCode) || engineTypeID <= 0 || string.IsNullOrWhiteSpace(engineType))
|
||||||
|
{
|
||||||
|
message = "产品执行信息不完整:" + scanCode;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
productCode = productCode.Trim();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
message = "查询产品执行信息失败:" + err.Message;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询 OP420 记录的线下手动静置开始时间。
|
||||||
|
/// </summary>
|
||||||
|
private bool TryGetManualStaticStartTime(string engineID, out string sourceOpName, out DateTime startTime, out string message)
|
||||||
|
{
|
||||||
|
sourceOpName = "";
|
||||||
|
startTime = DateTime.MinValue;
|
||||||
|
message = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// OP431 手动出库以 OP420 记录的线下静置开始时间为准。
|
||||||
|
string procedureName = "线下手动静置_记录_查询";
|
||||||
|
SqlParameter[] sqlParameters = new SqlParameter[1];
|
||||||
|
sqlParameters[0] = new SqlParameter("@产品编号", engineID);
|
||||||
|
|
||||||
|
DataAccess.ExecuteStoredProcedure(procedureName, ref sqlParameters, out DataTable dt, out string errorMessage);
|
||||||
|
if (!string.IsNullOrWhiteSpace(errorMessage))
|
||||||
|
{
|
||||||
|
message = "查询线下手动静置开始时间失败:" + errorMessage;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dt == null || dt.Rows.Count == 0)
|
||||||
|
{
|
||||||
|
message = "未查询到线下手动静置开始记录:" + engineID;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceOpName = "OP420";
|
||||||
|
startTime = Convert.ToDateTime(dt.Rows[0]["静置开始时间"]);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
message = "查询线下手动静置开始时间失败:" + err.Message;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OP431 保存时回写线下手动静置结束时间和静置时长。
|
||||||
|
/// </summary>
|
||||||
|
private bool FinishManualStaticRecord(string engineID, DateTime finishTime, decimal minutes, out string message)
|
||||||
|
{
|
||||||
|
message = "";
|
||||||
|
SqlParameter[] sqlParameters = new SqlParameter[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@产品编号", engineID),
|
||||||
|
new SqlParameter("@静置结束时间", finishTime),
|
||||||
|
new SqlParameter("@静置时长", minutes)
|
||||||
|
};
|
||||||
|
|
||||||
|
DataAccess.ExecuteStoredProcedure("线下手动静置_记录_结束", ref sqlParameters, out string errorMessage);
|
||||||
|
if (!string.IsNullOrWhiteSpace(errorMessage))
|
||||||
|
{
|
||||||
|
message = "回写线下手动静置结束时间失败:" + errorMessage;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成 OP431 保存时需要的静置时间和质量标识。
|
||||||
|
/// </summary>
|
||||||
|
private bool TryBuildManualStaticOutData(string engineID, int qualityMask, out ManualStaticOutData staticOutData, out string message)
|
||||||
|
{
|
||||||
|
staticOutData = null;
|
||||||
|
message = "";
|
||||||
|
|
||||||
|
if (!TryGetManualStaticStartTime(engineID, out string sourceOpName, out DateTime startTime, out message))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PLC 允许保存到达时的服务器时间作为静置完成时间。
|
||||||
|
DateTime finishTime = DateTime.Now;
|
||||||
|
decimal minutes = Math.Round(Convert.ToDecimal((finishTime - startTime).TotalMinutes), 2);
|
||||||
|
staticOutData = new ManualStaticOutData
|
||||||
|
{
|
||||||
|
SourceOpName = sourceOpName,
|
||||||
|
StartTime = startTime,
|
||||||
|
FinishTime = finishTime,
|
||||||
|
Minutes = minutes,
|
||||||
|
QualityMask = NormalizeManualStaticQualityMask(qualityMask)
|
||||||
|
};
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 标准化质量标识:1 为合格,其余均按不合格处理。
|
||||||
|
/// </summary>
|
||||||
|
private int NormalizeManualStaticQualityMask(int qualityMask)
|
||||||
|
{
|
||||||
|
return qualityMask == 1 ? 1 : 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 判断静置时长是否达到 PAD 配置的最小分钟数。
|
||||||
|
/// </summary>
|
||||||
|
private bool IsManualStaticTimeEnough(ManualStaticOutData staticOutData, decimal minStaticMinutes, out string message)
|
||||||
|
{
|
||||||
|
message = "";
|
||||||
|
if (staticOutData.Minutes < minStaticMinutes)
|
||||||
|
{
|
||||||
|
message = "静置时间不足 " + minStaticMinutes.ToString("0.##") + " 分钟,当前已静置 " + staticOutData.Minutes + " 分钟";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 直接写入 OP431 四项静置质量数据。
|
||||||
|
/// </summary>
|
||||||
|
private bool WriteManualStaticOutQualityData(string opName, string engineID, ManualStaticOutData data, out string message)
|
||||||
|
{
|
||||||
|
message = "";
|
||||||
|
int idTagCf = 0;
|
||||||
|
if (!TryGetManualStaticMinutesForProduct(engineID, out decimal rememberedMinStaticMinutes))
|
||||||
|
{
|
||||||
|
message = "未找到PAD确认的最小静置标准,请在PAD重新确认上线后再保存:" + engineID;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 先写质量索引,取返回的 Id_tagCF 作为明细关联键。
|
||||||
|
string minStaticMinutes = rememberedMinStaticMinutes.ToString("0.##");
|
||||||
|
|
||||||
|
// OP431 的静置数据由 Function 直接落库,不再通过 OnlineCheckData 做 HTTP 自调用。
|
||||||
|
SqlParameter[] indexParams = new SqlParameter[6];
|
||||||
|
indexParams[0] = new SqlParameter("@EngineID", engineID);
|
||||||
|
indexParams[1] = new SqlParameter("@工位号", opName);
|
||||||
|
indexParams[2] = new SqlParameter("@操作者工号", ManualStaticOperator);
|
||||||
|
indexParams[3] = new SqlParameter("@扫码时间", data.FinishTime);
|
||||||
|
indexParams[4] = new SqlParameter("@合格标志", data.QualityMask);
|
||||||
|
indexParams[5] = new SqlParameter("@Id_tagCF", idTagCf);
|
||||||
|
indexParams[5].Direction = ParameterDirection.Output;
|
||||||
|
|
||||||
|
DataAccess.ExecuteStoredProcedure("测量数据合格索引_增加_测试设备", ref indexParams, out string errorMessage);
|
||||||
|
if (!string.IsNullOrWhiteSpace(errorMessage))
|
||||||
|
{
|
||||||
|
message = "写入静置质量索引失败:" + errorMessage;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
idTagCf = Convert.ToInt32(indexParams[5].Value.ToString());
|
||||||
|
if (idTagCf <= 0)
|
||||||
|
{
|
||||||
|
message = "写入静置质量索引失败:未生成 Id_tagCF";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 四条质量明细必须与 MOM 数据收集组配置的 TagID 保持一致。
|
||||||
|
object[,] detailRows = new object[,]
|
||||||
|
{
|
||||||
|
{ "OP431_M0001_001", "开始静置时间", "min", "1", "60", minStaticMinutes, data.StartTime.ToString("yyyy-MM-dd HH:mm:ss"), data.QualityMask },
|
||||||
|
{ "OP431_M0001_002", "静置完成时间", "min", "1", "60", minStaticMinutes, data.FinishTime.ToString("yyyy-MM-dd HH:mm:ss"), data.QualityMask },
|
||||||
|
{ "OP431_M0001_003", "静置时间差", "min", "1", "60", minStaticMinutes, data.Minutes.ToString("0.##"), data.QualityMask },
|
||||||
|
{ "OP431_M0001_004", "静置库位号", "静置库位", "-1", "-1", "-1", ManualStaticLocation, data.QualityMask }
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i = 0; i < detailRows.GetLength(0); i++)
|
||||||
|
{
|
||||||
|
SqlParameter[] detailParams = new SqlParameter[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@Id_tagCF", idTagCf),
|
||||||
|
new SqlParameter("@EngineID", engineID),
|
||||||
|
new SqlParameter("@TagID", detailRows[i, 0]),
|
||||||
|
new SqlParameter("@TagValue", detailRows[i, 6]),
|
||||||
|
new SqlParameter("@IsGoodBad", detailRows[i, 7]),
|
||||||
|
new SqlParameter("@工位号", opName),
|
||||||
|
new SqlParameter("@理论值", detailRows[i, 3]),
|
||||||
|
new SqlParameter("@上限值", detailRows[i, 4]),
|
||||||
|
new SqlParameter("@下限值", detailRows[i, 5]),
|
||||||
|
new SqlParameter("@测量项目", detailRows[i, 1]),
|
||||||
|
new SqlParameter("@测量单位", detailRows[i, 2])
|
||||||
|
};
|
||||||
|
|
||||||
|
DataAccess.ExecuteStoredProcedure("测量数据合格_增加_测试设备", ref detailParams, out errorMessage);
|
||||||
|
if (!string.IsNullOrWhiteSpace(errorMessage))
|
||||||
|
{
|
||||||
|
message = "写入静置质量明细失败:" + errorMessage;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 确认上线前校验托盘到位和 PLC 申请上线状态。
|
||||||
|
/// </summary>
|
||||||
|
private bool CheckManualStaticPadPrecondition(string opName, out string message)
|
||||||
|
{
|
||||||
|
message = "";
|
||||||
|
|
||||||
|
MIS_BASE.Read_WorkStart(opName, out bool workStart);
|
||||||
|
if (!workStart)
|
||||||
|
{
|
||||||
|
message = "当前无托盘到位信号,不允许扫码确认";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
MIS_BASE.Read_PartLoad(opName, out bool partLoad);
|
||||||
|
if (!partLoad)
|
||||||
|
{
|
||||||
|
message = "PLC尚未申请上线,不允许扫码确认";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PAD 确认上线:校验静置条件,通过后写入 PLC 产品区。
|
||||||
|
/// </summary>
|
||||||
|
private bool ConfirmManualStaticOutProduct(string opName, string engineID, decimal minStaticMinutes, out string message)
|
||||||
|
{
|
||||||
|
message = "";
|
||||||
|
|
||||||
|
// PAD 确认上线时必须重新校验托盘和 PLC 申请状态,不能复用查询时的旧结果。
|
||||||
|
if (!CheckManualStaticPadPrecondition(opName, out message))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TryGetManualStaticOutProduct(engineID, out ManualStaticOutProduct product, out message))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TryBuildManualStaticOutData(product.EngineID, 1, out ManualStaticOutData staticOutData, out message))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 二次校验静置时间,最小分钟数来自 PAD 当前配置,默认 30 分钟。
|
||||||
|
if (!IsManualStaticTimeEnough(staticOutData, minStaticMinutes, out message))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
MIS_BASE.Read_PalletCode(opName, out int palletCode);
|
||||||
|
MisDataFun.OpName_MIS_MOBY_Insert(opName, product.EngineTypeID, product.EngineType, product.EngineID, palletCode, product.OrderForm, 0, 0, "");
|
||||||
|
|
||||||
|
// 写入 MES->PLC 产品区,PLC 收到 EngineTypeGetOver_MES 后再回传 44 做进站校验。
|
||||||
|
MIS_BASE.Write_EngineTypeID_MES(opName, product.EngineTypeID);
|
||||||
|
MIS_BASE.Write_EngineID_MES(opName, product.EngineID);
|
||||||
|
MIS_BASE.Write_EngineType_MES(opName, product.EngineType);
|
||||||
|
MIS_BASE.Write_OrderForm_MES(opName, product.OrderForm);
|
||||||
|
MIS_BASE.Write_EngineTypeGetOver_MES(opName, true);
|
||||||
|
RememberManualStaticMinutesForProduct(product.EngineID, minStaticMinutes);
|
||||||
|
|
||||||
|
message = "PAD确认上线成功:" + product.EngineID;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PAD 扫码查询:返回产品、静置时间和是否允许确认。
|
||||||
|
/// </summary>
|
||||||
|
private bool QueryManualStaticOutProduct(string opName, string engineID, decimal minStaticMinutes, out string resultMessage)
|
||||||
|
{
|
||||||
|
resultMessage = "";
|
||||||
|
|
||||||
|
// 扫码查询只返回产品与静置信息,不写 PLC、不调用进站,也不依赖托盘到位/PLC申请上线实时消息。
|
||||||
|
// PAD 页面可能不是一直打开,托盘到位等实时 MQTT 可能丢失,最终状态由确认上线时后端再次校验。
|
||||||
|
if (!TryGetManualStaticOutProduct(engineID, out ManualStaticOutProduct product, out resultMessage))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TryBuildManualStaticOutData(product.EngineID, 1, out ManualStaticOutData staticOutData, out resultMessage))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool timeEnough = IsManualStaticTimeEnough(staticOutData, minStaticMinutes, out string timeMessage);
|
||||||
|
MIS_BASE.Read_PartLoad(opName, out bool partLoad);
|
||||||
|
|
||||||
|
// PAD 直接使用 canConfirm 控制按钮,不再自行组合判断条件。
|
||||||
|
bool canConfirm = timeEnough && partLoad;
|
||||||
|
string confirmMessage = canConfirm
|
||||||
|
? "允许确认上线"
|
||||||
|
: !timeEnough
|
||||||
|
? timeMessage
|
||||||
|
: "PLC尚未申请上线,不允许确认上线";
|
||||||
|
|
||||||
|
resultMessage = string.Join("^", new string[]
|
||||||
|
{
|
||||||
|
product.EngineID,
|
||||||
|
product.OrderForm,
|
||||||
|
product.EngineType,
|
||||||
|
product.EngineTypeID.ToString(),
|
||||||
|
staticOutData.SourceOpName,
|
||||||
|
staticOutData.StartTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
|
staticOutData.Minutes.ToString("0.##"),
|
||||||
|
minStaticMinutes.ToString("0.##"),
|
||||||
|
partLoad ? "1" : "0",
|
||||||
|
canConfirm ? "1" : "0",
|
||||||
|
confirmMessage
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将 PAD 业务结果同时发送到 PAD 主题和工位主题。
|
||||||
|
/// </summary>
|
||||||
|
private void SendManualStaticOutResult(string opName, string command, bool success, string message)
|
||||||
|
{
|
||||||
|
string value = (success ? "1" : "0") + "^" + message;
|
||||||
|
SendManualStaticPadMqttMessage(command, opName, value);
|
||||||
|
|
||||||
|
// 同步给工位主题,保留现有页面状态监听能力;PAD 以 OP431PAD 主题为准。
|
||||||
|
SendMessageFun.SendInfomation(command, value, opName);
|
||||||
|
if (!success)
|
||||||
|
{
|
||||||
|
SendMessage.AsyncSendMessage_Notice(opName, "【" + opName + "】" + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 向 OP431 PAD 专用主题发送 MQTT 回包。
|
||||||
|
/// </summary>
|
||||||
|
private void SendManualStaticPadMqttMessage(string command, string opName, string value)
|
||||||
|
{
|
||||||
|
SendMessage.AsyncSendNotOpMessage(ManualStaticPadTopic, "MES|" + command + "|" + opName + "|" + value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 记录产品确认上线时使用的最小静置标准。
|
||||||
|
/// </summary>
|
||||||
|
private void RememberManualStaticMinutesForProduct(string engineID, decimal minStaticMinutes)
|
||||||
|
{
|
||||||
|
lock (ManualStaticMinutesLocker)
|
||||||
|
{
|
||||||
|
ManualStaticMinutesByEngine[engineID] = minStaticMinutes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取产品确认上线时记录的最小静置标准。
|
||||||
|
/// </summary>
|
||||||
|
private bool TryGetManualStaticMinutesForProduct(string engineID, out decimal minStaticMinutes)
|
||||||
|
{
|
||||||
|
lock (ManualStaticMinutesLocker)
|
||||||
|
{
|
||||||
|
if (ManualStaticMinutesByEngine.ContainsKey(engineID))
|
||||||
|
{
|
||||||
|
minStaticMinutes = ManualStaticMinutesByEngine[engineID];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
minStaticMinutes = DefaultManualStaticMinutes;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
MisDataFunction/Function1062/DataAccess/vssver2.scc
Normal file
BIN
MisDataFunction/Function1062/DataAccess/vssver2.scc
Normal file
Binary file not shown.
10
MisDataFunction/Function1062/Function08.csproj.vspscc
Normal file
10
MisDataFunction/Function1062/Function08.csproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
""
|
||||||
|
{
|
||||||
|
"FILE_VERSION" = "9237"
|
||||||
|
"ENLISTMENT_CHOICE" = "NEVER"
|
||||||
|
"PROJECT_FILE_RELATIVE_PATH" = "relative:MesServer.Function\\Function08"
|
||||||
|
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||||
|
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||||
|
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||||
|
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||||
|
}
|
||||||
109
MisDataFunction/Function1062/Function1062.csproj
Normal file
109
MisDataFunction/Function1062/Function1062.csproj
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{304A54D1-63AD-44DE-B573-772EE533C47F}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>Function1062</RootNamespace>
|
||||||
|
<AssemblyName>Function1062</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<SccProjectName>
|
||||||
|
</SccProjectName>
|
||||||
|
<SccLocalPath>
|
||||||
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="BasicData">
|
||||||
|
<HintPath>..\..\dll_common\BasicData.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MesWork.DeviceDriver, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\dll_common\MesWork.DeviceDriver.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\dll_common\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http">
|
||||||
|
<HintPath>..\..\DLL\System.Net.Http.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="DataAccess\DataAccess.cs" />
|
||||||
|
<Compile Include="MesServerFunction\Function1062.cs" />
|
||||||
|
<Compile Include="OpcServer\EngineGetOver.cs" />
|
||||||
|
<Compile Include="OpcServer\HeartBeat.cs" />
|
||||||
|
<Compile Include="OpcServer\MesRead.cs" />
|
||||||
|
<Compile Include="OpcServer\PartLoad.cs" />
|
||||||
|
<Compile Include="OpcServer\WebSubmit.cs" />
|
||||||
|
<Compile Include="OpcServer\WorkStart.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Common\09MesDataFunction\MesDataFunction\01-MesDataFunction.csproj">
|
||||||
|
<Project>{90e76fb4-646d-45e2-95db-0b8ab4e465d6}</Project>
|
||||||
|
<Name>01-MesDataFunction</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\Common\MyLog4Net\00_MyLog4Net.csproj">
|
||||||
|
<Project>{1dc48c83-1842-4de8-acaf-26e1e7f7c58f}</Project>
|
||||||
|
<Name>00_MyLog4Net</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Target>
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
128
MisDataFunction/Function1062/MesServerFunction/Function1062.cs
Normal file
128
MisDataFunction/Function1062/MesServerFunction/Function1062.cs
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
using MesServerWork;
|
||||||
|
using MisDataFunDll;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
public partial class FunctionMES
|
||||||
|
{
|
||||||
|
public void FunWork(string recData)
|
||||||
|
{
|
||||||
|
List<string> dataArray = MisDataFun.GetCmdStringList(recData);
|
||||||
|
string source = dataArray[0].ToString();
|
||||||
|
string command = dataArray[1].ToString();
|
||||||
|
string opName = dataArray[2].ToString();
|
||||||
|
string value = dataArray[3].ToString();
|
||||||
|
|
||||||
|
var e = new DeviceDriver_BasicData.CustomeEvetnArgs();
|
||||||
|
switch (source)
|
||||||
|
{
|
||||||
|
case "WEB":
|
||||||
|
e.OpName = opName;
|
||||||
|
e.TagValue = command + "|" + value;
|
||||||
|
fun_WebSubmit(e);
|
||||||
|
break;
|
||||||
|
case "PLC":
|
||||||
|
e = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceDriver_BasicData.CustomeEvetnArgs>(value);
|
||||||
|
e.TagValue = NormalizeTagValue(e.TagValue);
|
||||||
|
RoutePlcSignal(e, opName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string NormalizeTagValue(object tagValue)
|
||||||
|
{
|
||||||
|
string value = Convert.ToString(tagValue);
|
||||||
|
switch (value.ToLower())
|
||||||
|
{
|
||||||
|
case "false":
|
||||||
|
return "0";
|
||||||
|
case "true":
|
||||||
|
return "1";
|
||||||
|
default:
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RoutePlcSignal(DeviceDriver_BasicData.CustomeEvetnArgs e, string opName)
|
||||||
|
{
|
||||||
|
switch (e.TagTypeCodeID.ToString())
|
||||||
|
{
|
||||||
|
// PLC 工件到位
|
||||||
|
case "2":
|
||||||
|
fun_WorkStart(e);
|
||||||
|
break;
|
||||||
|
// PLC 允许保存质量数据
|
||||||
|
case "19":
|
||||||
|
fun_MesRead(e);
|
||||||
|
break;
|
||||||
|
// PLC 申请上线
|
||||||
|
case "43":
|
||||||
|
PartLoad(e);
|
||||||
|
break;
|
||||||
|
// PLC 传递机型
|
||||||
|
case "44":
|
||||||
|
fun_EngineTypeGetOverPLC(e);
|
||||||
|
break;
|
||||||
|
// PLC/MES 系统健康心跳
|
||||||
|
case "14":
|
||||||
|
fun_HeartBeatMIS(e);
|
||||||
|
break;
|
||||||
|
// MES 设备报警复位
|
||||||
|
case "61":
|
||||||
|
MIS_BASE.Write_MesErrorType(opName, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 传递机型
|
||||||
|
/// </summary>
|
||||||
|
public void fun_EngineTypeGetOverPLC(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||||
|
{
|
||||||
|
ThreadPool.QueueUserWorkItem(EngineTypeGetOver_PLC, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存完成 19
|
||||||
|
/// </summary>
|
||||||
|
public void fun_MesRead(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||||
|
{
|
||||||
|
ThreadPool.QueueUserWorkItem(MesRead, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工件到位离开,清空 MES 信号
|
||||||
|
/// </summary>
|
||||||
|
public void fun_WorkStart(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||||
|
{
|
||||||
|
ThreadPool.QueueUserWorkItem(WorkStart, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理 WEB/PAD 页面传递过来的数据
|
||||||
|
/// </summary>
|
||||||
|
public void fun_WebSubmit(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||||
|
{
|
||||||
|
ThreadPool.QueueUserWorkItem(WebSubmit, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MES 系统健康心跳监测
|
||||||
|
/// </summary>
|
||||||
|
public void fun_HeartBeatMIS(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||||
|
{
|
||||||
|
ThreadPool.QueueUserWorkItem(HeartBeatMES, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PLC 系统健康心跳监测
|
||||||
|
/// </summary>
|
||||||
|
public void fun_HeartBeatPLC(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||||
|
{
|
||||||
|
ThreadPool.QueueUserWorkItem(HeartBeatPLC, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
MisDataFunction/Function1062/MesServerFunction/vssver2.scc
Normal file
BIN
MisDataFunction/Function1062/MesServerFunction/vssver2.scc
Normal file
Binary file not shown.
107
MisDataFunction/Function1062/OpcServer/EngineGetOver.cs
Normal file
107
MisDataFunction/Function1062/OpcServer/EngineGetOver.cs
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
using MesServerWork;
|
||||||
|
using MisDataFunDll;
|
||||||
|
using MisDataSaveDate;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
partial class FunctionMES
|
||||||
|
{
|
||||||
|
// 防止 PLC 传递机型信号重复触发时并发进站。
|
||||||
|
object lockBarcodeEngineTypeGetOver = new object();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OP431 PLC 回传机型后,校验 PAD 确认信息并调用工厂 MES 进站。
|
||||||
|
/// </summary>
|
||||||
|
private void EngineTypeGetOver_PLC(object e)
|
||||||
|
{
|
||||||
|
lock (lockBarcodeEngineTypeGetOver)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
|
string opName = Convert.ToString(msgEvent.OpName);
|
||||||
|
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
||||||
|
|
||||||
|
if (tagValue != 1)
|
||||||
|
{
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MIS", "PLC传递机型取消!");
|
||||||
|
MIS_BASE.Write_FixAllow(opName, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MIS", "PLC传递机型!");
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(34, opName, false);
|
||||||
|
|
||||||
|
// 同时读取 PLC 回传信息和 PAD 确认时写入的 MES 产品区信息。
|
||||||
|
MIS_BASE.GetEngineTypeFromPLC(opName, out int engineTypeID, out string engineType, out string engineID, out int palletCode, out string orderForm);
|
||||||
|
MIS_BASE.GetEngineTypeFromPLC_MES(opName, out int engineTypeIDMes, out string engineTypeMes, out string engineIDMes, out string orderFormMes);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(engineID) || engineTypeID <= 0)
|
||||||
|
{
|
||||||
|
WriteManualStaticEngineError(opName, "PLC产品码或机型为空,产品码:" + engineID + ",机型代码:" + engineTypeID);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(engineIDMes) || engineTypeIDMes <= 0)
|
||||||
|
{
|
||||||
|
WriteManualStaticEngineError(opName, "未查询到PAD确认上线信息,请先在PAD确认上线");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PLC 回传产品必须与 PAD 确认上线产品一致,避免错件进站。
|
||||||
|
if (!string.Equals(engineID.Trim(), engineIDMes.Trim(), StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
WriteManualStaticEngineError(opName, "PLC产品码与PAD确认产品码不一致,PLC:" + engineID + ",PAD:" + engineIDMes);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (engineTypeID != engineTypeIDMes)
|
||||||
|
{
|
||||||
|
WriteManualStaticEngineError(opName, "PLC机型与PAD确认机型不一致,PLC:" + engineTypeID + ",PAD:" + engineTypeIDMes);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 进站前再次取产品执行信息,后续写 MOBY 使用数据库中的订单和型号。
|
||||||
|
if (!TryGetManualStaticOutProduct(engineID, out ManualStaticOutProduct product, out string productMessage))
|
||||||
|
{
|
||||||
|
WriteManualStaticEngineError(opName, productMessage);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用工厂 MES 进站,成功后才允许 PLC 工作。
|
||||||
|
CallWebService.Call_miFindCustomAndSfcData(opName, engineID, out string code, out string message);
|
||||||
|
if (code != "0")
|
||||||
|
{
|
||||||
|
WriteManualStaticEngineError(opName, "进站失败:" + engineID + ",code:" + code + ",message:" + message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MOM", "进站成功:" + engineID);
|
||||||
|
|
||||||
|
// 写普通 MOBY 当前工位状态,供后续正常过站过程取数。
|
||||||
|
MisDataFun.OpName_MIS_MOBY_Insert(opName, product.EngineTypeID, product.EngineType, product.EngineID, palletCode, product.OrderForm, 0, 0, "");
|
||||||
|
|
||||||
|
MIS_BASE.Write_FixAllow(opName, true);
|
||||||
|
SendMessage.AsyncSendMessage_Notice(opName, "【" + opName + "】进站成功,允许PLC工作:" + engineID);
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
MyLog4Net.MyLogHelper.Error("Function1062.EngineTypeGetOver", err.Message);
|
||||||
|
MisDataFun.LogRecording_OP(ManualStaticOutOpName, "ERROR", "EngineTypeGetOver", err.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OP431 进站失败时禁止 PLC 工作、置 MES 报警并通知页面。
|
||||||
|
/// </summary>
|
||||||
|
private void WriteManualStaticEngineError(string opName, string message)
|
||||||
|
{
|
||||||
|
MIS_BASE.Write_FixAllow(opName, false);
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(34, opName, true);
|
||||||
|
SendMessage.AsyncSendMessage_Notice(opName, "【" + opName + "】" + message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "EngineTypeGetOver", message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
56
MisDataFunction/Function1062/OpcServer/HeartBeat.cs
Normal file
56
MisDataFunction/Function1062/OpcServer/HeartBeat.cs
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
using MesServerWork;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
partial class FunctionMES
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MES与PLC心跳监听
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="OpName"></param>
|
||||||
|
/// <param name="tagValue"></param>
|
||||||
|
private void HeartBeatMES(object e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
|
string OpName = Convert.ToString(msgEvent.OpName);
|
||||||
|
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
||||||
|
|
||||||
|
//返写在MES心跳中
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(15, OpName, tagValue);
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
MyLog4Net.MyLogHelper.Error("Function1062.HeartBeatMES", err.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MES与PLC心跳监听
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="OpName"></param>
|
||||||
|
/// <param name="tagValue"></param>
|
||||||
|
private void HeartBeatPLC(object e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
|
string OpName = Convert.ToString(msgEvent.OpName);
|
||||||
|
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
||||||
|
|
||||||
|
int HeartBeatPLC;
|
||||||
|
//读取PLC心跳数据
|
||||||
|
HeartBeatPLC = Convert.ToInt32(MIS_BASE.Read_TagValueByTagTypeID(14, OpName));
|
||||||
|
//通知WEB修改状态
|
||||||
|
string message = "MES|HeartBeatPLC|" + OpName + "|" + HeartBeatPLC.ToString();
|
||||||
|
SendMessage.AsyncSendMessage(message);
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
MyLog4Net.MyLogHelper.Error("Function1062.HeartBeatPLC", err.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
124
MisDataFunction/Function1062/OpcServer/MesRead.cs
Normal file
124
MisDataFunction/Function1062/OpcServer/MesRead.cs
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
using MesServerWork;
|
||||||
|
using MesDataFunction;
|
||||||
|
using MisDataFunDll;
|
||||||
|
using MisDataSaveDate;
|
||||||
|
using System;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
partial class FunctionMES
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OP431 保存:按 PLC 允许保存时间生成静置质量数据,正常过站后带质量数据出站。
|
||||||
|
/// </summary>
|
||||||
|
private void MesRead(object e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
|
string opName = Convert.ToString(msgEvent.OpName);
|
||||||
|
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
||||||
|
|
||||||
|
if (tagValue != 1)
|
||||||
|
{
|
||||||
|
MisDataBaseFun.WriteMesReadOver(opName, false);
|
||||||
|
MIS_BASE.Write_OpNameIsOk(opName, -99);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MIS", "PLC允许保存数据取消!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MIS", "PLC允许保存OP431静置数据!");
|
||||||
|
|
||||||
|
// 读取 PLC 当前产品信息,后续质量数据和出站都以该产品码为准。
|
||||||
|
MIS_BASE.GetEngineTypeFromPLC(opName, out int engineTypeID, out string engineType, out string engineID, out int palletCode, out string orderForm);
|
||||||
|
if (string.IsNullOrWhiteSpace(engineID))
|
||||||
|
{
|
||||||
|
WriteManualStaticMesReadError(opName, "PLC产品码为空,无法保存静置数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存阶段从 PLC 读取到的已经是最终 PACK 码,只补查订单和机型信息。
|
||||||
|
MisDataFun.Moby_Select_PDC(engineID, out orderForm, out engineType, out engineTypeID);
|
||||||
|
if (engineTypeID <= 0)
|
||||||
|
{
|
||||||
|
WriteManualStaticMesReadError(opName, "未查询到产品执行信息:" + engineID);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PLC 合格标识只保留合格/不合格两种结果。
|
||||||
|
MIS_BASE.Read_QualityMask(opName, out int qualityMask);
|
||||||
|
qualityMask = NormalizeManualStaticQualityMask(qualityMask);
|
||||||
|
|
||||||
|
// 组装 OP431 静置质量数据:开始时间、完成时间、时间差、库位号。
|
||||||
|
if (!TryBuildManualStaticOutData(engineID, qualityMask, out ManualStaticOutData staticOutData, out string message))
|
||||||
|
{
|
||||||
|
WriteManualStaticMesReadError(opName, message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存信号到达时,回写线下静置结束时间和静置时长。
|
||||||
|
if (!FinishManualStaticRecord(engineID, staticOutData.FinishTime, staticOutData.Minutes, out message))
|
||||||
|
{
|
||||||
|
WriteManualStaticMesReadError(opName, message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将四项静置质量数据写入测量数据合格索引和明细表。
|
||||||
|
if (!WriteManualStaticOutQualityData(opName, engineID, staticOutData, out message))
|
||||||
|
{
|
||||||
|
WriteManualStaticMesReadError(opName, message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 写正常过站记录后查询 MOM 上传质量数据组。
|
||||||
|
MisDataFun.WorkStartInsert(opName, qualityMask);
|
||||||
|
MisDataFun.GetPartQualityGroupParams(opName, engineID, out DataTable dtQuality);
|
||||||
|
if (dtQuality == null || dtQuality.Rows.Count == 0)
|
||||||
|
{
|
||||||
|
WriteManualStaticMesReadError(opName, "未查询到OP431静置质量数据组,禁止静默出站:" + engineID);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 带质量数据调用工厂 MES 出站,返回 13921 时按不合格完成。
|
||||||
|
CallWebService.Call_dataCollectForSfcEx(opName, engineID, dtQuality, qualityMask, out string code, out string momMessage);
|
||||||
|
if (code == "0")
|
||||||
|
{
|
||||||
|
MIS_BASE.Write_OpNameIsOk(opName, qualityMask);
|
||||||
|
}
|
||||||
|
else if (code == "13921")
|
||||||
|
{
|
||||||
|
qualityMask = 2;
|
||||||
|
MIS_BASE.Write_OpNameIsOk(opName, qualityMask);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MOM", engineID + " 工厂MES质量判定不合格,按不合格完成OP431过站");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WriteManualStaticMesReadError(opName, "出站失败:" + engineID + ",错误代码:" + code + ",消息:" + momMessage);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MisDataBaseFun.WriteMesReadOver(opName, true);
|
||||||
|
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MIS", "MES保存OP431静置数据完成!");
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MIS", "MES工作完成!");
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
MyLog4Net.MyLogHelper.Error("Function1062.MesRead", err.Message);
|
||||||
|
MisDataFun.LogRecording_OP(ManualStaticOutOpName, "ERROR", "MesRead", err.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OP431 保存失败时统一复位保存完成、置 MES 报警并通知页面。
|
||||||
|
/// </summary>
|
||||||
|
private void WriteManualStaticMesReadError(string opName, string message)
|
||||||
|
{
|
||||||
|
MisDataBaseFun.WriteMesReadOver(opName, false);
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(34, opName, true);
|
||||||
|
SendMessage.AsyncSendMessage_Notice(opName, "【" + opName + "】" + message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "MesRead", message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
46
MisDataFunction/Function1062/OpcServer/PartLoad.cs
Normal file
46
MisDataFunction/Function1062/OpcServer/PartLoad.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
using MesServerWork;
|
||||||
|
using MisDataFunDll;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
partial class FunctionMES
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// OP431 申请上线:只记录 PLC 申请状态,等待 PAD 扫描已有产品。
|
||||||
|
/// </summary>
|
||||||
|
private void PartLoad(object e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
|
string opName = Convert.ToString(msgEvent.OpName);
|
||||||
|
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
||||||
|
|
||||||
|
if (tagValue == 1)
|
||||||
|
{
|
||||||
|
// OP431 不申请新 SFC,只通知 PAD 可以扫描已有产品。
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MIS", "PLC申请上线,等待PAD扫描已有产品!");
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(34, opName, false);
|
||||||
|
SendMessage.AsyncSendMessage_Notice(opName, "【" + opName + "】PLC已申请上线,请PAD扫描产品码");
|
||||||
|
// PAD 页面可能未打开,申请上线状态由 PadScanQuery 当前读取后返回。
|
||||||
|
SendMessageFun.SendInfomation("PartLoad", "1", opName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MisDataFun.LogRecording_OP(opName, "INFO", "MIS", "PLC申请上线取消!");
|
||||||
|
// 取消申请时清掉本轮未完成的 MES 输出信号。
|
||||||
|
MIS_BASE.Write_EngineTypeGetOver_MES(opName, false);
|
||||||
|
MIS_BASE.Write_FixAllow(opName, false);
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(34, opName, false);
|
||||||
|
// 不向 OP431PAD 发送实时取消消息,避免 PAD 依赖可能丢失的 MQTT 状态。
|
||||||
|
SendMessageFun.SendInfomation("PartLoad", "0", opName);
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
MyLog4Net.MyLogHelper.Error("Function1062.PartLoad", err.Message);
|
||||||
|
MisDataFun.LogRecording_OP(ManualStaticOutOpName, "ERROR", "PartLoad", err.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
190
MisDataFunction/Function1062/OpcServer/WebSubmit.cs
Normal file
190
MisDataFunction/Function1062/OpcServer/WebSubmit.cs
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
using MesServerWork;
|
||||||
|
using MisDataFunDll;
|
||||||
|
using MisDataSaveDate;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
partial class FunctionMES
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 处理 PAD/MQTT 发送到 Function1062 的 WEB 命令。
|
||||||
|
/// 消息外层格式由通讯层统一为:WEB|命令|工位号|参数。
|
||||||
|
/// 命令名不增加 OP431 前缀,工位归属统一通过 opName 判断,避免同一业务出现多套命令名。
|
||||||
|
/// </summary>
|
||||||
|
private void WebSubmit(object e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
|
string opName = Convert.ToString(msgEvent.OpName);
|
||||||
|
string content = Convert.ToString(msgEvent.TagValue);
|
||||||
|
|
||||||
|
// Function 入口已将 MQTT 的 Command 和 Value 合并为“命令|参数”。
|
||||||
|
// 参数支持“产品码”或“产品码^最小静置分钟数”,订单、机型等业务信息必须由后端重新查询。
|
||||||
|
string[] dataArray = content.Split('|');
|
||||||
|
if (dataArray.Length != 2)
|
||||||
|
{
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "WEB", "PAD命令格式错误,内容:" + content);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string command = dataArray[0].Trim();
|
||||||
|
string value = dataArray[1].Trim();
|
||||||
|
|
||||||
|
switch (command)
|
||||||
|
{
|
||||||
|
// PAD 扫码查询:只查询产品、前序离开时间和静置分钟数,不写 PLC,也不调用工厂 MES 进站。
|
||||||
|
case "PadScanQuery":
|
||||||
|
{
|
||||||
|
if (!TryGetManualStaticPadRequest(opName, "PadScanQuery", value, out string engineID, out decimal minStaticMinutes))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool success = QueryManualStaticOutProduct(opName, engineID, minStaticMinutes, out string message);
|
||||||
|
SendManualStaticOutResult(opName, "PadScanQuery", success, message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// PAD 确认上线:重新校验托盘到位、PLC申请上线和前端配置的最小静置时间,通过后写 PLC 产品区。
|
||||||
|
case "PadConfirmOnline":
|
||||||
|
{
|
||||||
|
if (!TryGetManualStaticPadRequest(opName, "PadConfirmOnline", value, out string engineID, out decimal minStaticMinutes))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool success = ConfirmManualStaticOutProduct(opName, engineID, minStaticMinutes, out string message);
|
||||||
|
SendManualStaticOutResult(opName, "PadConfirmOnline", success, message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, success ? "INFO" : "ERROR", "PadConfirmOnline", message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// 页面刷新或 PAD 重新订阅 MQTT 后,用当前 PLC/MES 状态恢复界面显示。
|
||||||
|
case "IniSingalToWeb":
|
||||||
|
InitializeSingalToWeb(opName);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
MisDataFun.LogRecording_OP(opName, "WARNING", "WebSubmit", "不支持的PAD命令:" + command);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
MyLog4Net.MyLogHelper.Error("Function1062.WebSubmit", err.Message);
|
||||||
|
MisDataFun.LogRecording_OP(ManualStaticOutOpName, "ERROR", "WebSubmit", err.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 解析 PAD 命令参数,取得产品码和最小静置分钟数。
|
||||||
|
/// </summary>
|
||||||
|
private bool TryGetManualStaticPadRequest(string opName, string command, string value, out string engineID, out decimal minStaticMinutes)
|
||||||
|
{
|
||||||
|
engineID = "";
|
||||||
|
minStaticMinutes = DefaultManualStaticMinutes;
|
||||||
|
string requestValue = Convert.ToString(value).Trim();
|
||||||
|
|
||||||
|
// PAD 上传产品码和可选最小静置分钟数。订单、机型、静置开始时间等信息全部从 MES 数据库重新取。
|
||||||
|
if (string.IsNullOrWhiteSpace(requestValue))
|
||||||
|
{
|
||||||
|
string message = "PAD命令参数为空,格式:" + command + "|产品码 或 " + command + "|产品码^最小静置分钟数";
|
||||||
|
SendManualStaticOutResult(opName, command, false, message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "WEB", message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requestValue.Contains("&"))
|
||||||
|
{
|
||||||
|
string message = "PAD命令参数格式错误,格式:" + command + "|产品码 或 " + command + "|产品码^最小静置分钟数,收到:" + value;
|
||||||
|
SendManualStaticOutResult(opName, command, false, message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "WEB", message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 参数最多允许“产品码^最小静置分钟数”两段。
|
||||||
|
string[] requestItems = requestValue.Split('^');
|
||||||
|
if (requestItems.Length > 2)
|
||||||
|
{
|
||||||
|
string message = "PAD命令参数格式错误,格式:" + command + "|产品码 或 " + command + "|产品码^最小静置分钟数,收到:" + value;
|
||||||
|
SendManualStaticOutResult(opName, command, false, message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "WEB", message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
engineID = requestItems[0].Trim();
|
||||||
|
if (string.IsNullOrWhiteSpace(engineID))
|
||||||
|
{
|
||||||
|
string message = "PAD命令产品码为空,格式:" + command + "|产品码 或 " + command + "|产品码^最小静置分钟数";
|
||||||
|
SendManualStaticOutResult(opName, command, false, message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "WEB", message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requestItems.Length == 2)
|
||||||
|
{
|
||||||
|
// 最小静置分钟数由 PAD 配置传入,未传时使用默认 30 分钟。
|
||||||
|
string minStaticMinutesText = requestItems[1].Trim();
|
||||||
|
if (!decimal.TryParse(minStaticMinutesText, out minStaticMinutes) || minStaticMinutes < 0)
|
||||||
|
{
|
||||||
|
string message = "PAD命令最小静置分钟数无效,收到:" + minStaticMinutesText;
|
||||||
|
SendManualStaticOutResult(opName, command, false, message);
|
||||||
|
MisDataFun.LogRecording_OP(opName, "ERROR", "WEB", message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 页面重新登录或 PAD 重新订阅时恢复关键状态。
|
||||||
|
/// 这里发送的是通用命令名,工位由 opName 区分。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeSingalToWeb(string opName)
|
||||||
|
{
|
||||||
|
MIS_BASE.GetEngineTypeFromDB(opName, out int engineTypeID, out string engineType, out string engineID, out int partPalletCode);
|
||||||
|
|
||||||
|
MIS_BASE.Read_WorkStart(opName, out bool workStart);
|
||||||
|
MIS_BASE.Read_PartLoad(opName, out bool partLoad);
|
||||||
|
MIS_BASE.Read_EngineGetOver_PLC(opName, out bool engineGetOver);
|
||||||
|
MIS_BASE.Read_FixAllow(opName, out bool fixAllow);
|
||||||
|
MIS_BASE.Read_QualityData_Read_CF(opName, out bool mesRead);
|
||||||
|
MIS_BASE.Read_MesReadOver(opName, out bool readOver);
|
||||||
|
MIS_BASE.Read_MaterialVerifyOver(opName, out bool workFinish);
|
||||||
|
MIS_BASE.Read_QualityMask(opName, out int qualityMask);
|
||||||
|
MIS_BASE.Read_FalseGo(opName, out bool falseGo);
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(engineID))
|
||||||
|
{
|
||||||
|
SendMessageFun.SendMessage("5123", "1111", opName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 以下状态沿用通用 MES 页面命令,PAD 或页面通过 opName 判断属于哪个工位。
|
||||||
|
SendMessageFun.SendInfomation("WorkStart", Convert.ToString(Convert.ToInt32(workStart)), opName);
|
||||||
|
SendMessageFun.SendInfomation("PartLoad", Convert.ToString(Convert.ToInt32(partLoad)), opName);
|
||||||
|
SendMessageFun.SendInfomation("EngineTypeGetOverPLC", Convert.ToString(Convert.ToInt32(engineGetOver)), opName);
|
||||||
|
SendMessageFun.SendInfomation("FixAllow", Convert.ToString(Convert.ToInt32(fixAllow)), opName);
|
||||||
|
SendMessageFun.SendInfomation("MesRead", Convert.ToString(Convert.ToInt32(mesRead)), opName);
|
||||||
|
SendMessageFun.SendInfomation("MesReadOver", Convert.ToString(Convert.ToInt32(readOver)), opName);
|
||||||
|
SendMessageFun.SendInfomation("MaterialVerifyOver", Convert.ToString(Convert.ToInt32(workFinish)), opName);
|
||||||
|
SendMessageFun.SendInfomation("QualityMask", Convert.ToString(qualityMask), opName);
|
||||||
|
SendMessageFun.SendInfomation("FalseGO", Convert.ToString(Convert.ToInt32(falseGo)), opName);
|
||||||
|
SendMessageFun.SendInfomation("CurrentProduct", engineID + "^" + engineTypeID + "^" + engineType + "^" + partPalletCode, opName);
|
||||||
|
|
||||||
|
InitAlarm(opName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重新发送当前工位报警状态。
|
||||||
|
/// </summary>
|
||||||
|
private void InitAlarm(string opName)
|
||||||
|
{
|
||||||
|
FuntionMesRead.Alarm_InitAlarm_Send(opName, out Hashtable ht);
|
||||||
|
foreach (DictionaryEntry kv in ht)
|
||||||
|
{
|
||||||
|
FuntionMesRead.Send_AlarmMsg(kv.Key.ToString(), kv.Value.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
56
MisDataFunction/Function1062/OpcServer/WorkStart.cs
Normal file
56
MisDataFunction/Function1062/OpcServer/WorkStart.cs
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using MesServerWork;
|
||||||
|
using MisDataFunDll;
|
||||||
|
//using SystemFramework;
|
||||||
|
|
||||||
|
|
||||||
|
namespace MesServerFunctions
|
||||||
|
{
|
||||||
|
partial class FunctionMES
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 工件到位与离开时,清空MES自身信号
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="OpName"></param>
|
||||||
|
/// <param name="tagValue"></param>
|
||||||
|
private void WorkStart(object e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
|
||||||
|
string OpName = Convert.ToString(msgEvent.OpName);
|
||||||
|
string tagValue = msgEvent.TagValue.ToString();
|
||||||
|
|
||||||
|
if (tagValue == "1")
|
||||||
|
{
|
||||||
|
string msg = "工件到位!";
|
||||||
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", msg);
|
||||||
|
MisDataFun.MOBY_TrayStart_Update(OpName); // 记录托盘到达时间
|
||||||
|
MIS_BASE.Write_TagValueByTagTypeID(34, OpName, false); // MES报警点
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string msg = "工件离开!";
|
||||||
|
MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", msg);
|
||||||
|
// 清除工位数据
|
||||||
|
MIS_BASE.Write_EngineTypeGetOver_MES(OpName, false); // 传递机型(MES)
|
||||||
|
MIS_BASE.Write_MesWorkFinish(OpName, false); // 工作完成(MES)
|
||||||
|
MIS_BASE.Write_FalseGO(OpName, false); // 不合格放行(MES)
|
||||||
|
MIS_BASE.Write_ConfirmOkGo(OpName, false); // 合格放行(MES)
|
||||||
|
MIS_BASE.Write_FixAllow(OpName, false); // 允许PLC工作(MES)
|
||||||
|
MIS_BASE.Write_MesReadOver(OpName, false); // MES保存完数据(MES)
|
||||||
|
MIS_BASE.Write_EngineTypeID_MES(OpName, 0); // 机型标志(MES)
|
||||||
|
MIS_BASE.Write_EngineID_MES(OpName, ""); // 工件编号(MES)
|
||||||
|
MIS_BASE.Write_EngineType_MES(OpName, ""); // 产品型号(MES)
|
||||||
|
MIS_BASE.Write_OrderForm_MES(OpName, ""); // 订单号(MES)
|
||||||
|
MIS_BASE.Write_MesErrorType(OpName, 0); // MES报警点
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
MisDataFun.LogRecording_OP("Function1062", "ERROR", "WorkStart", err.Message.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
MisDataFunction/Function1062/OpcServer/vssver2.scc
Normal file
BIN
MisDataFunction/Function1062/OpcServer/vssver2.scc
Normal file
Binary file not shown.
36
MisDataFunction/Function1062/Properties/AssemblyInfo.cs
Normal file
36
MisDataFunction/Function1062/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的常规信息通过以下
|
||||||
|
// 特性集控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("Function08")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("大连迈思信息技术有限公司")]
|
||||||
|
[assembly: AssemblyProduct("Function08")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 大连迈思信息技术有限公司 2017")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 使此程序集中的类型
|
||||||
|
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
||||||
|
// 则将该类型上的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("47710f2c-e141-4252-8d13-701bf4c1c027")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下面四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 内部版本号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
|
||||||
|
// 方法是按如下所示使用“*”:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
BIN
MisDataFunction/Function1062/Properties/vssver2.scc
Normal file
BIN
MisDataFunction/Function1062/Properties/vssver2.scc
Normal file
Binary file not shown.
19
MisDataFunction/Function1062/app.config
Normal file
19
MisDataFunction/Function1062/app.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>
|
||||||
5
MisDataFunction/Function1062/mssccprj.scc
Normal file
5
MisDataFunction/Function1062/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
SCC = This is a Source Code Control file
|
||||||
|
|
||||||
|
[Function08.csproj]
|
||||||
|
SCC_Aux_Path = "\\192.168.0.100\vss\MES4.0"
|
||||||
|
SCC_Project_Name = "$/MisData/MisData/MisData/MesServer.Function/Function08", KRHAAAAA
|
||||||
BIN
MisDataFunction/Function1062/vssver2.scc
Normal file
BIN
MisDataFunction/Function1062/vssver2.scc
Normal file
Binary file not shown.
Reference in New Issue
Block a user