fix - 监控数据逻辑优化,mes同步逻辑优化

master
SoulStar 8 months ago
parent 8f48b0735c
commit 93f26044fe

@ -68,8 +68,8 @@ namespace HighWayIot.Plc.PlcHelper
sideBytes[0] = sideBytes[0].SetBoolByIndex(5, paraEntity.B5 ?? false);
sideBytes[0] = sideBytes[0].SetBoolByIndex(6, paraEntity.B6 ?? false);
sideBytes[0] = sideBytes[0].SetBoolByIndex(7, paraEntity.B7 ?? false);
sideBytes[1] = sideBytes[1].SetBoolByIndex(0, paraEntity.B0 ?? false);
sideBytes[1] = sideBytes[1].SetBoolByIndex(1, paraEntity.B1 ?? false);
sideBytes[1] = sideBytes[1].SetBoolByIndex(0, paraEntity.B8 ?? false);
sideBytes[1] = sideBytes[1].SetBoolByIndex(1, paraEntity.B9 ?? false);
//if (!PlcConnect.PlcWrite2("D390", bitData, DataTypeEnum.UInt16).IsSuccess)
// return false;

@ -42,6 +42,18 @@ namespace HighWayIot.Plc.PlcHelper
}
}
/// <summary>
/// 复位报警点位信号
/// </summary>
/// <param name="No"></param>
public void WriteAlarmSignal(int No)
{
if(!PlcConnect.PlcWrite2($"3030.{No:X}", false, DataTypeEnum.Bool).IsSuccess)
{
LogHelper.Instance.Error($"小车报警复位失败 No.{No}");
}
}
///// <summary>
///// 工位贴合开始信号写入

