Commit bb31ab79 LN

日志修改

1 个父辈 b458d215
......@@ -12,7 +12,7 @@ namespace OnlineStore.Common
{
public class LogUtil
{
public static readonly ILog AIOLog = LogManager.GetLogger("AIOBOXLog");
public static readonly ILog AIOLog = LogManager.GetLogger("AIOBOX");
private static LogUtil instance = new LogUtil();
public delegate void ShowLog(string msg, Color color);
public static readonly ILog LOGGER = LogManager.GetLogger("RollingLogFileAppender");
......
......@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public class WorkParam
{
public WorkParam(int inPosType = 1, int tPosType = 0, string barcode = "", int plateH = 0, int plateW = 0, bool test = false )
public WorkParam(int inPosType = 1, int tPosType = 0, string barcode = "", int plateH = 0, int plateW = 0, bool test = false)
{
this.InPosType = inPosType;
this.TargetPosType = tPosType;
......@@ -26,16 +26,16 @@ namespace OnlineStore.DeviceLibrary
this.PlateH = plateH;
this.IsTest = test;
}
public string WareCode = "";
/// <summary>
/// 当前状态
/// </summary>
public int TrayStatus = -1;
public int PlateH = 0;
public int PlateW = 0;
/// <summary>
......@@ -52,7 +52,7 @@ namespace OnlineStore.DeviceLibrary
/// 目标位置:1=XRay入口,2=测值工位上层 电容,3=测值工位下层 电阻
/// </summary>
public int TargetPosType = 0;
public bool IsNgReel = false;
public string NgMsg = "";
/// <summary>
......@@ -75,9 +75,9 @@ namespace OnlineStore.DeviceLibrary
{
tP = "电阻测值";
}
return " [" + WareCode + "] " + "[" + PlateW + " X " + PlateH + "] " + "[" + (InPosType.Equals(1) ? "左侧入口" : "右侧入口") + "-->" + tP+ "]";
return " [" + WareCode + "] " + "[" + PlateW + " X " + PlateH + "] " + "[" + (InPosType.Equals(1) ? "左侧入口" : "右侧入口") + "-->" + tP + "]";
}
public string OutStr()
public string OutStr()
{
return "[" + WareCode + "] [ " + PlateW + "X" + PlateH + " ] [" + WareCount + "]" + (IsNgReel ? "[NG料:" + NgMsg + "]" : "") + "";
}
......@@ -141,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
}
public ReelInfo GetReelInfo()
{
ReelInfo reel = new ReelInfo(WareCode, PlateW, PlateH, WareCount, IsNgReel, NgMsg);
ReelInfo reel = new ReelInfo(WareCode, PlateW, PlateH, WareCount, IsNgReel, NgMsg);
return reel;
}
}
......@@ -150,7 +150,7 @@ namespace OnlineStore.DeviceLibrary
public class ReelInfo
{
public ReelInfo(string code = "", int plateW = 0, int plateH = 0,int count=0,bool IsNg=false,string msg="")
public ReelInfo(string code = "", int plateW = 0, int plateH = 0, int count = 0, bool IsNg = false, string msg = "")
{
this.WareCode = code;
this.PlateH = plateH;
......@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
public string ToStr()
{
return "[" + WareCode + "] [" + PlateW + "X" + PlateH + "] [数量:" + WareCount+"]"+(IsNgReel?"[NG料:"+NgMsg+"]":"")+"";
return "[" + WareCode + "] [" + PlateW + "X" + PlateH + "] [数量:" + WareCount + "]" + (IsNgReel ? "[NG料:" + NgMsg + "]" : "") + "";
}
public ReelInfo GetReelInfo()
......@@ -197,22 +197,22 @@ namespace OnlineStore.DeviceLibrary
string pn = "";
string reald = "";
string timeName = "-" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png";
string[] codeArray = WareCode.Split(';');
if (codeArray.Length == 2)
{
string pnStr = codeArray[0];
if (pnStr.Length > 3)
string pnStr = codeArray[0];
if (pnStr.Length >= 5)
{
pn = pnStr.Substring(pnStr.Length - 3, 3);
pn = pnStr.Substring(0, 2) + pnStr.Substring(pnStr.Length - 3, 3);
}
else
{
pn = pnStr;
}
reald= codeArray[1];
}
reald = codeArray[1];
}
return pn + "-" + reald + timeName;
}
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!