Commit be203805 LN

1

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