|
|
@@ -129,7 +129,32 @@ namespace UAS_MES_NEW.Make
|
|
|
JObject dataObj = JObject.Parse(dataString);
|
|
|
string serial = dataObj["Serial"].ToString();
|
|
|
|
|
|
- ShowMsg(1, $"第{currCount}次接收,客户端:{e.ClientId}, {name}类型信息, 序列号: {serial}");
|
|
|
+ string mesSuc = "0", mesMsg = "";
|
|
|
+ SQL.Clear();
|
|
|
+ SQL.Append($@"select * from makeprocess where mp_sncode = '{serial}' and mp_stepcode = '{User.CurrentStepCode}'"); // 本站过站记录
|
|
|
+ dt = (DataTable)dh.ExecuteSql(SQL.ToString(), "select");
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ mesSuc = "1";
|
|
|
+ mesMsg = "已重复过站";
|
|
|
+
|
|
|
+ SQL.Clear();
|
|
|
+ SQL.Append($@"select * from makeserial where ms_sncode = '{serial}' and ms_nextstepcode = '{User.CurrentStepCode}'"); // 站位回退可烧录
|
|
|
+ dt = (DataTable)dh.ExecuteSql(SQL.ToString(), "select");
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ mesSuc = "0";
|
|
|
+ mesMsg = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ mesSuc = "0";
|
|
|
+ }
|
|
|
+
|
|
|
+ //ShowMsg(1, $"第{currCount}次接收,客户端:{e.ClientId}, {name}类型信息, 序列号: {serial}");
|
|
|
+ ShowMsg(1, $"第{currCount}次接收,客户端:{e.ClientId}, {name}类型信息({e.Message})");
|
|
|
+
|
|
|
if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, serial, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
|
|
|
{
|
|
|
if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, serial, "产测软件对接", "OK", User.UserCode, out oErrorMessage))
|
|
|
@@ -137,7 +162,7 @@ namespace UAS_MES_NEW.Make
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, omakeCode, User.UserLineCode, User.UserSourceCode, "产测软件对接", "产测软件对接成功", serial, "");
|
|
|
|
|
|
ShowMsg(1, $"序列号: {serial} 过站处理成功");
|
|
|
- FirstStepPaseJSON(e.ClientId, currCount, serial, "0", "");
|
|
|
+ FirstStepPaseJSON(e.ClientId, currCount, serial, mesSuc, mesMsg);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -643,7 +668,8 @@ namespace UAS_MES_NEW.Make
|
|
|
new { ClientId = clientId, ClientSocket = clientSocket });
|
|
|
|
|
|
string result2 = BitConverter.ToString(packet).Replace("-", " ");
|
|
|
- return $"OK,发送成功,JSON长度: {jsonMessage.Length}, 报文总字节: {packet.Length} 到 {clientId},({result2})({jsonMessage})";
|
|
|
+ //return $"OK,发送成功,JSON长度: {jsonMessage.Length}, 报文总字节: {packet.Length} 到 {clientId},({result2})({jsonMessage})";
|
|
|
+ return $"OK,发送成功,JSON长度: {jsonMessage.Length}, 报文总字节: {packet.Length} 到 {clientId},({jsonMessage})";
|
|
|
|
|
|
//byte[] jsonBytes = Encoding.Unicode.GetBytes(jsonMessage);
|
|
|
//clientSocket.BeginSend(jsonBytes, 0, jsonBytes.Length, SocketFlags.None,
|