@ -33,7 +33,7 @@ namespace HighWayIot.Repository.service
/// 查询报表信息
/// </summary>
/// <returns></returns>
public List<ZxDailyReportEntity> GetOneDayDailyReportInfos()
public List<ZxDailyReportEntity> GetDailyReportInfos()
{
try
{

@ -4,6 +4,7 @@ using HighWayIot.Plc.PlcHelper;
using HighWayIot.Repository.domain;
using HighWayIot.Repository.service;
using HighWayIot.Winform.UserControlPages;
using HslCommunication;
using HslCommunication.Profinet.Keyence;
using Models;
using SixLabors.ImageSharp.PixelFormats;
@ -47,12 +48,46 @@ namespace HighWayIot.Winform.Business
//解析返回的信号数据
ushort[] rgvNo = new ushort[7];
//RGV状态信号
ushort[] rgvState = new ushort[7];
//称重信号
float[] weights = new float[4];
//报警信号
bool[] alarm = new bool[10];
//报警信号获取
alarm[0] = signals[58].GetBoolByIndex(0);
alarm[1] = signals[58].GetBoolByIndex(1);
alarm[2] = signals[58].GetBoolByIndex(2);
alarm[3] = signals[58].GetBoolByIndex(3);
alarm[4] = signals[58].GetBoolByIndex(4);
alarm[5] = signals[58].GetBoolByIndex(5);
alarm[6] = signals[58].GetBoolByIndex(6);
alarm[7] = signals[58].GetBoolByIndex(7);
alarm[8] = signals[59].GetBoolByIndex(0);
alarm[9] = signals[59].GetBoolByIndex(1);
//称重信号解析
for (int i = 0; i < 10; i++)
{
if (alarm[i])
{
if (SysErrorLogService.Instance.InsertErrorLogInfo(new SysErrorLogEntity()
{
Text = $"{i + 1}小车报警",
Operator = RoleBusiness.LoginUserName,
LogTime = DateTime.Now,
P1 = i + 1,
}))
{
transferSingal.WriteAlarmSignal(i + 1);
}
}
}
//报表信号获取
for (int i = 0; i < 7; i++)
{
rgvNo[i] = PlcConnect.MelsecInstance2.ByteTransform.TransUInt16(signals, (i * 2) + 20);
rgvNo[i] = PlcConnect.MelsecInstance2.ByteTransform.TransUInt16(signals, (i * 2) + 20);
rgvState[i] = PlcConnect.MelsecInstance2.ByteTransform.TransUInt16(signals, i * 2);
if (i > 2)
{
@ -62,17 +97,18 @@ namespace HighWayIot.Winform.Business
//LogHelper.Instance.Info(string.Join(", ", rgvNo));
//LogHelper.Instance.Info(string.Join(", ", rgvState));
//装圈工位
//装圈工位信号
if (rgvState[0] == 1)
{
// 监控画面信息插入
if(MonitorInsert(RecipeSendBusiness.NowRecipeCode, RecipeSendBusiness.NowDeviceNo, rgvNo[0]))
if (MonitorInsert(RecipeSendBusiness.NowRecipeCode, RecipeSendBusiness.NowDeviceNo, rgvNo[0]))
{
MonitorMainPage.MonitorRefreshAction.Invoke();
}
transferSingal.WriteStationReportSignal(1); // 复位信号
}
//基部胶
//基部胶信号
if (rgvState[1] == 1)
{
ZxDailyReportEntity entity = ZxDailyReportService.Instance.GetNearData(rgvNo[1]);
@ -90,7 +126,7 @@ namespace HighWayIot.Winform.Business
}
n1:
//中层胶
//中层胶信号
if (rgvState[2] == 1)
{
ZxDailyReportEntity entity = ZxDailyReportService.Instance.GetNearData(rgvNo[2]);
@ -109,7 +145,7 @@ namespace HighWayIot.Winform.Business
}
n2:
//胎面胶
//胎面胶信号
for (int i = 3; i <= 5; i++)
{
if (rgvState[i] == 1)

@ -3,6 +3,7 @@ using HighWayIot.Plc;
using HighWayIot.Plc.PlcHelper;
using HighWayIot.Repository.domain;
using HighWayIot.Repository.service;
using HighWayIot.Winform.MainForm;
using Models;
using System;
using System.Collections.Generic;
@ -79,19 +80,20 @@ namespace HighWayIot.Winform.Business
{
//读同步数据库找到等于0的
List<ZxMesPlanTransferEntity> transferEntity = ZxMesPlanTransferService.Instance.GetRecipeInfos(x => x.RequestFlag == false).ToList();
ZxMesPlanTransferEntity newRecipes;
if (transferEntity.Count > 1)
{
LogHelper.Instance.Error($"标识同步数据不唯一,请检查是否有多选情况发生,当前数量:{transferEntity.Count}");
return;
newRecipes = transferEntity.Where(x => x.SyncTime == transferEntity.Max(y => y.SyncTime)).Single();
}
if (transferEntity.Count == 0)
else if (transferEntity.Count == 0)
{
LogHelper.Instance.Error("配方下发请求不存在等待MES同步");
return;
}
else
{
newRecipes = transferEntity.Single();
}
//同步配方
ZxMesPlanTransferEntity newRecipes = transferEntity.First();
SyncRecipe(newRecipes);
ZxMesPlanTransferService.Instance.SetFlagTrue();
@ -110,6 +112,7 @@ namespace HighWayIot.Winform.Business
schedulingEntity.RecipeCode1 = newRecipes.RecipeCode;
}
ZxSchedulingService.Instance.UpdateSchedulingInfo(schedulingEntity);
BaseForm.SchdulingRefreshAction.Invoke();
}
string recipeNo;
ZxRecipeParaEntity recipeParaInfo;
@ -181,6 +184,7 @@ namespace HighWayIot.Winform.Business
if (nowEneity != null) //有就更新 只更新配方和称量信息
{
//同步配方
nowEneity.RecipeName = newRecipe.RecipeName;
nowEneity.RecipeSpecCode = newRecipe.SpecCode;
nowEneity.RecipeSpecName = newRecipe.SpecName;
nowEneity.SizeKind = newRecipe.RimInch;

@ -52,6 +52,11 @@ namespace HighWayIot.Winform.MainForm
/// </summary>
MonitorDataRefreshBusiness monitorDataRefreshBusiness = new MonitorDataRefreshBusiness();
/// <summary>
/// 排程combobox刷新
/// </summary>
public static Action SchdulingRefreshAction;
/// <summary>
/// 底边栏消息提示刷新
/// </summary>
@ -104,6 +109,7 @@ namespace HighWayIot.Winform.MainForm
{
LogInformationToolStrip.Text = log;
};
SchdulingRefreshAction += RefreshSchedulingNow;
}
/// <summary>
@ -410,14 +416,27 @@ namespace HighWayIot.Winform.MainForm
/// <param name="e"></param>
private void TabControlChange(object sender, TabControlEventArgs e)
{
if(e.TabPage.Text == "硫化排程")
//硫化排程界面Combobox绑定更新更新
if (e.TabPage.Text == "硫化排程")
{
UserControl control = UserControls.Where(x => x.Tag.ToString() == "硫化排程").Single();
if (control is ProductionScheduling)
{
ProductionScheduling productionScheduling = control as ProductionScheduling;
productionScheduling.ComboBoxBind();
}
SchdulingRefreshAction.Invoke();
}
}
/// <summary>
/// 刷新排程Combobox
/// </summary>
public void RefreshSchedulingNow()
{
UserControl control = UserControls.Where(x => x.Tag.ToString() == "硫化排程").Single();
if (control == null)
{
return;
}
if (control is ProductionScheduling)
{
ProductionScheduling productionScheduling = control as ProductionScheduling;
productionScheduling.ComboBoxBind();
}
}
}

@ -48,25 +48,10 @@ namespace HighWayIot.Winform.UserControlPages
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel3 = new System.Windows.Forms.Panel();
this.RgvNoLabel = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.RawTireWeightLabel = new System.Windows.Forms.Label();
this.SpecNameLabel = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.panel5 = new System.Windows.Forms.Panel();
this.NowDateProductNumTextBox = new System.Windows.Forms.TextBox();
this.NowDateProductNumLabel = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.NightProductNumTextBox = new System.Windows.Forms.TextBox();
this.DayProductNumTextBox = new System.Windows.Forms.TextBox();
this.NightTimeLabel = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.DayTimeLabel = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.SpecCodeLabel = new System.Windows.Forms.Label();
this.RecipeNameLabel = new System.Windows.Forms.Label();
@ -74,7 +59,6 @@ namespace HighWayIot.Winform.UserControlPages
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.MonitorDataGridView = new System.Windows.Forms.DataGridView();
this.No = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.VulcanizationNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -90,25 +74,38 @@ namespace HighWayIot.Winform.UserControlPages
this.RepeatWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsDone = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DataRefresh = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.panel4 = new System.Windows.Forms.Panel();
this.NightProductNumTextBox = new System.Windows.Forms.TextBox();
this.DayProductNumTextBox = new System.Windows.Forms.TextBox();
this.NightTimeLabel = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.DayTimeLabel = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.NowDateProductNumTextBox = new System.Windows.Forms.TextBox();
this.NowDateProductNumLabel = new System.Windows.Forms.Label();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.panel3.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
this.panel5.SuspendLayout();
this.panel4.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.MonitorDataGridView)).BeginInit();
this.tableLayoutPanel3.SuspendLayout();
this.panel4.SuspendLayout();
this.panel5.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.tableLayoutPanel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 114);
this.panel1.Margin = new System.Windows.Forms.Padding(0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1905, 231);
this.panel1.Size = new System.Drawing.Size(2169, 114);
this.panel1.TabIndex = 0;
//
// tableLayoutPanel1
@ -116,7 +113,7 @@ namespace HighWayIot.Winform.UserControlPages
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel3, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
@ -124,47 +121,15 @@ namespace HighWayIot.Winform.UserControlPages
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 231F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1905, 231);
this.tableLayoutPanel1.Size = new System.Drawing.Size(2169, 114);
this.tableLayoutPanel1.TabIndex = 0;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Controls.Add(this.panel3, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel3, 0, 1);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(952, 0);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(953, 231);
this.tableLayoutPanel2.TabIndex = 1;
//
// panel3
//
this.panel3.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.panel3.Controls.Add(this.RgvNoLabel);
this.panel3.Controls.Add(this.label10);
this.panel3.Controls.Add(this.RawTireWeightLabel);
this.panel3.Controls.Add(this.SpecNameLabel);
this.panel3.Controls.Add(this.label7);
this.panel3.Controls.Add(this.label8);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.Margin = new System.Windows.Forms.Padding(0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(953, 138);
this.panel3.TabIndex = 3;
//
// RgvNoLabel
//
this.RgvNoLabel.AutoSize = true;
this.RgvNoLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
this.RgvNoLabel.ForeColor = System.Drawing.Color.Khaki;
this.RgvNoLabel.Location = new System.Drawing.Point(480, 74);
this.RgvNoLabel.Location = new System.Drawing.Point(110, 14);
this.RgvNoLabel.Name = "RgvNoLabel";
this.RgvNoLabel.Size = new System.Drawing.Size(61, 31);
this.RgvNoLabel.TabIndex = 11;
@ -175,7 +140,7 @@ namespace HighWayIot.Winform.UserControlPages
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("微软雅黑", 18F);
this.label10.ForeColor = System.Drawing.Color.Khaki;
this.label10.Location = new System.Drawing.Point(364, 74);
this.label10.Location = new System.Drawing.Point(16, 14);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(110, 31);
this.label10.TabIndex = 10;
@ -186,192 +151,41 @@ namespace HighWayIot.Winform.UserControlPages
this.RawTireWeightLabel.AutoSize = true;
this.RawTireWeightLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
this.RawTireWeightLabel.ForeColor = System.Drawing.Color.Khaki;
this.RawTireWeightLabel.Location = new System.Drawing.Point(212, 74);
this.RawTireWeightLabel.Location = new System.Drawing.Point(741, 49);
this.RawTireWeightLabel.Name = "RawTireWeightLabel";
this.RawTireWeightLabel.Size = new System.Drawing.Size(61, 31);
this.RawTireWeightLabel.TabIndex = 9;
this.RawTireWeightLabel.Text = "N/A";
//
// SpecNameLabel
//
this.SpecNameLabel.AutoSize = true;
this.SpecNameLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
this.SpecNameLabel.ForeColor = System.Drawing.Color.Khaki;
this.SpecNameLabel.Location = new System.Drawing.Point(181, 28);
this.SpecNameLabel.Name = "SpecNameLabel";
this.SpecNameLabel.Size = new System.Drawing.Size(61, 31);
this.SpecNameLabel.TabIndex = 8;
this.SpecNameLabel.Text = "N/A";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("微软雅黑", 18F);
this.label7.ForeColor = System.Drawing.Color.Khaki;
this.label7.Location = new System.Drawing.Point(41, 74);
this.label7.Location = new System.Drawing.Point(590, 49);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(165, 31);
this.label7.TabIndex = 7;
this.label7.Text = "生胎重量(g)";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 18F);
this.label8.ForeColor = System.Drawing.Color.Khaki;
this.label8.Location = new System.Drawing.Point(41, 28);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(134, 31);
this.label8.TabIndex = 6;
this.label8.Text = "当前规格:";
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 2;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 261F));
this.tableLayoutPanel3.Controls.Add(this.panel5, 1, 0);
this.tableLayoutPanel3.Controls.Add(this.panel4, 0, 0);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 138);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 1;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(953, 93);
this.tableLayoutPanel3.TabIndex = 0;
//
// panel5
//
this.panel5.BackColor = System.Drawing.SystemColors.ControlLight;
this.panel5.Controls.Add(this.NowDateProductNumTextBox);
this.panel5.Controls.Add(this.NowDateProductNumLabel);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(692, 0);
this.panel5.Margin = new System.Windows.Forms.Padding(0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(261, 93);
this.panel5.TabIndex = 4;
//
// NowDateProductNumTextBox
//
this.NowDateProductNumTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.NowDateProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NowDateProductNumTextBox.Location = new System.Drawing.Point(67, 47);
this.NowDateProductNumTextBox.Name = "NowDateProductNumTextBox";
this.NowDateProductNumTextBox.ReadOnly = true;
this.NowDateProductNumTextBox.Size = new System.Drawing.Size(122, 30);
this.NowDateProductNumTextBox.TabIndex = 18;
this.NowDateProductNumTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// NowDateProductNumLabel
//
this.NowDateProductNumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.NowDateProductNumLabel.AutoSize = true;
this.NowDateProductNumLabel.Font = new System.Drawing.Font("微软雅黑", 15F);
this.NowDateProductNumLabel.ForeColor = System.Drawing.Color.Sienna;
this.NowDateProductNumLabel.Location = new System.Drawing.Point(48, 12);
this.NowDateProductNumLabel.Name = "NowDateProductNumLabel";
this.NowDateProductNumLabel.Size = new System.Drawing.Size(164, 27);
this.NowDateProductNumLabel.TabIndex = 13;
this.NowDateProductNumLabel.Text = "99 月 99 日 产量";
this.NowDateProductNumLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// panel4
//
this.panel4.BackColor = System.Drawing.SystemColors.ScrollBar;
this.panel4.Controls.Add(this.NightProductNumTextBox);
this.panel4.Controls.Add(this.DayProductNumTextBox);
this.panel4.Controls.Add(this.NightTimeLabel);
this.panel4.Controls.Add(this.label13);
this.panel4.Controls.Add(this.DayTimeLabel);
this.panel4.Controls.Add(this.label12);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Margin = new System.Windows.Forms.Padding(0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(692, 93);
this.panel4.TabIndex = 3;
//
// NightProductNumTextBox
//
this.NightProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NightProductNumTextBox.Location = new System.Drawing.Point(319, 47);
this.NightProductNumTextBox.Name = "NightProductNumTextBox";
this.NightProductNumTextBox.ReadOnly = true;
this.NightProductNumTextBox.Size = new System.Drawing.Size(122, 30);
this.NightProductNumTextBox.TabIndex = 17;
this.NightProductNumTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// DayProductNumTextBox
//
this.DayProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.DayProductNumTextBox.Location = new System.Drawing.Point(74, 47);
this.DayProductNumTextBox.Name = "DayProductNumTextBox";
this.DayProductNumTextBox.ReadOnly = true;
this.DayProductNumTextBox.Size = new System.Drawing.Size(122, 30);
this.DayProductNumTextBox.TabIndex = 16;
this.DayProductNumTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// NightTimeLabel
//
this.NightTimeLabel.AutoSize = true;
this.NightTimeLabel.Font = new System.Drawing.Font("微软雅黑", 15F);
this.NightTimeLabel.ForeColor = System.Drawing.Color.SaddleBrown;
this.NightTimeLabel.Location = new System.Drawing.Point(347, 13);
this.NightTimeLabel.Name = "NightTimeLabel";
this.NightTimeLabel.Size = new System.Drawing.Size(127, 27);
this.NightTimeLabel.TabIndex = 15;
this.NightTimeLabel.Text = "99:99-99:99";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("微软雅黑", 15F);
this.label13.ForeColor = System.Drawing.Color.SaddleBrown;
this.label13.Location = new System.Drawing.Point(283, 13);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(72, 27);
this.label13.TabIndex = 14;
this.label13.Text = "夜班:";
//
// DayTimeLabel
//
this.DayTimeLabel.AutoSize = true;
this.DayTimeLabel.Font = new System.Drawing.Font("微软雅黑", 15F);
this.DayTimeLabel.ForeColor = System.Drawing.Color.SaddleBrown;
this.DayTimeLabel.Location = new System.Drawing.Point(105, 14);
this.DayTimeLabel.Name = "DayTimeLabel";
this.DayTimeLabel.Size = new System.Drawing.Size(127, 27);
this.DayTimeLabel.TabIndex = 13;
this.DayTimeLabel.Text = "99:99-99:99";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("微软雅黑", 15F);
this.label12.ForeColor = System.Drawing.Color.SaddleBrown;
this.label12.Location = new System.Drawing.Point(41, 14);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(72, 27);
this.label12.TabIndex = 12;
this.label12.Text = "白班:";
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Gray;
this.panel2.Controls.Add(this.RgvNoLabel);
this.panel2.Controls.Add(this.SpecCodeLabel);
this.panel2.Controls.Add(this.label10);
this.panel2.Controls.Add(this.RecipeNameLabel);
this.panel2.Controls.Add(this.RawTireWeightLabel);
this.panel2.Controls.Add(this.RecipeCodeLabel);
this.panel2.Controls.Add(this.label4);
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.label3);
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.label1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Margin = new System.Windows.Forms.Padding(0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(952, 231);
this.panel2.Size = new System.Drawing.Size(1084, 114);
this.panel2.TabIndex = 2;
//
// SpecCodeLabel
@ -379,40 +193,40 @@ namespace HighWayIot.Winform.UserControlPages
this.SpecCodeLabel.AutoSize = true;
this.SpecCodeLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
this.SpecCodeLabel.ForeColor = System.Drawing.Color.LightGoldenrodYellow;
this.SpecCodeLabel.Location = new System.Drawing.Point(181, 152);
this.SpecCodeLabel.Location = new System.Drawing.Point(454, 50);
this.SpecCodeLabel.Name = "SpecCodeLabel";
this.SpecCodeLabel.Size = new System.Drawing.Size(61, 31);
this.SpecCodeLabel.Size = new System.Drawing.Size(112, 31);
this.SpecCodeLabel.TabIndex = 6;
this.SpecCodeLabel.Text = "N/A";
this.SpecCodeLabel.Text = "T123456";
//
// RecipeNameLabel
//
this.RecipeNameLabel.AutoSize = true;
this.RecipeNameLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
this.RecipeNameLabel.ForeColor = System.Drawing.Color.LightGoldenrodYellow;
this.RecipeNameLabel.Location = new System.Drawing.Point(181, 105);
this.RecipeNameLabel.Location = new System.Drawing.Point(297, 14);
this.RecipeNameLabel.Name = "RecipeNameLabel";
this.RecipeNameLabel.Size = new System.Drawing.Size(61, 31);
this.RecipeNameLabel.Size = new System.Drawing.Size(494, 31);
this.RecipeNameLabel.TabIndex = 5;
this.RecipeNameLabel.Text = "N/A";
this.RecipeNameLabel.Text = "8.15-15/28×9-15 C8900 THS NM 正新轮胎";
//
// RecipeCodeLabel
//
this.RecipeCodeLabel.AutoSize = true;
this.RecipeCodeLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
this.RecipeCodeLabel.ForeColor = System.Drawing.Color.LightGoldenrodYellow;
this.RecipeCodeLabel.Location = new System.Drawing.Point(181, 59);
this.RecipeCodeLabel.Location = new System.Drawing.Point(156, 49);
this.RecipeCodeLabel.Name = "RecipeCodeLabel";
this.RecipeCodeLabel.Size = new System.Drawing.Size(61, 31);
this.RecipeCodeLabel.Size = new System.Drawing.Size(147, 31);
this.RecipeCodeLabel.TabIndex = 4;
this.RecipeCodeLabel.Text = "N/A";
this.RecipeCodeLabel.Text = "TI12345567";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("微软雅黑", 18F);
this.label4.ForeColor = System.Drawing.Color.LightGoldenrodYellow;
this.label4.Location = new System.Drawing.Point(45, 151);
this.label4.Location = new System.Drawing.Point(329, 49);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(144, 31);
this.label4.TabIndex = 3;
@ -423,7 +237,7 @@ namespace HighWayIot.Winform.UserControlPages
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("微软雅黑", 18F);
this.label3.ForeColor = System.Drawing.Color.LightGoldenrodYellow;
this.label3.Location = new System.Drawing.Point(55, 104);
this.label3.Location = new System.Drawing.Point(177, 14);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(134, 31);
this.label3.TabIndex = 2;
@ -434,25 +248,12 @@ namespace HighWayIot.Winform.UserControlPages
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 18F);
this.label2.ForeColor = System.Drawing.Color.LightGoldenrodYellow;
this.label2.Location = new System.Drawing.Point(55, 58);
this.label2.Location = new System.Drawing.Point(16, 49);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(134, 31);
this.label2.TabIndex = 1;
this.label2.Text = "成品代号:";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.Cyan;
this.label1.Location = new System.Drawing.Point(417, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(114, 20);
this.label1.TabIndex = 0;
this.label1.Text = "新下发计划";
//
// MonitorDataGridView
//
this.MonitorDataGridView.AllowUserToAddRows = false;
@ -486,14 +287,14 @@ namespace HighWayIot.Winform.UserControlPages
this.RowTireFinishTime,
this.RepeatWeight,
this.IsDone});
this.MonitorDataGridView.Location = new System.Drawing.Point(0, 231);
this.MonitorDataGridView.Location = new System.Drawing.Point(0, 228);
this.MonitorDataGridView.Margin = new System.Windows.Forms.Padding(0);
this.MonitorDataGridView.MultiSelect = false;
this.MonitorDataGridView.Name = "MonitorDataGridView";
this.MonitorDataGridView.ReadOnly = true;
this.MonitorDataGridView.RowHeadersVisible = false;
this.MonitorDataGridView.RowTemplate.Height = 32;
this.MonitorDataGridView.Size = new System.Drawing.Size(1905, 764);
this.MonitorDataGridView.Size = new System.Drawing.Size(2169, 767);
this.MonitorDataGridView.TabIndex = 1;
//
// No
@ -629,6 +430,161 @@ namespace HighWayIot.Winform.UserControlPages
this.DataRefresh.Interval = 1000;
this.DataRefresh.Tick += new System.EventHandler(this.DataRefresh_Tick);
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 2;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 261F));
this.tableLayoutPanel3.Controls.Add(this.panel5, 1, 0);
this.tableLayoutPanel3.Controls.Add(this.panel4, 0, 0);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(1084, 0);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 1;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(1085, 114);
this.tableLayoutPanel3.TabIndex = 3;
//
// panel4
//
this.panel4.BackColor = System.Drawing.SystemColors.ScrollBar;
this.panel4.Controls.Add(this.NightProductNumTextBox);
this.panel4.Controls.Add(this.DayProductNumTextBox);
this.panel4.Controls.Add(this.NightTimeLabel);
this.panel4.Controls.Add(this.label13);
this.panel4.Controls.Add(this.DayTimeLabel);
this.panel4.Controls.Add(this.label12);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Margin = new System.Windows.Forms.Padding(0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(824, 114);
this.panel4.TabIndex = 17;
//
// NightProductNumTextBox
//
this.NightProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NightProductNumTextBox.Location = new System.Drawing.Point(319, 47);
this.NightProductNumTextBox.Name = "NightProductNumTextBox";
this.NightProductNumTextBox.ReadOnly = true;
this.NightProductNumTextBox.Size = new System.Drawing.Size(122, 30);
this.NightProductNumTextBox.TabIndex = 17;
this.NightProductNumTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// DayProductNumTextBox
//
this.DayProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.DayProductNumTextBox.Location = new System.Drawing.Point(74, 47);
this.DayProductNumTextBox.Name = "DayProductNumTextBox";
this.DayProductNumTextBox.ReadOnly = true;
this.DayProductNumTextBox.Size = new System.Drawing.Size(122, 30);
this.DayProductNumTextBox.TabIndex = 16;
this.DayProductNumTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// NightTimeLabel
//
this.NightTimeLabel.AutoSize = true;
this.NightTimeLabel.Font = new System.Drawing.Font("微软雅黑", 15F);
this.NightTimeLabel.ForeColor = System.Drawing.Color.SaddleBrown;
this.NightTimeLabel.Location = new System.Drawing.Point(347, 13);
this.NightTimeLabel.Name = "NightTimeLabel";
this.NightTimeLabel.Size = new System.Drawing.Size(127, 27);
this.NightTimeLabel.TabIndex = 15;
this.NightTimeLabel.Text = "99:99-99:99";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("微软雅黑", 15F);
this.label13.ForeColor = System.Drawing.Color.SaddleBrown;
this.label13.Location = new System.Drawing.Point(283, 13);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(72, 27);
this.label13.TabIndex = 14;
this.label13.Text = "夜班:";
//
// DayTimeLabel
//
this.DayTimeLabel.AutoSize = true;
this.DayTimeLabel.Font = new System.Drawing.Font("微软雅黑", 15F);
this.DayTimeLabel.ForeColor = System.Drawing.Color.SaddleBrown;
this.DayTimeLabel.Location = new System.Drawing.Point(105, 14);
this.DayTimeLabel.Name = "DayTimeLabel";
this.DayTimeLabel.Size = new System.Drawing.Size(127, 27);
this.DayTimeLabel.TabIndex = 13;
this.DayTimeLabel.Text = "99:99-99:99";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("微软雅黑", 15F);
this.label12.ForeColor = System.Drawing.Color.SaddleBrown;
this.label12.Location = new System.Drawing.Point(41, 14);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(72, 27);
this.label12.TabIndex = 12;
this.label12.Text = "白班:";
//
// panel5
//
this.panel5.BackColor = System.Drawing.SystemColors.ControlLight;
this.panel5.Controls.Add(this.NowDateProductNumTextBox);
this.panel5.Controls.Add(this.NowDateProductNumLabel);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(824, 0);
this.panel5.Margin = new System.Windows.Forms.Padding(0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(261, 114);
this.panel5.TabIndex = 18;
//
// NowDateProductNumTextBox
//
this.NowDateProductNumTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.NowDateProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NowDateProductNumTextBox.Location = new System.Drawing.Point(67, 58);
this.NowDateProductNumTextBox.Name = "NowDateProductNumTextBox";
this.NowDateProductNumTextBox.ReadOnly = true;
this.NowDateProductNumTextBox.Size = new System.Drawing.Size(122, 30);
this.NowDateProductNumTextBox.TabIndex = 18;
this.NowDateProductNumTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// NowDateProductNumLabel
//
this.NowDateProductNumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.NowDateProductNumLabel.AutoSize = true;
this.NowDateProductNumLabel.Font = new System.Drawing.Font("微软雅黑", 15F);
this.NowDateProductNumLabel.ForeColor = System.Drawing.Color.Sienna;
this.NowDateProductNumLabel.Location = new System.Drawing.Point(48, 23);
this.NowDateProductNumLabel.Name = "NowDateProductNumLabel";
this.NowDateProductNumLabel.Size = new System.Drawing.Size(164, 27);
this.NowDateProductNumLabel.TabIndex = 13;
this.NowDateProductNumLabel.Text = "99 月 99 日 产量";
this.NowDateProductNumLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Controls.Add(this.panel1, 0, 1);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(2169, 228);
this.tableLayoutPanel2.TabIndex = 2;
//
// panel3
//
this.panel3.Controls.Add(this.tableLayoutPanel2);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(2169, 228);
this.panel3.TabIndex = 3;
//
// MonitorMainPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -636,24 +592,23 @@ namespace HighWayIot.Winform.UserControlPages
this.AutoScroll = true;
this.AutoSize = true;
this.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.Controls.Add(this.panel3);
this.Controls.Add(this.MonitorDataGridView);
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "MonitorMainPage";
this.Size = new System.Drawing.Size(1905, 995);
this.Size = new System.Drawing.Size(2169, 1019);
this.panel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.tableLayoutPanel3.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.MonitorDataGridView)).EndInit();
this.tableLayoutPanel3.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -662,14 +617,8 @@ namespace HighWayIot.Winform.UserControlPages
private Panel panel1;
private TableLayoutPanel tableLayoutPanel1;
private TableLayoutPanel tableLayoutPanel2;
private TableLayoutPanel tableLayoutPanel3;
private Panel panel3;
private Panel panel5;
private Panel panel4;
private Panel panel2;
private DataGridView MonitorDataGridView;
private Label label1;
private Label label2;
private Label SpecCodeLabel;
private Label RecipeNameLabel;
@ -677,19 +626,9 @@ namespace HighWayIot.Winform.UserControlPages
private Label label4;
private Label label3;
private Label RawTireWeightLabel;
private Label SpecNameLabel;
private Label label7;
private Label label8;
private Label RgvNoLabel;
private Label label10;
private Label DayTimeLabel;
private Label label12;
private Label NightTimeLabel;
private Label label13;
private Label NowDateProductNumLabel;
private TextBox NowDateProductNumTextBox;
private TextBox NightProductNumTextBox;
private TextBox DayProductNumTextBox;
private Timer DataRefresh;
private DataGridViewTextBoxColumn No;
private DataGridViewTextBoxColumn VulcanizationNo;
@ -704,5 +643,18 @@ namespace HighWayIot.Winform.UserControlPages
private DataGridViewTextBoxColumn RowTireFinishTime;
private DataGridViewTextBoxColumn RepeatWeight;
private DataGridViewTextBoxColumn IsDone;
private TableLayoutPanel tableLayoutPanel3;
private Panel panel4;
private TextBox NightProductNumTextBox;
private TextBox DayProductNumTextBox;
private Label NightTimeLabel;
private Label label13;
private Label DayTimeLabel;
private Label label12;
private Panel panel5;
private TextBox NowDateProductNumTextBox;
private Label NowDateProductNumLabel;
private TableLayoutPanel tableLayoutPanel2;
private Panel panel3;
}
}

