Commit 77a18038 LN

增加分盘料判断。托盘修改bug修改。

1 个父辈 2bf1fcf1
......@@ -46,6 +46,8 @@
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.numTrayNum = new System.Windows.Forms.NumericUpDown();
this.groupTray = new System.Windows.Forms.GroupBox();
this.txtRfid = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtTrayLoc = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.chbSmall = new System.Windows.Forms.CheckBox();
......@@ -450,6 +452,8 @@
//
// groupTray
//
this.groupTray.Controls.Add(this.txtRfid);
this.groupTray.Controls.Add(this.label4);
this.groupTray.Controls.Add(this.txtTrayLoc);
this.groupTray.Controls.Add(this.label3);
this.groupTray.Controls.Add(this.chbSmall);
......@@ -475,21 +479,37 @@
this.groupTray.TabIndex = 277;
this.groupTray.TabStop = false;
//
// txtRfid
//
this.txtRfid.Location = new System.Drawing.Point(45, 98);
this.txtRfid.Name = "txtRfid";
this.txtRfid.Size = new System.Drawing.Size(122, 23);
this.txtRfid.TabIndex = 283;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 101);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 17);
this.label4.TabIndex = 282;
this.label4.Text = "料架:";
//
// txtTrayLoc
//
this.txtTrayLoc.Location = new System.Drawing.Point(45, 98);
this.txtTrayLoc.Location = new System.Drawing.Point(222, 98);
this.txtTrayLoc.Name = "txtTrayLoc";
this.txtTrayLoc.Size = new System.Drawing.Size(122, 23);
this.txtTrayLoc.Size = new System.Drawing.Size(92, 23);
this.txtTrayLoc.TabIndex = 281;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 101);
this.label3.Location = new System.Drawing.Point(183, 101);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(35, 17);
this.label3.TabIndex = 280;
this.label3.Text = "料架:";
this.label3.Text = "位置:";
//
// chbSmall
//
......@@ -782,6 +802,8 @@
private System.Windows.Forms.NumericUpDown numTrayNum;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button btnT3Reset;
private System.Windows.Forms.TextBox txtRfid;
private System.Windows.Forms.Label label4;
}
}
......@@ -255,6 +255,7 @@ namespace OnlineStore.AssemblyLine
bool urg = rdbUrg.Checked;
bool cutReel = rdbCutreel.Checked;
int loc = FormUtil.GetIntValue(txtTrayLoc);
string rfid = txtRfid.Text.Trim();
string code = txtTrayCode.Text.Trim();
if (hasTray)
{
......@@ -262,7 +263,7 @@ namespace OnlineStore.AssemblyLine
{
code = "CodeTest";
}
InOutParam inoutP = new InOutParam(num, code, posId, ph, pw, inNg, urg, cutReel, isSmall, "", loc);
InOutParam inoutP = new InOutParam(num, code, posId, ph, pw, inNg, urg, cutReel, isSmall, rfid, loc);
TrayManager.UpdateTrayInfo(num, hasTray, trayType, inoutP, "InStoreNG ");
}
else
......@@ -455,6 +456,7 @@ namespace OnlineStore.AssemblyLine
chbSmall.Checked = tray.InoutPar.smallReel;
txtTrayLoc.Text = tray.InoutPar.rfidLoc.ToString();
chbInStoNG.Checked = tray.InoutPar.IsNG;
txtRfid.Text = tray.InoutPar.rfid;
}
else
{
......@@ -467,6 +469,7 @@ namespace OnlineStore.AssemblyLine
chbSmall.Checked = false;
txtTrayLoc.Text = "";
chbInStoNG.Checked = false;
txtRfid.Text = "";
}
}
......
......@@ -1044,12 +1044,19 @@ namespace OnlineStore.DeviceLibrary
{
LogInfo(" C1->出料线:NG料" + "" + param.ToStr());
//如果分配了库位,需要调用取消
if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != ""&&trayInfo.InOrOutStore.Equals(1))
if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "" && trayInfo.InOrOutStore.Equals(1))
{
SServerManager.cancelPutInTask(Name, trayInfo.InoutPar.WareCode,false );
SServerManager.cancelPutInTask(Name, trayInfo.InoutPar.WareCode, false);
}
MoveInfo.MoveParam = param;
return true ;
return true;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.IsCheck() && this.DeviceID.Equals(216))
{
//盘点料到NG箱
LogInfo(" C1->出料线:盘点料" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
//else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel && this.DeviceID.Equals(216))
//{
......@@ -1064,11 +1071,11 @@ namespace OnlineStore.DeviceLibrary
if (!needToBielt)
{
LogUtil.info(Name + $"工单料:{trayInfo.InoutPar.WareCode} canReelToBelt={needToBielt} ,暂不移到出料线");
return false ;
return false;
}
//LogInfo(" C1->出料线:工单料" + "" + param.ToStr());
List<int> leftLineList= new List<int> { 204, 206 };
List<int> leftLineList = new List<int> { 204, 206 };
List<int> rightLineList = new List<int> { 213, 216 };
List<int> mustLine = new List<int>();
List<int> firstLine = new List<int>();
......@@ -1092,7 +1099,7 @@ namespace OnlineStore.DeviceLibrary
else if (param.rfidLoc <= 46)
{
// 小料时,架位为1 - 46优先走1 / 2号皮带线
firstLine = new List<int> (leftLineList);
firstLine = new List<int>(leftLineList);
}
else if (param.rfidLoc >= 47)
{
......@@ -1132,7 +1139,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (firstLine.Count > 0)
{
if (firstLine.Contains(DeviceID) )
if (firstLine.Contains(DeviceID))
{
LogInfo(" C1->出料线:工单料,优先线" + "" + param.ToStr());
MoveInfo.MoveParam = param;
......
......@@ -447,6 +447,13 @@ namespace OnlineStore.DeviceLibrary
//MoveInfo.MoveParam = inoup;
return true;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.IsCheck() && this.DeviceID.Equals(216))
{
//盘点料到NG箱
LogInfo(" 盘点料->NG箱" + "" + inoup.ToStr());
SecondMoveInfo.MoveParam = inoup;
return true;
}
//else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel && this.DeviceID.Equals(217))
//{
// LogInfo(" 紧急料->NG箱" + "" + inoup.ToStr());
......
......@@ -71,7 +71,14 @@ namespace OnlineStore.DeviceLibrary
}
public string ToShortStr()
{
return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] {( urgentReel ? "[紧急料]" : "")} {( cutReel ? "[分盘料]" : "")}";
if (urgentReel && IsCheck())
{
return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] [盘点料]";
}
else
{
return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] {(urgentReel ? "[紧急料]" : "")} {(cutReel ? "[分盘料]" : "")}";
}
}
/// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
......@@ -118,6 +125,28 @@ namespace OnlineStore.DeviceLibrary
return -1;
}
/// <summary>
/// 判断是否是盘点料
/// </summary>
/// <returns></returns>
public bool IsCheck()
{
try
{
if (urgentReel)
{
string[] array = rfid.Trim().Split('-');
if (array != null && array.Length.Equals(2) && array[0].Length >= 2)
{
return true;
}
}
}
catch (Exception ex)
{
}
return false;
}
/// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
public bool urgentReel { get; set; }
......
......@@ -38,7 +38,14 @@ namespace OnlineStore.DeviceLibrary
string outType = "出料"+ ngstr + ":";
if (inoutPar.urgentReel)
{
outType = "紧急料" + ngstr + ":";
if (inoutPar.IsCheck())
{
outType = "盘点料" + ngstr + ":";
}
else
{
outType = "紧急料" + ngstr + ":";
}
}else if (inoutPar.cutReel)
{
outType = "分盘料" + ngstr + ":";
......@@ -83,7 +90,7 @@ namespace OnlineStore.DeviceLibrary
{
this.inoutPar = value;
}
}
}
}
/// <summary>
/// 托盘上的物料的类型
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!