Commit 9269aa46 LN

bug修改

1 个父辈 5e69d37f
......@@ -964,9 +964,14 @@ namespace OnlineStore.DeviceLibrary
|| storeStatus.Equals(StoreStatus.OutStoreExecute)
|| storeStatus.Equals(StoreStatus.OutStoreBoxEnd))
{
return false;
}
return true;
if (lineConn.CanStartOut())
{
return true;
}
return false ;
}
public string GetMoveStr()
{
......
......@@ -179,15 +179,15 @@ namespace OnlineStore.DeviceLibrary
return false;
}
//public bool CanStartOut()
//{
// TimeSpan span = DateTime.Now - LastUpdateTime;
// if (span.TotalSeconds < ClientKeepSecond && CanOutStore)
// {
// return true;
// }
// return false;
//}
public bool CanStartOut()
{
TimeSpan span = DateTime.Now - LastUpdateTime;
if (span.TotalSeconds < ClientKeepSecond && CanOutStore)
{
return true;
}
return false;
}
public bool CanReSend()
{
TimeSpan span = DateTime.Now - LastOutStoreEndTime;
......@@ -209,7 +209,14 @@ namespace OnlineStore.DeviceLibrary
bean.WaitInStoreList = new List<string>( );
if (DoorPosInfo != null)
{
bean.WaitInStoreList.Add(DoorPosInfo.ShelfPosId);
if (string.IsNullOrEmpty(DoorPosInfo.ShelfPosId))
{
bean.WaitInStoreList.Add("NG料");
}
else
{
bean.WaitInStoreList.Add(DoorPosInfo.ShelfPosId);
}
}
return bean;
}
......
......@@ -116,7 +116,14 @@ namespace OnlineStore.DeviceLibrary
public bool IsNg { get; set; }
public string ToStr()
{
return $" [{ barcode }] [{ ShelfPosId }] [{PlateW }x{ PlateH }],boxPos[{ BoxPosId }],rfid [{ rfid}]";
if (IsNg)
{
return $" 仓门口NG料 [{ barcode }] [{ ShelfPosId }] [{PlateW }x{ PlateH }],boxPos[{ BoxPosId }],rfid [{ rfid}]";
}
else
{
return $" 仓门口物料 [{ barcode }] [{ ShelfPosId }] [{PlateW }x{ PlateH }],boxPos[{ BoxPosId }],rfid [{ rfid}]";
}
}
}
}
......@@ -64,10 +64,24 @@
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<appender name="TheRFID" type="log4net.Appender.RollingFileAppender">
<file value="logs/rfid/TheRFID-line.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<logger name="InOutStore">
<level value="Info" />
<appender-ref ref="InOutStore" />
</logger>
<logger name="TheRFID">
<level value="Info" />
<appender-ref ref="TheRFID" />
</logger>
<root>
<level value="Info" />
<appender-ref ref="RollingLogFileAppender" />
......
......@@ -126,6 +126,12 @@
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.工位1复位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.s2复位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.s3复位ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator();
this.tabControl1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox2.SuspendLayout();
......@@ -1213,7 +1219,13 @@
this.toolStripSeparator7,
this.打开设备照明ToolStripMenuItem,
this.toolStripSeparator14,
this.关闭设备照明ToolStripMenuItem});
this.关闭设备照明ToolStripMenuItem,
this.toolStripSeparator15,
this.工位1复位ToolStripMenuItem,
this.toolStripSeparator16,
this.s2复位ToolStripMenuItem,
this.toolStripSeparator17,
this.s3复位ToolStripMenuItem});
this.设置TToolStripMenuItem.Name = "设置TToolStripMenuItem";
this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25);
this.设置TToolStripMenuItem.Text = "设备调试 ";
......@@ -1360,6 +1372,42 @@
//
this.timer2.Interval = 1000;
//
// 工位1复位ToolStripMenuItem
//
this.工位1复位ToolStripMenuItem.Name = "工位1复位ToolStripMenuItem";
this.工位1复位ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.工位1复位ToolStripMenuItem.Text = "S1复位";
this.工位1复位ToolStripMenuItem.Click += new System.EventHandler(this.工位1复位ToolStripMenuItem_Click);
//
// s2复位ToolStripMenuItem
//
this.s2复位ToolStripMenuItem.Name = "s2复位ToolStripMenuItem";
this.s2复位ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.s2复位ToolStripMenuItem.Text = "S2复位";
this.s2复位ToolStripMenuItem.Click += new System.EventHandler(this.s2复位ToolStripMenuItem_Click);
//
// s3复位ToolStripMenuItem
//
this.s3复位ToolStripMenuItem.Name = "s3复位ToolStripMenuItem";
this.s3复位ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.s3复位ToolStripMenuItem.Text = "S3复位";
this.s3复位ToolStripMenuItem.Click += new System.EventHandler(this.s3复位ToolStripMenuItem_Click);
//
// toolStripSeparator15
//
this.toolStripSeparator15.Name = "toolStripSeparator15";
this.toolStripSeparator15.Size = new System.Drawing.Size(177, 6);
//
// toolStripSeparator16
//
this.toolStripSeparator16.Name = "toolStripSeparator16";
this.toolStripSeparator16.Size = new System.Drawing.Size(177, 6);
//
// toolStripSeparator17
//
this.toolStripSeparator17.Name = "toolStripSeparator17";
this.toolStripSeparator17.Size = new System.Drawing.Size(177, 6);
//
// FrmEquip
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
......@@ -1496,6 +1544,12 @@
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.Label lblHeartMsg;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
private System.Windows.Forms.ToolStripMenuItem 工位1复位ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator16;
private System.Windows.Forms.ToolStripMenuItem s2复位ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator17;
private System.Windows.Forms.ToolStripMenuItem s3复位ToolStripMenuItem;
}
}
......@@ -150,25 +150,28 @@ namespace OnlineStore.ACSingleStore
lblSize.Text = "库位尺寸:未知";
}
}
}
#endregion
private void timer1_Tick(object sender, EventArgs e)
{
if (!this.Visible)
{
return;
}
}
if (chbDebug.Checked.Equals(equip.IsDebug).Equals(false))
{
LoadOk = false;
chbDebug.Checked = equip.IsDebug;
LoadOk = true;
}
lblHeartMsg.Text = LineConnect.HeartMsg;
//lblHeartMsg.Text = LineConnect.HeartMsg;
lblHeartMsg.Text = LineConnect.DoorPosInfo?.ToStr();
lblThisSta.Text = equip.GetRunStr();
lblMoveStr.Text = equip.GetMoveStr();
//ReadPosistion();
......@@ -1124,6 +1127,38 @@ namespace OnlineStore.ACSingleStore
{
equip.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
private void 工位1复位ToolStripMenuItem_Click(object sender, EventArgs e)
{
LogUtil.info(equip.Name + "点击:S1复位");
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
{
MessageBox.Show(equip.Name + "设备未启动,无法复位");
return;
}
equip.StationMap[1].Reset();
}
private void s2复位ToolStripMenuItem_Click(object sender, EventArgs e)
{
LogUtil.info(equip.Name + "点击:S2复位");
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
{
MessageBox.Show(equip.Name + "设备未启动,无法复位");
return;
}
equip.StationMap[2].Reset();
}
private void s3复位ToolStripMenuItem_Click(object sender, EventArgs e)
{
LogUtil.info(equip.Name + "点击:S3复位");
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
{
MessageBox.Show(equip.Name + "设备未启动,无法复位");
return;
}
equip.StationMap[3].Reset();
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!