@ -143,7 +143,8 @@ namespace HighWayIot.Winform.UserControlPages
{
lock (GridRefreshLocker)
{
List<ZxDailyReportEntity> dailyEntity = _zxDailyReportService.GetOneDayDailyReportInfos();
//取出近两日的报表数据
List<ZxDailyReportEntity> dailyEntity = _zxDailyReportService.GetDailyReportInfos();
_monitorDataSources.Clear();
if (dailyEntity == null)
{
@ -176,7 +177,7 @@ namespace HighWayIot.Winform.UserControlPages
DayProductNumTextBox.Text = daycount.ToString();
int nightcount = dailyEntity.Count(x => x.StartTime >= NightStartTime && x.StartTime <= NightEndTime && x.IsDone == 1);
NightProductNumTextBox.Text = nightcount.ToString();
NowDateProductNumTextBox.Text = (daycount + nightcount).ToString();
NowDateProductNumTextBox.Text = dailyEntity.Count(x => x.StartTime >= DateTime.Today).ToString();
ZxDailyReportEntity first = dailyEntity.FirstOrDefault();
if (first == null)
@ -189,7 +190,7 @@ namespace HighWayIot.Winform.UserControlPages
ZxRecipeEntity recipeEntity = ZxRecipeService.Instance.GetRecipeInfosByRecipeCode(first.RecipeCode).FirstOrDefault();
if (recipeEntity != null)
{
SpecNameLabel.Text = recipeEntity.RecipeName;
//SpecNameLabel.Text = recipeEntity.RecipeName;
ZxRecipeParaEntity paraEntity = ZxRecipeParaService.Instance.GetRecipeParaInfoByRecipeCode(recipeEntity.RecipeCode).FirstOrDefault();
if (paraEntity != null)
{

@ -28,7 +28,6 @@
/// </summary>
private void InitializeComponent()
{
this.IsUseCheckBox = new System.Windows.Forms.CheckBox();
this.ConfrimAddButton = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.RecipeNameTextBox = new System.Windows.Forms.TextBox();
@ -48,18 +47,6 @@
this.WeightErrorTextBox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// IsUseCheckBox
//
this.IsUseCheckBox.AutoSize = true;
this.IsUseCheckBox.Checked = true;
this.IsUseCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.IsUseCheckBox.Location = new System.Drawing.Point(501, 85);
this.IsUseCheckBox.Name = "IsUseCheckBox";
this.IsUseCheckBox.Size = new System.Drawing.Size(72, 16);
this.IsUseCheckBox.TabIndex = 23;
this.IsUseCheckBox.Text = "是否启用";
this.IsUseCheckBox.UseVisualStyleBackColor = true;
//
// ConfrimAddButton
//
this.ConfrimAddButton.Location = new System.Drawing.Point(241, 112);
@ -218,7 +205,6 @@
this.Controls.Add(this.label5);
this.Controls.Add(this.SpecCodeTextBox);
this.Controls.Add(this.label6);
this.Controls.Add(this.IsUseCheckBox);
this.Controls.Add(this.ConfrimAddButton);
this.Controls.Add(this.label3);
this.Controls.Add(this.RecipeNameTextBox);
@ -234,8 +220,6 @@
}
#endregion
private System.Windows.Forms.CheckBox IsUseCheckBox;
private System.Windows.Forms.Button ConfrimAddButton;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox RecipeNameTextBox;

@ -58,7 +58,7 @@ namespace HighWayIot.Winform.UserControlPages.RecipeConfigPages
RecipeSpecName = SpecNameTextBox.Text.Trim(),
//BatchCode = SPECBatchCodeTextBox.Text.Trim(),
IsDeleted = false,
IsUse = IsUseCheckBox.Checked,
IsUse = false,
};
if (!int.TryParse(SizeKindTextBox.Text.Trim(), out int sizeKind))
{

@ -39,7 +39,6 @@
this.MaterialNameComboBox = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.IsUseCheckBox = new System.Windows.Forms.CheckBox();
this.SetThicknessTextBox = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.SetWidthTextBox = new System.Windows.Forms.TextBox();
@ -175,18 +174,6 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "可以先按类型选择物料";
//
// IsUseCheckBox
//
this.IsUseCheckBox.AutoSize = true;
this.IsUseCheckBox.Checked = true;
this.IsUseCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.IsUseCheckBox.Location = new System.Drawing.Point(278, 40);
this.IsUseCheckBox.Name = "IsUseCheckBox";
this.IsUseCheckBox.Size = new System.Drawing.Size(72, 16);
this.IsUseCheckBox.TabIndex = 12;
this.IsUseCheckBox.Text = "是否使用";
this.IsUseCheckBox.UseVisualStyleBackColor = true;
//
// SetThicknessTextBox
//
this.SetThicknessTextBox.Location = new System.Drawing.Point(94, 145);
@ -393,7 +380,6 @@
this.Controls.Add(this.label7);
this.Controls.Add(this.SetThicknessTextBox);
this.Controls.Add(this.label5);
this.Controls.Add(this.IsUseCheckBox);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.RecipeCodeTextBox);
this.Controls.Add(this.label1);
@ -422,7 +408,6 @@
private System.Windows.Forms.ComboBox MaterialNameComboBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox IsUseCheckBox;
private System.Windows.Forms.TextBox SetThicknessTextBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox SetWidthTextBox;

@ -114,7 +114,7 @@ namespace HighWayIot.Winform.UserControlPages.RecipeConfigPages
MaterialCode = MaterialCodeComboBox.Text.Trim(),
MaterialName = MaterialNameComboBox.Text.Trim(),
MaterialType = RubTypeCombobox.Text.Trim(),
IsUse = IsUseCheckBox.Checked,
IsUse = false,//IsUseCheckBox.Checked,
IsDeleted = false,
};

@ -31,8 +31,8 @@ namespace HighWayIot.Winform.UserControlPages
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.WeightDataGridView = new System.Windows.Forms.DataGridView();
this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MaterialCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -56,14 +56,6 @@ namespace HighWayIot.Winform.UserControlPages
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.RecipeDataGridView = new System.Windows.Forms.DataGridView();
this.RId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeSpecCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeSpecName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SizeKind = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.FixedWidth = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.WeightError = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
@ -168,6 +160,15 @@ namespace HighWayIot.Winform.UserControlPages
this.UpdateWeightButton = new System.Windows.Forms.Button();
this.AddWeightButton = new System.Windows.Forms.Button();
this.DeleteWeightButton = new System.Windows.Forms.Button();
this.RId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeSpecCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeSpecName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SizeKind = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.FixedWidth = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.WeightError = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.WeightDataGridView)).BeginInit();
this.ButtonPanel.SuspendLayout();
this.groupBox1.SuspendLayout();
@ -190,13 +191,13 @@ namespace HighWayIot.Winform.UserControlPages
this.WeightDataGridView.AllowUserToDeleteRows = false;
this.WeightDataGridView.AllowUserToResizeColumns = false;
this.WeightDataGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.WeightDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.WeightDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.WeightDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.WeightDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Id,
@ -425,14 +426,14 @@ namespace HighWayIot.Winform.UserControlPages
this.RecipeDataGridView.AllowUserToAddRows = false;
this.RecipeDataGridView.AllowUserToDeleteRows = false;
this.RecipeDataGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.RecipeDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.RecipeDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.RecipeDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.RecipeDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.RId,
@ -442,7 +443,8 @@ namespace HighWayIot.Winform.UserControlPages
this.RecipeSpecName,
this.SizeKind,
this.FixedWidth,
this.WeightError});
this.WeightError,
this.IsUse});
this.RecipeDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.RecipeDataGridView.Location = new System.Drawing.Point(3, 17);
this.RecipeDataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
@ -454,78 +456,6 @@ namespace HighWayIot.Winform.UserControlPages
this.RecipeDataGridView.Tag = "";
this.RecipeDataGridView.SelectionChanged += new System.EventHandler(this.RecipeDataGridView_SelectionChanged);
//
// RId
//
this.RId.DataPropertyName = "Id";
this.RId.HeaderText = "ID";
this.RId.Name = "RId";
this.RId.ReadOnly = true;
this.RId.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.RId.Width = 40;
//
// RecipeCode
//
this.RecipeCode.DataPropertyName = "RecipeCode";
this.RecipeCode.FillWeight = 52.74404F;
this.RecipeCode.HeaderText = "成品代号";
this.RecipeCode.Name = "RecipeCode";
this.RecipeCode.ReadOnly = true;
this.RecipeCode.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// RecipeName
//
this.RecipeName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeName.DataPropertyName = "RecipeName";
this.RecipeName.FillWeight = 52.74404F;
this.RecipeName.HeaderText = "标称尺度";
this.RecipeName.Name = "RecipeName";
this.RecipeName.ReadOnly = true;
this.RecipeName.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// RecipeSpecCode
//
this.RecipeSpecCode.DataPropertyName = "RecipeSpecCode";
this.RecipeSpecCode.FillWeight = 52.74404F;
this.RecipeSpecCode.HeaderText = "SPEC编号";
this.RecipeSpecCode.Name = "RecipeSpecCode";
this.RecipeSpecCode.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.RecipeSpecCode.Width = 90;
//
// RecipeSpecName
//
this.RecipeSpecName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeSpecName.DataPropertyName = "RecipeSpecName";
this.RecipeSpecName.FillWeight = 52.74404F;
this.RecipeSpecName.HeaderText = "SPEC名称";
this.RecipeSpecName.Name = "RecipeSpecName";
this.RecipeSpecName.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// SizeKind
//
this.SizeKind.DataPropertyName = "SizeKind";
this.SizeKind.FillWeight = 52.74404F;
this.SizeKind.HeaderText = "寸别";
this.SizeKind.Name = "SizeKind";
this.SizeKind.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.SizeKind.Width = 40;
//
// FixedWidth
//
this.FixedWidth.DataPropertyName = "FixedWidth";
this.FixedWidth.FillWeight = 137.1345F;
this.FixedWidth.HeaderText = "固定胶宽度";
this.FixedWidth.Name = "FixedWidth";
this.FixedWidth.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.FixedWidth.Width = 71;
//
// WeightError
//
this.WeightError.DataPropertyName = "WeightError";
this.WeightError.HeaderText = "重量公差";
this.WeightError.Name = "WeightError";
this.WeightError.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.WeightError.Width = 59;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -1650,6 +1580,87 @@ namespace HighWayIot.Winform.UserControlPages
this.DeleteWeightButton.UseVisualStyleBackColor = true;
this.DeleteWeightButton.Click += new System.EventHandler(this.DeleteWeightButton_Click);
//
// RId
//
this.RId.DataPropertyName = "Id";
this.RId.HeaderText = "ID";
this.RId.Name = "RId";
this.RId.ReadOnly = true;
this.RId.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.RId.Width = 40;
//
// RecipeCode
//
this.RecipeCode.DataPropertyName = "RecipeCode";
this.RecipeCode.FillWeight = 52.74404F;
this.RecipeCode.HeaderText = "成品代号";
this.RecipeCode.Name = "RecipeCode";
this.RecipeCode.ReadOnly = true;
this.RecipeCode.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// RecipeName
//
this.RecipeName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeName.DataPropertyName = "RecipeName";
this.RecipeName.FillWeight = 52.74404F;
this.RecipeName.HeaderText = "标称尺度";
this.RecipeName.Name = "RecipeName";
this.RecipeName.ReadOnly = true;
this.RecipeName.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// RecipeSpecCode
//
this.RecipeSpecCode.DataPropertyName = "RecipeSpecCode";
this.RecipeSpecCode.FillWeight = 52.74404F;
this.RecipeSpecCode.HeaderText = "SPEC编号";
this.RecipeSpecCode.Name = "RecipeSpecCode";
this.RecipeSpecCode.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.RecipeSpecCode.Width = 90;
//
// RecipeSpecName
//
this.RecipeSpecName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeSpecName.DataPropertyName = "RecipeSpecName";
this.RecipeSpecName.FillWeight = 52.74404F;
this.RecipeSpecName.HeaderText = "SPEC名称";
this.RecipeSpecName.Name = "RecipeSpecName";
this.RecipeSpecName.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// SizeKind
//
this.SizeKind.DataPropertyName = "SizeKind";
this.SizeKind.FillWeight = 52.74404F;
this.SizeKind.HeaderText = "寸别";
this.SizeKind.Name = "SizeKind";
this.SizeKind.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.SizeKind.Width = 40;
//
// FixedWidth
//
this.FixedWidth.DataPropertyName = "FixedWidth";
this.FixedWidth.FillWeight = 137.1345F;
this.FixedWidth.HeaderText = "固定胶宽度";
this.FixedWidth.Name = "FixedWidth";
this.FixedWidth.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.FixedWidth.Width = 71;
//
// WeightError
//
this.WeightError.DataPropertyName = "WeightError";
this.WeightError.HeaderText = "重量公差";
this.WeightError.Name = "WeightError";
this.WeightError.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.WeightError.Width = 59;
//
// IsUse
//
this.IsUse.DataPropertyName = "IsUse";
this.IsUse.HeaderText = "同步标识";
this.IsUse.Name = "IsUse";
this.IsUse.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.IsUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.IsUse.Width = 59;
//
// RecipeConfigPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -1822,5 +1833,6 @@ namespace HighWayIot.Winform.UserControlPages
private DataGridViewTextBoxColumn SizeKind;
private DataGridViewTextBoxColumn FixedWidth;
private DataGridViewTextBoxColumn WeightError;
private DataGridViewCheckBoxColumn IsUse;
}
}

