diff --git a/HighWayIot.Plc/PlcHelper/RecipeParaHelper.cs b/HighWayIot.Plc/PlcHelper/RecipeParaHelper.cs
index a8dcc83..ecb59c5 100644
--- a/HighWayIot.Plc/PlcHelper/RecipeParaHelper.cs
+++ b/HighWayIot.Plc/PlcHelper/RecipeParaHelper.cs
@@ -32,12 +32,12 @@ namespace HighWayIot.Plc.PlcHelper
}
catch
{
- return false;
+ return false;
}
//SPEC名称写入
var specNameBytes = Encoding.ASCII.GetBytes(paraEntity.SpecName);
- Array.Copy(specNameBytes, 0, bytes, 0, specNameBytes.Length > 20 ? 20 : specNameBytes.Length);
+ Array.Copy(specNameBytes, 0, bytes, 0, specNameBytes.Length > 38 ? 38 : specNameBytes.Length);
//if (!PlcConnect.PlcWrite2("D290", paraEntity.SpecName, DataTypeEnum.String).IsSuccess)
// return false;
@@ -59,6 +59,18 @@ namespace HighWayIot.Plc.PlcHelper
bitDatas[1] = bitDatas[1].SetBoolByIndex(0, paraEntity.S9 ?? false);
ushort bitData = bitDatas.FromBytes();
+ byte[] sideBytes = new byte[2];
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(0, paraEntity.B0 ?? false);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(1, paraEntity.B1 ?? false);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(2, paraEntity.B2 ?? false);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(3, paraEntity.B3 ?? false);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(4, paraEntity.B4 ?? false);
+ 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);
+
//if (!PlcConnect.PlcWrite2("D390", bitData, DataTypeEnum.UInt16).IsSuccess)
// return false;
@@ -85,7 +97,15 @@ namespace HighWayIot.Plc.PlcHelper
Array.Copy(bytes5, 0, bytes, (394 - 290) * 2, bytes5.Length);
Array.Copy(bytes6, 0, bytes, (398 - 290) * 2, bytes6.Length);
- return PlcConnect.PlcWriteBytes2("D290", bytes).IsSuccess;
+ if (!PlcConnect.PlcWriteBytes2("D290", bytes).IsSuccess)
+ {
+ return false;
+ }
+ if (!PlcConnect.PlcWriteBytes2("D409", sideBytes).IsSuccess)
+ {
+ return false;
+ }
+ return true;
}
///
@@ -194,11 +214,11 @@ namespace HighWayIot.Plc.PlcHelper
return new List();
}
- //读取SPEC编号
- paraEntity.SpecCode = PlcConnect.ReadUInt322("D206").Content.ToString();
+ //读取标称尺度
+ paraEntity.RecipeCode = PlcConnect.ReadString2("D206", 10).Content.ToString();
//读取SPEC名称
- paraEntity.SpecName = PlcConnect.MelsecInstance2.ByteTransform.TransString(data, 0, 10, Encoding.ASCII);
+ paraEntity.SpecName = PlcConnect.MelsecInstance2.ByteTransform.TransString(data, 0, 19, Encoding.ASCII);
//读取工位参数
List positionEntitys = SelectReadPositionPara(data);
@@ -214,6 +234,22 @@ namespace HighWayIot.Plc.PlcHelper
paraEntity.S7 = bitDatas[0].GetBoolByIndex(6);
paraEntity.S8 = bitDatas[0].GetBoolByIndex(7);
paraEntity.S9 = bitDatas[1].GetBoolByIndex(0);//390.8
+ OperateResult sideResult = PlcConnect.ReadByte2("D409", 1);
+ byte[] sideData;
+ if (sideResult.IsSuccess)
+ {
+ sideData = sideResult.Content;
+ paraEntity.B0 = sideData[0].GetBoolByIndex(0);
+ paraEntity.B1 = sideData[0].GetBoolByIndex(1);
+ paraEntity.B2 = sideData[0].GetBoolByIndex(2);
+ paraEntity.B3 = sideData[0].GetBoolByIndex(3);
+ paraEntity.B4 = sideData[0].GetBoolByIndex(4);
+ paraEntity.B5 = sideData[0].GetBoolByIndex(5);
+ paraEntity.B6 = sideData[0].GetBoolByIndex(6);
+ paraEntity.B7 = sideData[0].GetBoolByIndex(7);
+ paraEntity.B8 = sideData[1].GetBoolByIndex(0);
+ paraEntity.B9 = sideData[1].GetBoolByIndex(1);
+ }
paraEntity.RimInch = PlcConnect.MelsecInstance2.ByteTransform.TransInt16(data, (391 - 290) * 2);//("D391");
paraEntity.LightWidth = PlcConnect.MelsecInstance2.ByteTransform.TransInt16(data, (392 - 290) * 2);//("D392");
diff --git a/HighWayIot.Plc/PlcHelper/RecipeSignal.cs b/HighWayIot.Plc/PlcHelper/RecipeSignal.cs
index e974c7f..6ab5f3c 100644
--- a/HighWayIot.Plc/PlcHelper/RecipeSignal.cs
+++ b/HighWayIot.Plc/PlcHelper/RecipeSignal.cs
@@ -22,7 +22,7 @@ namespace HighWayIot.Plc.PlcHelper
if (!operateResult.IsSuccess)
{
- LogHelper.Instance.Error("排程监视信息读取失败");
+ LogHelper.Instance.Error("排程监视PLC点位读取失败,检查PLC连接情况");
return null;
}
diff --git a/HighWayIot.Plc/PlcHelper/TransferSingal.cs b/HighWayIot.Plc/PlcHelper/TransferSingal.cs
index 85accbe..62aa23b 100644
--- a/HighWayIot.Plc/PlcHelper/TransferSingal.cs
+++ b/HighWayIot.Plc/PlcHelper/TransferSingal.cs
@@ -14,164 +14,189 @@ namespace HighWayIot.Plc.PlcHelper
public class TransferSingal
{
///
- /// 工位贴合开始信号写入
+ /// 读取工位报表信号
///
- ///
///
- public bool WriteStationStickSingal(int stationNo)
+ public byte[] ReadStationReportSignal()
{
- bool result = false;
-
- switch (stationNo)
- {
- case 1:
- result = PlcConnect.PlcWrite2("B201", true, DataTypeEnum.Bool).IsSuccess;
- break;
- case 2:
- result = PlcConnect.PlcWrite2("B202", true, DataTypeEnum.Bool).IsSuccess;
- break;
- case 3:
- result = PlcConnect.PlcWrite2("B203", true, DataTypeEnum.Bool).IsSuccess;
- break;
- case 4:
- result = PlcConnect.PlcWrite2("B205", true, DataTypeEnum.Bool).IsSuccess;
- break;
- case 5:
- result = PlcConnect.PlcWrite2("B207", true, DataTypeEnum.Bool).IsSuccess;
- break;
- default:
- break;
- }
-
- return result;
- }
-
-
- ///
- /// 工位贴合计数开始信号写入
- ///
- ///
- ///
- public bool WriteStationStickCountSingal(int stationNo)
- {
- bool result = false;
-
- switch (stationNo)
- {
- case 1:
- result = PlcConnect.PlcWrite2("B211", true, DataTypeEnum.Bool).IsSuccess;
- break;
- case 2:
- result = PlcConnect.PlcWrite2("B212", true, DataTypeEnum.Bool).IsSuccess;
- break;
- case 3:
- result = PlcConnect.PlcWrite2("B213", true, DataTypeEnum.Bool).IsSuccess;
- break;
- case 4:
- result = PlcConnect.PlcWrite2("B215", true, DataTypeEnum.Bool).IsSuccess;
- break;
- case 5:
- result = PlcConnect.PlcWrite2("B217", true, DataTypeEnum.Bool).IsSuccess;
- break;
- default:
- break;
- }
-
- return result;
- }
-
- ///
- /// 读取小车就绪信号(开始贴合) 鼓到位信号读取(开始横裁信号)和贴合计数信号读取(横裁结束信号)
- ///
- /// 第一个Byte数组是第二个Byte数组是开始横裁信号,第三个是结束横裁信号
- public bool[][] ReadDrumReadyAndCountReadySignal()
- {
- OperateResult operateResult = PlcConnect.ReadByte2("B980", 3);
-
+ OperateResult operateResult = PlcConnect.ReadByte2("D3001", 30);
if (!operateResult.IsSuccess)
{
return null;
}
- byte[] data = operateResult.Content;
- bool[][] result = new bool[3][];
- result[0] = new bool[9];
- result[1] = new bool[8];
- result[2] = new bool[8];
- //12345工位小车就绪
- for (int i = 0; i < 6; i++)
- {
- result[0][i] = data[0].GetBoolByIndex(i);
- }
- //345称重工位就绪
- for (int i = 0; i < 3; i++)
- {
- result[0][i + 6] = data[1].GetBoolByIndex(i);
- }
- //开始和结束横裁的信号
- for (int i = 0; i < 8; i++)
- {
- result[1][i + 1] = data[2].GetBoolByIndex(i);
- result[2][i + 1] = data[4].GetBoolByIndex(i);
- }
-
- return result;
+ return operateResult.Content;
}
///
- /// 监控中转信号
+ /// 复位工位小车结束信号
///
+ ///
///
- public bool[][] ReadMonitorSingal()
+ public bool WriteStationReportSignal(int No)
{
- OperateResult operateResult = PlcConnect.ReadByte2("B9B1", 5);
-
- if (!operateResult.IsSuccess)
- {
- return null;
- }
-
- byte[] data = operateResult.Content;
- bool[][] result = new bool[5][];
- for (int i = 0; i < 5; i++)
- {
- result[i] = new bool[5];
- for (int j = 0; j < 5; j++)
- {
- result[i][j] = data[i * 2].GetBoolByIndex(j);
- }
- }
-
- return result;
+ return PlcConnect.PlcWrite2($"D301{No}", 0, DataTypeEnum.UInt16).IsSuccess;
}
- ///
- /// 监控工位配方信息
- ///
- ///
- public List ReadStationRecipeInfo()
- {
- OperateResult operateResult = PlcConnect.ReadByte2("W950", 80);
- if (!operateResult.IsSuccess)
- {
- return null;
- }
+ /////
+ ///// 工位贴合开始信号写入
+ /////
+ /////
+ /////
+ //public bool WriteStationStickSingal(int stationNo)
+ //{
+ // bool result = false;
- byte[] data = operateResult.Content;
- List resultList = new List();
+ // switch (stationNo)
+ // {
+ // case 1:
+ // result = PlcConnect.PlcWrite2("B201", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // case 2:
+ // result = PlcConnect.PlcWrite2("B202", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // case 3:
+ // result = PlcConnect.PlcWrite2("B203", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // case 4:
+ // result = PlcConnect.PlcWrite2("B205", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // case 5:
+ // result = PlcConnect.PlcWrite2("B207", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // default:
+ // break;
+ // }
- for (int i = 0; i < 5; i++)
- {
- resultList.Add(new StationRecipeEntity()
- {
- StationRecipeDescripe = PlcConnect.MelsecInstance2.ByteTransform.TransString(data, (i * 16) + 0, 20, Encoding.ASCII),
- StationRecipeNo = PlcConnect.MelsecInstance2.ByteTransform.TransInt16(data, (i * 16) + 20),
- StationVehicleNo = PlcConnect.MelsecInstance2.ByteTransform.TransInt16(data, (i * 16) + 22),
- StationTireWeight = PlcConnect.MelsecInstance2.ByteTransform.TransSingle(data, (i * 16) + 24),
- });
- }
+ // return result;
+ //}
- return resultList;
- }
+
+ /////
+ ///// 工位贴合计数开始信号写入
+ /////
+ /////
+ /////
+ //public bool WriteStationStickCountSingal(int stationNo)
+ //{
+ // bool result = false;
+
+ // switch (stationNo)
+ // {
+ // case 1:
+ // result = PlcConnect.PlcWrite2("B211", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // case 2:
+ // result = PlcConnect.PlcWrite2("B212", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // case 3:
+ // result = PlcConnect.PlcWrite2("B213", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // case 4:
+ // result = PlcConnect.PlcWrite2("B215", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // case 5:
+ // result = PlcConnect.PlcWrite2("B217", true, DataTypeEnum.Bool).IsSuccess;
+ // break;
+ // default:
+ // break;
+ // }
+
+ // return result;
+ //}
+
+ /////
+ ///// 读取小车就绪信号(开始贴合) 鼓到位信号读取(开始横裁信号)和贴合计数信号读取(横裁结束信号)
+ /////
+ ///// 第一个Byte数组是第二个Byte数组是开始横裁信号,第三个是结束横裁信号
+ //public bool[][] ReadDrumReadyAndCountReadySignal()
+ //{
+ // OperateResult operateResult = PlcConnect.ReadByte2("B980", 3);
+
+ // if (!operateResult.IsSuccess)
+ // {
+ // return null;
+ // }
+ // byte[] data = operateResult.Content;
+ // bool[][] result = new bool[3][];
+ // result[0] = new bool[9];
+ // result[1] = new bool[8];
+ // result[2] = new bool[8];
+ // //12345工位小车就绪
+ // for (int i = 0; i < 6; i++)
+ // {
+ // result[0][i] = data[0].GetBoolByIndex(i);
+ // }
+ // //345称重工位就绪
+ // for (int i = 0; i < 3; i++)
+ // {
+ // result[0][i + 6] = data[1].GetBoolByIndex(i);
+ // }
+ // //开始和结束横裁的信号
+ // for (int i = 0; i < 8; i++)
+ // {
+ // result[1][i + 1] = data[2].GetBoolByIndex(i);
+ // result[2][i + 1] = data[4].GetBoolByIndex(i);
+ // }
+
+ // return result;
+ //}
+
+ /////
+ ///// 监控中转信号
+ /////
+ /////
+ //public bool[][] ReadMonitorSingal()
+ //{
+ // OperateResult operateResult = PlcConnect.ReadByte2("B9B1", 5);
+
+ // if (!operateResult.IsSuccess)
+ // {
+ // return null;
+ // }
+
+ // byte[] data = operateResult.Content;
+ // bool[][] result = new bool[5][];
+ // for (int i = 0; i < 5; i++)
+ // {
+ // result[i] = new bool[5];
+ // for (int j = 0; j < 5; j++)
+ // {
+ // result[i][j] = data[i * 2].GetBoolByIndex(j);
+ // }
+ // }
+
+ // return result;
+ //}
+
+ /////
+ ///// 监控工位配方信息
+ /////
+ /////
+ //public List ReadStationRecipeInfo()
+ //{
+ // OperateResult operateResult = PlcConnect.ReadByte2("W950", 80);
+
+ // if (!operateResult.IsSuccess)
+ // {
+ // return null;
+ // }
+
+ // byte[] data = operateResult.Content;
+ // List resultList = new List();
+
+ // for (int i = 0; i < 5; i++)
+ // {
+ // resultList.Add(new StationRecipeEntity()
+ // {
+ // StationRecipeDescripe = PlcConnect.MelsecInstance2.ByteTransform.TransString(data, (i * 16) + 0, 20, Encoding.ASCII),
+ // StationRecipeNo = PlcConnect.MelsecInstance2.ByteTransform.TransInt16(data, (i * 16) + 20),
+ // StationVehicleNo = PlcConnect.MelsecInstance2.ByteTransform.TransInt16(data, (i * 16) + 22),
+ // StationTireWeight = PlcConnect.MelsecInstance2.ByteTransform.TransSingle(data, (i * 16) + 24),
+ // });
+ // }
+
+ // return resultList;
+ //}
}
}
diff --git a/HighWayIot.Repository/domain/MonitorDataSource.cs b/HighWayIot.Repository/domain/MonitorDataSource.cs
index 22ce400..288870d 100644
--- a/HighWayIot.Repository/domain/MonitorDataSource.cs
+++ b/HighWayIot.Repository/domain/MonitorDataSource.cs
@@ -47,7 +47,7 @@ namespace HighWayIot.Repository.domain
/// 备 注:小车编号
/// 默认值:
///
- public int? DeviceNo { get; set; }
+ public string DeviceNo { get; set; } = string.Empty;
///
/// 备 注:生胎重量
@@ -70,6 +70,14 @@ namespace HighWayIot.Repository.domain
///
public string FaceRubTimeSpan { get; set; } = string.Empty;
+ ///
+ /// 复重重量
+ ///
+ public int? RepeatWeight { get; set; }
+ ///
+ /// 是否已完成
+ ///
+ public string IsDone { get; set; } = string.Empty;
}
}
diff --git a/HighWayIot.Repository/domain/ZxMesPlanTransferEntity.cs b/HighWayIot.Repository/domain/ZxMesPlanTransferEntity.cs
index ea5553d..83b8e8e 100644
--- a/HighWayIot.Repository/domain/ZxMesPlanTransferEntity.cs
+++ b/HighWayIot.Repository/domain/ZxMesPlanTransferEntity.cs
@@ -54,6 +54,13 @@ namespace HighWayIot.Repository.domain
[SugarColumn(ColumnName = "spec_code")]
public string SpecCode { get; set; } = string.Empty;
+ ///
+ /// 备 注:更新时间
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "sync_time")]
+ public DateTime? SyncTime { get; set; }
+
///
/// 备 注:钢圈尺寸
/// 默认值:
@@ -73,7 +80,7 @@ namespace HighWayIot.Repository.domain
/// 默认值:
///
[SugarColumn(ColumnName = "tire_weight")]
- public float? TireWeight { get; set; }
+ public int? TireWeight { get; set; }
///
/// 备 注:物料名称1基部胶
@@ -90,18 +97,39 @@ namespace HighWayIot.Repository.domain
public int? MaterialLayers1 { get; set; }
///
- /// 备 注:重量1基部胶
+ /// 备 注:贴合层数1基部胶2
/// 默认值:
///
- [SugarColumn(ColumnName = "material_weight_1")]
- public double? MaterialWeight1 { get; set; }
+ [SugarColumn(ColumnName = "material_layers_1_2")]
+ public int? MaterialLayers12 { get; set; }
+
+ ///
+ /// 备 注:贴合层数1基部胶3
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "material_layers_1_3")]
+ public int? MaterialLayers13 { get; set; }
///
/// 备 注:宽度1基部胶
/// 默认值:
///
[SugarColumn(ColumnName = "material_width_1")]
- public double? MaterialWidth1 { get; set; }
+ public int? MaterialWidth1 { get; set; }
+
+ ///
+ /// 备 注:宽度1基部胶2
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "material_width_1_2")]
+ public int? MaterialWidth12 { get; set; }
+
+ ///
+ /// 备 注:宽度1基部胶3
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "material_width_1_3")]
+ public int? MaterialWidth13 { get; set; }
///
/// 备 注:物料名称2缓冲胶
@@ -117,19 +145,40 @@ namespace HighWayIot.Repository.domain
[SugarColumn(ColumnName = "material_layers_2")]
public int? MaterialLayers2 { get; set; }
- ///
- /// 备 注:重量2缓冲胶
+ ///
+ /// 备 注:贴合层数2缓冲胶2
/// 默认值:
///
- [SugarColumn(ColumnName = "material_weight_2")]
- public double? MaterialWeight2 { get; set; }
+ [SugarColumn(ColumnName = "material_layers_2_2")]
+ public int? MaterialLayers22 { get; set; }
+
+ ///
+ /// 备 注:贴合层数2缓冲胶3
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "material_layers_2_3")]
+ public int? MaterialLayers23 { get; set; }
///
/// 备 注:宽度2缓冲胶
/// 默认值:
///
[SugarColumn(ColumnName = "material_width_2")]
- public double? MaterialWidth2 { get; set; }
+ public int? MaterialWidth2 { get; set; }
+
+ ///
+ /// 备 注:宽度2缓冲胶2
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "material_width_2_2")]
+ public int? MaterialWidth22 { get; set; }
+
+ ///
+ /// 备 注:宽度2缓冲胶3
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "material_width_2_3")]
+ public int? MaterialWidth23 { get; set; }
///
/// 备 注:物料名称3胎面胶
@@ -146,53 +195,39 @@ namespace HighWayIot.Repository.domain
public int? MaterialLayers3 { get; set; }
///
- /// 备 注:重量3胎面胶
- /// 默认值:
- ///
- [SugarColumn(ColumnName = "material_weight_3")]
- public double? MaterialWeight3 { get; set; }
-
- ///
- /// 备 注:宽度3胎面胶
- /// 默认值:
- ///
- [SugarColumn(ColumnName = "material_width_3")]
- public double? MaterialWidth3 { get; set; }
-
- ///
- /// 备 注:更新时间
- /// 默认值:
- ///
- [SugarColumn(ColumnName = "sync_time")]
- public DateTime? SyncTime { get; set; }
-
- ///
- /// 备 注:贴合层数1基部胶
- /// 默认值:
- ///
- [SugarColumn(ColumnName = "material_layers_1_2")]
- public int? MaterialLayers12 { get; set; }
-
- ///
- /// 备 注:宽度1基部胶
- /// 默认值:
- ///
- [SugarColumn(ColumnName = "material_width_1_2")]
- public double? MaterialWidth12 { get; set; }
-
- ///
- /// 备 注:贴合层数3胎面胶
+ /// 备 注:贴合层数3胎面胶2
/// 默认值:
///
[SugarColumn(ColumnName = "material_layers_3_2")]
public int? MaterialLayers32 { get; set; }
+ ///
+ /// 备 注:贴合层数3胎面胶3
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "material_layers_3_3")]
+ public int? MaterialLayers33 { get; set; }
+
///
/// 备 注:宽度3胎面胶
/// 默认值:
///
+ [SugarColumn(ColumnName = "material_width_3")]
+ public int? MaterialWidth3 { get; set; }
+
+ ///
+ /// 备 注:宽度3胎面胶2
+ /// 默认值:
+ ///
[SugarColumn(ColumnName = "material_width_3_2")]
- public double? MaterialWidth32 { get; set; }
+ public int? MaterialWidth32 { get; set; }
+
+ ///
+ /// 备 注:宽度3胎面胶3
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "material_width_3_3")]
+ public int? MaterialWidth33 { get; set; }
}
diff --git a/HighWayIot.Repository/domain/ZxRecipeEntity.cs b/HighWayIot.Repository/domain/ZxRecipeEntity.cs
index a07b536..e113e7f 100644
--- a/HighWayIot.Repository/domain/ZxRecipeEntity.cs
+++ b/HighWayIot.Repository/domain/ZxRecipeEntity.cs
@@ -57,14 +57,21 @@ namespace Models
/// 默认值:
///
[SugarColumn(ColumnName = "fixed_width")]
- public decimal? FixedWidth { get; set; }
+ public int? FixedWidth { get; set; }
+
+ /////
+ ///// 备 注:批次号
+ ///// 默认值:
+ /////
+ //[SugarColumn(ColumnName = "batch_code")]
+ //public string BatchCode { get; set; } = string.Empty;
///
/// 备 注:重量公差(%)
/// 默认值:
///
[SugarColumn(ColumnName = "weight_error")]
- public int? WeightError { get; set; }
+ public float? WeightError { get; set; }
///
/// 备 注:是否使用
@@ -80,7 +87,5 @@ namespace Models
[SugarColumn(ColumnName = "is_deleted")]
public bool? IsDeleted { get; set; }
-
}
-
}
\ No newline at end of file
diff --git a/HighWayIot.Repository/domain/ZxRecipeParaEntity.cs b/HighWayIot.Repository/domain/ZxRecipeParaEntity.cs
index 56ee2fa..c2eaf5d 100644
--- a/HighWayIot.Repository/domain/ZxRecipeParaEntity.cs
+++ b/HighWayIot.Repository/domain/ZxRecipeParaEntity.cs
@@ -144,6 +144,76 @@ namespace Models
[SugarColumn(ColumnName = "S9")]
public bool? S9 { get; set; }
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B0")]
+ public bool? B0 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B1")]
+ public bool? B1 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B2")]
+ public bool? B2 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B3")]
+ public bool? B3 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B4")]
+ public bool? B4 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B5")]
+ public bool? B5 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B6")]
+ public bool? B6 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B7")]
+ public bool? B7 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B8")]
+ public bool? B8 { get; set; }
+
+ ///
+ /// 备 注:
+ /// 默认值:
+ ///
+ [SugarColumn(ColumnName = "B9")]
+ public bool? B9 { get; set; }
+
}
diff --git a/HighWayIot.Repository/domain/ZxSchedulingEntity.cs b/HighWayIot.Repository/domain/ZxSchedulingEntity.cs
index ed22b36..445dc64 100644
--- a/HighWayIot.Repository/domain/ZxSchedulingEntity.cs
+++ b/HighWayIot.Repository/domain/ZxSchedulingEntity.cs
@@ -38,6 +38,13 @@ namespace Models
[SugarColumn(ColumnName = "recipe_no_1")]
public string RecipeCode1 { get; set; } = string.Empty;
+ /////
+ ///// 备 注:批次号1
+ ///// 默认值:
+ /////
+ //[SugarColumn(ColumnName = "batch_code_1")]
+ //public string BatchCode1 { get; set; } = string.Empty;
+
///
/// 备 注:成品代号2
/// 默认值:
@@ -51,6 +58,15 @@ namespace Models
///
[SugarColumn(ColumnName = "recipe_no_2")]
public string RecipeCode2 { get; set; } = string.Empty;
+
+ /////
+ ///// 备 注:批次号2
+ ///// 默认值:
+ /////
+ //[SugarColumn(ColumnName = "batch_code_2")]
+ //public string BatchCode2 { get; set; } = string.Empty;
+
+
}
}
\ No newline at end of file
diff --git a/HighWayIot.Repository/domain/ZxWeightEntity.cs b/HighWayIot.Repository/domain/ZxWeightEntity.cs
index fc9c251..1235c6f 100644
--- a/HighWayIot.Repository/domain/ZxWeightEntity.cs
+++ b/HighWayIot.Repository/domain/ZxWeightEntity.cs
@@ -59,21 +59,21 @@ namespace Models
/// 默认值:
///
[SugarColumn(ColumnName = "set_width")]
- public decimal? SetWidth { get; set; }
+ public int? SetWidth { get; set; }
///
/// 备 注:宽度2
/// 默认值:
///
[SugarColumn(ColumnName = "set_width_2")]
- public decimal? SetWidth2 { get; set; }
+ public int? SetWidth2 { get; set; }
///
/// 备 注:宽度3
/// 默认值:
///
[SugarColumn(ColumnName = "set_width_3")]
- public decimal? SetWidth3 { get; set; }
+ public int? SetWidth3 { get; set; }
///
/// 备 注:层数
@@ -101,7 +101,7 @@ namespace Models
/// 默认值:
///
[SugarColumn(ColumnName = "set_weight")]
- public decimal? SetWeight { get; set; }
+ public int? SetWeight { get; set; }
///
/// 备 注:公差
diff --git a/HighWayIot.Repository/service/ZxDailyReportService.cs b/HighWayIot.Repository/service/ZxDailyReportService.cs
index 47c6584..ede15ba 100644
--- a/HighWayIot.Repository/service/ZxDailyReportService.cs
+++ b/HighWayIot.Repository/service/ZxDailyReportService.cs
@@ -33,20 +33,41 @@ namespace HighWayIot.Repository.service
/// 查询报表信息
///
///
- public List Get25DailyReportInfos()
+ public List Get30DailyReportInfos()
{
try
{
List entity =
_repository.AsQueryable()
.OrderByDescending(x => x.StartTime)
- .Take(25)
+ .Take(30)
.ToList();
return entity;
}
catch (Exception ex)
{
- log.Error("配方信息获取异常", ex);
+ log.Error("报表息获取异常", ex);
+ return null;
+ }
+ }
+
+ ///
+ /// 得到最近的一次符合条件的数据
+ ///
+ ///
+ public ZxDailyReportEntity GetNearData(int rgvNo)
+ {
+ try
+ {
+ ZxDailyReportEntity entity =
+ _repository.AsQueryable()
+ .OrderByDescending(x => x.StartTime)
+ .First(x => x.DeviceNo == rgvNo);
+ return entity;
+ }
+ catch (Exception ex)
+ {
+ log.Error("报表信息获取异常或无数据", ex);
return null;
}
}
@@ -65,7 +86,7 @@ namespace HighWayIot.Repository.service
}
catch(Exception ex)
{
- log.Error("配发信息获取异常", ex);
+ log.Error("报表信息获取异常", ex);
return null;
}
}
diff --git a/HighWayIot.Repository/service/ZxRecipeParaService.cs b/HighWayIot.Repository/service/ZxRecipeParaService.cs
index 71bf57e..815c723 100644
--- a/HighWayIot.Repository/service/ZxRecipeParaService.cs
+++ b/HighWayIot.Repository/service/ZxRecipeParaService.cs
@@ -80,6 +80,24 @@ namespace HighWayIot.Repository.service
}
}
+ ///
+ /// 修改配方字段信息
+ ///
+ ///
+ ///
+ public bool UpdateRangeRecipeParaInfo(List entity)
+ {
+ try
+ {
+ return _repository.UpdateRange(entity);
+ }
+ catch (Exception ex)
+ {
+ log.Error("配方字段信息修改异常", ex);
+ return false;
+ }
+ }
+
///
/// 添加配方字段信息
///
diff --git a/HighWayIot.Repository/service/ZxRecipePositionParaService.cs b/HighWayIot.Repository/service/ZxRecipePositionParaService.cs
index f4052ad..63809c2 100644
--- a/HighWayIot.Repository/service/ZxRecipePositionParaService.cs
+++ b/HighWayIot.Repository/service/ZxRecipePositionParaService.cs
@@ -99,6 +99,24 @@ namespace HighWayIot.Repository.service
}
}
+ ///
+ /// 修改工位配方字段信息
+ ///
+ ///
+ ///
+ public bool UpdateRecipePositionParaInfo(List entity)
+ {
+ try
+ {
+ return _repository.UpdateRange(entity);
+ }
+ catch (Exception ex)
+ {
+ log.Error("工位配方字段信息修改异常", ex);
+ return false;
+ }
+ }
+
///
/// 添加工位配方字段信息
///
diff --git a/HighWayIot.Repository/service/ZxRecipeService.cs b/HighWayIot.Repository/service/ZxRecipeService.cs
index e207c82..493dbed 100644
--- a/HighWayIot.Repository/service/ZxRecipeService.cs
+++ b/HighWayIot.Repository/service/ZxRecipeService.cs
@@ -6,6 +6,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
@@ -44,6 +45,20 @@ namespace HighWayIot.Repository.service
}
}
+ //public List GetSpecBatchCodeByRecipeCode(string recipeCode)
+ //{
+ // try
+ // {
+ // List entity = _repository.GetList(x => x.RecipeCode == recipeCode && x.IsDeleted == false).Select(x => x.)
+ // return entity;
+ // }
+ // catch (Exception ex)
+ // {
+ // log.Error("配方信息获取异常", ex);
+ // return null;
+ // }
+ //}
+
///
/// 根据配方编号查询配方信息
///
diff --git a/HighWayIot.Winform/Business/MonitorDataRefreshBusiness.cs b/HighWayIot.Winform/Business/MonitorDataRefreshBusiness.cs
new file mode 100644
index 0000000..0b38b0c
--- /dev/null
+++ b/HighWayIot.Winform/Business/MonitorDataRefreshBusiness.cs
@@ -0,0 +1,159 @@
+using HighWayIot.Plc;
+using HighWayIot.Plc.PlcHelper;
+using HighWayIot.Repository.domain;
+using HighWayIot.Repository.service;
+using HighWayIot.Winform.UserControlPages;
+using HslCommunication.Profinet.Keyence;
+using Models;
+using SixLabors.ImageSharp.PixelFormats;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace HighWayIot.Winform.Business
+{
+ ///
+ /// 报表数据刷新业务类
+ ///
+ public class MonitorDataRefreshBusiness
+ {
+ TransferSingal transferSingal = new TransferSingal();
+
+ private Timer refreshTimer;
+
+ public MonitorDataRefreshBusiness()
+ {
+ // 启动定时器,每隔1秒刷新一次报表数据
+ refreshTimer = new System.Threading.Timer(RefreshData, null, 0, 1000);
+ }
+
+ ///
+ /// 数据刷新
+ ///
+ ///
+ private void RefreshData(object o)
+ {
+ byte[] signals = transferSingal.ReadStationReportSignal();
+ if (signals == null)
+ {
+ return;
+ }
+
+ //解析返回的信号数据
+ ushort[] rgvNo = new ushort[7];
+ ushort[] rgvState = new ushort[7];
+ float[] weights = new float[4];
+
+ for (int i = 0; i < 7; i++)
+ {
+ rgvNo[i] = BitConverter.ToUInt16(signals, i * 2);
+ rgvState[i] = BitConverter.ToUInt16(signals, (i * 2) + 20);
+ if (i > 2)
+ {
+ weights[i - 3] = BitConverter.ToSingle(signals, ((i - 3) * 4) + 40);
+ }
+ }
+ //装圈工位
+ if (rgvState[0] == 1)
+ {
+ // 监控画面信息插入
+ MonitorInsert(RecipeSendBusiness.NowRecipeCode, RecipeSendBusiness.NowDeviceNo, rgvNo[0]);
+ MonitorMainPage.MonitorRefreshAction.Invoke();
+ transferSingal.WriteStationReportSignal(1); // 复位信号
+ }
+ //基部胶
+ if (rgvState[1] == 1)
+ {
+ ZxDailyReportEntity entity = ZxDailyReportService.Instance.GetNearData(rgvNo[1]);
+ if (entity == null)
+ {
+ goto n1;
+ }
+ entity.BaseEndTime = DateTime.Now;
+ ZxDailyReportService.Instance.UpdateDailyReportInfo(entity);
+ MonitorMainPage.MonitorRefreshAction.Invoke();
+ transferSingal.WriteStationReportSignal(2); // 复位信号
+ }
+ n1:
+
+ //中层胶
+ if (rgvState[2] == 1)
+ {
+ ZxDailyReportEntity entity = ZxDailyReportService.Instance.GetNearData(rgvNo[2]);
+ if(entity == null)
+ {
+ goto n2;
+ }
+ entity.MidEndTime = DateTime.Now;
+ ZxDailyReportService.Instance.UpdateDailyReportInfo(entity);
+ MonitorMainPage.MonitorRefreshAction.Invoke();
+ transferSingal.WriteStationReportSignal(3); // 复位信号
+ }
+ n2:
+
+ //胎面胶
+ for (int i = 3; i <= 5; i++)
+ {
+ if (rgvState[i] == 1)
+ {
+ // 监控画面信息插入
+ ZxDailyReportEntity entity = ZxDailyReportService.Instance.GetNearData(rgvNo[i]);
+ if (entity == null)
+ {
+ continue;
+ }
+ entity.BaseEndTime = DateTime.Now;
+ entity.RawTireWeight = (int)weights[i - 3];
+ ZxDailyReportService.Instance.UpdateDailyReportInfo(entity);
+ MonitorMainPage.MonitorRefreshAction.Invoke();
+ transferSingal.WriteStationReportSignal(i + 1); // 复位信号
+ }
+ }
+
+ //结束
+ if (rgvState[6] == 1)
+ {
+ ZxDailyReportEntity entity = ZxDailyReportService.Instance.GetNearData(rgvNo[6]);
+ entity.RepeatWeight = (int)weights[3];
+ entity.IsDone = 1;
+ ZxDailyReportService.Instance.UpdateDailyReportInfo(entity);
+ MonitorMainPage.MonitorRefreshAction.Invoke();
+ transferSingal.WriteStationReportSignal(7); // 复位信号
+
+ }
+ }
+
+ ///
+ /// 监控画面信息插入
+ ///
+ /// 机台号
+ /// 硫化机台编号
+ /// RGV编号
+ public void MonitorInsert(string recipeCode, string deviceNo, int rgvNo)
+ {
+ ZxRecipeEntity recipeEntity = ZxRecipeService.Instance.GetRecipeInfosByRecipeCode(recipeCode).FirstOrDefault();
+ if (recipeEntity == null)
+ {
+ return;
+ }
+
+ ZxDailyReportEntity entity = new ZxDailyReportEntity()
+ {
+ Uuid = Guid.NewGuid().ToString("N"),
+ VulcanizationNo = deviceNo,
+ StartTime = DateTime.Now,
+ RecipeName = recipeEntity.RecipeName,
+ RecipeCode = recipeEntity.RecipeCode,
+ SpecCode = recipeEntity.RecipeSpecCode,
+ DeviceNo = rgvNo,
+ RawTireWeight = (int)ZxRecipeParaService.Instance.GetRecipeParaInfoByRecipeCode(recipeCode).FirstOrDefault()?.TireWeight,
+ IsDone = 0
+ };
+
+ ZxDailyReportService.Instance.InsertDailyReportInfo(entity);
+ }
+ }
+}
diff --git a/HighWayIot.Winform/Business/RecipeMesSyncBusiness.cs b/HighWayIot.Winform/Business/RecipeMesSyncBusiness.cs
deleted file mode 100644
index e4ce089..0000000
--- a/HighWayIot.Winform/Business/RecipeMesSyncBusiness.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HighWayIot.Winform.Business
-{
- public class RecipeMesSyncBusiness
- {
-
- }
-}
diff --git a/HighWayIot.Winform/Business/RecipeParaSyncBusiness.cs b/HighWayIot.Winform/Business/RecipeParaSyncBusiness.cs
new file mode 100644
index 0000000..6b1ce15
--- /dev/null
+++ b/HighWayIot.Winform/Business/RecipeParaSyncBusiness.cs
@@ -0,0 +1,112 @@
+using HighWayIot.Plc;
+using HighWayIot.Plc.PlcHelper;
+using HighWayIot.Repository.domain;
+using HighWayIot.Repository.service;
+using HighWayIot.Winform.MainForm;
+using HslCommunication;
+using Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Timer = System.Threading.Timer;
+
+namespace HighWayIot.Winform.Business
+{
+ ///
+ /// 上位机配方同步业务类
+ ///
+ public class RecipeParaSyncBusiness
+ {
+ //private Timer _readSignalTimer;
+
+ //private RecipeParaHelper recipeParaHelper = new RecipeParaHelper();
+
+ //private ZxRecipeParaService zxRecipeParaService = ZxRecipeParaService.Instance;
+
+ //private ZxRecipePositionParaService zxRecipePositionParaService = ZxRecipePositionParaService.Instance;
+
+ //public RecipeParaSyncBusiness()
+ //{
+ // _readSignalTimer = new Timer(new System.Threading.TimerCallback(ReadSignal), null, 0, 1500);
+ //}
+
+ /////
+ ///// 读取某个点位
+ /////
+ /////
+ //private void ReadSignal(object o)
+ //{
+ // OperateResult boolReault = PlcConnect.ReadBool2("B100");
+ // if (!boolReault.IsSuccess)
+ // {
+ // return;
+ // }
+ // if (boolReault.Content)
+ // {
+ // PlcConnect.PlcWrite2("B100", false,DataTypeEnum.Bool); //写入完成信号
+ // SyncRecipe();
+ // }
+ //}
+
+ /////
+ ///// 配方同步
+ /////
+ //private void SyncRecipe()
+ //{
+ // ZxRecipeParaEntity recipeParaEntity = new ZxRecipeParaEntity();
+ // List positionParaEntities = recipeParaHelper.DownLoadFormPlc(ref recipeParaEntity);
+
+ // //查重
+ // var nowParaEntity = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeParaEntity.RecipeCode);
+ // var nowPositionParaEntity = zxRecipePositionParaService.GetRecipePositionParaInfoByRecipeCode(recipeParaEntity.RecipeCode);
+
+ // //保存公共参数
+ // if (nowParaEntity.Count == 0) //没有就插入
+ // {
+ // if (!zxRecipeParaService.InsertRecipeParaInfo(recipeParaEntity))
+ // {
+ // Log4net.LogHelper.Instance.Error("配方公共参数插入数据库失败");
+ // return;
+ // }
+ // }
+ // else //有就更新 多条更新第一条
+ // {
+ // recipeParaEntity.Id = nowParaEntity[0].Id;
+ // if (!zxRecipeParaService.UpdateRecipeParaInfo(recipeParaEntity))
+ // {
+ // Log4net.LogHelper.Instance.Error("配方公共参数更新数据库失败");
+ // return;
+ // }
+ // }
+
+
+ // //保存贴合参数
+ // var flag2 = true;
+ // foreach (var item in positionParaEntities)
+ // {
+ // item.RecipeCode = recipeParaEntity.RecipeCode;
+ // var count = positionParaEntities.Count(x => x.Position == item.Position);
+ // //如果没有
+ // if (count == 0)
+ // {
+ // flag2 = zxRecipePositionParaService.InsertRecipePositionParaInfo(item);
+ // }
+ // else //有 多条存第一条
+ // {
+ // item.Id = positionParaEntities.FirstOrDefault(x => x.Position == item.Position).Id;
+ // flag2 = zxRecipePositionParaService.UpdateRecipePositionParaInfo(item);
+
+ // if (count != 1) //多条提示
+ // {
+ // Log4net.LogHelper.Instance.Error($"配方贴合参数重复,配方号:{recipeParaEntity.RecipeCode},工位号:{item.Position}");
+ // }
+ // }
+ // if (!flag2) break;
+ // }
+ //}
+ }
+}
diff --git a/HighWayIot.Winform/Business/RecipeSendBusiness.cs b/HighWayIot.Winform/Business/RecipeSendBusiness.cs
index 921a00e..fa5bc03 100644
--- a/HighWayIot.Winform/Business/RecipeSendBusiness.cs
+++ b/HighWayIot.Winform/Business/RecipeSendBusiness.cs
@@ -32,19 +32,24 @@ namespace HighWayIot.Winform.Business
private RecipeParaHelper recipeParaHelper = new RecipeParaHelper();
- public static int RecipeNeededVehicleNo = 0;
-
+ public static bool RecipeSendMode = false;
+
+ public static string NowRecipeCode = string.Empty;
+
+ public static string NowDeviceNo = string.Empty;
+
public RecipeSendBusiness()
{
GetSchedulingTimer = new Timer(new System.Threading.TimerCallback(ReadSignal), null, 0, 1500);
}
-
///
/// 重复读取
///
///
public void ReadSignal(object o)
{
+ //读取是True的点位
+
Dictionary a = recipeSignal.ReadSchedulingSignal();
if (a == null)
@@ -60,91 +65,119 @@ namespace HighWayIot.Winform.Business
}
else
{
- if(ares.Count > 1)
+ if (ares.Count > 1)
{
- LogHelper.Instance.Error($"排程信号True值不唯一 {string.Join(", " , ares.Select(x => x.Key).ToList())}");
+ LogHelper.Instance.Error($"排程信号True值不唯一 {string.Join(", ", ares.Select(x => x.Key).ToList())}");
}
return;
}
- var schedulingInfo = zxSchedulingService.GetSchedulingInfo();
- string recipeNo;
- ZxRecipeParaEntity recipeParaInfo;
- List zxRecipePositionParaEntities;
- if ((destinationVulcanizationNo + 1) <= 62)
+ if (RecipeSendMode) //通过MES下配方
{
- recipeNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1).RecipeCode1;
- recipeParaInfo = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeNo).FirstOrDefault();
- zxRecipePositionParaEntities = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.RecipeCode == recipeNo);
- if (recipeParaInfo == null)
+ //读同步数据库,找到等于0的
+ List transferEntity = ZxMesPlanTransferService.Instance.GetRecipeInfos(x => x.RequestFlag == false).ToList();
+ if (transferEntity.Count > 1)
{
- LogHelper.Instance.Error("配方信息获取失败");
+ LogHelper.Instance.Error($"标识同步数据不唯一,请检查数据库,当前数量:{transferEntity.Count}");
return;
}
- if (recipeParaHelper.UploadToPLC(recipeParaInfo, zxRecipePositionParaEntities))
+ if (transferEntity.Count == 0)
{
- PlcConnect.PlcWrite2($"B{(destinationVulcanizationNo + 0x901).ToString("X")}", false, DataTypeEnum.Bool);
- int deviceNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1).DeviceNo ?? 0;
- //MonitorInsert(recipeNo, $"{deviceNo}上模");
- LogHelper.Instance.Info($"配方上传成功,配方号:{recipeNo},模具号:{deviceNo}上模");
+ LogHelper.Instance.Error("配方下发请求不存在,请检查数据库");
+ return;
+ }
+
+ //同步到配方(配方和称量,如果是新的加字段)
+ //////////////////////////////更新配方表/////////////////////////////////
+ //var newEneitys = RecipeLists.Where(x => x.RecipeCode == newRecipes.RecipeCode).ToList();
+ //if (newEneitys.Count > 0) //有就更新
+ //{
+ // //配方
+ // newEneitys[0].RecipeSpecCode = newRecipes.SpecCode;
+ // newEneitys[0].RecipeSpecName = newRecipes.SpecName;
+ // newEneitys[0].SizeKind = newRecipes.RimInch;
+ // newEneitys[0].FixedWidth = newRecipes.FixRubWidth;
+ // if (!zxRecipeService.UpdateRecipeInfo(newEneitys[0]))
+ // {
+ // return;
+ // }
+ //}
+ //else //没有就插入
+ //{
+ // ZxRecipeEntity entity = new ZxRecipeEntity()
+ // {
+ // RecipeName = newRecipes.RecipeName,
+ // RecipeCode = newRecipes.RecipeCode,
+ // RecipeSpecCode = newRecipes.SpecCode,
+ // RecipeSpecName = newRecipes.SpecName,
+ // SizeKind = newRecipes.RimInch,
+ // FixedWidth = newRecipes.FixRubWidth,
+ // IsUse = true,
+ // IsDeleted = false,
+ // };
+ // zxRecipeService.InsertRecipeInfo(entity);
+ //}
+
+ //同步到对应硫化排程的界面
+ //后续流程相同
+ }
+ else //手动下配方
+ {
+ var schedulingInfo = zxSchedulingService.GetSchedulingInfo();
+ string recipeNo;
+ ZxRecipeParaEntity recipeParaInfo;
+ List zxRecipePositionParaEntities;
+ if ((destinationVulcanizationNo + 1) <= 62)
+ {
+ recipeNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1).RecipeCode1;
+ recipeParaInfo = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeNo).FirstOrDefault();
+ zxRecipePositionParaEntities = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.RecipeCode == recipeNo);
+ if (recipeParaInfo == null)
+ {
+ LogHelper.Instance.Error("配方信息获取失败,请检查所选机台是否配置了相应配方");
+ return;
+ }
+ if (recipeParaHelper.UploadToPLC(recipeParaInfo, zxRecipePositionParaEntities))
+ {
+ //PlcConnect.PlcWrite2($"B{(destinationVulcanizationNo + 0x901).ToString("X")}", false, DataTypeEnum.Bool);
+ int deviceNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1).DeviceNo ?? 0;
+ //MonitorInsert(recipeNo, $"{deviceNo}上模");
+ LogHelper.Instance.Info($"配方上传成功,配方号:{recipeNo},模具号:{deviceNo}上模");
+ NowRecipeCode = recipeNo;
+ NowDeviceNo = deviceNo + "-2";
+ }
+ else
+ {
+ LogHelper.Instance.Error("配方上传失败,检查PLC连接");
+ return;
+ }
}
else
{
- LogHelper.Instance.Error("配方上传失败");
- return;
+ recipeNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1 - 62).RecipeCode2;
+ recipeParaInfo = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeNo).FirstOrDefault();
+ zxRecipePositionParaEntities = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.RecipeCode == recipeNo);
+ if (recipeParaInfo == null)
+ {
+ LogHelper.Instance.Error("配方信息获取失败,请检查所选机台是否配置了相应配方");
+ return;
+ }
+ if (recipeParaHelper.UploadToPLC(recipeParaInfo, zxRecipePositionParaEntities))
+ {
+ //PlcConnect.PlcWrite2($"B{(destinationVulcanizationNo - 62 + 0x941).ToString("X")}", false, DataTypeEnum.Bool);
+ int deviceNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1 - 62).DeviceNo ?? 0;
+ //MonitorInsert(recipeNo, $"{deviceNo}下模");
+ LogHelper.Instance.Info($"配方上传成功,配方号:{recipeNo},模具号:{deviceNo}下模");
+ NowRecipeCode = recipeNo;
+ NowDeviceNo = deviceNo + "-1";
+ }
+ else
+ {
+ LogHelper.Instance.Error("配方上传失败,检查PLC连接");
+ return;
+ }
}
}
- else
- {
- recipeNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1 - 62).RecipeCode2;
- recipeParaInfo = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeNo).FirstOrDefault();
- zxRecipePositionParaEntities = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.RecipeCode == recipeNo);
- if (recipeParaInfo == null)
- {
- LogHelper.Instance.Error("配方信息获取失败");
- return;
- }
- if (recipeParaHelper.UploadToPLC(recipeParaInfo, zxRecipePositionParaEntities))
- {
- PlcConnect.PlcWrite2($"B{(destinationVulcanizationNo - 62 + 0x941).ToString("X")}", false, DataTypeEnum.Bool);
- int deviceNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1 - 62).DeviceNo ?? 0;
- //MonitorInsert(recipeNo, $"{deviceNo}下模");
- LogHelper.Instance.Info($"配方上传成功,配方号:{recipeNo},模具号:{deviceNo}下模");
- }
- else
- {
- LogHelper.Instance.Error("配方上传失败");
- return;
- }
- }
-
- }
-
- ///
- /// 监控画面信息插入
- ///
- public void MonitorInsert(string recipeCode, string deviceNo)
- {
- ZxRecipeEntity recipeEntity = ZxRecipeService.Instance.GetRecipeInfosByRecipeCode(recipeCode).FirstOrDefault();
- if (recipeEntity == null)
- {
- return;
- }
-
- ZxDailyReportEntity entity = new ZxDailyReportEntity()
- {
- Uuid = Guid.NewGuid().ToString("N"),
- VulcanizationNo = deviceNo,
- StartTime = DateTime.Now,
- RecipeName = recipeEntity.RecipeName,
- RecipeCode = recipeEntity.RecipeCode,
- SpecCode = recipeEntity.RecipeSpecCode,
- DeviceNo = RecipeNeededVehicleNo,
- RawTireWeight = (int)ZxRecipeParaService.Instance.GetRecipeParaInfoByRecipeCode(recipeCode).FirstOrDefault()?.TireWeight,
- IsDone = 0
- };
-
- ZxDailyReportService.Instance.InsertDailyReportInfo(entity);
}
}
}
diff --git a/HighWayIot.Winform/Business/TCPClientFactory.cs b/HighWayIot.Winform/Business/TCPClientFactory.cs
index 84b846b..172c057 100644
--- a/HighWayIot.Winform/Business/TCPClientFactory.cs
+++ b/HighWayIot.Winform/Business/TCPClientFactory.cs
@@ -148,34 +148,12 @@ namespace HighWayIot.Winform.Business
try
{
- //记录当前配方对应的小车
- if (int.Parse(workstationNo) == 1)
- {
- RecipeSendBusiness.RecipeNeededVehicleNo = int.Parse(deviceNo);
- }
//如果对应位置成功写入,记录上次该工位写入的是该小车,如果下次还是,不再写入(防止重复写入)
int stationNo = int.Parse(workstationNo);
int vehicleNo = int.Parse(deviceNo);
- //if (StationRecord.ContainsKey(stationNo)) //判断上次是不是写入的该点位
- //{
- // //上次就写入的该车 就不继续写入了
- // if (StationRecord[stationNo] == vehicleNo)
- // {
- // return;
- // }
- //}
//写入对应的PLC信号
if (_workStationHelper.WriteStationSingal(stationNo, vehicleNo))
{
- ////写入成功后记录,上次已写入了该点位,不继续写入
- //if (StationRecord.ContainsKey(stationNo))
- //{
- // StationRecord[stationNo] = vehicleNo;
- //}
- //else
- //{
- // StationRecord.Add(stationNo, vehicleNo);
- //}
LogHelper.Instance.RfidLog($"{workstationNo}工位, {deviceNo}号车 写入成功[{DateTime.Now.ToString("yy-MM-dd HH:mm:ss:fff")}]");
}
else
diff --git a/HighWayIot.Winform/Business/WorkStationBusiness.cs b/HighWayIot.Winform/Business/WorkStationBusiness.cs
index c6c52b7..467db17 100644
--- a/HighWayIot.Winform/Business/WorkStationBusiness.cs
+++ b/HighWayIot.Winform/Business/WorkStationBusiness.cs
@@ -135,7 +135,7 @@ namespace HighWayIot.Winform.Business
if (setting == null)
{
- LogHelper.Instance.Error($"找不到第[{no}]个读写器");
+ //LogHelper.Instance.Error($"找不到第[{no}]个读写器");
return;
}
diff --git a/HighWayIot.Winform/HighWayIot.Winform.csproj b/HighWayIot.Winform/HighWayIot.Winform.csproj
index 3b2d513..a0cd5a7 100644
--- a/HighWayIot.Winform/HighWayIot.Winform.csproj
+++ b/HighWayIot.Winform/HighWayIot.Winform.csproj
@@ -148,7 +148,8 @@
-
+
+
diff --git a/HighWayIot.Winform/MainForm/BaseForm.Designer.cs b/HighWayIot.Winform/MainForm/BaseForm.Designer.cs
index b042ba5..58c6d96 100644
--- a/HighWayIot.Winform/MainForm/BaseForm.Designer.cs
+++ b/HighWayIot.Winform/MainForm/BaseForm.Designer.cs
@@ -70,6 +70,9 @@ namespace HighWayIot.Winform.MainForm
this.StripLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
this.TimeStripLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.TimeDisplayTimer = new System.Windows.Forms.Timer(this.components);
+ this.RecipeStateChangeButton = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.ModeSelectLabel = new System.Windows.Forms.Label();
this.MainMenu.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
@@ -382,11 +385,44 @@ namespace HighWayIot.Winform.MainForm
this.TimeDisplayTimer.Interval = 1000;
this.TimeDisplayTimer.Tick += new System.EventHandler(this.TimeDisplayTimer_Tick);
//
+ // RecipeStateChangeButton
+ //
+ this.RecipeStateChangeButton.Location = new System.Drawing.Point(1708, 1);
+ this.RecipeStateChangeButton.Name = "RecipeStateChangeButton";
+ this.RecipeStateChangeButton.Size = new System.Drawing.Size(88, 23);
+ this.RecipeStateChangeButton.TabIndex = 6;
+ this.RecipeStateChangeButton.Text = "配方状态切换";
+ this.RecipeStateChangeButton.UseVisualStyleBackColor = true;
+ this.RecipeStateChangeButton.Click += new System.EventHandler(this.RecipeStateChangeButton_Click);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.BackColor = System.Drawing.Color.Transparent;
+ this.label1.Location = new System.Drawing.Point(1802, 6);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(41, 12);
+ this.label1.TabIndex = 7;
+ this.label1.Text = "当前:";
+ //
+ // ModeSelectLabel
+ //
+ this.ModeSelectLabel.AutoSize = true;
+ this.ModeSelectLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+ this.ModeSelectLabel.Location = new System.Drawing.Point(1840, 6);
+ this.ModeSelectLabel.Name = "ModeSelectLabel";
+ this.ModeSelectLabel.Size = new System.Drawing.Size(29, 12);
+ this.ModeSelectLabel.TabIndex = 8;
+ this.ModeSelectLabel.Text = "手动";
+ //
// BaseForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1904, 1041);
+ this.Controls.Add(this.ModeSelectLabel);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.RecipeStateChangeButton);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.ClosePageButton);
this.Controls.Add(this.UserControlTabs);
@@ -443,5 +479,8 @@ namespace HighWayIot.Winform.MainForm
private ToolStripMenuItem rToolStripMenuItem;
private ToolStripMenuItem rFID参数配置ToolStripMenuItem;
private ToolStripMenuItem 机台物料信息绑定ToolStripMenuItem1;
+ private Button RecipeStateChangeButton;
+ private Label label1;
+ private Label ModeSelectLabel;
}
}
\ No newline at end of file
diff --git a/HighWayIot.Winform/MainForm/BaseForm.cs b/HighWayIot.Winform/MainForm/BaseForm.cs
index 2487f81..7bf8c12 100644
--- a/HighWayIot.Winform/MainForm/BaseForm.cs
+++ b/HighWayIot.Winform/MainForm/BaseForm.cs
@@ -377,5 +377,25 @@ namespace HighWayIot.Winform.MainForm
// MoldingMachineWatchDog = 2;
//}
}
+
+ ///
+ /// 配方下传方式转换
+ ///
+ ///
+ ///
+ private void RecipeStateChangeButton_Click(object sender, EventArgs e)
+ {
+ RecipeSendBusiness.RecipeSendMode = !RecipeSendBusiness.RecipeSendMode;
+ if (RecipeSendBusiness.RecipeSendMode)
+ {
+ ModeSelectLabel.Text = "自动";
+ ModeSelectLabel.BackColor = Color.FromArgb(100, 128, 255, 128);
+ }
+ else
+ {
+ ModeSelectLabel.Text = "手动";
+ ModeSelectLabel.BackColor = Color.FromArgb(100, 255, 255, 128);
+ }
+ }
}
}
diff --git a/HighWayIot.Winform/UserControlPages/LogPages/AlarmLogPage.cs b/HighWayIot.Winform/UserControlPages/LogPages/AlarmLogPage.cs
index b3a59e9..c0c7f28 100644
--- a/HighWayIot.Winform/UserControlPages/LogPages/AlarmLogPage.cs
+++ b/HighWayIot.Winform/UserControlPages/LogPages/AlarmLogPage.cs
@@ -28,8 +28,8 @@ namespace HighWayIot.Winform.UserControlPages
private void Init()
{
LogDataGridView.AutoGenerateColumns = false;
-
- Lists = sysErrorLogService.GetErrorLogInfos();
+ SelectLogBeginTime.Value = DateTime.Now.AddMonths(-3);
+ Lists = sysErrorLogService.GetErrorLogInfos(x => x.LogTime >= SelectLogBeginTime.Value && x.LogTime <= SelectLogEndTime.Value);
LogDataGridView.DataSource = null;
LogDataGridView.DataSource = Lists;
diff --git a/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.Designer.cs b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.Designer.cs
index 9f2e635..2272d7a 100644
--- a/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.Designer.cs
+++ b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.Designer.cs
@@ -31,18 +31,8 @@ namespace HighWayIot.Winform.UserControlPages
///
private void InitializeComponent()
{
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.ReportDataGridView = new System.Windows.Forms.DataGridView();
- this.No = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.VulcanizationNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.StartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.RecipeCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.RecipeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SpecCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.DeviceNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.RawTireWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.BaseRubTimeSpan = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.MidRubTimeSpan = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.FaceRubTimeSpan = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ButtonPanel = new System.Windows.Forms.Panel();
this.ExportTableButton = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
@@ -56,6 +46,20 @@ namespace HighWayIot.Winform.UserControlPages
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.SelectReport = new System.Windows.Forms.Button();
+ this.label5 = new System.Windows.Forms.Label();
+ this.DataCountLabel = new System.Windows.Forms.Label();
+ this.No = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.VulcanizationNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.StartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.RecipeCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.RecipeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SpecCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.DeviceNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.RawTireWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.BaseRubTimeSpan = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.MidRubTimeSpan = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.FaceRubTimeSpan = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.RepeatWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.ReportDataGridView)).BeginInit();
this.ButtonPanel.SuspendLayout();
this.SuspendLayout();
@@ -67,6 +71,14 @@ namespace HighWayIot.Winform.UserControlPages
this.ReportDataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.BottomCenter;
+ 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;
+ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.ReportDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.ReportDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.ReportDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.No,
@@ -79,7 +91,8 @@ namespace HighWayIot.Winform.UserControlPages
this.RawTireWeight,
this.BaseRubTimeSpan,
this.MidRubTimeSpan,
- this.FaceRubTimeSpan});
+ this.FaceRubTimeSpan,
+ this.RepeatWeight});
this.ReportDataGridView.Location = new System.Drawing.Point(-3, 65);
this.ReportDataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ReportDataGridView.Name = "ReportDataGridView";
@@ -89,101 +102,12 @@ namespace HighWayIot.Winform.UserControlPages
this.ReportDataGridView.Size = new System.Drawing.Size(1639, 868);
this.ReportDataGridView.TabIndex = 7;
//
- // No
- //
- this.No.DataPropertyName = "No";
- this.No.HeaderText = "ID";
- this.No.Name = "No";
- this.No.ReadOnly = true;
- this.No.Width = 50;
- //
- // VulcanizationNo
- //
- this.VulcanizationNo.DataPropertyName = "VulcanizationNo";
- this.VulcanizationNo.HeaderText = "机位";
- this.VulcanizationNo.Name = "VulcanizationNo";
- this.VulcanizationNo.ReadOnly = true;
- this.VulcanizationNo.Width = 70;
- //
- // StartTime
- //
- this.StartTime.DataPropertyName = "StartTime";
- this.StartTime.HeaderText = "开始时间";
- this.StartTime.Name = "StartTime";
- this.StartTime.ReadOnly = true;
- this.StartTime.Width = 150;
- //
- // RecipeCode
- //
- this.RecipeCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
- this.RecipeCode.DataPropertyName = "RecipeCode";
- this.RecipeCode.FillWeight = 30F;
- this.RecipeCode.HeaderText = "成品代号";
- this.RecipeCode.Name = "RecipeCode";
- this.RecipeCode.ReadOnly = true;
- //
- // RecipeName
- //
- this.RecipeName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
- this.RecipeName.DataPropertyName = "RecipeName";
- this.RecipeName.FillWeight = 70F;
- this.RecipeName.HeaderText = "标称尺度";
- this.RecipeName.Name = "RecipeName";
- this.RecipeName.ReadOnly = true;
- //
- // SpecCode
- //
- this.SpecCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
- this.SpecCode.DataPropertyName = "SpecCode";
- this.SpecCode.FillWeight = 30F;
- this.SpecCode.HeaderText = "Spec编号";
- this.SpecCode.Name = "SpecCode";
- this.SpecCode.ReadOnly = true;
- //
- // DeviceNo
- //
- this.DeviceNo.DataPropertyName = "DeviceNo";
- this.DeviceNo.HeaderText = "小车编号";
- this.DeviceNo.Name = "DeviceNo";
- this.DeviceNo.ReadOnly = true;
- this.DeviceNo.Width = 80;
- //
- // RawTireWeight
- //
- this.RawTireWeight.DataPropertyName = "RawTireWeight";
- this.RawTireWeight.HeaderText = "生胎重量";
- this.RawTireWeight.Name = "RawTireWeight";
- this.RawTireWeight.ReadOnly = true;
- this.RawTireWeight.Width = 80;
- //
- // BaseRubTimeSpan
- //
- this.BaseRubTimeSpan.DataPropertyName = "BaseRubTimeSpan";
- this.BaseRubTimeSpan.HeaderText = "基部胶完成时间";
- this.BaseRubTimeSpan.Name = "BaseRubTimeSpan";
- this.BaseRubTimeSpan.ReadOnly = true;
- this.BaseRubTimeSpan.Width = 140;
- //
- // MidRubTimeSpan
- //
- this.MidRubTimeSpan.DataPropertyName = "MidRubTimeSpan";
- this.MidRubTimeSpan.HeaderText = "中层胶完成时间";
- this.MidRubTimeSpan.Name = "MidRubTimeSpan";
- this.MidRubTimeSpan.ReadOnly = true;
- this.MidRubTimeSpan.Width = 150;
- //
- // FaceRubTimeSpan
- //
- this.FaceRubTimeSpan.DataPropertyName = "FaceRubTimeSpan";
- this.FaceRubTimeSpan.HeaderText = "生胎完成时间";
- this.FaceRubTimeSpan.Name = "FaceRubTimeSpan";
- this.FaceRubTimeSpan.ReadOnly = true;
- this.FaceRubTimeSpan.Width = 140;
- //
// ButtonPanel
//
this.ButtonPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.ButtonPanel.Controls.Add(this.DataCountLabel);
+ this.ButtonPanel.Controls.Add(this.label5);
this.ButtonPanel.Controls.Add(this.ExportTableButton);
this.ButtonPanel.Controls.Add(this.label6);
this.ButtonPanel.Controls.Add(this.VulcanizationNoCombobox);
@@ -313,6 +237,123 @@ namespace HighWayIot.Winform.UserControlPages
this.SelectReport.UseVisualStyleBackColor = true;
this.SelectReport.Click += new System.EventHandler(this.SelectReport_Click);
//
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(771, 38);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(65, 12);
+ this.label5.TabIndex = 28;
+ this.label5.Text = "数据条目:";
+ //
+ // DataCountLabel
+ //
+ this.DataCountLabel.AutoSize = true;
+ this.DataCountLabel.Location = new System.Drawing.Point(842, 38);
+ this.DataCountLabel.Name = "DataCountLabel";
+ this.DataCountLabel.Size = new System.Drawing.Size(23, 12);
+ this.DataCountLabel.TabIndex = 29;
+ this.DataCountLabel.Text = "N/A";
+ //
+ // No
+ //
+ this.No.DataPropertyName = "No";
+ this.No.HeaderText = "ID";
+ this.No.Name = "No";
+ this.No.ReadOnly = true;
+ this.No.Width = 50;
+ //
+ // VulcanizationNo
+ //
+ this.VulcanizationNo.DataPropertyName = "VulcanizationNo";
+ this.VulcanizationNo.HeaderText = "机位";
+ this.VulcanizationNo.Name = "VulcanizationNo";
+ this.VulcanizationNo.ReadOnly = true;
+ this.VulcanizationNo.Width = 70;
+ //
+ // StartTime
+ //
+ this.StartTime.DataPropertyName = "StartTime";
+ this.StartTime.HeaderText = "开始时间";
+ this.StartTime.Name = "StartTime";
+ this.StartTime.ReadOnly = true;
+ this.StartTime.Width = 150;
+ //
+ // RecipeCode
+ //
+ this.RecipeCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.RecipeCode.DataPropertyName = "RecipeCode";
+ this.RecipeCode.FillWeight = 30F;
+ this.RecipeCode.HeaderText = "成品代号";
+ this.RecipeCode.Name = "RecipeCode";
+ this.RecipeCode.ReadOnly = true;
+ //
+ // RecipeName
+ //
+ this.RecipeName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.RecipeName.DataPropertyName = "RecipeName";
+ this.RecipeName.FillWeight = 70F;
+ this.RecipeName.HeaderText = "标称尺度";
+ this.RecipeName.Name = "RecipeName";
+ this.RecipeName.ReadOnly = true;
+ //
+ // SpecCode
+ //
+ this.SpecCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.SpecCode.DataPropertyName = "SpecCode";
+ this.SpecCode.FillWeight = 30F;
+ this.SpecCode.HeaderText = "Spec编号";
+ this.SpecCode.Name = "SpecCode";
+ this.SpecCode.ReadOnly = true;
+ //
+ // DeviceNo
+ //
+ this.DeviceNo.DataPropertyName = "DeviceNo";
+ this.DeviceNo.HeaderText = "小车编号";
+ this.DeviceNo.Name = "DeviceNo";
+ this.DeviceNo.ReadOnly = true;
+ this.DeviceNo.Width = 80;
+ //
+ // RawTireWeight
+ //
+ this.RawTireWeight.DataPropertyName = "RawTireWeight";
+ this.RawTireWeight.HeaderText = "生胎重量";
+ this.RawTireWeight.Name = "RawTireWeight";
+ this.RawTireWeight.ReadOnly = true;
+ this.RawTireWeight.Width = 80;
+ //
+ // BaseRubTimeSpan
+ //
+ this.BaseRubTimeSpan.DataPropertyName = "BaseRubTimeSpan";
+ this.BaseRubTimeSpan.HeaderText = "基部胶完成时间";
+ this.BaseRubTimeSpan.Name = "BaseRubTimeSpan";
+ this.BaseRubTimeSpan.ReadOnly = true;
+ this.BaseRubTimeSpan.Width = 140;
+ //
+ // MidRubTimeSpan
+ //
+ this.MidRubTimeSpan.DataPropertyName = "MidRubTimeSpan";
+ this.MidRubTimeSpan.HeaderText = "中层胶完成时间";
+ this.MidRubTimeSpan.Name = "MidRubTimeSpan";
+ this.MidRubTimeSpan.ReadOnly = true;
+ this.MidRubTimeSpan.Width = 150;
+ //
+ // FaceRubTimeSpan
+ //
+ this.FaceRubTimeSpan.DataPropertyName = "FaceRubTimeSpan";
+ this.FaceRubTimeSpan.HeaderText = "生胎完成时间";
+ this.FaceRubTimeSpan.Name = "FaceRubTimeSpan";
+ this.FaceRubTimeSpan.ReadOnly = true;
+ this.FaceRubTimeSpan.Width = 140;
+ //
+ // RepeatWeight
+ //
+ this.RepeatWeight.DataPropertyName = "RepeatWeight";
+ this.RepeatWeight.HeaderText = "复重重量";
+ this.RepeatWeight.Name = "RepeatWeight";
+ this.RepeatWeight.ReadOnly = true;
+ this.RepeatWeight.Width = 80;
+ //
// DailyReportPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -345,6 +386,9 @@ namespace HighWayIot.Winform.UserControlPages
private ComboBox RecipeCodeCombobox;
private Label label6;
private ComboBox VulcanizationNoCombobox;
+ private Button ExportTableButton;
+ private Label DataCountLabel;
+ private Label label5;
private DataGridViewTextBoxColumn No;
private DataGridViewTextBoxColumn VulcanizationNo;
private DataGridViewTextBoxColumn StartTime;
@@ -356,6 +400,6 @@ namespace HighWayIot.Winform.UserControlPages
private DataGridViewTextBoxColumn BaseRubTimeSpan;
private DataGridViewTextBoxColumn MidRubTimeSpan;
private DataGridViewTextBoxColumn FaceRubTimeSpan;
- private Button ExportTableButton;
+ private DataGridViewTextBoxColumn RepeatWeight;
}
}
diff --git a/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.cs b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.cs
index e8c17e5..a4a64a1 100644
--- a/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.cs
+++ b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.cs
@@ -88,7 +88,8 @@ namespace HighWayIot.Winform.UserControlPages
&& x.StartTime <= SelectEndTime.Value
&& (string.IsNullOrEmpty(RecipeCodeCombobox.Text) || x.RecipeCode == RecipeCodeCombobox.Text)
&& (string.IsNullOrEmpty(VulcanizationNoCombobox.Text) || x.VulcanizationNo == VulcanizationNoCombobox.Text)
- && (string.IsNullOrEmpty(DeviceNoCombobox.Text) || x.DeviceNo.ToString() == DeviceNoCombobox.Text));
+ && (string.IsNullOrEmpty(DeviceNoCombobox.Text) || x.DeviceNo.ToString() == DeviceNoCombobox.Text)
+ && x.IsDone == 1);
_monitorDataSources.Clear();
@@ -102,13 +103,30 @@ namespace HighWayIot.Winform.UserControlPages
RecipeName = dailyEntities[i].RecipeName,
RecipeCode = dailyEntities[i].RecipeCode,
SpecCode = dailyEntities[i].SpecCode,
- DeviceNo = dailyEntities[i].DeviceNo,
+ DeviceNo = dailyEntities[i].DeviceNo.ToString(),
RawTireWeight = dailyEntities[i].RawTireWeight ?? 0,
BaseRubTimeSpan = GeneralUtils.DateTimeToString(dailyEntities[i].StartTime, dailyEntities[i].BaseEndTime),
MidRubTimeSpan = GeneralUtils.DateTimeToString(dailyEntities[i].StartTime, dailyEntities[i].MidEndTime),
FaceRubTimeSpan = GeneralUtils.DateTimeToString(dailyEntities[i].StartTime, dailyEntities[i].FaceEndTime),
});
}
+
+ List ds1 = new List() { "" };
+ ds1.AddRange(_monitorDataSources.Select(x => x.VulcanizationNo).ToList());
+ VulcanizationNoCombobox.DataSource = ds1;
+ VulcanizationNoCombobox.SelectedIndex = 0;
+
+ List ds2 = new List() { "" };
+ ds2.AddRange(_monitorDataSources.Select(x => x.DeviceNo).ToList());
+ DeviceNoCombobox.DataSource = ds2;
+ DeviceNoCombobox.SelectedIndex = 0;
+
+ List ds3 = new List() { "" };
+ ds3.AddRange(_monitorDataSources.Select(x => x.RecipeCode).ToList());
+ RecipeCodeCombobox.DataSource = ds3;
+ RecipeCodeCombobox.SelectedIndex = 0;
+
+ DataCountLabel.Text = _monitorDataSources.Count.ToString();
}
///
diff --git a/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.resx b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.resx
index b1a9187..a8f53f4 100644
--- a/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.resx
+++ b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.resx
@@ -150,4 +150,7 @@
True
+
+ True
+
\ No newline at end of file
diff --git a/HighWayIot.Winform/UserControlPages/LogPages/ExportPreviewForm.Designer.cs b/HighWayIot.Winform/UserControlPages/LogPages/ExportPreviewForm.Designer.cs
index bbf38cc..f2cdf79 100644
--- a/HighWayIot.Winform/UserControlPages/LogPages/ExportPreviewForm.Designer.cs
+++ b/HighWayIot.Winform/UserControlPages/LogPages/ExportPreviewForm.Designer.cs
@@ -101,11 +101,11 @@
this.RepeatWeight});
this.dataGridView1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.dataGridView1.EnableHeadersVisualStyles = false;
- this.dataGridView1.Location = new System.Drawing.Point(-238, 193);
+ this.dataGridView1.Location = new System.Drawing.Point(0, 50);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowTemplate.Height = 23;
- this.dataGridView1.Size = new System.Drawing.Size(1904, 985);
+ this.dataGridView1.Size = new System.Drawing.Size(1904, 991);
this.dataGridView1.TabIndex = 0;
//
// RecipeCode
@@ -352,6 +352,7 @@
this.Name = "ExportPreviewForm";
this.Text = "导出预览";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ExportPreviewForm_FormClosing);
+ this.Load += new System.EventHandler(this.ExportPreviewForm_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/HighWayIot.Winform/UserControlPages/LogPages/ExportPreviewForm.cs b/HighWayIot.Winform/UserControlPages/LogPages/ExportPreviewForm.cs
index 3959003..09fd1e3 100644
--- a/HighWayIot.Winform/UserControlPages/LogPages/ExportPreviewForm.cs
+++ b/HighWayIot.Winform/UserControlPages/LogPages/ExportPreviewForm.cs
@@ -80,7 +80,7 @@ namespace HighWayIot.Winform.UserControlPages.LogPages
{
exportTableEntity.BaseRubName = baseWeight.MaterialName;
exportTableEntity.BaseRubThickness = baseWeight.SetThickness.ToString();
- //基部胶宽度和层数(可能有两层
+ //基部胶宽度和层数(可能有三层
if (baseWeight.SetLayer2 == 0 || baseWeight.SetLayer2 == null)
{
exportTableEntity.BaseRubWidth = baseWeight.SetWidth.ToString();
@@ -308,5 +308,10 @@ namespace HighWayIot.Winform.UserControlPages.LogPages
return dataTable;
}
+
+ private void ExportPreviewForm_Load(object sender, EventArgs e)
+ {
+
+ }
}
}
diff --git a/HighWayIot.Winform/UserControlPages/LogPages/OperateConfigPage.cs b/HighWayIot.Winform/UserControlPages/LogPages/OperateConfigPage.cs
index 2365089..f3cb14f 100644
--- a/HighWayIot.Winform/UserControlPages/LogPages/OperateConfigPage.cs
+++ b/HighWayIot.Winform/UserControlPages/LogPages/OperateConfigPage.cs
@@ -29,7 +29,7 @@ namespace HighWayIot.Winform.UserControlPages
{
LogDataGridView.AutoGenerateColumns = false;
SelectLogBeginTime.Value = DateTime.Now.AddMonths(-3);
- Lists = sysLogService.GetLogInfos();
+ Lists = sysLogService.GetLogInfos(x => x.LogTime >= SelectLogBeginTime.Value && x.LogTime <= SelectLogEndTime.Value);
LogDataGridView.DataSource = null;
LogDataGridView.DataSource = Lists;
}
diff --git a/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.Designer.cs b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.Designer.cs
index 58a8c98..6210ae1 100644
--- a/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.Designer.cs
+++ b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.Designer.cs
@@ -44,14 +44,16 @@ namespace HighWayIot.Winform.UserControlPages
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
+ 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.label9 = new System.Windows.Forms.Label();
+ this.RgvNoLabel = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.label6 = 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();
@@ -67,7 +69,7 @@ namespace HighWayIot.Winform.UserControlPages
this.label12 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.SpecCodeLabel = new System.Windows.Forms.Label();
- this.SpecNameLabel = new System.Windows.Forms.Label();
+ this.RecipeNameLabel = new System.Windows.Forms.Label();
this.RecipeCodeLabel = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
@@ -86,6 +88,8 @@ namespace HighWayIot.Winform.UserControlPages
this.BaseRubFinishTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MidRubFinishTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RowTireFinishTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.RepeatWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.IsDone = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
@@ -142,10 +146,10 @@ namespace HighWayIot.Winform.UserControlPages
// panel3
//
this.panel3.BackColor = System.Drawing.SystemColors.ButtonShadow;
- this.panel3.Controls.Add(this.label9);
+ this.panel3.Controls.Add(this.RgvNoLabel);
this.panel3.Controls.Add(this.label10);
- this.panel3.Controls.Add(this.label5);
- this.panel3.Controls.Add(this.label6);
+ 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;
@@ -155,16 +159,16 @@ namespace HighWayIot.Winform.UserControlPages
this.panel3.Size = new System.Drawing.Size(953, 138);
this.panel3.TabIndex = 3;
//
- // label9
+ // RgvNoLabel
//
- this.label9.AutoSize = true;
- this.label9.Font = new System.Drawing.Font("微软雅黑", 18F);
- this.label9.ForeColor = System.Drawing.Color.Khaki;
- this.label9.Location = new System.Drawing.Point(480, 74);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(61, 31);
- this.label9.TabIndex = 11;
- this.label9.Text = "N/A";
+ 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.Name = "RgvNoLabel";
+ this.RgvNoLabel.Size = new System.Drawing.Size(61, 31);
+ this.RgvNoLabel.TabIndex = 11;
+ this.RgvNoLabel.Text = "N/A";
//
// label10
//
@@ -177,27 +181,27 @@ namespace HighWayIot.Winform.UserControlPages
this.label10.TabIndex = 10;
this.label10.Text = "小车号:";
//
- // label5
+ // RawTireWeightLabel
//
- this.label5.AutoSize = true;
- this.label5.Font = new System.Drawing.Font("微软雅黑", 18F);
- this.label5.ForeColor = System.Drawing.Color.Khaki;
- this.label5.Location = new System.Drawing.Point(212, 74);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(61, 31);
- this.label5.TabIndex = 9;
- this.label5.Text = "N/A";
+ 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.Name = "RawTireWeightLabel";
+ this.RawTireWeightLabel.Size = new System.Drawing.Size(61, 31);
+ this.RawTireWeightLabel.TabIndex = 9;
+ this.RawTireWeightLabel.Text = "N/A";
//
- // label6
+ // SpecNameLabel
//
- this.label6.AutoSize = true;
- this.label6.Font = new System.Drawing.Font("微软雅黑", 18F);
- this.label6.ForeColor = System.Drawing.Color.Khaki;
- this.label6.Location = new System.Drawing.Point(181, 28);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(61, 31);
- this.label6.TabIndex = 8;
- this.label6.Text = "N/A";
+ 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
//
@@ -351,7 +355,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.panel2.BackColor = System.Drawing.Color.Gray;
this.panel2.Controls.Add(this.SpecCodeLabel);
- this.panel2.Controls.Add(this.SpecNameLabel);
+ this.panel2.Controls.Add(this.RecipeNameLabel);
this.panel2.Controls.Add(this.RecipeCodeLabel);
this.panel2.Controls.Add(this.label4);
this.panel2.Controls.Add(this.label3);
@@ -375,16 +379,16 @@ namespace HighWayIot.Winform.UserControlPages
this.SpecCodeLabel.TabIndex = 6;
this.SpecCodeLabel.Text = "N/A";
//
- // SpecNameLabel
+ // RecipeNameLabel
//
- this.SpecNameLabel.AutoSize = true;
- this.SpecNameLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
- this.SpecNameLabel.ForeColor = System.Drawing.Color.LightGoldenrodYellow;
- this.SpecNameLabel.Location = new System.Drawing.Point(181, 105);
- this.SpecNameLabel.Name = "SpecNameLabel";
- this.SpecNameLabel.Size = new System.Drawing.Size(61, 31);
- this.SpecNameLabel.TabIndex = 5;
- this.SpecNameLabel.Text = "N/A";
+ 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.Name = "RecipeNameLabel";
+ this.RecipeNameLabel.Size = new System.Drawing.Size(61, 31);
+ this.RecipeNameLabel.TabIndex = 5;
+ this.RecipeNameLabel.Text = "N/A";
//
// RecipeCodeLabel
//
@@ -435,13 +439,13 @@ namespace HighWayIot.Winform.UserControlPages
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);
+ 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(333, 14);
+ this.label1.Location = new System.Drawing.Point(417, 18);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(129, 20);
+ this.label1.Size = new System.Drawing.Size(114, 20);
this.label1.TabIndex = 0;
- this.label1.Text = "运行中的计划";
+ this.label1.Text = "新下发计划";
//
// MonitorDataGridView
//
@@ -459,7 +463,7 @@ namespace HighWayIot.Winform.UserControlPages
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.MonitorDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.MonitorDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.MonitorDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -473,7 +477,9 @@ namespace HighWayIot.Winform.UserControlPages
this.TireWeight,
this.BaseRubFinishTime,
this.MidRubFinishTime,
- this.RowTireFinishTime});
+ this.RowTireFinishTime,
+ this.RepeatWeight,
+ this.IsDone});
this.MonitorDataGridView.Location = new System.Drawing.Point(0, 231);
this.MonitorDataGridView.Margin = new System.Windows.Forms.Padding(0);
this.MonitorDataGridView.MultiSelect = false;
@@ -498,7 +504,7 @@ namespace HighWayIot.Winform.UserControlPages
this.No.HeaderText = "序号";
this.No.Name = "No";
this.No.ReadOnly = true;
- this.No.Width = 79;
+ this.No.Width = 60;
//
// VulcanizationNo
//
@@ -527,7 +533,7 @@ namespace HighWayIot.Winform.UserControlPages
this.RecipeCode.HeaderText = "成品代号";
this.RecipeCode.Name = "RecipeCode";
this.RecipeCode.ReadOnly = true;
- this.RecipeCode.Width = 220;
+ this.RecipeCode.Width = 180;
//
// RecipeName
//
@@ -547,7 +553,7 @@ namespace HighWayIot.Winform.UserControlPages
this.SpecCode.HeaderText = "SPEC编号";
this.SpecCode.Name = "SpecCode";
this.SpecCode.ReadOnly = true;
- this.SpecCode.Width = 200;
+ this.SpecCode.Width = 140;
//
// DeviceNo
//
@@ -557,16 +563,16 @@ namespace HighWayIot.Winform.UserControlPages
this.DeviceNo.HeaderText = "小车号";
this.DeviceNo.Name = "DeviceNo";
this.DeviceNo.ReadOnly = true;
+ this.DeviceNo.Width = 80;
//
// TireWeight
//
this.TireWeight.DataPropertyName = "RawTireWeight";
dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold);
this.TireWeight.DefaultCellStyle = dataGridViewCellStyle9;
- this.TireWeight.HeaderText = "轮胎重量";
+ this.TireWeight.HeaderText = "生胎重量";
this.TireWeight.Name = "TireWeight";
this.TireWeight.ReadOnly = true;
- this.TireWeight.Width = 120;
//
// BaseRubFinishTime
//
@@ -576,7 +582,7 @@ namespace HighWayIot.Winform.UserControlPages
this.BaseRubFinishTime.HeaderText = "基部胶完成时间";
this.BaseRubFinishTime.Name = "BaseRubFinishTime";
this.BaseRubFinishTime.ReadOnly = true;
- this.BaseRubFinishTime.Width = 179;
+ this.BaseRubFinishTime.Width = 162;
//
// MidRubFinishTime
//
@@ -586,7 +592,7 @@ namespace HighWayIot.Winform.UserControlPages
this.MidRubFinishTime.HeaderText = "中层胶完成时间";
this.MidRubFinishTime.Name = "MidRubFinishTime";
this.MidRubFinishTime.ReadOnly = true;
- this.MidRubFinishTime.Width = 179;
+ this.MidRubFinishTime.Width = 162;
//
// RowTireFinishTime
//
@@ -596,7 +602,26 @@ namespace HighWayIot.Winform.UserControlPages
this.RowTireFinishTime.HeaderText = "生胎完成时间";
this.RowTireFinishTime.Name = "RowTireFinishTime";
this.RowTireFinishTime.ReadOnly = true;
- this.RowTireFinishTime.Width = 160;
+ this.RowTireFinishTime.Width = 141;
+ //
+ // RepeatWeight
+ //
+ this.RepeatWeight.DataPropertyName = "RepeatWeight";
+ dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold);
+ this.RepeatWeight.DefaultCellStyle = dataGridViewCellStyle13;
+ this.RepeatWeight.HeaderText = "复重重量";
+ this.RepeatWeight.Name = "RepeatWeight";
+ this.RepeatWeight.ReadOnly = true;
+ //
+ // IsDone
+ //
+ this.IsDone.DataPropertyName = "IsDone";
+ dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold);
+ this.IsDone.DefaultCellStyle = dataGridViewCellStyle14;
+ this.IsDone.HeaderText = "状态";
+ this.IsDone.Name = "IsDone";
+ this.IsDone.ReadOnly = true;
+ this.IsDone.Width = 80;
//
// MonitorMainPage
//
@@ -641,15 +666,15 @@ namespace HighWayIot.Winform.UserControlPages
private Label label1;
private Label label2;
private Label SpecCodeLabel;
- private Label SpecNameLabel;
+ private Label RecipeNameLabel;
private Label RecipeCodeLabel;
private Label label4;
private Label label3;
- private Label label5;
- private Label label6;
+ private Label RawTireWeightLabel;
+ private Label SpecNameLabel;
private Label label7;
private Label label8;
- private Label label9;
+ private Label RgvNoLabel;
private Label label10;
private Label DayTimeLabel;
private Label label12;
@@ -671,5 +696,7 @@ namespace HighWayIot.Winform.UserControlPages
private DataGridViewTextBoxColumn BaseRubFinishTime;
private DataGridViewTextBoxColumn MidRubFinishTime;
private DataGridViewTextBoxColumn RowTireFinishTime;
+ private DataGridViewTextBoxColumn RepeatWeight;
+ private DataGridViewTextBoxColumn IsDone;
}
}
diff --git a/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.cs b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.cs
index bee064d..23382d0 100644
--- a/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.cs
+++ b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.cs
@@ -2,6 +2,7 @@
using HighWayIot.Repository.domain;
using HighWayIot.Repository.service;
using HighWayIot.Winform.Business;
+using Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -35,6 +36,8 @@ namespace HighWayIot.Winform.UserControlPages
///
private BindingList _monitorDataSources = new BindingList();
+ public static Action MonitorRefreshAction;
+
public MonitorMainPage()
{
InitializeComponent();
@@ -45,6 +48,9 @@ namespace HighWayIot.Winform.UserControlPages
MonitorDataGridView.DataSource = null;
MonitorDataGridView.DataSource = _monitorDataSources;
+
+ MonitorRefreshAction += BindData;
+ MonitorRefreshAction.Invoke();
}
///
@@ -58,7 +64,6 @@ namespace HighWayIot.Winform.UserControlPages
{
DateTimeRefresh();
}
- BindData();
}
///
@@ -90,7 +95,7 @@ namespace HighWayIot.Winform.UserControlPages
///
private void BindData()
{
- List dailyEntity = _zxDailyReportService.Get25DailyReportInfos();
+ List dailyEntity = _zxDailyReportService.Get30DailyReportInfos();
_monitorDataSources.Clear();
for(int i = 0; i < dailyEntity.Count; i++)
{
@@ -102,14 +107,32 @@ namespace HighWayIot.Winform.UserControlPages
RecipeName = dailyEntity[i].RecipeName,
RecipeCode = dailyEntity[i].RecipeCode,
SpecCode = dailyEntity[i].SpecCode,
- DeviceNo = dailyEntity[i].DeviceNo,
+ DeviceNo = dailyEntity[i].DeviceNo.ToString(),
RawTireWeight = dailyEntity[i].RawTireWeight ?? 0,
BaseRubTimeSpan = GeneralUtils.DateTimeToString(dailyEntity[i].StartTime, dailyEntity[i].BaseEndTime),
MidRubTimeSpan = GeneralUtils.DateTimeToString(dailyEntity[i].StartTime, dailyEntity[i].MidEndTime),
FaceRubTimeSpan = GeneralUtils.DateTimeToString(dailyEntity[i].StartTime, dailyEntity[i].FaceEndTime),
+ RepeatWeight = dailyEntity[i].RepeatWeight,
+ IsDone = dailyEntity[i].IsDone == 1 ? "已完成" : "未完成"
});
}
-
+
+ ZxDailyReportEntity first = dailyEntity.FirstOrDefault();
+ RecipeCodeLabel.Text = first.RecipeCode;
+ SpecCodeLabel.Text = first.SpecCode;
+ RecipeNameLabel.Text = first.RecipeName;
+ ZxRecipeEntity recipeEntity = ZxRecipeService.Instance.GetRecipeInfosByRecipeCode(first.RecipeCode).FirstOrDefault();
+ if (recipeEntity != null)
+ {
+ SpecNameLabel.Text = recipeEntity.RecipeName;
+ ZxRecipeParaEntity paraEntity = ZxRecipeParaService.Instance.GetRecipeParaInfoByRecipeCode(recipeEntity.RecipeCode).FirstOrDefault();
+ if (paraEntity != null)
+ {
+ RawTireWeightLabel.Text = paraEntity.TireWeight.ToString();
+ }
+ }
+ RgvNoLabel.Text = first.DeviceNo.ToString();
}
+
}
}
diff --git a/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.resx b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.resx
index 84f32bf..9af3200 100644
--- a/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.resx
+++ b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.resx
@@ -150,6 +150,12 @@
True
+
+ True
+
+
+ True
+
17, 17
diff --git a/HighWayIot.Winform/UserControlPages/ParamConfigPages/ProductionScheduling.Designer.cs b/HighWayIot.Winform/UserControlPages/ParamConfigPages/ProductionScheduling.Designer.cs
index 4f927e7..b65814d 100644
--- a/HighWayIot.Winform/UserControlPages/ParamConfigPages/ProductionScheduling.Designer.cs
+++ b/HighWayIot.Winform/UserControlPages/ParamConfigPages/ProductionScheduling.Designer.cs
@@ -37,6 +37,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
this.SchedulingDataGridView = new System.Windows.Forms.DataGridView();
this.SelectConfigButton = new System.Windows.Forms.Button();
this.ButtonPanel = new System.Windows.Forms.Panel();
@@ -56,6 +57,14 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
this.SchedulingDataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ 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;
+ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.SchedulingDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.SchedulingDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.SchedulingDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Id,
@@ -112,8 +121,8 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
// Id
//
this.Id.DataPropertyName = "Id";
- dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.Id.DefaultCellStyle = dataGridViewCellStyle1;
+ dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.Id.DefaultCellStyle = dataGridViewCellStyle2;
this.Id.HeaderText = "ID";
this.Id.Name = "Id";
this.Id.ReadOnly = true;
@@ -123,8 +132,8 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
// DeviceNo
//
this.DeviceNo.DataPropertyName = "DeviceNo";
- dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.DeviceNo.DefaultCellStyle = dataGridViewCellStyle2;
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.DeviceNo.DefaultCellStyle = dataGridViewCellStyle3;
this.DeviceNo.HeaderText = "机台编号";
this.DeviceNo.Name = "DeviceNo";
this.DeviceNo.ReadOnly = true;
@@ -133,9 +142,9 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
// RecipeCode2
//
this.RecipeCode2.DataPropertyName = "RecipeCode2";
- dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
- dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.RecipeCode2.DefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle4.BackColor = System.Drawing.Color.White;
+ dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.RecipeCode2.DefaultCellStyle = dataGridViewCellStyle4;
this.RecipeCode2.HeaderText = "成品代号 - 上模";
this.RecipeCode2.Name = "RecipeCode2";
this.RecipeCode2.ReadOnly = true;
@@ -147,8 +156,8 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
//
this.RecipeName2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeName2.DataPropertyName = "RecipeName2";
- dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.RecipeName2.DefaultCellStyle = dataGridViewCellStyle4;
+ dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.RecipeName2.DefaultCellStyle = dataGridViewCellStyle5;
this.RecipeName2.HeaderText = "标称尺度 - 上模";
this.RecipeName2.Name = "RecipeName2";
this.RecipeName2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@@ -156,12 +165,12 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
// RecipeCode1
//
this.RecipeCode1.DataPropertyName = "RecipeCode1";
- dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
- dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
- dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.White;
- dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.Black;
- this.RecipeCode1.DefaultCellStyle = dataGridViewCellStyle5;
+ dataGridViewCellStyle6.BackColor = System.Drawing.Color.White;
+ dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black;
+ dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.White;
+ dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.Black;
+ this.RecipeCode1.DefaultCellStyle = dataGridViewCellStyle6;
this.RecipeCode1.HeaderText = "成品代号 - 下模";
this.RecipeCode1.Name = "RecipeCode1";
this.RecipeCode1.ReadOnly = true;
@@ -172,8 +181,8 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
//
this.RecipeName1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeName1.DataPropertyName = "RecipeName1";
- dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.RecipeName1.DefaultCellStyle = dataGridViewCellStyle6;
+ dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.RecipeName1.DefaultCellStyle = dataGridViewCellStyle7;
this.RecipeName1.HeaderText = "标称尺度 - 下模";
this.RecipeName1.Name = "RecipeName1";
this.RecipeName1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
diff --git a/HighWayIot.Winform/UserControlPages/ParamConfigPages/ProductionScheduling.cs b/HighWayIot.Winform/UserControlPages/ParamConfigPages/ProductionScheduling.cs
index 91be6e3..05ae10a 100644
--- a/HighWayIot.Winform/UserControlPages/ParamConfigPages/ProductionScheduling.cs
+++ b/HighWayIot.Winform/UserControlPages/ParamConfigPages/ProductionScheduling.cs
@@ -1,6 +1,7 @@
using HighWayIot.Log4net;
using HighWayIot.Repository.service;
using HighWayIot.Winform.Business;
+using HighWayIot.Winform.MainForm;
using Models;
using System;
using System.Collections.Generic;
@@ -149,18 +150,20 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
int column = SchedulingDataGridView.CurrentCell.ColumnIndex;
string DeviceNo = SchedulingDataGridView.Rows[row].Cells[1].Value.ToString();
- if(column == 5)
+ if (column == 5)
{
ZxRecipeEntity recipe = zxRecipeService.GetSingleInfoByRecipeName(combox.Text);
if (recipe == null)
{
- MessageBox.Show("存在多个相同的标称尺度或不存在,请检查并维护配方,重启排程界面");
+ BaseForm.LogRefreshAction.Invoke($"{combox.Text}存在多个相同的配方或不存在,请检查并维护配方,重启排程界面");
zxSchedulingEntity[row].RecipeCode1 = string.Empty;
}
else
{
zxSchedulingEntity[row].RecipeCode1 = recipe.RecipeCode;
SqlLogHelper.AddLog($"排程信息操作 机台[{DeviceNo}下模] 配方更改为[{recipe.RecipeCode}]");
+ //DataGridViewComboBoxCell cb = SchedulingDataGridView.Rows[row].Cells[column + 1] as DataGridViewComboBoxCell;
+ //cb.DataSource = zxRecipeService.
}
}
@@ -169,7 +172,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
ZxRecipeEntity recipe = zxRecipeService.GetSingleInfoByRecipeName(combox.Text);
if (recipe == null)
{
- MessageBox.Show("存在多个相同的标称尺度或不存在,请检查并维护配方,重启排程界面");
+ BaseForm.LogRefreshAction.Invoke($"{combox.Text}存在多个相同的配方或不存在,请检查并维护配方,重启排程界面");
zxSchedulingEntity[row].RecipeCode2 = string.Empty;
}
else
diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddRecipeForm.Designer.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddRecipeForm.Designer.cs
index 1397a3d..f1a4bdb 100644
--- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddRecipeForm.Designer.cs
+++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddRecipeForm.Designer.cs
@@ -62,7 +62,7 @@
//
// ConfrimAddButton
//
- this.ConfrimAddButton.Location = new System.Drawing.Point(241, 125);
+ this.ConfrimAddButton.Location = new System.Drawing.Point(241, 112);
this.ConfrimAddButton.Name = "ConfrimAddButton";
this.ConfrimAddButton.Size = new System.Drawing.Size(110, 41);
this.ConfrimAddButton.TabIndex = 20;
@@ -200,12 +200,13 @@
this.WeightErrorTextBox.Size = new System.Drawing.Size(83, 21);
this.WeightErrorTextBox.TabIndex = 33;
this.WeightErrorTextBox.Text = "1";
+ this.WeightErrorTextBox.TextChanged += new System.EventHandler(this.WeightErrorTextBox_TextChanged);
//
// AddRecipeForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(601, 188);
+ this.ClientSize = new System.Drawing.Size(601, 172);
this.Controls.Add(this.label9);
this.Controls.Add(this.WeightErrorTextBox);
this.Controls.Add(this.label8);
diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddRecipeForm.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddRecipeForm.cs
index d06eba1..bbf653a 100644
--- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddRecipeForm.cs
+++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddRecipeForm.cs
@@ -56,6 +56,7 @@ namespace HighWayIot.Winform.UserControlPages.RecipeConfigPages
RecipeName = RecipeNameTextBox.Text.Trim(),
RecipeSpecCode = SpecCodeTextBox.Text.Trim(),
RecipeSpecName = SpecNameTextBox.Text.Trim(),
+ //BatchCode = SPECBatchCodeTextBox.Text.Trim(),
IsDeleted = false,
IsUse = IsUseCheckBox.Checked,
};
@@ -65,13 +66,13 @@ namespace HighWayIot.Winform.UserControlPages.RecipeConfigPages
return;
}
zxRecipeEntity.SizeKind = sizeKind;
- if (!decimal.TryParse(FixedWidthTextBox.Text.Trim(), out decimal fixedWidth))
+ if (!int.TryParse(FixedWidthTextBox.Text.Trim(), out int fixedWidth))
{
MessageBox.Show("固定胶宽度请填入可带小数点的阿拉伯数字");
return;
}
zxRecipeEntity.FixedWidth = fixedWidth;
- if (!int.TryParse(WeightErrorTextBox.Text.Trim(), out int weightError))
+ if (!float.TryParse(WeightErrorTextBox.Text.Trim(), out float weightError))
{
MessageBox.Show("重量公差请填入整数阿拉伯数字");
return;
@@ -97,5 +98,15 @@ namespace HighWayIot.Winform.UserControlPages.RecipeConfigPages
{
this.DialogResult = DialogResult.OK;
}
+
+ private void label10_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void WeightErrorTextBox_TextChanged(object sender, EventArgs e)
+ {
+
+ }
}
}
diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddWeightForm.Designer.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddWeightForm.Designer.cs
index a9cfa80..c5c0687 100644
--- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddWeightForm.Designer.cs
+++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddWeightForm.Designer.cs
@@ -205,31 +205,34 @@
//
// SetWidthTextBox
//
- this.SetWidthTextBox.Location = new System.Drawing.Point(272, 145);
+ this.SetWidthTextBox.Location = new System.Drawing.Point(278, 202);
this.SetWidthTextBox.Name = "SetWidthTextBox";
- this.SetWidthTextBox.Size = new System.Drawing.Size(123, 21);
+ this.SetWidthTextBox.Size = new System.Drawing.Size(121, 21);
this.SetWidthTextBox.TabIndex = 16;
+ this.SetWidthTextBox.TextChanged += new System.EventHandler(this.SetWidthTextBox_TextChanged);
//
// label7
//
this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(225, 149);
+ this.label7.Location = new System.Drawing.Point(233, 206);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(47, 12);
this.label7.TabIndex = 15;
this.label7.Text = "宽度1:";
+ this.label7.Click += new System.EventHandler(this.label7_Click);
//
// SetLayerTextBox
//
- this.SetLayerTextBox.Location = new System.Drawing.Point(450, 145);
+ this.SetLayerTextBox.Location = new System.Drawing.Point(459, 203);
this.SetLayerTextBox.Name = "SetLayerTextBox";
- this.SetLayerTextBox.Size = new System.Drawing.Size(123, 21);
+ this.SetLayerTextBox.Size = new System.Drawing.Size(121, 21);
this.SetLayerTextBox.TabIndex = 18;
+ this.SetLayerTextBox.TextChanged += new System.EventHandler(this.SetLayerTextBox_TextChanged);
//
// label8
//
this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(403, 149);
+ this.label8.Location = new System.Drawing.Point(415, 206);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(47, 12);
this.label8.TabIndex = 17;
@@ -298,15 +301,16 @@
//
// SetLayerTextBox2
//
- this.SetLayerTextBox2.Location = new System.Drawing.Point(450, 172);
+ this.SetLayerTextBox2.Location = new System.Drawing.Point(459, 149);
this.SetLayerTextBox2.Name = "SetLayerTextBox2";
- this.SetLayerTextBox2.Size = new System.Drawing.Size(123, 21);
+ this.SetLayerTextBox2.Size = new System.Drawing.Size(121, 21);
this.SetLayerTextBox2.TabIndex = 28;
+ this.SetLayerTextBox2.TextChanged += new System.EventHandler(this.SetLayerTextBox2_TextChanged);
//
// label12
//
this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(403, 176);
+ this.label12.Location = new System.Drawing.Point(415, 153);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(47, 12);
this.label12.TabIndex = 27;
@@ -314,15 +318,16 @@
//
// SetWidthTextBox2
//
- this.SetWidthTextBox2.Location = new System.Drawing.Point(272, 172);
+ this.SetWidthTextBox2.Location = new System.Drawing.Point(278, 148);
this.SetWidthTextBox2.Name = "SetWidthTextBox2";
- this.SetWidthTextBox2.Size = new System.Drawing.Size(123, 21);
+ this.SetWidthTextBox2.Size = new System.Drawing.Size(121, 21);
this.SetWidthTextBox2.TabIndex = 26;
+ this.SetWidthTextBox2.TextChanged += new System.EventHandler(this.SetWidthTextBox2_TextChanged);
//
// label13
//
this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(225, 176);
+ this.label13.Location = new System.Drawing.Point(233, 151);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(47, 12);
this.label13.TabIndex = 25;
@@ -330,15 +335,16 @@
//
// SetLayerTextBox3
//
- this.SetLayerTextBox3.Location = new System.Drawing.Point(450, 199);
+ this.SetLayerTextBox3.Location = new System.Drawing.Point(459, 176);
this.SetLayerTextBox3.Name = "SetLayerTextBox3";
- this.SetLayerTextBox3.Size = new System.Drawing.Size(123, 21);
+ this.SetLayerTextBox3.Size = new System.Drawing.Size(121, 21);
this.SetLayerTextBox3.TabIndex = 32;
+ this.SetLayerTextBox3.TextChanged += new System.EventHandler(this.SetLayerTextBox3_TextChanged);
//
// label14
//
this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(403, 203);
+ this.label14.Location = new System.Drawing.Point(415, 180);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(47, 12);
this.label14.TabIndex = 31;
@@ -346,15 +352,16 @@
//
// SetWidthTextBox3
//
- this.SetWidthTextBox3.Location = new System.Drawing.Point(272, 199);
+ this.SetWidthTextBox3.Location = new System.Drawing.Point(278, 175);
this.SetWidthTextBox3.Name = "SetWidthTextBox3";
- this.SetWidthTextBox3.Size = new System.Drawing.Size(123, 21);
+ this.SetWidthTextBox3.Size = new System.Drawing.Size(121, 21);
this.SetWidthTextBox3.TabIndex = 30;
+ this.SetWidthTextBox3.TextChanged += new System.EventHandler(this.SetWidthTextBox3_TextChanged);
//
// label15
//
this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(225, 203);
+ this.label15.Location = new System.Drawing.Point(233, 178);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(47, 12);
this.label15.TabIndex = 29;
@@ -394,6 +401,7 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "添加成型信息";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AddWeightForm_FormClosing);
+ this.Load += new System.EventHandler(this.AddWeightForm_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddWeightForm.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddWeightForm.cs
index 9539573..fb63e9a 100644
--- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddWeightForm.cs
+++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/AddWeightForm.cs
@@ -139,23 +139,23 @@ namespace HighWayIot.Winform.UserControlPages.RecipeConfigPages
}
zxWeightEntity.SetThickness = thickness;
- if (!decimal.TryParse(SetWidthTextBox.Text.Trim(), out decimal width) && !string.IsNullOrEmpty(SetWidthTextBox.Text.Trim()))
+ if (!int.TryParse(SetWidthTextBox.Text.Trim(), out int width) && !string.IsNullOrEmpty(SetWidthTextBox.Text.Trim()))
{
- MessageBox.Show("宽度请填入可带小数的阿拉伯数字");
+ MessageBox.Show("宽度请填入整数");
return;
}
zxWeightEntity.SetWidth = width;
- if (!decimal.TryParse(SetWidthTextBox2.Text.Trim(), out decimal width2) && !string.IsNullOrEmpty(SetWidthTextBox2.Text.Trim()))
+ if (!int.TryParse(SetWidthTextBox2.Text.Trim(), out int width2) && !string.IsNullOrEmpty(SetWidthTextBox2.Text.Trim()))
{
- MessageBox.Show("宽度请填入可带小数的阿拉伯数字");
+ MessageBox.Show("宽度请填入整数");
return;
}
zxWeightEntity.SetWidth2 = width2;
- if (!decimal.TryParse(SetWidthTextBox3.Text.Trim(), out decimal width3) && !string.IsNullOrEmpty(SetWidthTextBox2.Text.Trim()))
+ if (!int.TryParse(SetWidthTextBox3.Text.Trim(), out int width3) && !string.IsNullOrEmpty(SetWidthTextBox3.Text.Trim()))
{
- MessageBox.Show("宽度请填入可带小数的阿拉伯数字");
+ MessageBox.Show("宽度请填入整数");
return;
}
zxWeightEntity.SetWidth3 = width3;
@@ -174,14 +174,14 @@ namespace HighWayIot.Winform.UserControlPages.RecipeConfigPages
}
zxWeightEntity.SetLayer2 = layer2;
- if (!int.TryParse(SetLayerTextBox3.Text.Trim(), out int layer3) && !string.IsNullOrEmpty(SetLayerTextBox2.Text.Trim()))
+ if (!int.TryParse(SetLayerTextBox3.Text.Trim(), out int layer3) && !string.IsNullOrEmpty(SetLayerTextBox3.Text.Trim()))
{
MessageBox.Show("层数请填入整数阿拉伯数字");
return;
}
zxWeightEntity.SetLayer3 = layer3;
- if (!decimal.TryParse(SetWeightTextBox.Text.Trim(), out decimal weight) && !string.IsNullOrEmpty(SetWeightTextBox.Text.Trim()))
+ if (!int.TryParse(SetWeightTextBox.Text.Trim(), out int weight) && !string.IsNullOrEmpty(SetWeightTextBox.Text.Trim()))
{
MessageBox.Show("重量请填入可带小数的阿拉伯数字");
return;
@@ -334,5 +334,45 @@ namespace HighWayIot.Winform.UserControlPages.RecipeConfigPages
{
this.DialogResult = DialogResult.OK;
}
+
+ private void SetLayerTextBox2_TextChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void SetWidthTextBox2_TextChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void SetWidthTextBox_TextChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void SetLayerTextBox3_TextChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void SetWidthTextBox3_TextChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void SetLayerTextBox_TextChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void label7_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void AddWeightForm_Load(object sender, EventArgs e)
+ {
+
+ }
}
}
diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.Designer.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.Designer.cs
index 1f319ae..2a5cf4c 100644
--- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.Designer.cs
+++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.Designer.cs
@@ -31,7 +31,22 @@ namespace HighWayIot.Winform.UserControlPages
///
private void InitializeComponent()
{
+ 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();
+ this.MaterialName = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.MaterialType = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetThickness = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetWidth2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetLayer2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetWidth3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetLayer3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetWidth1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetLayer1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.SetError = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.AddRecipeButton = new System.Windows.Forms.Button();
this.ButtonPanel = new System.Windows.Forms.Panel();
this.SyncDataButton = new System.Windows.Forms.Button();
@@ -42,15 +57,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.IsUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
@@ -70,16 +76,6 @@ namespace HighWayIot.Winform.UserControlPages
this.DownloadFromPlc = new System.Windows.Forms.Button();
this.UpLoadToPlc = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.label20 = new System.Windows.Forms.Label();
- this.E15TextBox = new System.Windows.Forms.TextBox();
- this.label24 = new System.Windows.Forms.Label();
- this.E14TextBox = new System.Windows.Forms.TextBox();
- this.label25 = new System.Windows.Forms.Label();
- this.E13TextBox = new System.Windows.Forms.TextBox();
- this.label33 = new System.Windows.Forms.Label();
- this.E12TextBox = new System.Windows.Forms.TextBox();
- this.label35 = new System.Windows.Forms.Label();
- this.E11TextBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.E10TextBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
@@ -107,6 +103,18 @@ namespace HighWayIot.Winform.UserControlPages
this.Position2RadioButton = new System.Windows.Forms.RadioButton();
this.Position1RadioButton = new System.Windows.Forms.RadioButton();
this.groupbox5 = new System.Windows.Forms.GroupBox();
+ this.label37 = new System.Windows.Forms.Label();
+ this.label36 = new System.Windows.Forms.Label();
+ this.B5Check = new System.Windows.Forms.CheckBox();
+ this.B8Check = new System.Windows.Forms.CheckBox();
+ this.B7Check = new System.Windows.Forms.CheckBox();
+ this.B9Check = new System.Windows.Forms.CheckBox();
+ this.B6Check = new System.Windows.Forms.CheckBox();
+ this.B1Check = new System.Windows.Forms.CheckBox();
+ this.B4Check = new System.Windows.Forms.CheckBox();
+ this.B3Check = new System.Windows.Forms.CheckBox();
+ this.B0Check = new System.Windows.Forms.CheckBox();
+ this.B2Check = new System.Windows.Forms.CheckBox();
this.Station5MaterialName = new System.Windows.Forms.Label();
this.Station4MaterialName = new System.Windows.Forms.Label();
this.Station3MaterialName = new System.Windows.Forms.Label();
@@ -147,25 +155,20 @@ namespace HighWayIot.Winform.UserControlPages
this.label19 = new System.Windows.Forms.Label();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel1 = new System.Windows.Forms.Panel();
+ this.PositionSelectRefreshButton = new System.Windows.Forms.Button();
this.label27 = new System.Windows.Forms.Label();
this.RefreshWeightButton = new System.Windows.Forms.Button();
this.UpdateWeightButton = new System.Windows.Forms.Button();
this.AddWeightButton = new System.Windows.Forms.Button();
this.DeleteWeightButton = new System.Windows.Forms.Button();
- this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.MaterialCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.MaterialName = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.MaterialType = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetThickness = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetWidth1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetLayer1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetWidth2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetLayer2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetWidth3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetLayer3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.SetError = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.WeightIsUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+ 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();
((System.ComponentModel.ISupportInitialize)(this.WeightDataGridView)).BeginInit();
this.ButtonPanel.SuspendLayout();
this.groupBox1.SuspendLayout();
@@ -188,6 +191,13 @@ namespace HighWayIot.Winform.UserControlPages
this.WeightDataGridView.AllowUserToDeleteRows = false;
this.WeightDataGridView.AllowUserToResizeColumns = false;
this.WeightDataGridView.AllowUserToResizeRows = false;
+ 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,
@@ -195,15 +205,14 @@ namespace HighWayIot.Winform.UserControlPages
this.MaterialName,
this.MaterialType,
this.SetThickness,
- this.SetWidth1,
- this.SetLayer1,
this.SetWidth2,
this.SetLayer2,
this.SetWidth3,
this.SetLayer3,
+ this.SetWidth1,
+ this.SetLayer1,
this.SetWeight,
- this.SetError,
- this.WeightIsUse});
+ this.SetError});
this.WeightDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.WeightDataGridView.Location = new System.Drawing.Point(3, 17);
this.WeightDataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
@@ -214,6 +223,111 @@ namespace HighWayIot.Winform.UserControlPages
this.WeightDataGridView.TabIndex = 0;
this.WeightDataGridView.Tag = "";
//
+ // Id
+ //
+ this.Id.DataPropertyName = "Id";
+ this.Id.HeaderText = "ID";
+ this.Id.Name = "Id";
+ this.Id.ReadOnly = true;
+ this.Id.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.Id.Width = 40;
+ //
+ // MaterialCode
+ //
+ this.MaterialCode.DataPropertyName = "MaterialCode";
+ this.MaterialCode.HeaderText = "胶料编码";
+ this.MaterialCode.Name = "MaterialCode";
+ this.MaterialCode.ReadOnly = true;
+ this.MaterialCode.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ //
+ // MaterialName
+ //
+ this.MaterialName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.MaterialName.DataPropertyName = "MaterialName";
+ this.MaterialName.HeaderText = "胶料名称";
+ this.MaterialName.Name = "MaterialName";
+ this.MaterialName.ReadOnly = true;
+ this.MaterialName.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ //
+ // MaterialType
+ //
+ this.MaterialType.DataPropertyName = "MaterialType";
+ this.MaterialType.HeaderText = "胶料类型";
+ this.MaterialType.Name = "MaterialType";
+ this.MaterialType.ReadOnly = true;
+ this.MaterialType.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.MaterialType.Width = 89;
+ //
+ // SetThickness
+ //
+ this.SetThickness.DataPropertyName = "SetThickness";
+ this.SetThickness.HeaderText = "厚度";
+ this.SetThickness.Name = "SetThickness";
+ this.SetThickness.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.SetThickness.Width = 59;
+ //
+ // SetWidth2
+ //
+ this.SetWidth2.DataPropertyName = "SetWidth2";
+ this.SetWidth2.HeaderText = "宽度2";
+ this.SetWidth2.Name = "SetWidth2";
+ this.SetWidth2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.SetWidth2.Width = 65;
+ //
+ // SetLayer2
+ //
+ this.SetLayer2.DataPropertyName = "SetLayer2";
+ this.SetLayer2.HeaderText = "层数2";
+ this.SetLayer2.Name = "SetLayer2";
+ this.SetLayer2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.SetLayer2.Width = 65;
+ //
+ // SetWidth3
+ //
+ this.SetWidth3.DataPropertyName = "SetWidth3";
+ this.SetWidth3.HeaderText = "宽度3";
+ this.SetWidth3.Name = "SetWidth3";
+ this.SetWidth3.Width = 65;
+ //
+ // SetLayer3
+ //
+ this.SetLayer3.DataPropertyName = "SetLayer3";
+ this.SetLayer3.HeaderText = "层数3";
+ this.SetLayer3.Name = "SetLayer3";
+ this.SetLayer3.Width = 65;
+ //
+ // SetWidth1
+ //
+ this.SetWidth1.DataPropertyName = "SetWidth";
+ this.SetWidth1.HeaderText = "宽度1";
+ this.SetWidth1.Name = "SetWidth1";
+ this.SetWidth1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.SetWidth1.Width = 60;
+ //
+ // SetLayer1
+ //
+ this.SetLayer1.DataPropertyName = "SetLayer";
+ this.SetLayer1.HeaderText = "层数1";
+ this.SetLayer1.Name = "SetLayer1";
+ this.SetLayer1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.SetLayer1.Width = 60;
+ //
+ // SetWeight
+ //
+ this.SetWeight.DataPropertyName = "SetWeight";
+ this.SetWeight.HeaderText = "重量";
+ this.SetWeight.Name = "SetWeight";
+ this.SetWeight.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.SetWeight.Width = 80;
+ //
+ // SetError
+ //
+ this.SetError.DataPropertyName = "SetError";
+ this.SetError.HeaderText = "公差";
+ this.SetError.Name = "SetError";
+ this.SetError.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.SetError.Width = 55;
+ //
// AddRecipeButton
//
this.AddRecipeButton.Location = new System.Drawing.Point(11, 12);
@@ -325,6 +439,14 @@ namespace HighWayIot.Winform.UserControlPages
this.RecipeDataGridView.AllowUserToAddRows = false;
this.RecipeDataGridView.AllowUserToDeleteRows = false;
this.RecipeDataGridView.AllowUserToResizeRows = false;
+ 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,
@@ -334,101 +456,19 @@ namespace HighWayIot.Winform.UserControlPages
this.RecipeSpecName,
this.SizeKind,
this.FixedWidth,
- this.WeightError,
- this.IsUse});
+ this.WeightError});
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);
this.RecipeDataGridView.Name = "RecipeDataGridView";
+ this.RecipeDataGridView.RowHeadersVisible = false;
this.RecipeDataGridView.RowTemplate.Height = 25;
this.RecipeDataGridView.Size = new System.Drawing.Size(946, 722);
this.RecipeDataGridView.TabIndex = 0;
this.RecipeDataGridView.Tag = "";
+ this.RecipeDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.RecipeDataGridView_CellContentClick);
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.ReadOnly = true;
- 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.ReadOnly = true;
- 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 = 55;
- //
- // 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 = 90;
- //
- // WeightError
- //
- this.WeightError.DataPropertyName = "WeightError";
- this.WeightError.HeaderText = "重量公差";
- this.WeightError.Name = "WeightError";
- this.WeightError.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.WeightError.Width = 79;
- //
- // IsUse
- //
- this.IsUse.DataPropertyName = "IsUse";
- this.IsUse.HeaderText = "启用";
- this.IsUse.Name = "IsUse";
- this.IsUse.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.IsUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
- this.IsUse.Width = 40;
- //
// tableLayoutPanel1
//
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -650,16 +690,6 @@ namespace HighWayIot.Winform.UserControlPages
//
// groupBox4
//
- this.groupBox4.Controls.Add(this.label20);
- this.groupBox4.Controls.Add(this.E15TextBox);
- this.groupBox4.Controls.Add(this.label24);
- this.groupBox4.Controls.Add(this.E14TextBox);
- this.groupBox4.Controls.Add(this.label25);
- this.groupBox4.Controls.Add(this.E13TextBox);
- this.groupBox4.Controls.Add(this.label33);
- this.groupBox4.Controls.Add(this.E12TextBox);
- this.groupBox4.Controls.Add(this.label35);
- this.groupBox4.Controls.Add(this.E11TextBox);
this.groupBox4.Controls.Add(this.label6);
this.groupBox4.Controls.Add(this.E10TextBox);
this.groupBox4.Controls.Add(this.label7);
@@ -690,90 +720,10 @@ namespace HighWayIot.Winform.UserControlPages
this.groupBox4.TabStop = false;
this.groupBox4.Text = "贴合参数";
//
- // label20
- //
- this.label20.AutoSize = true;
- this.label20.Location = new System.Drawing.Point(591, 139);
- this.label20.Name = "label20";
- this.label20.Size = new System.Drawing.Size(17, 12);
- this.label20.TabIndex = 38;
- this.label20.Text = "15";
- //
- // E15TextBox
- //
- this.E15TextBox.Location = new System.Drawing.Point(621, 136);
- this.E15TextBox.Name = "E15TextBox";
- this.E15TextBox.Size = new System.Drawing.Size(80, 21);
- this.E15TextBox.TabIndex = 37;
- //
- // label24
- //
- this.label24.AutoSize = true;
- this.label24.Location = new System.Drawing.Point(591, 112);
- this.label24.Name = "label24";
- this.label24.Size = new System.Drawing.Size(17, 12);
- this.label24.TabIndex = 36;
- this.label24.Text = "14";
- //
- // E14TextBox
- //
- this.E14TextBox.Location = new System.Drawing.Point(621, 109);
- this.E14TextBox.Name = "E14TextBox";
- this.E14TextBox.Size = new System.Drawing.Size(80, 21);
- this.E14TextBox.TabIndex = 35;
- //
- // label25
- //
- this.label25.AutoSize = true;
- this.label25.Location = new System.Drawing.Point(591, 85);
- this.label25.Name = "label25";
- this.label25.Size = new System.Drawing.Size(17, 12);
- this.label25.TabIndex = 34;
- this.label25.Text = "13";
- //
- // E13TextBox
- //
- this.E13TextBox.Location = new System.Drawing.Point(621, 82);
- this.E13TextBox.Name = "E13TextBox";
- this.E13TextBox.Size = new System.Drawing.Size(80, 21);
- this.E13TextBox.TabIndex = 33;
- //
- // label33
- //
- this.label33.AutoSize = true;
- this.label33.Location = new System.Drawing.Point(591, 59);
- this.label33.Name = "label33";
- this.label33.Size = new System.Drawing.Size(17, 12);
- this.label33.TabIndex = 32;
- this.label33.Text = "12";
- //
- // E12TextBox
- //
- this.E12TextBox.Location = new System.Drawing.Point(621, 55);
- this.E12TextBox.Name = "E12TextBox";
- this.E12TextBox.Size = new System.Drawing.Size(80, 21);
- this.E12TextBox.TabIndex = 31;
- //
- // label35
- //
- this.label35.AutoSize = true;
- this.label35.Location = new System.Drawing.Point(591, 31);
- this.label35.Name = "label35";
- this.label35.Size = new System.Drawing.Size(17, 12);
- this.label35.TabIndex = 30;
- this.label35.Text = "11";
- //
- // E11TextBox
- //
- this.E11TextBox.Location = new System.Drawing.Point(621, 28);
- this.E11TextBox.Name = "E11TextBox";
- this.E11TextBox.Size = new System.Drawing.Size(80, 21);
- this.E11TextBox.TabIndex = 29;
- //
// label6
//
this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(375, 139);
+ this.label6.Location = new System.Drawing.Point(183, 138);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 28;
@@ -781,7 +731,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E10TextBox
//
- this.E10TextBox.Location = new System.Drawing.Point(434, 136);
+ this.E10TextBox.Location = new System.Drawing.Point(242, 135);
this.E10TextBox.Name = "E10TextBox";
this.E10TextBox.Size = new System.Drawing.Size(80, 21);
this.E10TextBox.TabIndex = 27;
@@ -789,15 +739,15 @@ namespace HighWayIot.Winform.UserControlPages
// label7
//
this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(333, 113);
+ this.label7.Location = new System.Drawing.Point(201, 113);
this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(95, 12);
+ this.label7.Size = new System.Drawing.Size(35, 12);
this.label7.TabIndex = 26;
- this.label7.Text = "纵裁刀宽度1(mm)";
+ this.label7.Text = "宽度1";
//
// E9TextBox
//
- this.E9TextBox.Location = new System.Drawing.Point(434, 109);
+ this.E9TextBox.Location = new System.Drawing.Point(242, 108);
this.E9TextBox.Name = "E9TextBox";
this.E9TextBox.Size = new System.Drawing.Size(80, 21);
this.E9TextBox.TabIndex = 25;
@@ -805,15 +755,15 @@ namespace HighWayIot.Winform.UserControlPages
// label8
//
this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(393, 86);
+ this.label8.Location = new System.Drawing.Point(342, 138);
this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(35, 12);
+ this.label8.Size = new System.Drawing.Size(77, 12);
this.label8.TabIndex = 24;
- this.label8.Text = "备用3";
+ this.label8.Text = "包边停止距离";
//
// E8TextBox
//
- this.E8TextBox.Location = new System.Drawing.Point(434, 82);
+ this.E8TextBox.Location = new System.Drawing.Point(425, 134);
this.E8TextBox.Name = "E8TextBox";
this.E8TextBox.Size = new System.Drawing.Size(80, 21);
this.E8TextBox.TabIndex = 23;
@@ -821,15 +771,15 @@ namespace HighWayIot.Winform.UserControlPages
// label9
//
this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(333, 59);
+ this.label9.Location = new System.Drawing.Point(384, 57);
this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(95, 12);
+ this.label9.Size = new System.Drawing.Size(35, 12);
this.label9.TabIndex = 22;
- this.label9.Text = "纵裁刀宽度2(mm)";
+ this.label9.Text = "宽度2";
//
// E7TextBox
//
- this.E7TextBox.Location = new System.Drawing.Point(434, 55);
+ this.E7TextBox.Location = new System.Drawing.Point(425, 54);
this.E7TextBox.Name = "E7TextBox";
this.E7TextBox.Size = new System.Drawing.Size(80, 21);
this.E7TextBox.TabIndex = 21;
@@ -837,15 +787,15 @@ namespace HighWayIot.Winform.UserControlPages
// label10
//
this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(369, 31);
+ this.label10.Location = new System.Drawing.Point(384, 31);
this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(59, 12);
+ this.label10.Size = new System.Drawing.Size(35, 12);
this.label10.TabIndex = 20;
- this.label10.Text = "贴合层数2";
+ this.label10.Text = "层数2";
//
// E6TextBox
//
- this.E6TextBox.Location = new System.Drawing.Point(434, 28);
+ this.E6TextBox.Location = new System.Drawing.Point(425, 27);
this.E6TextBox.Name = "E6TextBox";
this.E6TextBox.Size = new System.Drawing.Size(80, 21);
this.E6TextBox.TabIndex = 19;
@@ -853,15 +803,15 @@ namespace HighWayIot.Winform.UserControlPages
// label5
//
this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(182, 139);
+ this.label5.Location = new System.Drawing.Point(201, 85);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(59, 12);
+ this.label5.Size = new System.Drawing.Size(35, 12);
this.label5.TabIndex = 18;
- this.label5.Text = "贴合层数1";
+ this.label5.Text = "层数1";
//
// E5TextBox
//
- this.E5TextBox.Location = new System.Drawing.Point(247, 136);
+ this.E5TextBox.Location = new System.Drawing.Point(242, 81);
this.E5TextBox.Name = "E5TextBox";
this.E5TextBox.Size = new System.Drawing.Size(80, 21);
this.E5TextBox.TabIndex = 17;
@@ -869,15 +819,15 @@ namespace HighWayIot.Winform.UserControlPages
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(182, 114);
+ this.label4.Location = new System.Drawing.Point(384, 111);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(59, 12);
+ this.label4.Size = new System.Drawing.Size(35, 12);
this.label4.TabIndex = 16;
- this.label4.Text = "备用时间2";
+ this.label4.Text = "宽度3";
//
// E4TextBox
//
- this.E4TextBox.Location = new System.Drawing.Point(247, 110);
+ this.E4TextBox.Location = new System.Drawing.Point(425, 107);
this.E4TextBox.Name = "E4TextBox";
this.E4TextBox.Size = new System.Drawing.Size(80, 21);
this.E4TextBox.TabIndex = 15;
@@ -885,15 +835,15 @@ namespace HighWayIot.Winform.UserControlPages
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(182, 87);
+ this.label3.Location = new System.Drawing.Point(384, 84);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(59, 12);
+ this.label3.Size = new System.Drawing.Size(35, 12);
this.label3.TabIndex = 14;
- this.label3.Text = "备用延时1";
+ this.label3.Text = "层数3";
//
// E3TextBox
//
- this.E3TextBox.Location = new System.Drawing.Point(247, 83);
+ this.E3TextBox.Location = new System.Drawing.Point(425, 80);
this.E3TextBox.Name = "E3TextBox";
this.E3TextBox.Size = new System.Drawing.Size(80, 21);
this.E3TextBox.TabIndex = 13;
@@ -901,7 +851,7 @@ namespace HighWayIot.Winform.UserControlPages
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(116, 61);
+ this.label2.Location = new System.Drawing.Point(111, 59);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(125, 12);
this.label2.TabIndex = 12;
@@ -909,7 +859,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E2TextBox
//
- this.E2TextBox.Location = new System.Drawing.Point(247, 56);
+ this.E2TextBox.Location = new System.Drawing.Point(242, 54);
this.E2TextBox.Name = "E2TextBox";
this.E2TextBox.Size = new System.Drawing.Size(80, 21);
this.E2TextBox.TabIndex = 11;
@@ -917,7 +867,7 @@ namespace HighWayIot.Winform.UserControlPages
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(116, 34);
+ this.label1.Location = new System.Drawing.Point(111, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(125, 12);
this.label1.TabIndex = 10;
@@ -925,7 +875,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// E1TextBox
//
- this.E1TextBox.Location = new System.Drawing.Point(247, 29);
+ this.E1TextBox.Location = new System.Drawing.Point(242, 27);
this.E1TextBox.Name = "E1TextBox";
this.E1TextBox.Size = new System.Drawing.Size(80, 21);
this.E1TextBox.TabIndex = 9;
@@ -1011,6 +961,18 @@ namespace HighWayIot.Winform.UserControlPages
//
// groupbox5
//
+ this.groupbox5.Controls.Add(this.label37);
+ this.groupbox5.Controls.Add(this.label36);
+ this.groupbox5.Controls.Add(this.B5Check);
+ this.groupbox5.Controls.Add(this.B8Check);
+ this.groupbox5.Controls.Add(this.B7Check);
+ this.groupbox5.Controls.Add(this.B9Check);
+ this.groupbox5.Controls.Add(this.B6Check);
+ this.groupbox5.Controls.Add(this.B1Check);
+ this.groupbox5.Controls.Add(this.B4Check);
+ this.groupbox5.Controls.Add(this.B3Check);
+ this.groupbox5.Controls.Add(this.B0Check);
+ this.groupbox5.Controls.Add(this.B2Check);
this.groupbox5.Controls.Add(this.Station5MaterialName);
this.groupbox5.Controls.Add(this.Station4MaterialName);
this.groupbox5.Controls.Add(this.Station3MaterialName);
@@ -1058,6 +1020,126 @@ namespace HighWayIot.Winform.UserControlPages
this.groupbox5.TabStop = false;
this.groupbox5.Text = "公共参数";
//
+ // label37
+ //
+ this.label37.AutoSize = true;
+ this.label37.Location = new System.Drawing.Point(282, 12);
+ this.label37.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
+ this.label37.Name = "label37";
+ this.label37.Size = new System.Drawing.Size(35, 12);
+ this.label37.TabIndex = 87;
+ this.label37.Text = "宽度3";
+ //
+ // label36
+ //
+ this.label36.AutoSize = true;
+ this.label36.Location = new System.Drawing.Point(237, 12);
+ this.label36.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
+ this.label36.Name = "label36";
+ this.label36.Size = new System.Drawing.Size(35, 12);
+ this.label36.TabIndex = 86;
+ this.label36.Text = "宽度2";
+ //
+ // B5Check
+ //
+ this.B5Check.AutoSize = true;
+ this.B5Check.Location = new System.Drawing.Point(292, 35);
+ this.B5Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B5Check.Name = "B5Check";
+ this.B5Check.Size = new System.Drawing.Size(15, 14);
+ this.B5Check.TabIndex = 85;
+ this.B5Check.UseVisualStyleBackColor = true;
+ //
+ // B8Check
+ //
+ this.B8Check.AutoSize = true;
+ this.B8Check.Location = new System.Drawing.Point(292, 113);
+ this.B8Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B8Check.Name = "B8Check";
+ this.B8Check.Size = new System.Drawing.Size(15, 14);
+ this.B8Check.TabIndex = 84;
+ this.B8Check.UseVisualStyleBackColor = true;
+ //
+ // B7Check
+ //
+ this.B7Check.AutoSize = true;
+ this.B7Check.Location = new System.Drawing.Point(292, 87);
+ this.B7Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B7Check.Name = "B7Check";
+ this.B7Check.Size = new System.Drawing.Size(15, 14);
+ this.B7Check.TabIndex = 83;
+ this.B7Check.UseVisualStyleBackColor = true;
+ //
+ // B9Check
+ //
+ this.B9Check.AutoSize = true;
+ this.B9Check.Location = new System.Drawing.Point(292, 139);
+ this.B9Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B9Check.Name = "B9Check";
+ this.B9Check.Size = new System.Drawing.Size(15, 14);
+ this.B9Check.TabIndex = 82;
+ this.B9Check.UseVisualStyleBackColor = true;
+ //
+ // B6Check
+ //
+ this.B6Check.AutoSize = true;
+ this.B6Check.Location = new System.Drawing.Point(292, 61);
+ this.B6Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B6Check.Name = "B6Check";
+ this.B6Check.Size = new System.Drawing.Size(15, 14);
+ this.B6Check.TabIndex = 81;
+ this.B6Check.UseVisualStyleBackColor = true;
+ //
+ // B1Check
+ //
+ this.B1Check.AutoSize = true;
+ this.B1Check.Location = new System.Drawing.Point(247, 61);
+ this.B1Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B1Check.Name = "B1Check";
+ this.B1Check.Size = new System.Drawing.Size(15, 14);
+ this.B1Check.TabIndex = 80;
+ this.B1Check.UseVisualStyleBackColor = true;
+ //
+ // B4Check
+ //
+ this.B4Check.AutoSize = true;
+ this.B4Check.Location = new System.Drawing.Point(247, 139);
+ this.B4Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B4Check.Name = "B4Check";
+ this.B4Check.Size = new System.Drawing.Size(15, 14);
+ this.B4Check.TabIndex = 79;
+ this.B4Check.UseVisualStyleBackColor = true;
+ //
+ // B3Check
+ //
+ this.B3Check.AutoSize = true;
+ this.B3Check.Location = new System.Drawing.Point(247, 113);
+ this.B3Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B3Check.Name = "B3Check";
+ this.B3Check.Size = new System.Drawing.Size(15, 14);
+ this.B3Check.TabIndex = 78;
+ this.B3Check.UseVisualStyleBackColor = true;
+ //
+ // B0Check
+ //
+ this.B0Check.AutoSize = true;
+ this.B0Check.Location = new System.Drawing.Point(247, 35);
+ this.B0Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B0Check.Name = "B0Check";
+ this.B0Check.Size = new System.Drawing.Size(15, 14);
+ this.B0Check.TabIndex = 77;
+ this.B0Check.UseVisualStyleBackColor = true;
+ //
+ // B2Check
+ //
+ this.B2Check.AutoSize = true;
+ this.B2Check.Location = new System.Drawing.Point(247, 87);
+ this.B2Check.Margin = new System.Windows.Forms.Padding(6);
+ this.B2Check.Name = "B2Check";
+ this.B2Check.Size = new System.Drawing.Size(15, 14);
+ this.B2Check.TabIndex = 76;
+ this.B2Check.UseVisualStyleBackColor = true;
+ //
// Station5MaterialName
//
this.Station5MaterialName.AutoSize = true;
@@ -1127,7 +1209,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.PlcSpecNameLabel.AutoSize = true;
this.PlcSpecNameLabel.Font = new System.Drawing.Font("宋体", 9F);
- this.PlcSpecNameLabel.Location = new System.Drawing.Point(517, 143);
+ this.PlcSpecNameLabel.Location = new System.Drawing.Point(598, 143);
this.PlcSpecNameLabel.Name = "PlcSpecNameLabel";
this.PlcSpecNameLabel.Size = new System.Drawing.Size(23, 12);
this.PlcSpecNameLabel.TabIndex = 68;
@@ -1137,7 +1219,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.label34.AutoSize = true;
this.label34.Font = new System.Drawing.Font("宋体", 9F);
- this.label34.Location = new System.Drawing.Point(437, 143);
+ this.label34.Location = new System.Drawing.Point(518, 143);
this.label34.Name = "label34";
this.label34.Size = new System.Drawing.Size(83, 12);
this.label34.TabIndex = 67;
@@ -1147,7 +1229,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.PlcSpecNoLabel.AutoSize = true;
this.PlcSpecNoLabel.Font = new System.Drawing.Font("宋体", 9F);
- this.PlcSpecNoLabel.Location = new System.Drawing.Point(517, 121);
+ this.PlcSpecNoLabel.Location = new System.Drawing.Point(598, 121);
this.PlcSpecNoLabel.Name = "PlcSpecNoLabel";
this.PlcSpecNoLabel.Size = new System.Drawing.Size(23, 12);
this.PlcSpecNoLabel.TabIndex = 66;
@@ -1157,7 +1239,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.label32.AutoSize = true;
this.label32.Font = new System.Drawing.Font("宋体", 9F);
- this.label32.Location = new System.Drawing.Point(437, 121);
+ this.label32.Location = new System.Drawing.Point(518, 121);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(83, 12);
this.label32.TabIndex = 65;
@@ -1226,7 +1308,7 @@ namespace HighWayIot.Winform.UserControlPages
// label11
//
this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(255, 139);
+ this.label11.Location = new System.Drawing.Point(336, 139);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(53, 12);
this.label11.TabIndex = 41;
@@ -1264,7 +1346,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// RimInchTextBox
//
- this.RimInchTextBox.Location = new System.Drawing.Point(314, 27);
+ this.RimInchTextBox.Location = new System.Drawing.Point(395, 27);
this.RimInchTextBox.Name = "RimInchTextBox";
this.RimInchTextBox.Size = new System.Drawing.Size(100, 21);
this.RimInchTextBox.TabIndex = 32;
@@ -1272,7 +1354,7 @@ namespace HighWayIot.Winform.UserControlPages
// label15
//
this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(255, 31);
+ this.label15.Location = new System.Drawing.Point(336, 31);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(53, 12);
this.label15.TabIndex = 33;
@@ -1290,7 +1372,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// LightWidthTextBox
//
- this.LightWidthTextBox.Location = new System.Drawing.Point(314, 54);
+ this.LightWidthTextBox.Location = new System.Drawing.Point(395, 54);
this.LightWidthTextBox.Name = "LightWidthTextBox";
this.LightWidthTextBox.Size = new System.Drawing.Size(100, 21);
this.LightWidthTextBox.TabIndex = 34;
@@ -1308,7 +1390,7 @@ namespace HighWayIot.Winform.UserControlPages
// label14
//
this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(255, 58);
+ this.label14.Location = new System.Drawing.Point(336, 58);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(53, 12);
this.label14.TabIndex = 35;
@@ -1316,7 +1398,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// SlowDistanceTextBox
//
- this.SlowDistanceTextBox.Location = new System.Drawing.Point(314, 81);
+ this.SlowDistanceTextBox.Location = new System.Drawing.Point(395, 81);
this.SlowDistanceTextBox.Name = "SlowDistanceTextBox";
this.SlowDistanceTextBox.Size = new System.Drawing.Size(100, 21);
this.SlowDistanceTextBox.TabIndex = 36;
@@ -1334,7 +1416,7 @@ namespace HighWayIot.Winform.UserControlPages
// label13
//
this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(273, 85);
+ this.label13.Location = new System.Drawing.Point(354, 85);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(35, 12);
this.label13.TabIndex = 37;
@@ -1352,7 +1434,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// StopDistanceTextBox
//
- this.StopDistanceTextBox.Location = new System.Drawing.Point(314, 108);
+ this.StopDistanceTextBox.Location = new System.Drawing.Point(395, 108);
this.StopDistanceTextBox.Name = "StopDistanceTextBox";
this.StopDistanceTextBox.Size = new System.Drawing.Size(100, 21);
this.StopDistanceTextBox.TabIndex = 38;
@@ -1360,7 +1442,7 @@ namespace HighWayIot.Winform.UserControlPages
// label12
//
this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(273, 112);
+ this.label12.Location = new System.Drawing.Point(354, 112);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(35, 12);
this.label12.TabIndex = 39;
@@ -1368,7 +1450,7 @@ namespace HighWayIot.Winform.UserControlPages
//
// TireWeightTextBox
//
- this.TireWeightTextBox.Location = new System.Drawing.Point(314, 135);
+ this.TireWeightTextBox.Location = new System.Drawing.Point(395, 135);
this.TireWeightTextBox.Name = "TireWeightTextBox";
this.TireWeightTextBox.Size = new System.Drawing.Size(100, 21);
this.TireWeightTextBox.TabIndex = 40;
@@ -1377,7 +1459,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.SpecNameLabel.AutoSize = true;
this.SpecNameLabel.Font = new System.Drawing.Font("宋体", 12F);
- this.SpecNameLabel.Location = new System.Drawing.Point(436, 96);
+ this.SpecNameLabel.Location = new System.Drawing.Point(517, 96);
this.SpecNameLabel.Name = "SpecNameLabel";
this.SpecNameLabel.Size = new System.Drawing.Size(31, 16);
this.SpecNameLabel.TabIndex = 46;
@@ -1387,7 +1469,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.label18.AutoSize = true;
this.label18.Font = new System.Drawing.Font("宋体", 12F);
- this.label18.Location = new System.Drawing.Point(436, 28);
+ this.label18.Location = new System.Drawing.Point(517, 28);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(87, 16);
this.label18.TabIndex = 43;
@@ -1397,7 +1479,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.SpecNoLabel.AutoSize = true;
this.SpecNoLabel.Font = new System.Drawing.Font("宋体", 12F);
- this.SpecNoLabel.Location = new System.Drawing.Point(436, 50);
+ this.SpecNoLabel.Location = new System.Drawing.Point(517, 50);
this.SpecNoLabel.Name = "SpecNoLabel";
this.SpecNoLabel.Size = new System.Drawing.Size(31, 16);
this.SpecNoLabel.TabIndex = 45;
@@ -1407,7 +1489,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.label19.AutoSize = true;
this.label19.Font = new System.Drawing.Font("宋体", 12F);
- this.label19.Location = new System.Drawing.Point(436, 74);
+ this.label19.Location = new System.Drawing.Point(517, 74);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(87, 16);
this.label19.TabIndex = 44;
@@ -1434,6 +1516,7 @@ namespace HighWayIot.Winform.UserControlPages
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.panel1.Controls.Add(this.PositionSelectRefreshButton);
this.panel1.Controls.Add(this.label27);
this.panel1.Controls.Add(this.RefreshWeightButton);
this.panel1.Controls.Add(this.UpdateWeightButton);
@@ -1445,6 +1528,17 @@ namespace HighWayIot.Winform.UserControlPages
this.panel1.Size = new System.Drawing.Size(953, 63);
this.panel1.TabIndex = 5;
//
+ // PositionSelectRefreshButton
+ //
+ this.PositionSelectRefreshButton.Location = new System.Drawing.Point(729, 12);
+ this.PositionSelectRefreshButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.PositionSelectRefreshButton.Name = "PositionSelectRefreshButton";
+ this.PositionSelectRefreshButton.Size = new System.Drawing.Size(103, 39);
+ this.PositionSelectRefreshButton.TabIndex = 9;
+ this.PositionSelectRefreshButton.Text = "工位参数更新";
+ this.PositionSelectRefreshButton.UseVisualStyleBackColor = true;
+ this.PositionSelectRefreshButton.Click += new System.EventHandler(this.PositionSelectRefreshButton_Click);
+ //
// label27
//
this.label27.AutoSize = true;
@@ -1499,120 +1593,77 @@ namespace HighWayIot.Winform.UserControlPages
this.DeleteWeightButton.UseVisualStyleBackColor = true;
this.DeleteWeightButton.Click += new System.EventHandler(this.DeleteWeightButton_Click);
//
- // Id
+ // RId
//
- this.Id.DataPropertyName = "Id";
- this.Id.HeaderText = "ID";
- this.Id.Name = "Id";
- this.Id.ReadOnly = true;
- this.Id.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.Id.Width = 40;
+ 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;
//
- // MaterialCode
+ // RecipeCode
//
- this.MaterialCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
- this.MaterialCode.DataPropertyName = "MaterialCode";
- this.MaterialCode.HeaderText = "胶料编码";
- this.MaterialCode.Name = "MaterialCode";
- this.MaterialCode.ReadOnly = true;
- this.MaterialCode.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ 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;
//
- // MaterialName
+ // RecipeName
//
- this.MaterialName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
- this.MaterialName.DataPropertyName = "MaterialName";
- this.MaterialName.HeaderText = "胶料名称";
- this.MaterialName.Name = "MaterialName";
- this.MaterialName.ReadOnly = true;
- this.MaterialName.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ 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;
//
- // MaterialType
+ // RecipeSpecCode
//
- this.MaterialType.DataPropertyName = "MaterialType";
- this.MaterialType.HeaderText = "胶料类型";
- this.MaterialType.Name = "MaterialType";
- this.MaterialType.ReadOnly = true;
- this.MaterialType.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.MaterialType.Width = 89;
+ 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;
//
- // SetThickness
+ // RecipeSpecName
//
- this.SetThickness.DataPropertyName = "SetThickness";
- this.SetThickness.HeaderText = "厚度";
- this.SetThickness.Name = "SetThickness";
- this.SetThickness.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.SetThickness.Width = 59;
+ 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;
//
- // SetWidth1
+ // SizeKind
//
- this.SetWidth1.DataPropertyName = "SetWidth";
- this.SetWidth1.HeaderText = "宽度1";
- this.SetWidth1.Name = "SetWidth1";
- this.SetWidth1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.SetWidth1.Width = 60;
+ 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;
//
- // SetLayer1
+ // FixedWidth
//
- this.SetLayer1.DataPropertyName = "SetLayer";
- this.SetLayer1.HeaderText = "层数1";
- this.SetLayer1.Name = "SetLayer1";
- this.SetLayer1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.SetLayer1.Width = 60;
+ 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;
//
- // SetWidth2
+ // WeightError
//
- this.SetWidth2.DataPropertyName = "SetWidth2";
- this.SetWidth2.HeaderText = "宽度2";
- this.SetWidth2.Name = "SetWidth2";
- this.SetWidth2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.SetWidth2.Width = 60;
- //
- // SetLayer2
- //
- this.SetLayer2.DataPropertyName = "SetLayer2";
- this.SetLayer2.HeaderText = "层数2";
- this.SetLayer2.Name = "SetLayer2";
- this.SetLayer2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.SetLayer2.Width = 60;
- //
- // SetWidth3
- //
- this.SetWidth3.DataPropertyName = "SetWidth3";
- this.SetWidth3.HeaderText = "宽度3";
- this.SetWidth3.Name = "SetWidth3";
- this.SetWidth3.Width = 60;
- //
- // SetLayer3
- //
- this.SetLayer3.DataPropertyName = "SetLayer3";
- this.SetLayer3.HeaderText = "层数3";
- this.SetLayer3.Name = "SetLayer3";
- this.SetLayer3.Width = 60;
- //
- // SetWeight
- //
- this.SetWeight.DataPropertyName = "SetWeight";
- this.SetWeight.HeaderText = "重量";
- this.SetWeight.Name = "SetWeight";
- this.SetWeight.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.SetWeight.Width = 70;
- //
- // SetError
- //
- this.SetError.DataPropertyName = "SetError";
- this.SetError.HeaderText = "公差";
- this.SetError.Name = "SetError";
- this.SetError.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.SetError.Width = 55;
- //
- // WeightIsUse
- //
- this.WeightIsUse.DataPropertyName = "IsUse";
- this.WeightIsUse.HeaderText = "启用";
- this.WeightIsUse.Name = "WeightIsUse";
- this.WeightIsUse.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.WeightIsUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
- this.WeightIsUse.Width = 40;
+ this.WeightError.DataPropertyName = "WeightError";
+ this.WeightError.HeaderText = "重量公差";
+ this.WeightError.Name = "WeightError";
+ this.WeightError.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.WeightError.Width = 59;
//
// RecipeConfigPage
//
@@ -1753,16 +1804,32 @@ namespace HighWayIot.Winform.UserControlPages
private Label Station3MaterialName;
private Label Station2MaterialName;
private Label Station1MaterialName;
- private Label label20;
- private TextBox E15TextBox;
- private Label label24;
- private TextBox E14TextBox;
- private Label label25;
- private TextBox E13TextBox;
- private Label label33;
- private TextBox E12TextBox;
- private Label label35;
- private TextBox E11TextBox;
+ private CheckBox B5Check;
+ private CheckBox B8Check;
+ private CheckBox B7Check;
+ private CheckBox B9Check;
+ private CheckBox B6Check;
+ private CheckBox B1Check;
+ private CheckBox B4Check;
+ private CheckBox B3Check;
+ private CheckBox B0Check;
+ private CheckBox B2Check;
+ private Label label37;
+ private Label label36;
+ private Button PositionSelectRefreshButton;
+ private DataGridViewTextBoxColumn Id;
+ private DataGridViewTextBoxColumn MaterialCode;
+ private DataGridViewTextBoxColumn MaterialName;
+ private DataGridViewTextBoxColumn MaterialType;
+ private DataGridViewTextBoxColumn SetThickness;
+ private DataGridViewTextBoxColumn SetWidth2;
+ private DataGridViewTextBoxColumn SetLayer2;
+ private DataGridViewTextBoxColumn SetWidth3;
+ private DataGridViewTextBoxColumn SetLayer3;
+ private DataGridViewTextBoxColumn SetWidth1;
+ private DataGridViewTextBoxColumn SetLayer1;
+ private DataGridViewTextBoxColumn SetWeight;
+ private DataGridViewTextBoxColumn SetError;
private DataGridViewTextBoxColumn RId;
private DataGridViewTextBoxColumn RecipeCode;
private DataGridViewTextBoxColumn RecipeName;
@@ -1771,20 +1838,5 @@ namespace HighWayIot.Winform.UserControlPages
private DataGridViewTextBoxColumn SizeKind;
private DataGridViewTextBoxColumn FixedWidth;
private DataGridViewTextBoxColumn WeightError;
- private DataGridViewCheckBoxColumn IsUse;
- private DataGridViewTextBoxColumn Id;
- private DataGridViewTextBoxColumn MaterialCode;
- private DataGridViewTextBoxColumn MaterialName;
- private DataGridViewTextBoxColumn MaterialType;
- private DataGridViewTextBoxColumn SetThickness;
- private DataGridViewTextBoxColumn SetWidth1;
- private DataGridViewTextBoxColumn SetLayer1;
- private DataGridViewTextBoxColumn SetWidth2;
- private DataGridViewTextBoxColumn SetLayer2;
- private DataGridViewTextBoxColumn SetWidth3;
- private DataGridViewTextBoxColumn SetLayer3;
- private DataGridViewTextBoxColumn SetWeight;
- private DataGridViewTextBoxColumn SetError;
- private DataGridViewCheckBoxColumn WeightIsUse;
}
}
diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs
index 998f35a..a8ae06b 100644
--- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs
+++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs
@@ -10,6 +10,7 @@ using HighWayIot.Winform.UserControlPages.SysConfigPages;
using HslCommunication;
using HslCommunication.Profinet.Siemens.S7PlusHelper;
using Models;
+using NPOI.SS.Formula.Functions;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -21,6 +22,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Schema;
+using static Org.BouncyCastle.Math.EC.ECCurve;
namespace HighWayIot.Winform.UserControlPages
{
@@ -197,8 +199,8 @@ namespace HighWayIot.Winform.UserControlPages
{
AddRecipeForm form = new AddRecipeForm();
if (form.ShowDialog() == DialogResult.OK)
- {
- if(form.CloseValue == null)
+ {
+ if (form.CloseValue == null)
{
return;
}
@@ -333,9 +335,10 @@ namespace HighWayIot.Winform.UserControlPages
entity.RecipeSpecCode = nowRow.Cells["RecipeSpecCode"].Value.ToString().Trim();
entity.RecipeSpecName = nowRow.Cells["RecipeSpecName"].Value.ToString().Trim();
entity.SizeKind = int.Parse(Convert.ToString(nowRow.Cells["SizeKind"].Value) ?? "0");
- entity.FixedWidth = decimal.Parse(Convert.ToString(nowRow.Cells["FixedWidth"].Value) ?? "0");
- entity.WeightError = int.Parse(Convert.ToString(nowRow.Cells["WeightError"].Value) ?? "0");
- entity.IsUse = bool.Parse(Convert.ToString(nowRow.Cells["IsUse"].Value) ?? "0");
+ 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.IsDeleted = false;
}
catch (Exception ex)
@@ -350,6 +353,8 @@ namespace HighWayIot.Winform.UserControlPages
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);
MessageBox.Show("配方更新成功!");
SqlLogHelper.AddLog($"配方更新成功 [{NowRecipeCode}]");
@@ -400,45 +405,92 @@ namespace HighWayIot.Winform.UserControlPages
if (form.OutValue == null)
{
return;
- }
+ }
//连同更新PLC字段信息
var config = openMixConfig.Where(x => x.MaterialName == form.OutValue.MaterialName).FirstOrDefault();
if (config != null)
{
//更新公众参数
ZxRecipeParaEntity recipePara = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(form.OutValue.RecipeCode).FirstOrDefault();
+ //自动工位选择
var prop = recipePara.GetType().GetProperty($"S{config.StationNo + 1}");
- prop.SetValue(recipePara, true);
+ if (prop != null)
+ {
+ prop.SetValue(recipePara, true);
+ }
+ //自动包边选择
+ if (!(form.OutValue.SetLayer2 == 0
+ || form.OutValue.SetLayer2 == null
+ || form.OutValue.SetWidth2 == null
+ || form.OutValue.SetWidth2 == 0))
+ {
+ var propp = recipePara.GetType().GetProperty($"B{config.StationNo - 1}");
+ if (propp != null)
+ {
+ propp.SetValue(recipePara, true);
+ }
+ }
+ if (!(form.OutValue.SetLayer3 == 0
+ || form.OutValue.SetLayer3 == null
+ || form.OutValue.SetWidth3 == null
+ || form.OutValue.SetWidth3 == 0))
+ {
+ var propp = recipePara.GetType().GetProperty($"B{config.StationNo + 4}");
+ if (propp != null)
+ {
+ propp.SetValue(recipePara, true);
+ }
+ }
+ //设置胎体重量
if (form.OutValue.MaterialType == "胎面胶")
{
recipePara.TireWeight = Convert.ToSingle(form.OutValue.SetWeight);
+ switch (config.StationNo)
+ {
+ case 3:
+ recipePara.S7 = true;
+ break;
+ case 4:
+ recipePara.S8 = true;
+ break;
+ case 5:
+ recipePara.S9 = true;
+ break;
+ default:
+ break;
+ }
}
zxRecipeParaService.UpdateRecipeParaInfo(recipePara);
//更新工位字段
var positionInfo = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.Position == config.StationNo && x.RecipeCode == NowRecipeCode);
- if(positionInfo.Count == 0)
+ if (positionInfo.Count == 0) //如果不存在就新增
{
ZxRecipePositionParaEntity zxRecipePositionParaEntity = new ZxRecipePositionParaEntity()
{
RecipeCode = NowRecipeCode,
Position = config.StationNo,
- E1 = 45,
+ E1 = 15,
E2 = 52,
- E5 = form.OutValue.SetLayer,
+ E5 = form.OutValue.SetLayer * 10,
E9 = (int)form.OutValue.SetWidth,
- E6 = form.OutValue.SetLayer2,
+ E6 = form.OutValue.SetLayer2 * 10,
E7 = (int)form.OutValue.SetWidth2,
- E10 = 2900
+ E3 = form.OutValue.SetLayer3 * 10,
+ E4 = (int)form.OutValue.SetWidth3,
+ E10 = 800,
+ E8 = 300
};
zxRecipePositionParaService.InsertRecipePositionParaInfo(zxRecipePositionParaEntity);
}
- else
+ else //存在就更新
{
var entity = positionInfo.FirstOrDefault();
- entity.E5 = form.OutValue.SetLayer;
+ entity.E5 = form.OutValue.SetLayer * 10;
entity.E9 = (int)form.OutValue.SetWidth;
- entity.E6 = form.OutValue.SetLayer2;
+ entity.E6 = form.OutValue.SetLayer2 * 10;
entity.E7 = (int)form.OutValue.SetWidth2;
+ entity.E3 = form.OutValue.SetLayer3 * 10;
+ entity.E4 = (int)form.OutValue.SetWidth3;
zxRecipePositionParaService.UpdateRecipePositionParaInfo(entity);
}
}
@@ -524,15 +576,15 @@ namespace HighWayIot.Winform.UserControlPages
entity.MaterialName = nowRow.Cells["MaterialName"].Value.ToString().Trim();
entity.MaterialType = nowRow.Cells["MaterialType"].Value.ToString().Trim();
entity.SetThickness = decimal.Parse(Convert.ToString(nowRow.Cells["SetThickness"].Value ?? "0"));
- entity.SetWidth = decimal.Parse(Convert.ToString(nowRow.Cells["SetWidth1"].Value ?? "0"));
- entity.SetWidth2 = decimal.Parse(Convert.ToString(nowRow.Cells["SetWidth2"].Value ?? "0"));
- entity.SetWidth3 = decimal.Parse(Convert.ToString(nowRow.Cells["SetWidth3"].Value ?? "0"));
+ entity.SetWidth = int.Parse(Convert.ToString(nowRow.Cells["SetWidth1"].Value ?? "0"));
+ entity.SetWidth2 = int.Parse(Convert.ToString(nowRow.Cells["SetWidth2"].Value ?? "0"));
+ entity.SetWidth3 = int.Parse(Convert.ToString(nowRow.Cells["SetWidth3"].Value ?? "0"));
entity.SetLayer = int.Parse(Convert.ToString(nowRow.Cells["SetLayer1"].Value ?? "0"));
entity.SetLayer2 = int.Parse(Convert.ToString(nowRow.Cells["SetLayer2"].Value ?? "0"));
entity.SetLayer3 = int.Parse(Convert.ToString(nowRow.Cells["SetLayer3"].Value ?? "0"));
- entity.SetWeight = decimal.Parse(Convert.ToString(nowRow.Cells["SetWeight"].Value ?? "0"));
+ entity.SetWeight = int.Parse(Convert.ToString(nowRow.Cells["SetWeight"].Value ?? "0"));
entity.SetError = decimal.Parse(Convert.ToString(nowRow.Cells["SetError"].Value ?? "0"));
- entity.IsUse = bool.Parse(Convert.ToString(nowRow.Cells["WeightIsUse"].Value));
+ //entity.IsUse = bool.Parse(Convert.ToString(nowRow.Cells["WeightIsUse"].Value));
entity.IsDeleted = false;
}
catch (Exception ex)
@@ -543,38 +595,81 @@ namespace HighWayIot.Winform.UserControlPages
if (zxWeightService.UpdateWeightInfo(entity))
{
+ var config = openMixConfig.Where(x => x.MaterialName == entity.MaterialName).FirstOrDefault();
+ ZxRecipeParaEntity recipePara = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(entity.RecipeCode).FirstOrDefault();
+ //自动包边选择
+ if (!(entity.SetLayer2 == 0
+ || entity.SetLayer2 == null
+ || entity.SetWidth2 == null
+ || entity.SetWidth2 == 0))
+ {
+ var propp = recipePara.GetType().GetProperty($"B{config.StationNo - 1}");
+ if (propp != null)
+ {
+ propp.SetValue(recipePara, true);
+ }
+ }
+ else
+ {
+ var propp = recipePara.GetType().GetProperty($"B{config.StationNo - 1}");
+ if (propp != null)
+ {
+ propp.SetValue(recipePara, false);
+ }
+ }
+ if (!(entity.SetLayer3 == 0
+ || entity.SetLayer3 == null
+ || entity.SetWidth3 == null
+ || entity.SetWidth3 == 0))
+ {
+ var propp = recipePara.GetType().GetProperty($"B{config.StationNo + 4}");
+ if (propp != null)
+ {
+ propp.SetValue(recipePara, true);
+ }
+ }
+ else
+ {
+ var propp = recipePara.GetType().GetProperty($"B{config.StationNo + 4}");
+ if (propp != null)
+ {
+ propp.SetValue(recipePara, false);
+ }
+ }
//是否更新重量
if (entity.MaterialType == "胎面胶")
{
- ZxRecipeParaEntity recipePara = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(entity.RecipeCode).FirstOrDefault();
recipePara.TireWeight = Convert.ToSingle(entity.SetWeight);
- zxRecipeParaService.UpdateRecipeParaInfo(recipePara);
}
- //连同更新PLC字段信息
- var config = openMixConfig.Where(x => x.MaterialName == entity.MaterialName).FirstOrDefault();
+ zxRecipeParaService.UpdateRecipeParaInfo(recipePara);
+ //连同更新配方字段信息
if (config != null)
{
var positionInfo = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.Position == config.StationNo && x.RecipeCode == NowRecipeCode);
if (positionInfo.Count == 0)
{
- ZxRecipePositionParaEntity zxRecipePositionParaEntity = new ZxRecipePositionParaEntity()
+ ZxRecipePositionParaEntity zxRecipePositionParaEntity = new ZxRecipePositionParaEntity() //没有就添加
{
RecipeCode = NowRecipeCode,
Position = config.StationNo,
- E5 = entity.SetLayer,
+ E5 = entity.SetLayer * 10,
E9 = (int)entity.SetWidth,
- E6 = entity.SetLayer2,
+ E6 = entity.SetLayer2 * 10,
E7 = (int)entity.SetWidth2,
+ E3 = entity.SetLayer3 * 10,
+ E4 = (int)entity.SetWidth3,
};
zxRecipePositionParaService.InsertRecipePositionParaInfo(zxRecipePositionParaEntity);
}
- else
+ else //有就修改
{
var positionEntity = positionInfo.FirstOrDefault();
- positionEntity.E5 = entity.SetLayer;
+ positionEntity.E5 = entity.SetLayer * 10;
positionEntity.E9 = (int)entity.SetWidth;
- positionEntity.E6 = entity.SetLayer2;
+ positionEntity.E6 = entity.SetLayer2 * 10;
positionEntity.E7 = (int)entity.SetWidth2;
+ positionEntity.E3 = entity.SetLayer3 * 10;
+ positionEntity.E4 = (int)entity.SetWidth3;
zxRecipePositionParaService.UpdateRecipePositionParaInfo(positionEntity);
}
}
@@ -725,6 +820,7 @@ namespace HighWayIot.Winform.UserControlPages
GetPublicParaValue();
GetPrivateParaValue(index);
+
//查重
var paraEntity = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(NowRecipeCode);
var positionParaEntity = zxRecipePositionParaService.GetRecipePositionParaInfoByRecipeCode(NowRecipeCode);
@@ -785,6 +881,144 @@ namespace HighWayIot.Winform.UserControlPages
//保存贴合参数
}
+ ///
+ /// 全部的工位参数刷新
+ ///
+ ///
+ ///
+ private void PositionSelectRefreshButton_Click(object sender, EventArgs e)
+ {
+ if (MessageBox.Show("确定要按照配方信息称量信息更新所有PLC配方参数?可能会导致数据丢失不可恢复", "确认", MessageBoxButtons.OKCancel) != DialogResult.OK)
+ {
+ return;
+ }
+
+ try
+ {
+ //获取所有称重信息
+ List allWeightData = zxWeightService.GetWeightInfos();
+ List allRecipeData = zxRecipeService.GetRecipeInfos();
+ List allParaData = zxRecipeParaService.GetRecipeParaInfos();
+ List allPositionData = zxRecipePositionParaService.GetRecipePositionParaInfos();
+ //先把公共选择参数全部归零
+ foreach(ZxRecipeParaEntity para in allParaData)
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ var propS = para.GetType().GetProperty($"S{i}");
+ if (propS != null)
+ {
+ propS.SetValue(para, false);
+ }
+ var propB = para.GetType().GetProperty($"B{i}");
+ if (propB != null)
+ {
+ propB.SetValue(para, false);
+ }
+ }
+ var pE = allRecipeData.Where(x => x.RecipeCode == para.RecipeCode).FirstOrDefault();
+ if (pE != null)
+ {
+ para.RimInch = pE.SizeKind;
+ para.LightWidth = (int?)pE.FixedWidth;
+ }
+ }
+ foreach (ZxWeightEntity entity in allWeightData)
+ {
+ //工位参数
+ int positionNo;
+ var openMixinfo = openMixConfig.Where(x => x.MaterialName == entity.MaterialName).FirstOrDefault();
+ if(openMixinfo == null)
+ {
+ continue;
+ }
+ else
+ {
+ positionNo = openMixinfo.StationNo;
+ }
+
+ allPositionData.Where(x => x.RecipeCode == entity.RecipeCode && x.Position == positionNo)
+ .ToList().ForEach(p =>
+ {
+ p.E5 = entity.SetLayer * 10;
+ p.E9 = (int?)entity.SetWidth;
+ p.E6 = entity.SetLayer2 * 10;
+ p.E7 = (int?)entity.SetWidth2;
+ p.E3 = entity.SetLayer3 * 10;
+ p.E4 = (int?)entity.SetWidth3;
+ });
+ //公共参数
+ allParaData.Where(x => x.RecipeCode == entity.RecipeCode)
+ .ToList().ForEach(p =>
+ {
+ //自动工位选择
+ var prop = p.GetType().GetProperty($"S{positionNo + 1}");
+ if (prop != null)
+ {
+ prop.SetValue(p, true);
+ }
+ //自动包边选择
+ if (!(entity.SetLayer2 == 0
+ || entity.SetLayer2 == null
+ || entity.SetWidth2 == null
+ || entity.SetWidth2 == 0))
+ {
+ var propp = p.GetType().GetProperty($"B{positionNo - 1}");
+ if (propp != null)
+ {
+ propp.SetValue(p, true);
+ }
+ }
+ if (!(entity.SetLayer3 == 0
+ || entity.SetLayer3 == null
+ || entity.SetWidth3 == null
+ || entity.SetWidth3 == 0))
+ {
+ var propp = p.GetType().GetProperty($"B{positionNo + 4}");
+ if (propp != null)
+ {
+ propp.SetValue(p, true);
+ }
+ }
+ //设置胎体重量
+ if (entity.MaterialType == "胎面胶")
+ {
+ p.TireWeight = Convert.ToSingle(entity.SetWeight);
+ switch (positionNo)
+ {
+ case 3:
+ p.S7 = true;
+ break;
+ case 4:
+ p.S8 = true;
+ break;
+ case 5:
+ p.S9 = true;
+ break;
+ default:
+ break;
+ }
+ }
+ });
+ }
+ if (!zxRecipeParaService.UpdateRangeRecipeParaInfo(allParaData))
+ {
+ MessageBox.Show("修改失败");
+ return;
+ }
+ if (!zxRecipePositionParaService.UpdateRecipePositionParaInfo(allPositionData))
+ {
+ MessageBox.Show("修改失败");
+ return;
+ }
+ MessageBox.Show("修改成功");
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("修改失败 ERROR:" + ex.Message);
+ }
+ }
+
///
/// 初始化工位参数
///
@@ -850,11 +1084,6 @@ namespace HighWayIot.Winform.UserControlPages
E8TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E8);
E9TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E9);
E10TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E10);
- E11TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E11);
- E12TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E12);
- E13TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E13);
- E14TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E14);
- E15TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E15);
}
///
@@ -872,6 +1101,17 @@ namespace HighWayIot.Winform.UserControlPages
S8Check.Checked = paraEntity.S8 ?? false;
S9Check.Checked = paraEntity.S9 ?? false;
+ B0Check.Checked = paraEntity.B0 ?? false;
+ B1Check.Checked = paraEntity.B1 ?? false;
+ B2Check.Checked = paraEntity.B2 ?? false;
+ B3Check.Checked = paraEntity.B3 ?? false;
+ B4Check.Checked = paraEntity.B4 ?? false;
+ B5Check.Checked = paraEntity.B5 ?? false;
+ B6Check.Checked = paraEntity.B6 ?? false;
+ B7Check.Checked = paraEntity.B7 ?? false;
+ B8Check.Checked = paraEntity.B8 ?? false;
+ B9Check.Checked = paraEntity.B9 ?? false;
+
RimInchTextBox.Text = GeneralUtils.IntEmptyOrToString(paraEntity.RimInch);
LightWidthTextBox.Text = GeneralUtils.IntEmptyOrToString(paraEntity.LightWidth);
SlowDistanceTextBox.Text = GeneralUtils.IntEmptyOrToString(paraEntity.SlowDistance);
@@ -899,11 +1139,6 @@ namespace HighWayIot.Winform.UserControlPages
e.E8 = GeneralUtils.StringNullOrToInt(E8TextBox.Text);
e.E9 = GeneralUtils.StringNullOrToInt(E9TextBox.Text);
e.E10 = GeneralUtils.StringNullOrToInt(E10TextBox.Text);
- e.E11 = GeneralUtils.StringNullOrToInt(E11TextBox.Text);
- e.E12 = GeneralUtils.StringNullOrToInt(E12TextBox.Text);
- e.E13 = GeneralUtils.StringNullOrToInt(E13TextBox.Text);
- e.E14 = GeneralUtils.StringNullOrToInt(E14TextBox.Text);
- e.E15 = GeneralUtils.StringNullOrToInt(E15TextBox.Text);
e.Position = GetSelectIndex();
e.RecipeCode = NowRecipeCode;
@@ -924,6 +1159,17 @@ namespace HighWayIot.Winform.UserControlPages
zxRecipeParaEntity.S7 = S7Check.Checked;
zxRecipeParaEntity.S8 = S8Check.Checked;
zxRecipeParaEntity.S9 = S9Check.Checked;
+
+ zxRecipeParaEntity.B0 = B0Check.Checked;
+ zxRecipeParaEntity.B1 = B1Check.Checked;
+ zxRecipeParaEntity.B2 = B2Check.Checked;
+ zxRecipeParaEntity.B3 = B3Check.Checked;
+ zxRecipeParaEntity.B4 = B4Check.Checked;
+ zxRecipeParaEntity.B5 = B5Check.Checked;
+ zxRecipeParaEntity.B6 = B6Check.Checked;
+ zxRecipeParaEntity.B7 = B7Check.Checked;
+ zxRecipeParaEntity.B8 = B8Check.Checked;
+ zxRecipeParaEntity.B9 = B9Check.Checked;
zxRecipeParaEntity.RimInch = GeneralUtils.StringNullOrToInt(RimInchTextBox.Text);
zxRecipeParaEntity.LightWidth = GeneralUtils.StringNullOrToInt(LightWidthTextBox.Text);
zxRecipeParaEntity.SlowDistance = GeneralUtils.StringNullOrToInt(SlowDistanceTextBox.Text);
@@ -1249,418 +1495,422 @@ namespace HighWayIot.Winform.UserControlPages
//}
}
- ///
- /// 配方数据同步方法
- ///
- private void RecipeDataSync(List sourceEntity)
- {
- foreach (var newRecipes in sourceEntity)
- {
- //////////////////////////////更新配方表/////////////////////////////////
- var newEneitys = RecipeLists.Where(x => x.RecipeCode == newRecipes.RecipeCode).ToList();
- if (newEneitys.Count > 0) //有就更新
- {
- //配方
- newEneitys[0].RecipeSpecCode = newRecipes.SpecCode;
- newEneitys[0].RecipeSpecName = newRecipes.SpecName;
- newEneitys[0].SizeKind = newRecipes.RimInch;
- newEneitys[0].FixedWidth = newRecipes.FixRubWidth;
- if (!zxRecipeService.UpdateRecipeInfo(newEneitys[0]))
- {
- return;
- }
- }
- else //没有就插入
- {
- ZxRecipeEntity entity = new ZxRecipeEntity()
- {
- RecipeName = newRecipes.RecipeName,
- RecipeCode = newRecipes.RecipeCode,
- RecipeSpecCode = newRecipes.SpecCode,
- RecipeSpecName = newRecipes.SpecName,
- SizeKind = newRecipes.RimInch,
- FixedWidth = newRecipes.FixRubWidth,
- IsUse = true,
- IsDeleted = false,
- };
- zxRecipeService.InsertRecipeInfo(entity);
- }
+ /////
+ ///// 配方数据同步方法
+ /////
+ //private void RecipeDataSync(List sourceEntity)
+ //{
+ // foreach (var newRecipes in sourceEntity)
+ // {
+ // //////////////////////////////更新配方表/////////////////////////////////
+ // var newEneitys = RecipeLists.Where(x => x.RecipeCode == newRecipes.RecipeCode).ToList();
+ // if (newEneitys.Count > 0) //有就更新
+ // {
+ // //配方
+ // newEneitys[0].RecipeSpecCode = newRecipes.SpecCode;
+ // newEneitys[0].RecipeSpecName = newRecipes.SpecName;
+ // newEneitys[0].SizeKind = newRecipes.RimInch;
+ // newEneitys[0].FixedWidth = newRecipes.FixRubWidth;
+ // if (!zxRecipeService.UpdateRecipeInfo(newEneitys[0]))
+ // {
+ // return;
+ // }
+ // }
+ // else //没有就插入
+ // {
+ // ZxRecipeEntity entity = new ZxRecipeEntity()
+ // {
+ // RecipeName = newRecipes.RecipeName,
+ // RecipeCode = newRecipes.RecipeCode,
+ // RecipeSpecCode = newRecipes.SpecCode,
+ // RecipeSpecName = newRecipes.SpecName,
+ // SizeKind = newRecipes.RimInch,
+ // FixedWidth = newRecipes.FixRubWidth,
+ // IsUse = true,
+ // IsDeleted = false,
+ // };
+ // zxRecipeService.InsertRecipeInfo(entity);
+ // }
- /////////////////////////////更新称量信息表////////////////////////////////
- string recipeCode = newRecipes.RecipeCode;
- var material1 = zxMaterialService.GetMaterialInfoByMaterialName(newRecipes.MaterialName1);
- var material2 = zxMaterialService.GetMaterialInfoByMaterialName(newRecipes.MaterialName2);
- var material3 = zxMaterialService.GetMaterialInfoByMaterialName(newRecipes.MaterialName3);
- //物料1
- if (!string.IsNullOrEmpty(newRecipes.MaterialName1))
- {
- if (material1 != null) //有这个物料
- {
- //查询是否有这个配方这个物料的称量 有更改 没有添加
- var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material1.MaterialCode, "基部胶");
- if (weightInfo == null)
- {
- bool a = zxWeightService.InsertWeightInfo(new ZxWeightEntity()
- {
- RecipeCode = recipeCode,
- MaterialCode = material1.MaterialCode,
- MaterialName = material1.MaterialName,
- MaterialType = "基部胶",
- SetWidth = (decimal?)newRecipes.MaterialWidth1,
- SetWeight = (decimal?)newRecipes.MaterialWeight1,
- SetLayer = newRecipes.MaterialLayers1,
- IsDeleted = false,
- IsUse = true
- });
- }
- else
- {
- weightInfo.SetWidth = (decimal?)newRecipes.MaterialWidth1;
- weightInfo.SetWeight = (decimal?)newRecipes.MaterialWeight1;
- weightInfo.SetLayer = newRecipes.MaterialLayers1;
- zxWeightService.UpdateWeightInfo(weightInfo);
- }
- }
- else //没这个物料
- {
- //先添加物料
- material1 = new ZxMaterialEntity()
- {
- MaterialCode = DateTime.Now.ToString("yyyyMMddHHmmssffff"),
- MaterialName = newRecipes.MaterialName1,
- MaterialType = "胶料",
- IsDeleted = false,
- IsUse = true
- };
- zxMaterialService.InsertMaterialInfo(material1);
- //查询是否有这个配方这个物料的称量 有更改 没有添加
- var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material1.MaterialCode, "基部胶");
- if (weightInfo == null) //没有配方数据
- {
- zxWeightService.InsertWeightInfo(new ZxWeightEntity()
- {
- RecipeCode = recipeCode,
- MaterialCode = material1.MaterialCode,
- MaterialName = material1.MaterialName,
- MaterialType = "基部胶",
- SetWidth = (decimal?)newRecipes.MaterialWidth1,
- SetWeight = (decimal?)newRecipes.MaterialWeight1,
- SetLayer = newRecipes.MaterialLayers1,
- IsDeleted = false,
- IsUse = true
- });
- }
- else //有配方数据
- {
- weightInfo.SetWidth = (decimal?)newRecipes.MaterialWidth1;
- weightInfo.SetWeight = (decimal?)newRecipes.MaterialWeight1;
- weightInfo.SetLayer = newRecipes.MaterialLayers1;
- zxWeightService.UpdateWeightInfo(weightInfo);
- }
- }
- }
- //物料2
- if (!string.IsNullOrEmpty(newRecipes.MaterialName2))
- {
- if (material2 != null) //有这个物料
- {
- //查询是否有这个配方这个物料的称量 有更改 没有添加
- var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material2.MaterialCode, "缓冲胶");
- if (weightInfo == null)
- {
- bool a = zxWeightService.InsertWeightInfo(new ZxWeightEntity()
- {
- RecipeCode = recipeCode,
- MaterialCode = material1.MaterialCode,
- MaterialName = material1.MaterialName,
- MaterialType = "缓冲胶",
- SetWidth = (decimal?)newRecipes.MaterialWidth2,
- SetWeight = (decimal?)newRecipes.MaterialWeight2,
- SetLayer = newRecipes.MaterialLayers2,
- IsDeleted = false,
- IsUse = true
- });
- }
- else
- {
- weightInfo.SetWidth = (decimal?)newRecipes.MaterialWidth2;
- weightInfo.SetWeight = (decimal?)newRecipes.MaterialWeight2;
- weightInfo.SetLayer = newRecipes.MaterialLayers2;
- zxWeightService.UpdateWeightInfo(weightInfo);
- }
- }
- else //没这个物料
- {
- //先添加物料
- material2 = new ZxMaterialEntity()
- {
- MaterialCode = DateTime.Now.ToString("yyyyMMddHHmmssffff"),
- MaterialName = newRecipes.MaterialName2,
- MaterialType = "胶料",
- IsDeleted = false,
- IsUse = true
- };
- zxMaterialService.InsertMaterialInfo(material2);
- //查询是否有这个配方这个物料的称量 有更改 没有添加
- var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material2.MaterialCode, "缓冲胶");
- if (weightInfo == null) //没有配方数据
- {
- zxWeightService.InsertWeightInfo(new ZxWeightEntity()
- {
- RecipeCode = recipeCode,
- MaterialCode = material2.MaterialCode,
- MaterialName = material2.MaterialName,
- MaterialType = "缓冲胶",
- SetWidth = (decimal?)newRecipes.MaterialWidth2,
- SetWeight = (decimal?)newRecipes.MaterialWeight2,
- SetLayer = newRecipes.MaterialLayers2,
- IsDeleted = false,
- IsUse = true
- });
- }
- else //有配方数据
- {
- weightInfo.SetWidth = (decimal?)newRecipes.MaterialWidth2;
- weightInfo.SetWeight = (decimal?)newRecipes.MaterialWeight2;
- weightInfo.SetLayer = newRecipes.MaterialLayers2;
- zxWeightService.UpdateWeightInfo(weightInfo);
- }
- }
- }
+ // /////////////////////////////更新称量信息表////////////////////////////////
+ // string recipeCode = newRecipes.RecipeCode;
+ // var material1 = zxMaterialService.GetMaterialInfoByMaterialName(newRecipes.MaterialName1);
+ // var material2 = zxMaterialService.GetMaterialInfoByMaterialName(newRecipes.MaterialName2);
+ // var material3 = zxMaterialService.GetMaterialInfoByMaterialName(newRecipes.MaterialName3);
+ // //物料1
+ // if (!string.IsNullOrEmpty(newRecipes.MaterialName1))
+ // {
+ // if (material1 != null) //有这个物料
+ // {
+ // //查询是否有这个配方这个物料的称量 有更改 没有添加
+ // var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material1.MaterialCode, "基部胶");
+ // if (weightInfo == null)
+ // {
+ // bool a = zxWeightService.InsertWeightInfo(new ZxWeightEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // MaterialCode = material1.MaterialCode,
+ // MaterialName = material1.MaterialName,
+ // MaterialType = "基部胶",
+ // SetWidth = (int?)newRecipes.MaterialWidth1,
+ // SetWeight = (int?)newRecipes.MaterialWeight1,
+ // SetLayer = newRecipes.MaterialLayers1,
+ // IsDeleted = false,
+ // IsUse = true
+ // });
+ // }
+ // else
+ // {
+ // weightInfo.SetWidth = (int?)newRecipes.MaterialWidth1;
+ // weightInfo.SetWeight = (int?)newRecipes.MaterialWeight1;
+ // weightInfo.SetLayer = newRecipes.MaterialLayers1;
+ // zxWeightService.UpdateWeightInfo(weightInfo);
+ // }
+ // }
+ // else //没这个物料
+ // {
+ // //先添加物料
+ // material1 = new ZxMaterialEntity()
+ // {
+ // MaterialCode = DateTime.Now.ToString("yyyyMMddHHmmssffff"),
+ // MaterialName = newRecipes.MaterialName1,
+ // MaterialType = "胶料",
+ // IsDeleted = false,
+ // IsUse = true
+ // };
+ // zxMaterialService.InsertMaterialInfo(material1);
+ // //查询是否有这个配方这个物料的称量 有更改 没有添加
+ // var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material1.MaterialCode, "基部胶");
+ // if (weightInfo == null) //没有配方数据
+ // {
+ // zxWeightService.InsertWeightInfo(new ZxWeightEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // MaterialCode = material1.MaterialCode,
+ // MaterialName = material1.MaterialName,
+ // MaterialType = "基部胶",
+ // SetWidth = (int?)newRecipes.MaterialWidth1,
+ // SetWeight = (int?)newRecipes.MaterialWeight1,
+ // SetLayer = newRecipes.MaterialLayers1,
+ // IsDeleted = false,
+ // IsUse = true
+ // });
+ // }
+ // else //有配方数据
+ // {
+ // weightInfo.SetWidth = (int?)newRecipes.MaterialWidth1;
+ // weightInfo.SetWeight = (int?)newRecipes.MaterialWeight1;
+ // weightInfo.SetLayer = newRecipes.MaterialLayers1;
+ // zxWeightService.UpdateWeightInfo(weightInfo);
+ // }
+ // }
+ // }
+ // //物料2
+ // if (!string.IsNullOrEmpty(newRecipes.MaterialName2))
+ // {
+ // if (material2 != null) //有这个物料
+ // {
+ // //查询是否有这个配方这个物料的称量 有更改 没有添加
+ // var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material2.MaterialCode, "缓冲胶");
+ // if (weightInfo == null)
+ // {
+ // bool a = zxWeightService.InsertWeightInfo(new ZxWeightEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // MaterialCode = material1.MaterialCode,
+ // MaterialName = material1.MaterialName,
+ // MaterialType = "缓冲胶",
+ // SetWidth = (int?)newRecipes.MaterialWidth2,
+ // SetWeight = (int?)newRecipes.MaterialWeight2,
+ // SetLayer = newRecipes.MaterialLayers2,
+ // IsDeleted = false,
+ // IsUse = true
+ // });
+ // }
+ // else
+ // {
+ // weightInfo.SetWidth = (int?)newRecipes.MaterialWidth2;
+ // weightInfo.SetWeight = (int?)newRecipes.MaterialWeight2;
+ // weightInfo.SetLayer = newRecipes.MaterialLayers2;
+ // zxWeightService.UpdateWeightInfo(weightInfo);
+ // }
+ // }
+ // else //没这个物料
+ // {
+ // //先添加物料
+ // material2 = new ZxMaterialEntity()
+ // {
+ // MaterialCode = DateTime.Now.ToString("yyyyMMddHHmmssffff"),
+ // MaterialName = newRecipes.MaterialName2,
+ // MaterialType = "胶料",
+ // IsDeleted = false,
+ // IsUse = true
+ // };
+ // zxMaterialService.InsertMaterialInfo(material2);
+ // //查询是否有这个配方这个物料的称量 有更改 没有添加
+ // var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material2.MaterialCode, "缓冲胶");
+ // if (weightInfo == null) //没有配方数据
+ // {
+ // zxWeightService.InsertWeightInfo(new ZxWeightEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // MaterialCode = material2.MaterialCode,
+ // MaterialName = material2.MaterialName,
+ // MaterialType = "缓冲胶",
+ // SetWidth = (int?)newRecipes.MaterialWidth2,
+ // SetWeight = (int?)newRecipes.MaterialWeight2,
+ // SetLayer = newRecipes.MaterialLayers2,
+ // IsDeleted = false,
+ // IsUse = true
+ // });
+ // }
+ // else //有配方数据
+ // {
+ // weightInfo.SetWidth = (int?)newRecipes.MaterialWidth2;
+ // weightInfo.SetWeight = (int?)newRecipes.MaterialWeight2;
+ // weightInfo.SetLayer = newRecipes.MaterialLayers2;
+ // zxWeightService.UpdateWeightInfo(weightInfo);
+ // }
+ // }
+ // }
- //物料3
- if (!string.IsNullOrEmpty(newRecipes.MaterialName3))
- {
- if (material3 != null) //有这个物料
- {
- //查询是否有这个配方这个物料的称量 有更改 没有添加
- var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material3.MaterialCode, "胎面胶");
- if (weightInfo == null)
- {
- bool a = zxWeightService.InsertWeightInfo(new ZxWeightEntity()
- {
- RecipeCode = recipeCode,
- MaterialCode = material3.MaterialCode,
- MaterialName = material3.MaterialName,
- MaterialType = "胎面胶",
- SetWidth = (decimal?)newRecipes.MaterialWidth3,
- SetWeight = (decimal?)newRecipes.MaterialWeight3,
- SetLayer = newRecipes.MaterialLayers3,
- IsDeleted = false,
- IsUse = true
- });
- }
- else
- {
- weightInfo.SetWidth = (decimal?)newRecipes.MaterialWidth3;
- weightInfo.SetWeight = (decimal?)newRecipes.MaterialWeight3;
- weightInfo.SetLayer = newRecipes.MaterialLayers3;
- zxWeightService.UpdateWeightInfo(weightInfo);
- }
- }
- else //没这个物料
- {
- //先添加物料
- material3 = new ZxMaterialEntity()
- {
- MaterialCode = DateTime.Now.ToString("yyyyMMddHHmmssffff"),
- MaterialName = newRecipes.MaterialName3,
- MaterialType = "胶料",
- IsDeleted = false,
- IsUse = true
- };
- zxMaterialService.InsertMaterialInfo(material3);
- //查询是否有这个配方这个物料的称量 有更改 没有添加
- var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material3.MaterialCode, "胎面胶");
- if (weightInfo == null) //没有配方数据
- {
- zxWeightService.InsertWeightInfo(new ZxWeightEntity()
- {
- RecipeCode = recipeCode,
- MaterialCode = material3.MaterialCode,
- MaterialName = material3.MaterialName,
- MaterialType = "胎面胶",
- SetWidth = (decimal?)newRecipes.MaterialWidth3,
- SetWeight = (decimal?)newRecipes.MaterialWeight3,
- SetLayer = newRecipes.MaterialLayers3,
- IsDeleted = false,
- IsUse = true
- });
- }
- else //有配方数据
- {
- weightInfo.SetWidth = (decimal?)newRecipes.MaterialWidth3;
- weightInfo.SetWeight = (decimal?)newRecipes.MaterialWeight3;
- weightInfo.SetLayer = newRecipes.MaterialLayers3;
- zxWeightService.UpdateWeightInfo(weightInfo);
- }
- }
- }
+ // //物料3
+ // if (!string.IsNullOrEmpty(newRecipes.MaterialName3))
+ // {
+ // if (material3 != null) //有这个物料
+ // {
+ // //查询是否有这个配方这个物料的称量 有更改 没有添加
+ // var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material3.MaterialCode, "胎面胶");
+ // if (weightInfo == null)
+ // {
+ // bool a = zxWeightService.InsertWeightInfo(new ZxWeightEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // MaterialCode = material3.MaterialCode,
+ // MaterialName = material3.MaterialName,
+ // MaterialType = "胎面胶",
+ // SetWidth = (int?)newRecipes.MaterialWidth3,
+ // SetWeight = (int?)newRecipes.MaterialWeight3,
+ // SetLayer = newRecipes.MaterialLayers3,
+ // IsDeleted = false,
+ // IsUse = true
+ // });
+ // }
+ // else
+ // {
+ // weightInfo.SetWidth = (int?)newRecipes.MaterialWidth3;
+ // weightInfo.SetWeight = (int?)newRecipes.MaterialWeight3;
+ // weightInfo.SetLayer = newRecipes.MaterialLayers3;
+ // zxWeightService.UpdateWeightInfo(weightInfo);
+ // }
+ // }
+ // else //没这个物料
+ // {
+ // //先添加物料
+ // material3 = new ZxMaterialEntity()
+ // {
+ // MaterialCode = DateTime.Now.ToString("yyyyMMddHHmmssffff"),
+ // MaterialName = newRecipes.MaterialName3,
+ // MaterialType = "胶料",
+ // IsDeleted = false,
+ // IsUse = true
+ // };
+ // zxMaterialService.InsertMaterialInfo(material3);
+ // //查询是否有这个配方这个物料的称量 有更改 没有添加
+ // var weightInfo = zxWeightService.GetWeightInfos(recipeCode, material3.MaterialCode, "胎面胶");
+ // if (weightInfo == null) //没有配方数据
+ // {
+ // zxWeightService.InsertWeightInfo(new ZxWeightEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // MaterialCode = material3.MaterialCode,
+ // MaterialName = material3.MaterialName,
+ // MaterialType = "胎面胶",
+ // SetWidth = (int?)newRecipes.MaterialWidth3,
+ // SetWeight = (int?)newRecipes.MaterialWeight3,
+ // SetLayer = newRecipes.MaterialLayers3,
+ // IsDeleted = false,
+ // IsUse = true
+ // });
+ // }
+ // else //有配方数据
+ // {
+ // weightInfo.SetWidth = (int?)newRecipes.MaterialWidth3;
+ // weightInfo.SetWeight = (int?)newRecipes.MaterialWeight3;
+ // weightInfo.SetLayer = newRecipes.MaterialLayers3;
+ // zxWeightService.UpdateWeightInfo(weightInfo);
+ // }
+ // }
+ // }
- /////////////////////////////////////更新配方参数//////////////////////////////////////
- ZxRecipeParaEntity recipePara = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeCode).FirstOrDefault();
- if (recipePara == null) //不存早
- {
- recipePara = new ZxRecipeParaEntity()
- {
- SpecName = newRecipes.SpecName,
- SpecCode = newRecipes.SpecCode,
- RimInch = newRecipes.RimInch,
- LightWidth = newRecipes.FixRubWidth,
- TireWeight = newRecipes.TireWeight,
- RecipeCode = recipeCode
- };
+ // /////////////////////////////////////更新配方参数//////////////////////////////////////
+ // ZxRecipeParaEntity recipePara = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeCode).FirstOrDefault();
+ // if (recipePara == null) //不存早
+ // {
+ // recipePara = new ZxRecipeParaEntity()
+ // {
+ // SpecName = newRecipes.SpecName,
+ // SpecCode = newRecipes.SpecCode,
+ // RimInch = newRecipes.RimInch,
+ // LightWidth = newRecipes.FixRubWidth,
+ // TireWeight = newRecipes.TireWeight,
+ // RecipeCode = recipeCode
+ // };
- foreach (var config in openMixConfig) //工位选择设置
- {
- if (config.MaterialName == material1.MaterialName
- || config.MaterialName == material2.MaterialName
- || config.MaterialName == material3.MaterialName)
- {
- try
- {
- var prop = recipePara.GetType().GetProperty($"S{config.StationNo + 1}");
- prop.SetValue(recipePara, true);
- }
- catch
- {
- return;
- }
- }
- }
+ // foreach (var config in openMixConfig) //工位选择设置
+ // {
+ // if (config.MaterialName == material1.MaterialName
+ // || config.MaterialName == material2.MaterialName
+ // || config.MaterialName == material3.MaterialName)
+ // {
+ // try
+ // {
+ // var prop = recipePara.GetType().GetProperty($"S{config.StationNo + 1}");
+ // prop.SetValue(recipePara, true);
+ // }
+ // catch
+ // {
+ // return;
+ // }
+ // }
+ // }
- zxRecipeParaService.InsertRecipeParaInfo(recipePara);
- }
- else //存在
- {
- recipePara.SpecName = newRecipes.SpecName;
- recipePara.SpecCode = newRecipes.SpecCode;
- recipePara.RimInch = newRecipes.RimInch;
- recipePara.LightWidth = newRecipes.FixRubWidth;
- recipePara.TireWeight = newRecipes.TireWeight;
+ // zxRecipeParaService.InsertRecipeParaInfo(recipePara);
+ // }
+ // else //存在
+ // {
+ // recipePara.SpecName = newRecipes.SpecName;
+ // recipePara.SpecCode = newRecipes.SpecCode;
+ // recipePara.RimInch = newRecipes.RimInch;
+ // recipePara.LightWidth = newRecipes.FixRubWidth;
+ // recipePara.TireWeight = newRecipes.TireWeight;
- foreach (var config in openMixConfig) //工位选择设置
- {
- if (config.MaterialName == material1.MaterialName
- || config.MaterialName == material2.MaterialName
- || config.MaterialName == material3.MaterialName)
- {
- try
- {
- var prop = recipePara.GetType().GetProperty($"S{config.StationNo + 1}");
- prop.SetValue(recipePara, true);
- }
- catch
- {
- return;
- }
- }
- }
+ // foreach (var config in openMixConfig) //工位选择设置
+ // {
+ // if (config.MaterialName == material1.MaterialName
+ // || config.MaterialName == material2.MaterialName
+ // || config.MaterialName == material3.MaterialName)
+ // {
+ // try
+ // {
+ // var prop = recipePara.GetType().GetProperty($"S{config.StationNo + 1}");
+ // prop.SetValue(recipePara, true);
+ // }
+ // catch
+ // {
+ // return;
+ // }
+ // }
+ // }
- zxRecipeParaService.UpdateRecipeParaInfo(recipePara);
- }
+ // zxRecipeParaService.UpdateRecipeParaInfo(recipePara);
+ // }
- /////////////////////////////////////更新配方工位参数//////////////////////////////////////
- List positionParaEntities = zxRecipePositionParaService.GetRecipePositionParaInfoByRecipeCode(recipeCode);
+ // /////////////////////////////////////更新配方工位参数//////////////////////////////////////
+ // List positionParaEntities = zxRecipePositionParaService.GetRecipePositionParaInfoByRecipeCode(recipeCode);
- int position = 1;
- for (int i = 0; i < 5; i++)
- {
- try
- {
- var prop = recipePara.GetType().GetProperty($"S{i + 2}");
- object value = prop.GetValue(recipePara);
- // 处理可空类型的null值情况
- if (value == null)
- {
- continue;
- }
- bool positionValue;
- positionValue = Convert.ToBoolean(value);
- if (positionValue == true)
- {
- ZxRecipePositionParaEntity positionPara = positionParaEntities.Where(x => x.Position == (i + 1)).FirstOrDefault();
- if (position == 1)
- {
- if (positionPara == null)//没工位参数
- {
- positionPara = new ZxRecipePositionParaEntity()
- {
- RecipeCode = recipeCode,
- Position = i + 1,
- E5 = newRecipes.MaterialLayers1,
- E9 = (int)newRecipes.MaterialWidth1,
- E6 = newRecipes.MaterialLayers12,
- E7 = (int)newRecipes.MaterialWidth12,
- };
- zxRecipePositionParaService.InsertRecipePositionParaInfo(positionPara);
- }
- else//有工位参数
- {
- positionPara.E5 = newRecipes.MaterialLayers1;
- positionPara.E9 = (int)newRecipes.MaterialWidth1;
- positionPara.E6 = newRecipes.MaterialLayers12;
- positionPara.E7 = (int)newRecipes.MaterialWidth12;
- zxRecipePositionParaService.UpdateRecipePositionParaInfo(positionPara);
- }
- }
- else if (position == 2)
- {
- if (positionPara == null)//没工位参数
- {
- positionPara = new ZxRecipePositionParaEntity()
- {
- RecipeCode = recipeCode,
- Position = i + 1,
- E5 = newRecipes.MaterialLayers2,
- E9 = (int)newRecipes.MaterialWidth2,
- };
- zxRecipePositionParaService.InsertRecipePositionParaInfo(positionPara);
- }
- else//有工位参数
- {
- positionPara.E5 = newRecipes.MaterialLayers2;
- positionPara.E9 = (int)newRecipes.MaterialWidth2;
- zxRecipePositionParaService.UpdateRecipePositionParaInfo(positionPara);
- }
- }
- else
- {
- if (positionPara == null)//没工位参数
- {
- positionPara = new ZxRecipePositionParaEntity()
- {
- RecipeCode = recipeCode,
- Position = i + 1,
- E5 = newRecipes.MaterialLayers3,
- E9 = (int)newRecipes.MaterialWidth3,
- E6 = newRecipes.MaterialLayers32,
- E7 = (int)newRecipes.MaterialWidth32,
- };
- zxRecipePositionParaService.InsertRecipePositionParaInfo(positionPara);
- }
- else//有工位参数
- {
- positionPara.E5 = newRecipes.MaterialLayers3;
- positionPara.E9 = (int)newRecipes.MaterialWidth3;
- positionPara.E6 = newRecipes.MaterialLayers32;
- positionPara.E7 = (int)newRecipes.MaterialWidth32;
- zxRecipePositionParaService.UpdateRecipePositionParaInfo(positionPara);
- }
- }
- position++;
- }
+ // int position = 1;
+ // for (int i = 0; i < 5; i++)
+ // {
+ // try
+ // {
+ // var prop = recipePara.GetType().GetProperty($"S{i + 2}");
+ // object value = prop.GetValue(recipePara);
+ // // 处理可空类型的null值情况
+ // if (value == null)
+ // {
+ // continue;
+ // }
+ // bool positionValue;
+ // positionValue = Convert.ToBoolean(value);
+ // if (positionValue == true)
+ // {
+ // ZxRecipePositionParaEntity positionPara = positionParaEntities.Where(x => x.Position == (i + 1)).FirstOrDefault();
+ // if (position == 1)
+ // {
+ // if (positionPara == null)//没工位参数
+ // {
+ // positionPara = new ZxRecipePositionParaEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // Position = i + 1,
+ // E5 = newRecipes.MaterialLayers1,
+ // E9 = (int)newRecipes.MaterialWidth1,
+ // E6 = newRecipes.MaterialLayers12,
+ // E7 = (int)newRecipes.MaterialWidth12,
+ // };
+ // zxRecipePositionParaService.InsertRecipePositionParaInfo(positionPara);
+ // }
+ // else//有工位参数
+ // {
+ // positionPara.E5 = newRecipes.MaterialLayers1;
+ // positionPara.E9 = (int)newRecipes.MaterialWidth1;
+ // positionPara.E6 = newRecipes.MaterialLayers12;
+ // positionPara.E7 = (int)newRecipes.MaterialWidth12;
+ // zxRecipePositionParaService.UpdateRecipePositionParaInfo(positionPara);
+ // }
+ // }
+ // else if (position == 2)
+ // {
+ // if (positionPara == null)//没工位参数
+ // {
+ // positionPara = new ZxRecipePositionParaEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // Position = i + 1,
+ // E5 = newRecipes.MaterialLayers2,
+ // E9 = (int)newRecipes.MaterialWidth2,
+ // };
+ // zxRecipePositionParaService.InsertRecipePositionParaInfo(positionPara);
+ // }
+ // else//有工位参数
+ // {
+ // positionPara.E5 = newRecipes.MaterialLayers2;
+ // positionPara.E9 = (int)newRecipes.MaterialWidth2;
+ // zxRecipePositionParaService.UpdateRecipePositionParaInfo(positionPara);
+ // }
+ // }
+ // else
+ // {
+ // if (positionPara == null)//没工位参数
+ // {
+ // positionPara = new ZxRecipePositionParaEntity()
+ // {
+ // RecipeCode = recipeCode,
+ // Position = i + 1,
+ // E5 = newRecipes.MaterialLayers3,
+ // E9 = (int)newRecipes.MaterialWidth3,
+ // E6 = newRecipes.MaterialLayers32,
+ // E7 = (int)newRecipes.MaterialWidth32,
+ // };
+ // zxRecipePositionParaService.InsertRecipePositionParaInfo(positionPara);
+ // }
+ // else//有工位参数
+ // {
+ // positionPara.E5 = newRecipes.MaterialLayers3;
+ // positionPara.E9 = (int)newRecipes.MaterialWidth3;
+ // positionPara.E6 = newRecipes.MaterialLayers32;
+ // positionPara.E7 = (int)newRecipes.MaterialWidth32;
+ // zxRecipePositionParaService.UpdateRecipePositionParaInfo(positionPara);
+ // }
+ // }
+ // position++;
+ // }
- }
- catch
- {
- continue;
- }
- }
- }
- }
+ // }
+ // catch
+ // {
+ // continue;
+ // }
+ // }
+ // }
+ //}
#endregion
+ private void RecipeDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
+ {
+
+ }
}
}
diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.resx b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.resx
index d67a87b..881da56 100644
--- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.resx
+++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.resx
@@ -132,12 +132,6 @@
True
-
- True
-
-
- True
-
True
@@ -150,15 +144,18 @@
True
+
+ True
+
+
+ True
+
True
True
-
- True
-
True
@@ -183,7 +180,4 @@
True
-
- True
-
\ No newline at end of file
diff --git a/HighWayIot.Winform/UserControlPages/TestPage.Designer.cs b/HighWayIot.Winform/UserControlPages/TestPage.Designer.cs
index 8cfafec..51b20bd 100644
--- a/HighWayIot.Winform/UserControlPages/TestPage.Designer.cs
+++ b/HighWayIot.Winform/UserControlPages/TestPage.Designer.cs
@@ -47,7 +47,7 @@
//
// button1
//
- this.button1.Location = new System.Drawing.Point(29, 28);
+ this.button1.Location = new System.Drawing.Point(382, 28);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(93, 51);
this.button1.TabIndex = 0;
diff --git a/HighWayIot.Winform/UserControlPages/TestPage.cs b/HighWayIot.Winform/UserControlPages/TestPage.cs
index 995e474..82e13df 100644
--- a/HighWayIot.Winform/UserControlPages/TestPage.cs
+++ b/HighWayIot.Winform/UserControlPages/TestPage.cs
@@ -59,19 +59,6 @@ namespace HighWayIot.Winform.UserControlPages
//PlcType.DataSource = ;
}
- ///
- /// 测试按钮1
- ///
- ///
- ///
- private void button1_Click(object sender, EventArgs e)
- {
- MonitorInsert(
- ZxRecipeService.Instance.GetRecipeInfos().FirstOrDefault().RecipeCode,
- 10.ToString()
- );
- }
-
///
/// RFID测试
///
@@ -90,9 +77,49 @@ namespace HighWayIot.Winform.UserControlPages
///
private void button3_Click(object sender, EventArgs e)
{
- //MessageBox.Show(PlcConnect.ReadByte2("D200", 1).IsSuccess.ToString());
- var res = PlcConnect.PlcWrite2("D310", 123, DataTypeEnum.UInt16);
- MessageBox.Show(res.IsSuccess.ToString());
+ byte[] sideBytes = new byte[2];
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(0, false);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(1, true);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(2, false);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(3, true);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(4, false);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(5, true);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(6, false);
+ sideBytes[0] = sideBytes[0].SetBoolByIndex(7, true);
+ sideBytes[1] = sideBytes[1].SetBoolByIndex(0, false);
+ sideBytes[1] = sideBytes[1].SetBoolByIndex(1, true);
+ ushort sideBitData = sideBytes.FromBytes();
+ sideBytes = BitConverter.GetBytes(sideBitData);
+ if (PlcConnect.PlcWriteBytes2("D409", sideBytes).IsSuccess)
+ {
+ MessageBox.Show("写入成功");
+ }
+ }
+
+ ///
+ /// 测试按钮1
+ ///
+ ///
+ ///
+ private void button1_Click(object sender, EventArgs e)
+ {
+ OperateResult sideResult = PlcConnect.ReadByte2("D409", 1);
+ byte[] sideData;
+ if (sideResult.IsSuccess)
+ {
+ sideData = sideResult.Content;
+ List result = new List();
+ result.Add(sideData[0].GetBoolByIndex(0));
+ result.Add(sideData[0].GetBoolByIndex(1));
+ result.Add(sideData[0].GetBoolByIndex(2));
+ result.Add(sideData[0].GetBoolByIndex(3));
+ result.Add(sideData[0].GetBoolByIndex(4));
+ result.Add(sideData[0].GetBoolByIndex(5));
+ result.Add(sideData[0].GetBoolByIndex(6));
+ result.Add(sideData[0].GetBoolByIndex(7));
+ result.Add(sideData[1].GetBoolByIndex(0));
+ result.Add(sideData[1].GetBoolByIndex(1));
+ }
}
///
@@ -146,33 +173,6 @@ namespace HighWayIot.Winform.UserControlPages
//PlcShowValue.Text = res;
}
- ///
- /// 监控画面信息插入
- ///
- public void MonitorInsert(string recipeCode, string deviceNo)
- {
- ZxRecipeEntity recipeEntity = ZxRecipeService.Instance.GetRecipeInfosByRecipeCode(recipeCode).FirstOrDefault();
- if (recipeEntity == null)
- {
- return;
- }
-
- ZxDailyReportEntity entity = new ZxDailyReportEntity()
- {
- Uuid = Guid.NewGuid().ToString("N"),
- VulcanizationNo = deviceNo,
- StartTime = DateTime.Now,
- RecipeName = recipeEntity.RecipeName,
- RecipeCode = recipeEntity.RecipeCode,
- SpecCode = recipeEntity.RecipeSpecCode,
- DeviceNo = RecipeSendBusiness.RecipeNeededVehicleNo,
- RawTireWeight = (int)ZxRecipeParaService.Instance.GetRecipeParaInfoByRecipeCode(recipeCode).FirstOrDefault()?.TireWeight,
- IsDone = 0
- };
-
- ZxDailyReportService.Instance.InsertDailyReportInfo(entity);
- }
-
///
/// PLC写入按钮
///