|
@@ -36,7 +36,7 @@ using Org.BouncyCastle.Asn1.IsisMtt;
|
|
|
using System.Web.Services.Description;
|
|
|
using System.Numerics;
|
|
|
using MathNet.Numerics.RootFinding;
|
|
|
-using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
|
|
|
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
|
|
|
|
|
|
/*
|
|
|
* 注:本源码对外提供,所以有些地方使用中文命名方法及变量
|
|
@@ -283,14 +283,85 @@ namespace MainForm
|
|
|
{
|
|
|
string addr = GlobalContext.MQTTServerHost;
|
|
|
int port = GlobalContext.MQTTServerPort;
|
|
|
- int qmttResult = XiaomiMqttClient_Extend.OpenWithMqttServer(addr, port, GlobalContext.MqttServerPath, GlobalContext.MqttServerName);
|
|
|
+ //生产环境需要修改
|
|
|
+ int qmttResult = XiaomiMqttClient_Extend.OpenWithMqttServer("127.0.0.1", 6666, GlobalContext.MqttServerPath, GlobalContext.MqttServerName);
|
|
|
XiaomiMqttResponse_ErrCode response_ErrCode = (XiaomiMqttResponse_ErrCode)qmttResult;
|
|
|
if (response_ErrCode == XiaomiMqttResponse_ErrCode.OK)
|
|
|
{
|
|
|
picIot.Image = imageListState.Images[1];
|
|
|
AddMessage(LogType.Info, "小米IOT MQTT初始连接成功!");
|
|
|
|
|
|
- XiaomiMqttClient_Extend.SetCallbackWithDataId(CallbackWithDataId);
|
|
|
+ // 设置回调函数
|
|
|
+ //XiaomiMqttClient_Extend.SetCallbackWithDataId(CallbackWithDataId);
|
|
|
+ // 配置参数
|
|
|
+ XiaomiMqttLoginFunAndParam param = new XiaomiMqttLoginFunAndParam();
|
|
|
+ // fds
|
|
|
+ param.parameter.fds.address = "http://file-cm.be.mi.com/file/x5/file/upload/mqtt";
|
|
|
+ param.parameter.fds.appId = "Auto-Soft";
|
|
|
+ param.parameter.fds.appKey = "d11ec2b9-0e7a-4086-a80c-a1ec716e0896";
|
|
|
+ // mes
|
|
|
+ param.parameter.mes.address = GlobalContext.ServerIp;
|
|
|
+ param.parameter.mes.appId = GlobalContext.MESAppId;
|
|
|
+ param.parameter.mes.appKey = GlobalContext.MESAppKey;
|
|
|
+ // mqtt
|
|
|
+ param.parameter.mqtt.address = GlobalContext.MQTTServerHost;
|
|
|
+ param.parameter.mqtt.port = GlobalContext.MQTTServerPort;
|
|
|
+ param.parameter.mqtt.username = GlobalContext.MQTTAppId;
|
|
|
+ param.parameter.mqtt.password = GlobalContext.MQTTAppPwd;
|
|
|
+ // 设备配置
|
|
|
+ param.parameter.equipment.factoryCode = GlobalContext.Factory_Code;
|
|
|
+ if (GlobalContext.IsUsePLC1)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S1_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S1_station; // ⼯位Id
|
|
|
+ }
|
|
|
+ if (GlobalContext.IsUsePLC2)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S2_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S2_station; // ⼯位Id
|
|
|
+ }
|
|
|
+ if (GlobalContext.IsUsePLC3)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S3_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S3_station; // ⼯位Id
|
|
|
+ }
|
|
|
+ if (GlobalContext.IsUsePLC4)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S4_1_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S4_1_station; // ⼯位Id
|
|
|
+ }
|
|
|
+ if (GlobalContext.IsUsePLC5)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S5_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S5_station; // ⼯位Id
|
|
|
+ }
|
|
|
+ if (GlobalContext.IsUsePLC6)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S6_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S6_station; // ⼯位Id
|
|
|
+ }
|
|
|
+ if (GlobalContext.IsUsePLC7)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S7_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S7_station; // ⼯位Id
|
|
|
+ }
|
|
|
+ if (GlobalContext.IsUsePLC8)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S8_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S8_station; // ⼯位Id
|
|
|
+ }
|
|
|
+ if (GlobalContext.IsUsePLC9)
|
|
|
+ {
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.S9_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.S9_station; // ⼯位Id
|
|
|
+ }
|
|
|
+
|
|
|
+ param.parameter.equipment.project = GlobalContext.Project_Code;
|
|
|
+ param.parameter.equipment.productMode = "debug";
|
|
|
+ //
|
|
|
+ param.parameter.other.logLevel = 0;
|
|
|
+ param.parameter.other.LogPath = "D:\\Test";
|
|
|
+ XiaomiMqttClient_Extend.ParameterConfig(param);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1097,6 +1168,73 @@ namespace MainForm
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public Dictionary<string, string> GetLastLineCompensation(string path,string direction,string sn)
|
|
|
+ {
|
|
|
+ // 创建字典存储补偿点及其对应的值
|
|
|
+ Dictionary<string, string> compensationDict = new Dictionary<string, string>();
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ //string path = GlobalContext.MESLaserRPath;
|
|
|
+ // 获取当前日期并格式化为 "yyyy-MM-dd" 格式
|
|
|
+ string currentDate = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
+ string filename = $"Laser-{currentDate}-W0.txt";
|
|
|
+ // 拼接完整路径
|
|
|
+ string fullPath = Path.Combine(path, filename);
|
|
|
+ string lastNonEmptyLine = "";
|
|
|
+
|
|
|
+ // 判断文件是否存在
|
|
|
+ if (File.Exists(fullPath))
|
|
|
+ {
|
|
|
+ //读取文件内容
|
|
|
+ string[] lines = File.ReadAllLines(fullPath);
|
|
|
+
|
|
|
+ // 获取最后一行数据(忽略标题行)
|
|
|
+ if (lines.Length > 1)
|
|
|
+ {
|
|
|
+ string lastLine = "";
|
|
|
+ for (int i = lines.Length - 1; i > 0; i--)
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrEmpty(lines[i]))
|
|
|
+ {
|
|
|
+ lastLine = lines[i];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将最后一行按逗号分隔
|
|
|
+ string[] values = lastLine.Split(',');
|
|
|
+ values[1] = sn;
|
|
|
+
|
|
|
+ string key = "三点激光_"+ direction; // 构造键名
|
|
|
+ string value = string.Join(",", values); // 获取值并去除多余空格
|
|
|
+ compensationDict[key] = value;
|
|
|
+
|
|
|
+ //// 提取“1点补偿”到“6点补偿”的值
|
|
|
+ //for (int i = 2; i <= 7 && i < values.Length; i++) // 从索引2开始,最多提取6个值
|
|
|
+ //{
|
|
|
+ // string key = $"{i - 1}点补偿"; // 构造键名
|
|
|
+ // string value = values[i].Trim(); // 获取值并去除多余空格
|
|
|
+ // compensationDict[key] = value;
|
|
|
+ //}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Console.WriteLine($"文件不存在: {fullPath}");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ // 捕获异常并输出错误信息
|
|
|
+ Console.WriteLine($"发生错误: {ex.Message}");
|
|
|
+ }
|
|
|
+
|
|
|
+ return compensationDict;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 调用进站接口并保存进站数据
|
|
|
/// </summary>
|
|
@@ -1143,11 +1281,15 @@ namespace MainForm
|
|
|
try
|
|
|
{
|
|
|
XmMES_StationInResponse response = new XmMES_StationInResponse();
|
|
|
+ string resultJson = "";
|
|
|
string mesRet = string.Empty;
|
|
|
int i = 0;
|
|
|
while (i < 2) // 1009会多次尝试上传
|
|
|
{
|
|
|
response = XiaomiMESHttp_StationInbound.StationIn(inRequest_Body);
|
|
|
+
|
|
|
+ resultJson = JsonConvert.SerializeObject(response);
|
|
|
+
|
|
|
if (response != null && response.header.code == "200")
|
|
|
break;
|
|
|
else if (!mesRet.Contains("1009")) // 1009是未知错误
|
|
@@ -1157,21 +1299,20 @@ namespace MainForm
|
|
|
|
|
|
mesRet = $"[{response?.header?.code}]{response?.header?.desc}";
|
|
|
// 记录失败原因
|
|
|
- OnMessage(LogType.Error, "上传出站数据到MES服务器---失败!正在重新上传!接口报错信息:" + mesRet + "参数:" + json_Body);
|
|
|
+ OnMessage(LogType.Error, $"上传出站数据到MES服务器---失败!正在重新上传!请求参数:{json_Body},接口报错信息:" + mesRet);
|
|
|
}
|
|
|
-
|
|
|
|
|
|
if (response?.header?.code == "200")
|
|
|
{
|
|
|
string sql_Upd = stationIn.ToStringUpdateStatusByID(1);
|
|
|
string ret_Upd = SQLHelper_New.ExecuteNonQuery(sql_Upd, null);
|
|
|
result = ret_Upd == "成功" ? 1 : 6;
|
|
|
- AddMessage( LogType.Info, $"【进站数据 SN {stationIn.Sn}】上传MES服务器---成功");
|
|
|
+ AddMessage( LogType.Info, $"【进站数据 SN {stationIn.Sn}】上传MES服务器---成功,请求参数:{json_Body},返回参数:{resultJson}");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
result = 5;
|
|
|
- AddMessage(LogType.Info, $"【进站数据 SN {stationIn.Sn}】上传MES服务器---失败!接口报错信息:" + mesRet);
|
|
|
+ AddMessage(LogType.Info, $"【进站数据 SN {stationIn.Sn}】上传MES服务器---失败!请求参数:{json_Body},接口报错信息:" + mesRet);
|
|
|
}
|
|
|
string sql_response = stationIn.ToStringUpdateStationInReturn_body(JsonConvert.SerializeObject(response));
|
|
|
SQLHelper_New.ExecuteNonQuery(sql_response, null);
|
|
@@ -1202,10 +1343,10 @@ namespace MainForm
|
|
|
/// <returns>上传成功时返回1;失败返回0</returns>
|
|
|
private int SwitctProcessData(string stationNameStr, List<TestItem> items, string equipmentCode, string processItem,
|
|
|
string workorder_code, string batch_num, string mtltmrk, string proDate,
|
|
|
- string supplierCode, string sn, bool pass, string vehicleSn, string vehicleSlot, string MachineId, string StationId, string PartBarcode)
|
|
|
+ string supplierCode, string sn, bool pass, string vehicleSn, string vehicleSlot, string MachineId, string StationId, string PartBarcode,string jsonParm, string direction="")
|
|
|
{
|
|
|
return SaveProcessDataByDB(stationNameStr, items, equipmentCode, processItem, workorder_code, batch_num, mtltmrk,
|
|
|
- proDate, supplierCode, sn, pass, vehicleSn, vehicleSlot, MachineId, StationId, PartBarcode);
|
|
|
+ proDate, supplierCode, sn, pass, vehicleSn, vehicleSlot, MachineId, StationId, PartBarcode, jsonParm, direction);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -1223,7 +1364,7 @@ namespace MainForm
|
|
|
/// <returns>上传成功时返回1;失败返回0</returns>
|
|
|
public int SaveProcessDataByDB(string stationNameStr, List<TestItem> items, string equipmentCode,
|
|
|
string processItem, string workorder_code, string batch_num, string mtltmrk,
|
|
|
- string proDate, string supplierCode, string sn, bool pass, string vehicleSn, string vehicleSlot, string machineId, string stationId, string partBarcode)
|
|
|
+ string proDate, string supplierCode, string sn, bool pass, string vehicleSn, string vehicleSlot, string machineId, string stationId, string partBarcode,string jsonParm,string direction="")
|
|
|
{
|
|
|
int upload = 0;
|
|
|
int result = 0;
|
|
@@ -1273,6 +1414,27 @@ namespace MainForm
|
|
|
}); // 设备数据 - 部件码
|
|
|
}
|
|
|
|
|
|
+ //OP30站读txt数据
|
|
|
+ if (stationNameStr.Contains("OP30"))
|
|
|
+ {
|
|
|
+ string path = "";
|
|
|
+ if (direction == "Left")
|
|
|
+ path = GlobalContext.MESLaserLPath;
|
|
|
+ else
|
|
|
+ path= GlobalContext.MESLaserRPath;
|
|
|
+ //字典存储数据
|
|
|
+ Dictionary<string, string> compensationDict = GetLastLineCompensation(path, direction,sn);
|
|
|
+ foreach (var kvp in compensationDict)
|
|
|
+ {
|
|
|
+ outRequest_Body.unitData.processData.Add(
|
|
|
+ new XmMES_StationOutRequest_Body.XmStationOut_ProcessData()
|
|
|
+ {
|
|
|
+ dataName = kvp.Key.ToString(),
|
|
|
+ dataValue = kvp.Value.ToString()
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
string jsonstr1 = JsonConvert.SerializeObject(outRequest_Body);
|
|
|
|
|
|
if (GlobalContext.IsSendProcessData)
|
|
@@ -1284,7 +1446,10 @@ namespace MainForm
|
|
|
{
|
|
|
response = XiaomiMESHttp_StationOutbound.StationOut(outRequest_Body);
|
|
|
if (response != null && response.header.code == "200")
|
|
|
+ {
|
|
|
+ OnMessage(LogType.Error, "上传出站数据到MES服务器---成功!请求信息:" + jsonstr1 + "返回信息:" + JsonConvert.SerializeObject(response.body));
|
|
|
break;
|
|
|
+ }
|
|
|
else if (!mesRet.Contains("1009")) // 1009是未知错误
|
|
|
i++;
|
|
|
|
|
@@ -1926,10 +2091,10 @@ namespace MainForm
|
|
|
Parameter_value = sn,
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
-
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
//出站接口
|
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "");
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
|
|
|
@@ -2222,10 +2387,10 @@ namespace MainForm
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
|
|
|
-
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
|
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, PartBarcode);
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, PartBarcode, paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
|
|
|
@@ -2611,11 +2776,13 @@ namespace MainForm
|
|
|
});
|
|
|
|
|
|
int result1 = 1;
|
|
|
- if (direction == "Right")
|
|
|
- {
|
|
|
- result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "");
|
|
|
- }
|
|
|
+ //if (direction == "Right")
|
|
|
+ //{
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
+ result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "", paramJson, direction);
|
|
|
+ //}
|
|
|
+
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
|
|
|
@@ -2911,9 +3078,9 @@ namespace MainForm
|
|
|
Parameter_value = sn,
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
-
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "");
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
|
|
|
@@ -3207,9 +3374,9 @@ namespace MainForm
|
|
|
Parameter_value = sn,
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
-
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, PartBarcode);
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, PartBarcode, paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
|
|
|
@@ -3515,9 +3682,9 @@ namespace MainForm
|
|
|
Parameter_value = sn,
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
-
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "");
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
|
|
|
@@ -3893,12 +4060,13 @@ namespace MainForm
|
|
|
});
|
|
|
|
|
|
int result1 = 1;
|
|
|
- if (direction == "Right")
|
|
|
- {
|
|
|
- SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "");
|
|
|
+ //if (direction == "Right")
|
|
|
+ //{
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
+ SwitctProcessData(stationNameStr, items, equipmentCode, processItem , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode
|
|
|
+ , sn, pass, CarrierBarcode, "1", MachineId, StationId, "", paramJson);
|
|
|
|
|
|
- }
|
|
|
+ //}
|
|
|
|
|
|
//if (direction == "Left")
|
|
|
//{
|
|
@@ -4211,8 +4379,9 @@ namespace MainForm
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "");
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
|
|
|
@@ -4491,9 +4660,9 @@ namespace MainForm
|
|
|
Parameter_value = sn,
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
-
|
|
|
+ string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "");
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
|
|
|
@@ -5203,7 +5372,7 @@ namespace MainForm
|
|
|
Parameter_value = a1Result == 1 ? "OK" : "NG",
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
- int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
+ int result1 = SwitctProcessData_old(stationNameStr, items, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, partNo1, pass, sn, "1");
|
|
|
|
|
|
// 产品2
|
|
@@ -5226,7 +5395,7 @@ namespace MainForm
|
|
|
Parameter_value = a1Result == 1 ? "OK" : "NG",
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
- int result2 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
+ int result2 = SwitctProcessData_old(stationNameStr, items, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, partNo2, pass, sn, "2");
|
|
|
|
|
|
short result = 0;
|
|
@@ -6273,7 +6442,7 @@ namespace MainForm
|
|
|
Parameter_value = b1Part1Result == 1 ? "OK" : "NG",
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
- result1 = SwitctProcessData(stationNameStr, items1, equipmentCode, processItem
|
|
|
+ result1 = SwitctProcessData_old(stationNameStr, items1, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, b1ProductSN1, pass1, b1ProductSN, "1");
|
|
|
}
|
|
|
// 产品2
|
|
@@ -6301,7 +6470,7 @@ namespace MainForm
|
|
|
Parameter_value = b1Part2Result == 1 ? "OK" : "NG",
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
- result2 = SwitctProcessData(stationNameStr, items2, equipmentCode, processItem
|
|
|
+ result2 = SwitctProcessData_old(stationNameStr, items2, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, b1ProductSN2, pass2, b1ProductSN, "2");
|
|
|
}
|
|
|
|
|
@@ -7164,7 +7333,7 @@ namespace MainForm
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
|
|
|
- int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
+ int result1 = SwitctProcessData_old(stationNameStr, items, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, productSN, pass, sn, "1");
|
|
|
short result = (short)result1;
|
|
|
stopwatch2.Stop();
|
|
@@ -8263,7 +8432,7 @@ namespace MainForm
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
|
|
|
- int result1 = SwitctProcessData(stationNameStr, items1, equipmentCode, processItem
|
|
|
+ int result1 = SwitctProcessData_old(stationNameStr, items1, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, partNos[i], pass, sn, index);
|
|
|
|
|
|
results.Add(result1);
|
|
@@ -8793,7 +8962,7 @@ namespace MainForm
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
|
|
|
- int result1 = SwitctProcessData(stationNameStr, items1, equipmentCode, processItem
|
|
|
+ int result1 = SwitctProcessData_old(stationNameStr, items1, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, partNos[i], isPass, sn, index);
|
|
|
|
|
|
results.Add(result1);
|
|
@@ -9135,7 +9304,7 @@ namespace MainForm
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
|
|
|
- int result1 = SwitctProcessData(stationNameStr, items1, equipmentCode, processItem
|
|
|
+ int result1 = SwitctProcessData_old(stationNameStr, items1, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, partNos[i], isPass, sn, index);
|
|
|
|
|
|
results.Add(result1);
|
|
@@ -9509,7 +9678,7 @@ namespace MainForm
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
|
|
|
- int result1 = SwitctProcessData(stationNameStr, items1, equipmentCode, processItem
|
|
|
+ int result1 = SwitctProcessData_old(stationNameStr, items1, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, partNos[i], pass, sn, index);
|
|
|
results.Add(result1);
|
|
|
}
|
|
@@ -10142,7 +10311,7 @@ namespace MainForm
|
|
|
Parameter_unit = ""
|
|
|
});
|
|
|
|
|
|
- int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
|
+ int result1 = SwitctProcessData_old(stationNameStr, items, equipmentCode, processItem
|
|
|
, workorder_code, mtltmrk, partNo, pass, sn, "1");
|
|
|
//int result = result1 == 1 ? 1 : (GlobalContext.IsSendProcessData ? 4 : 1);
|
|
|
short result = result1 == 1 ? (short)1 : (short)3;
|