|
@@ -550,6 +550,8 @@ namespace MainForm
|
|
|
|
|
|
//上传操作记录
|
|
//上传操作记录
|
|
operateToIot("startup", "开启");
|
|
operateToIot("startup", "开启");
|
|
|
|
+ //上传装备配置
|
|
|
|
+ deviceConfigToIot("project_name", GlobalContext.Project_Code);
|
|
AddMessage(LogType.Info, "程序初始化完成");
|
|
AddMessage(LogType.Info, "程序初始化完成");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
@@ -789,8 +791,9 @@ namespace MainForm
|
|
private string _DeviceStates2 = "未知状态";
|
|
private string _DeviceStates2 = "未知状态";
|
|
private string _DeviceStates_Old2 = "未知状态";
|
|
private string _DeviceStates_Old2 = "未知状态";
|
|
|
|
|
|
- private static string AlarmStateCode=""; //记录出发故障时的其中一笔警报,上传设备状态用
|
|
|
|
- private static string AlarmStateName = ""; //记录出发故障时的其中一笔警报,上传设备状态用
|
|
|
|
|
|
+ private static string AlarmStateCode=""; //记录出发故障时的其中一笔警报编码,上传设备状态用
|
|
|
|
+ private static string AlarmStateName = ""; //记录出发故障时的其中一笔警报名称,上传设备状态用
|
|
|
|
+ private static string AlarmStateTime = ""; //记录出发故障时的其中一笔警报时间,上传设备状态用
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 获取设备报警数据与获取设备运行信息
|
|
/// 获取设备报警数据与获取设备运行信息
|
|
@@ -1112,7 +1115,8 @@ namespace MainForm
|
|
private static bool isCollectingFlagRight;
|
|
private static bool isCollectingFlagRight;
|
|
private bool OpenDailogFalg = true; //是否开启扫码弹窗标识
|
|
private bool OpenDailogFalg = true; //是否开启扫码弹窗标识
|
|
private static int res = 0;
|
|
private static int res = 0;
|
|
- public static bool StopWhile =false;
|
|
|
|
|
|
+ public static bool StopWhile =false; //二维码弹窗后停止循环
|
|
|
|
+ public static bool inStationPass = true; //过站结果,保存进站结果
|
|
|
|
|
|
public void ConnectToIOT()
|
|
public void ConnectToIOT()
|
|
{
|
|
{
|
|
@@ -1536,6 +1540,7 @@ namespace MainForm
|
|
|
|
|
|
if (response?.header?.code == "200")
|
|
if (response?.header?.code == "200")
|
|
{
|
|
{
|
|
|
|
+ inStationPass = true;//上传iot进站结果
|
|
string sql_Upd = stationIn.ToStringUpdateStatusByID(1);
|
|
string sql_Upd = stationIn.ToStringUpdateStatusByID(1);
|
|
string ret_Upd = SQLHelper_New.ExecuteNonQuery(sql_Upd, null);
|
|
string ret_Upd = SQLHelper_New.ExecuteNonQuery(sql_Upd, null);
|
|
result = ret_Upd == "成功" ? 1 : 6;
|
|
result = ret_Upd == "成功" ? 1 : 6;
|
|
@@ -1544,6 +1549,7 @@ namespace MainForm
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ inStationPass = false;//上传iot进站结果
|
|
result = 5;
|
|
result = 5;
|
|
AddMessage(LogType.Info,
|
|
AddMessage(LogType.Info,
|
|
$"【进站数据 SN {stationIn.Sn}】上传MES服务器---失败!接口报错信息: {mesRet},请求参数:{json_Body}");
|
|
$"【进站数据 SN {stationIn.Sn}】上传MES服务器---失败!接口报错信息: {mesRet},请求参数:{json_Body}");
|
|
@@ -1555,6 +1561,7 @@ namespace MainForm
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
|
|
+ inStationPass = false;//上传iot进站结果
|
|
result = 6;
|
|
result = 6;
|
|
string str = ex.StackTrace;
|
|
string str = ex.StackTrace;
|
|
AddMessage_Station(stationNameStr, LogType.Error,
|
|
AddMessage_Station(stationNameStr, LogType.Error,
|
|
@@ -1568,34 +1575,34 @@ namespace MainForm
|
|
|
|
|
|
#region IOT
|
|
#region IOT
|
|
|
|
|
|
- //过站结果
|
|
|
|
- if (GlobalContext.IsMqttSendProcessData)
|
|
|
|
- {
|
|
|
|
- PassStationResultRequest request = new PassStationResultRequest();
|
|
|
|
- request.project_code = GlobalContext.Project_Code; // 项⽬编码
|
|
|
|
- request.factory_code = GlobalContext.Factory_Code; // ⼯⼚Id
|
|
|
|
- request.process_section_code = GlobalContext.Process_Section_Code; // ⼯段编码
|
|
|
|
- request.line_code = GlobalContext.LineCode; // 线体编码
|
|
|
|
- request.work_station = xiaomiParm.workstation; // ⼯站ID
|
|
|
|
- request.device_code = xiaomiParm.deviceCode; // 装备编码
|
|
|
|
- request.station = xiaomiParm.stationCode;
|
|
|
|
- request.process_time =
|
|
|
|
- DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); // 节拍发⽣时间(2022-06-01 14:27:57.283)
|
|
|
|
- request.slot = slot; // 槽位编码
|
|
|
|
- request.sn = sn; // 产品SN
|
|
|
|
- // request.enter_status = inpass ? "PASS" : "FAIL"; // 进站状态
|
|
|
|
- request.enter_status = pass ? "PASS" : "FAIL"; // 进站状态
|
|
|
|
- request.result = ""; // 出站条件 PASS或FAIL; // 过站结果
|
|
|
|
- request.work_type = "OUT_STATION"; // 作业类型
|
|
|
|
-
|
|
|
|
- // 上传过站结果
|
|
|
|
- (int, string) iotResult = XiaomiMqttClient_Extend.Write_PassStationResult(request);
|
|
|
|
- if (iotResult.Item1 != 0)
|
|
|
|
- {
|
|
|
|
- OnMessage(LogType.Info,
|
|
|
|
- $"【IOT过站结果】上传失败!错误原因:{iotResult.Item2},过站结果;产品码[{sn}] 进站结果[{request.enter_status}] 出站结果[{request.result}]");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //过站结果,出站传结果,这里注释掉
|
|
|
|
+ //if (GlobalContext.IsMqttSendProcessData)
|
|
|
|
+ //{
|
|
|
|
+ // PassStationResultRequest request = new PassStationResultRequest();
|
|
|
|
+ // request.project_code = GlobalContext.Project_Code; // 项⽬编码
|
|
|
|
+ // request.factory_code = GlobalContext.Factory_Code; // ⼯⼚Id
|
|
|
|
+ // request.process_section_code = GlobalContext.Process_Section_Code; // ⼯段编码
|
|
|
|
+ // request.line_code = GlobalContext.LineCode; // 线体编码
|
|
|
|
+ // request.work_station = xiaomiParm.workstation; // ⼯站ID
|
|
|
|
+ // request.device_code = xiaomiParm.deviceCode; // 装备编码
|
|
|
|
+ // request.station = xiaomiParm.stationCode;
|
|
|
|
+ // request.process_time =
|
|
|
|
+ // DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); // 节拍发⽣时间(2022-06-01 14:27:57.283)
|
|
|
|
+ // request.slot = slot; // 槽位编码
|
|
|
|
+ // request.sn = sn; // 产品SN
|
|
|
|
+ // // request.enter_status = inpass ? "PASS" : "FAIL"; // 进站状态
|
|
|
|
+ // request.enter_status = pass ? "PASS" : "FAIL"; // 进站状态
|
|
|
|
+ // request.result = ""; // 出站条件 PASS或FAIL; // 过站结果
|
|
|
|
+ // request.work_type = "OUT_STATION"; // 作业类型
|
|
|
|
+
|
|
|
|
+ // // 上传过站结果
|
|
|
|
+ // (int, string) iotResult = XiaomiMqttClient_Extend.Write_PassStationResult(request);
|
|
|
|
+ // if (iotResult.Item1 != 0)
|
|
|
|
+ // {
|
|
|
|
+ // OnMessage(LogType.Info,
|
|
|
|
+ // $"【IOT过站结果】上传失败!错误原因:{iotResult.Item2},过站结果;产品码[{sn}] 进站结果[{request.enter_status}] 出站结果[{request.result}]");
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
@@ -1690,7 +1697,6 @@ namespace MainForm
|
|
outRequest_Body.unitData.vehicleData.vehicleType = string.Empty;
|
|
outRequest_Body.unitData.vehicleData.vehicleType = string.Empty;
|
|
outRequest_Body.unitData.vehicleData.slot = vehicleSlot;
|
|
outRequest_Body.unitData.vehicleData.slot = vehicleSlot;
|
|
|
|
|
|
-
|
|
|
|
if (!string.IsNullOrEmpty(partBarcode))
|
|
if (!string.IsNullOrEmpty(partBarcode))
|
|
{
|
|
{
|
|
outRequest_Body.unitData.keyMaterial.Add(
|
|
outRequest_Body.unitData.keyMaterial.Add(
|
|
@@ -1831,6 +1837,7 @@ namespace MainForm
|
|
//过站明细
|
|
//过站明细
|
|
if (GlobalContext.IsMqttSendProcessData)
|
|
if (GlobalContext.IsMqttSendProcessData)
|
|
{
|
|
{
|
|
|
|
+ test_item_num = 0;
|
|
PassStationDetailRequest request = new PassStationDetailRequest();
|
|
PassStationDetailRequest request = new PassStationDetailRequest();
|
|
if (direction == "Right")
|
|
if (direction == "Right")
|
|
request.pass_station_id = uuid2;
|
|
request.pass_station_id = uuid2;
|
|
@@ -1867,6 +1874,10 @@ namespace MainForm
|
|
if (GlobalContext.IsMqttSendProcessData)
|
|
if (GlobalContext.IsMqttSendProcessData)
|
|
{
|
|
{
|
|
PassStationResultRequest request = new PassStationResultRequest();
|
|
PassStationResultRequest request = new PassStationResultRequest();
|
|
|
|
+ if (direction == "Right")
|
|
|
|
+ request.pass_station_id = uuid2;
|
|
|
|
+ else
|
|
|
|
+ request.pass_station_id = uuid;
|
|
request.project_code = GlobalContext.Project_Code; // 项⽬编码
|
|
request.project_code = GlobalContext.Project_Code; // 项⽬编码
|
|
request.factory_code = GlobalContext.Factory_Code; // ⼯⼚Id
|
|
request.factory_code = GlobalContext.Factory_Code; // ⼯⼚Id
|
|
request.process_section_code = GlobalContext.Process_Section_Code; // ⼯段编码
|
|
request.process_section_code = GlobalContext.Process_Section_Code; // ⼯段编码
|
|
@@ -1879,7 +1890,7 @@ namespace MainForm
|
|
request.slot = vehicleSlot; // 槽位编码
|
|
request.slot = vehicleSlot; // 槽位编码
|
|
request.sn = sn; // 产品SN
|
|
request.sn = sn; // 产品SN
|
|
// request.enter_status = inpass ? "PASS" : "FAIL"; // 进站状态
|
|
// request.enter_status = inpass ? "PASS" : "FAIL"; // 进站状态
|
|
- request.enter_status = ""; // 进站状态
|
|
|
|
|
|
+ request.enter_status = inStationPass ? "PASS" : "FAIL";// 进站状态
|
|
request.result = pass ? "PASS" : "FAIL"; // 出站条件 PASS或FAIL; // 过站结果
|
|
request.result = pass ? "PASS" : "FAIL"; // 出站条件 PASS或FAIL; // 过站结果
|
|
request.work_type = "OUT_STATION"; // 作业类型
|
|
request.work_type = "OUT_STATION"; // 作业类型
|
|
|
|
|
|
@@ -2802,6 +2813,20 @@ namespace MainForm
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void deviceConfigToIot(string id, string value)
|
|
|
|
+ {
|
|
|
|
+ DeviceConfigRequest request = new DeviceConfigRequest();
|
|
|
|
+ request.id = id; // 操作时间(2022-06-01 14:27:57.283)
|
|
|
|
+ request.value = value; // 操作动作(对应软件开启/关闭/重新加载项⽬;startup、shutdown、reload)
|
|
|
|
+
|
|
|
|
+ // 上传
|
|
|
|
+ (int, string) iotResult = XiaomiMqttClient_Extend.Write_deviceConfig(request);
|
|
|
|
+ if (iotResult.Item1 != 0)
|
|
|
|
+ {
|
|
|
|
+ AddMessage(LogType.Info, "【装备配置】上传失败!错误原因:" + iotResult.Item2 );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private void 通用节拍接口(int plcNo, string stationNameStr, string tagMesCommName, string CarrierBarcode,
|
|
private void 通用节拍接口(int plcNo, string stationNameStr, string tagMesCommName, string CarrierBarcode,
|
|
IoT_DataSet_t iot_data, out int res)
|
|
IoT_DataSet_t iot_data, out int res)
|
|
{
|
|
{
|
|
@@ -3302,7 +3327,7 @@ namespace MainForm
|
|
|
|
|
|
//出站接口
|
|
//出站接口
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1",
|
|
|
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "01-SLOT-01",
|
|
MachineId, StationId, "", paramJson);
|
|
MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
@@ -3740,7 +3765,7 @@ namespace MainForm
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
|
|
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1",
|
|
|
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "01-SLOT-01",
|
|
MachineId, StationId, PartBarcode, paramJson);
|
|
MachineId, StationId, PartBarcode, paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
@@ -4304,14 +4329,17 @@ namespace MainForm
|
|
string CarrierBarcode = (string)stPLC_MesData.BarcodeSet.strCarrierBarcode; // 载具条码;
|
|
string CarrierBarcode = (string)stPLC_MesData.BarcodeSet.strCarrierBarcode; // 载具条码;
|
|
string MachineId = GlobalContext.S3_MachineId; // 装备id(可配置)
|
|
string MachineId = GlobalContext.S3_MachineId; // 装备id(可配置)
|
|
string StationId = string.Empty;
|
|
string StationId = string.Empty;
|
|
|
|
+ string slot = "";
|
|
if (direction == "Left")
|
|
if (direction == "Left")
|
|
{
|
|
{
|
|
StationId = GlobalContext.S3_StationId_1; // 工位ID(可配置)
|
|
StationId = GlobalContext.S3_StationId_1; // 工位ID(可配置)
|
|
|
|
+ slot = "01-SLOT-01";
|
|
}
|
|
}
|
|
|
|
|
|
if (direction == "Right")
|
|
if (direction == "Right")
|
|
{
|
|
{
|
|
StationId = GlobalContext.S3_StationId_2; // 工位ID(可配置)
|
|
StationId = GlobalContext.S3_StationId_2; // 工位ID(可配置)
|
|
|
|
+ slot = "01-SLOT-02";
|
|
}
|
|
}
|
|
|
|
|
|
int a1Result = (int)stPLC_MesData.iotData.testStatus; // 产品结果
|
|
int a1Result = (int)stPLC_MesData.iotData.testStatus; // 产品结果
|
|
@@ -4349,7 +4377,7 @@ namespace MainForm
|
|
//{
|
|
//{
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData).Replace("null","0");
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData).Replace("null","0");
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1",
|
|
|
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode,slot,
|
|
MachineId, StationId, "", paramJson, direction);
|
|
MachineId, StationId, "", paramJson, direction);
|
|
//}
|
|
//}
|
|
|
|
|
|
@@ -4492,6 +4520,12 @@ namespace MainForm
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ //测试数据
|
|
|
|
+ //stPLC_MesData.mesCommFrmPLC.cmd = 2;
|
|
|
|
+ //stPLC_MesData.BarcodeSet.strCarrierBarcode = "A235461";
|
|
|
|
+ //stPLC_MesData.BarcodeSet.strPCBBarcode = "A1507V000239";
|
|
|
|
+
|
|
|
|
+
|
|
//去除扫码产生的特殊字符
|
|
//去除扫码产生的特殊字符
|
|
stPLC_MesData.BarcodeSet.strProductBarcode =
|
|
stPLC_MesData.BarcodeSet.strProductBarcode =
|
|
FormatStrbyPLC(stPLC_MesData.BarcodeSet.strProductBarcode);
|
|
FormatStrbyPLC(stPLC_MesData.BarcodeSet.strProductBarcode);
|
|
@@ -4512,6 +4546,7 @@ namespace MainForm
|
|
s4PLCData["a4OEEType"] = stPLC_MesData.iotData.beatAction;
|
|
s4PLCData["a4OEEType"] = stPLC_MesData.iotData.beatAction;
|
|
//报警信息
|
|
//报警信息
|
|
_FaultDatas = stPLC_MesData.iotData.fault_codes;
|
|
_FaultDatas = stPLC_MesData.iotData.fault_codes;
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
#endregion 一次性读取所有数据
|
|
#endregion 一次性读取所有数据
|
|
@@ -5324,7 +5359,7 @@ namespace MainForm
|
|
{
|
|
{
|
|
result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem, workorder_code,
|
|
result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem, workorder_code,
|
|
batch_num
|
|
batch_num
|
|
- , mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1", MachineId, StationId,
|
|
|
|
|
|
+ , mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "01-SLOT-01", MachineId, StationId,
|
|
PartBarcode, paramJson);
|
|
PartBarcode, paramJson);
|
|
}
|
|
}
|
|
else if (stPLC_MesData.mesCommFrmPLC.cmdParam == 1)
|
|
else if (stPLC_MesData.mesCommFrmPLC.cmdParam == 1)
|
|
@@ -5844,7 +5879,7 @@ namespace MainForm
|
|
|
|
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1",
|
|
|
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "01-SLOT-01",
|
|
MachineId, StationId, "", paramJson);
|
|
MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
@@ -6422,14 +6457,18 @@ namespace MainForm
|
|
string CarrierBarcode = (string)stPLC_MesData.BarcodeSet.strCarrierBarcode; // 载具条码;
|
|
string CarrierBarcode = (string)stPLC_MesData.BarcodeSet.strCarrierBarcode; // 载具条码;
|
|
string MachineId = GlobalContext.S7_MachineId; // 装备id(可配置)
|
|
string MachineId = GlobalContext.S7_MachineId; // 装备id(可配置)
|
|
string StationId = string.Empty; // 工位ID(可配置)
|
|
string StationId = string.Empty; // 工位ID(可配置)
|
|
|
|
+ string slot = "";//iot槽位
|
|
if (direction == "Left")
|
|
if (direction == "Left")
|
|
{
|
|
{
|
|
StationId = GlobalContext.S7_StationId_1;
|
|
StationId = GlobalContext.S7_StationId_1;
|
|
|
|
+ slot = "01-SLOT-01";
|
|
}
|
|
}
|
|
|
|
|
|
if (direction == "Right")
|
|
if (direction == "Right")
|
|
{
|
|
{
|
|
StationId = GlobalContext.S7_StationId_2;
|
|
StationId = GlobalContext.S7_StationId_2;
|
|
|
|
+ slot = "01-SLOT-02";
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
int a1Result = (int)stPLC_MesData.iotData.testStatus; // 产品结果
|
|
int a1Result = (int)stPLC_MesData.iotData.testStatus; // 产品结果
|
|
@@ -6466,7 +6505,7 @@ namespace MainForm
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem, workorder_code,
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem, workorder_code,
|
|
batch_num, mtltmrk, plcDate_YMD, supplierCode
|
|
batch_num, mtltmrk, plcDate_YMD, supplierCode
|
|
- , sn, pass, CarrierBarcode, "1", MachineId, StationId, "", paramJson);
|
|
|
|
|
|
+ , sn, pass, CarrierBarcode, slot, MachineId, StationId, "", paramJson);
|
|
|
|
|
|
//}
|
|
//}
|
|
|
|
|
|
@@ -6950,7 +6989,7 @@ namespace MainForm
|
|
|
|
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1",
|
|
|
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "01-SLOT-01",
|
|
MachineId, StationId, "", paramJson);
|
|
MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
@@ -7376,7 +7415,7 @@ namespace MainForm
|
|
});
|
|
});
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
string paramJson = JsonConvert.SerializeObject(stPLC_MesData.mesData);
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
int result1 = SwitctProcessData(stationNameStr, items, equipmentCode, processItem
|
|
- , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "1",
|
|
|
|
|
|
+ , workorder_code, batch_num, mtltmrk, plcDate_YMD, supplierCode, sn, pass, CarrierBarcode, "01-SLOT-01",
|
|
MachineId, StationId, "", paramJson);
|
|
MachineId, StationId, "", paramJson);
|
|
|
|
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
byte mesResultFrmWeb = (byte)(result1 == 1 ? 1 : 110);
|
|
@@ -8121,7 +8160,7 @@ namespace MainForm
|
|
Parameter_unit = ""
|
|
Parameter_unit = ""
|
|
});
|
|
});
|
|
int result1 = SwitctProcessData_old(stationNameStr, items, equipmentCode, processItem
|
|
int result1 = SwitctProcessData_old(stationNameStr, items, equipmentCode, processItem
|
|
- , workorder_code, mtltmrk, partNo1, pass, sn, "1");
|
|
|
|
|
|
+ , workorder_code, mtltmrk, partNo1, pass, sn, "01-SLOT-01");
|
|
|
|
|
|
// 产品2
|
|
// 产品2
|
|
items = new List<TestItem>();
|
|
items = new List<TestItem>();
|