@ -338,7 +338,7 @@ namespace HighWayIot.Winform.UserControlPages
entity.FixedWidth = int.Parse(Convert.ToString(nowRow.Cells["FixedWidth"].Value) ?? "0");
entity.WeightError = float.Parse(Convert.ToString(nowRow.Cells["WeightError"].Value) ?? "0");
//entity.BatchCode = nowRow.Cells["BatchCode"].Value.ToString().Trim();
//entity.IsUse = bool.Parse(Convert.ToString(nowRow.Cells["IsUse"].Value) ?? "0");
entity.IsUse = bool.Parse(Convert.ToString(nowRow.Cells["IsUse"].Value) ?? "0");
entity.IsDeleted = false;
}
catch (Exception ex)
@ -351,11 +351,14 @@ namespace HighWayIot.Winform.UserControlPages
{
//PLC字段更新
ZxRecipeParaEntity paraentity = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(entity.RecipeCode).FirstOrDefault();
paraentity.RimInch = entity.SizeKind;
paraentity.LightWidth = (int)entity.FixedWidth;
paraentity.SpecCode = entity.RecipeSpecName;
paraentity.SpecName = entity.RecipeSpecName;
zxRecipeParaService.UpdateRecipeParaInfo(paraentity);
if(paraentity != null)
{
paraentity.RimInch = entity.SizeKind;
paraentity.LightWidth = (int)entity.FixedWidth;
paraentity.SpecCode = entity.RecipeSpecName;
paraentity.SpecName = entity.RecipeSpecName;
zxRecipeParaService.UpdateRecipeParaInfo(paraentity);
}
MessageBox.Show("配方更新成功!");
SqlLogHelper.AddLog($"配方更新成功 [{NowRecipeCode}]");
}

@ -180,4 +180,7 @@
<metadata name="WeightError.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="IsUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
Loading…
Cancel
Save