Commit 31b684f9 张东亮

消息提示

1 个父辈 51554d4e
...@@ -133,7 +133,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,7 +133,7 @@ namespace OnlineStore.DeviceLibrary
public bool singleOut = false; public bool singleOut = false;
public string ToStr() public string ToStr()
{ {
return " [" + barcode + "] [" + PosId + "] [" + PlateW + "x" + PlateH + "]"+ $",hSerial[{hSerial}]" +$",isNg[{IsNG}],NgMsg[{NgMsg}]"+ ",singleOut[" + singleOut + "]"; return $" NgMsg[{NgMsg}], [" + barcode + "] [" + PosId + "] [" + PlateW + "x" + PlateH + "]"+ $",hSerial[{hSerial}]" +$",isNg[{IsNG}]"+ ",singleOut[" + singleOut + "]";
} }
public string ToStr1() public string ToStr1()
{ {
......
...@@ -100,6 +100,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -100,6 +100,7 @@ namespace OnlineStore.DeviceLibrary
operation.boxStatus[1].status = (int)storeStatus; operation.boxStatus[1].status = (int)storeStatus;
LogUtil.info(JsonHelper.SerializeObject(operation)); LogUtil.info(JsonHelper.SerializeObject(operation));
Operation resultOperation = HttpHelper.Post(SServerManager.GetPostApi(server), operation, false); Operation resultOperation = HttpHelper.Post(SServerManager.GetPostApi(server), operation, false);
LogUtil.info($"SendStoreState【{JsonHelper.SerializeObject(operation)}】【{JsonHelper.SerializeObject(resultOperation)}】");
if (resultOperation != null) if (resultOperation != null)
{ {
if (operation.seq == resultOperation.seq) if (operation.seq == resultOperation.seq)
...@@ -132,7 +133,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -132,7 +133,7 @@ namespace OnlineStore.DeviceLibrary
string preUploadMsg = ""; string preUploadMsg = "";
public void ProcessMsg(List<Msg> msg) public void ProcessMsg(List<Msg> msg)
{ {
var printMSG = ConfigHelper.Config.Get("打印上传到SMF的消息",true); var printMSG = ConfigHelper.Config.Get("打印上传到SMF的消息", true);
uploadMsg = string.Join("\r\n", msg.Select(x => uploadMsg = string.Join("\r\n", msg.Select(x =>
{ {
//if (x.msgLevel == MsgLevel.warning || x.msgLevel == MsgLevel.alarm) //if (x.msgLevel == MsgLevel.warning || x.msgLevel == MsgLevel.alarm)
...@@ -141,9 +142,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -141,9 +142,10 @@ namespace OnlineStore.DeviceLibrary
} }
} }
).Where(x => !string.IsNullOrEmpty(x))); ).Where(x => !string.IsNullOrEmpty(x)));
if(printMSG)
if (printMSG)
{ {
if (!preUploadMsg.Equals(uploadMsg)) if (!string.IsNullOrEmpty(uploadMsg) && !preUploadMsg.Equals(uploadMsg))
{ {
LogUtil.info("上传消息到服务器消息:" + uploadMsg); LogUtil.info("上传消息到服务器消息:" + uploadMsg);
preUploadMsg = uploadMsg; preUploadMsg = uploadMsg;
...@@ -281,7 +283,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,7 +283,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "没有湿度预警范围,需要从服务器获取,发送OP=" + lineOperation.op, DeviceID + 105); LogUtil.error(Name + "没有湿度预警范围,需要从服务器获取,发送OP=" + lineOperation.op, DeviceID + 105);
} }
Operation resultOperation = HttpHelper.PostOperation(SServerManager.GetPostApi(server), lineOperation); Operation resultOperation = HttpHelper.PostOperation(SServerManager.GetPostApi(server), lineOperation);
//LogUtil.info("resultOperation="+ JsonHelper.SerializeObject(resultOperation)); var printMSG = ConfigHelper.Config.Get("打印上传到SMF的消息", true);
if (printMSG)
{
if (!string.IsNullOrEmpty(uploadMsg))
LogUtil.info($"定时通讯【{JsonHelper.SerializeObject(lineOperation)}】【{JsonHelper.SerializeObject(resultOperation)}】");
}
//发送状态信息到服务器 //发送状态信息到服务器
if (resultOperation == null || (resultOperation.op <= 0)) if (resultOperation == null || (resultOperation.op <= 0))
{ {
......
...@@ -273,7 +273,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -273,7 +273,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
if (isAlarmForkCheck()) if (isAlarmForkCheck())
SetCriticalMsg($"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】,请检查检查"); SetCriticalMsg($"{MoveInfo.MoveParam.PosInfo.GetPosSide()}取料后,料叉未检测到料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】");
return; return;
} }
SetWarnMsg(""); SetWarnMsg("");
...@@ -339,7 +339,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -339,7 +339,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
if (isAlarmForkCheck()) if (isAlarmForkCheck())
SetCriticalMsg($"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】,请检查"); SetCriticalMsg($"{MoveInfo.MoveParam.PosInfo.GetPosSide()}取料后,料叉未检测到料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】");
return; return;
} }
SetWarnMsg(""); SetWarnMsg("");
...@@ -357,7 +357,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -357,7 +357,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
if (isAlarmForkCheck()) if (isAlarmForkCheck())
SetCriticalMsg($"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】,请检查"); SetCriticalMsg($"{MoveInfo.MoveParam.PosInfo.GetPosSide()}取料后,料叉未检测到料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】");
return; return;
} }
SetWarnMsg(""); SetWarnMsg("");
...@@ -403,7 +403,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -403,7 +403,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
if (isAlarmForkCheck()) if (isAlarmForkCheck())
SetCriticalMsg($"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】,请检查"); SetCriticalMsg($"{MoveInfo.MoveParam.PosInfo.GetPosSide()}取料后,料叉未检测到料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】");
return; return;
} }
SetWarnMsg(""); SetWarnMsg("");
......
...@@ -166,7 +166,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -166,7 +166,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
if (isAlarmForkCheck()) if (isAlarmForkCheck())
SetCriticalMsg($"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】,请检查"); SetCriticalMsg($"{MoveInfo.MoveParam.PosInfo.GetPosSide()}取料后,料叉未检测到料盘【{MoveInfo?.MoveParam?.PosInfo?.barcode}】");
return; return;
} }
SetWarnMsg(""); SetWarnMsg("");
......
...@@ -35,7 +35,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -35,7 +35,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckBothReel(true)) if (!CheckBothReel(true))
{ {
if (isAlarmForkCheck()) if (isAlarmForkCheck())
SetCriticalMsg($"两面料叉上存在未检测到料盘【{MoveInfo.MoveParam?.PosInfo?.barcode}】【{MoveInfo.MoveParam?.PosInfoBack?.barcode}】,请检查"); SetCriticalMsg($"运动过程中两面的料叉丢失料盘信号【{MoveInfo.MoveParam?.PosInfo?.barcode}】【{MoveInfo.MoveParam?.PosInfoBack?.barcode}】,请检查");
return; return;
} }
SetWarnMsg(""); SetWarnMsg("");
...@@ -99,7 +99,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -99,7 +99,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckBothReel(false)) if (!CheckBothReel(false))
{ {
if (isAlarmForkCheck()) if (isAlarmForkCheck())
SetCriticalMsg($"两面料叉上还能检测到料盘【{MoveInfo.MoveParam?.PosInfo?.barcode}】【{MoveInfo.MoveParam?.PosInfoBack?.barcode}】,请检查"); SetCriticalMsg($"放完料盘后,两面料叉上还能检测到料盘【{MoveInfo.MoveParam?.PosInfo?.barcode}】【{MoveInfo.MoveParam?.PosInfoBack?.barcode}】,请检查");
return; return;
} }
SetWarnMsg(""); SetWarnMsg("");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!