Commit 77a18038 LN

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

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