Commit be203805 LN

1

1 个父辈 05d0c0eb
......@@ -353,12 +353,12 @@ namespace OnlineStore.DeviceLibrary
if (String.IsNullOrEmpty(RFIDIP)) { }
else
{
LogUtil.LOGGER.Info(Name + " [" + trayCount + "] IP [" + RFIDManager.GetRFIP(DeviceID) + "] 当前托盘 [" + currTrayNum + "] 上个托盘 [" + preTrayNum + "] ");
LogUtil.LOGGER.Info(Name +$" [{ trayCount }] IP [{ RFIDManager.GetRFIP(DeviceID) }] 当前托盘 [{ currTrayNum }] 上个托盘 [{ preTrayNum }] ");
if (preTrayNum.Equals(currTrayNum) && currTrayNum > 0)
{
TrayManager.TrayErrorMsg = DateTime.Now.ToLongTimeString() + " " + Name + "托盘号错乱:当前托盘 [" + currTrayNum + "] 上个托盘[" + preTrayNum + "] ,连续两个托盘号一样";
TrayManager.TrayErrorMsg =$"{ DateTime.Now.ToLongTimeString() } { Name }托盘号错乱:当前托盘 [{ currTrayNum }] 上个托盘[{ preTrayNum }] ,连续两个托盘号一样";
LogUtil.error(Name + "托盘号错乱:当前托盘 [" + currTrayNum + "] 上个托盘[" + preTrayNum + "] ,连续两个托盘号一样");
LogUtil.error(Name +$"托盘号错乱:当前托盘 [{ currTrayNum }] 上个托盘[{ preTrayNum }] ,连续两个托盘号一样");
}
}
......@@ -464,7 +464,7 @@ namespace OnlineStore.DeviceLibrary
{
continue;
}
NotOkMsg = " [" + wait.ToStr() + "] ";
NotOkMsg = $" [{ wait.ToStr() }] ";
if (wait.WaitType.Equals(WaitEnum.W001_AxisMove))
{
TimeSpan axisSpan = DateTime.Now - preCheckAxisTime;
......
......@@ -98,7 +98,7 @@ namespace OnlineStore.DeviceLibrary
}
}
internal override void StopMove()
internal override void StopMove(string stopDes = "")
{
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
......
......@@ -22,16 +22,16 @@ namespace OnlineStore.DeviceLibrary
baseConfig = config;
IsDebug = config.IsDebug.Equals(1);
ClampJwa = new ClampJawBean(jawconfig);
Name = (" " + "D" + DeviceID + "-进仓" + DeviceID.ToString().PadLeft(1, '0') + " ").ToUpper();
Name = ($" D{ DeviceID }-进仓{ DeviceID.ToString().PadLeft(1, '0') } ").ToUpper();
if (DeviceID.Equals(7))
{
OnlyProOutTray = true;
Name = " " + "D" + DeviceID + "-出料口";
Name = $" D{ DeviceID }-出料口";
}
Init();
MoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-Move]");
SecondMoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-SMove]");
MoveInfo = new LineMoveInfo(DeviceID, $"[{ Name.Trim() }-Move]");
SecondMoveInfo = new LineMoveInfo(DeviceID, $"[{ Name.Trim() }-SMove]");
UseAxis = config.UpDownUseAxis.Equals(1);
UpdownAxis = new AxisBean(config.UpDown_Axis, Name);
......
......@@ -67,12 +67,11 @@ namespace OnlineStore.DeviceLibrary
public string NgMsg = "";
public string ToStr()
{
return " [" + TrayNumber + "] [" + WareCode + "] [" + PosId + "] [" + PlateW + "x" + PlateH + "],InStoreNg [" + InStoreNg +
"],urgentReel [" + urgentReel + "],cutReel [" + cutReel + "],smallReel [" + smallReel + "],rfid [" + rfid + "],rfidLoc [" + rfidLoc + "]";
return $" [{ TrayNumber }] [{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }],InStoreNg [{ InStoreNg }],urgentReel [{ urgentReel }],cutReel [{ cutReel }],smallReel [{ smallReel }],rfid [{ rfid }],rfidLoc [{ rfidLoc }]";
}
public string ToShortStr()
{
return " [" + rfid + "][" + WareCode + "] [" + PosId + "] [" + PlateW + "x" + PlateH + "] " + (urgentReel ? "[紧急料]" : "") + (cutReel ? "[分盘料]" : "");
return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] {(urgentReel ? "[紧急料]" : "")} {(cutReel ? "[分盘料]" : "")}";
}
/// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
......
......@@ -171,15 +171,7 @@ namespace OnlineStore.DeviceLibrary
internal string ToStr()
{
string str = "";
if (MoveParam != null)
{
str = "[" + MoveType + "][" + MoveStep + "]" + MoveParam.ToStr();
}
else
{
str = "[" + MoveType + "][" + MoveStep + "]";
}
string str = $"[{MoveType}][{MoveStep}]{ MoveParam?.ToStr()}";
return str;
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!