change - 优化前端逻辑,修改排程错误,增大前端数据刷新间隔

master
SoulStar 1 month ago
parent 3a994c80ff
commit 5fcdd89323

@ -86,7 +86,8 @@ namespace HighWayIot.Repository.service
ZxDailyReportEntity entity = ZxDailyReportEntity entity =
_repository.AsQueryable() _repository.AsQueryable()
.OrderByDescending(x => x.StartTime) .OrderByDescending(x => x.StartTime)
.First(x => x.DeviceNo == rgvNo); //取最近一小时内未完成的数据,防止取到很久以前的数据
.First(x => x.DeviceNo == rgvNo && x.IsDone == 0 && x.StartTime > (DateTime.Now - TimeSpan.FromMinutes(60)));
return entity; return entity;
} }
catch (Exception ex) catch (Exception ex)

@ -29,7 +29,7 @@ namespace HighWayIot.Winform.Business
public MonitorDataRefreshBusiness() public MonitorDataRefreshBusiness()
{ {
// 启动定时器每隔1秒刷新一次报表数据 // 启动定时器每隔1秒刷新一次报表数据
refreshTimer = new System.Threading.Timer(RefreshData, null, 0, 1000); refreshTimer = new System.Threading.Timer(RefreshData, null, 0, 1600);
} }
/// <summary> /// <summary>

@ -76,50 +76,51 @@ namespace HighWayIot.Winform.Business
} }
var schedulingInfo = zxSchedulingService.GetSchedulingInfo(); var schedulingInfo = zxSchedulingService.GetSchedulingInfo();
if (RecipeSendMode) //通过MES下配方 //if (RecipeSendMode) //通过MES下配方
{ //{
//读同步数据库找到等于0的 // //读同步数据库找到等于0的
List<ZxMesPlanTransferEntity> transferEntity = ZxMesPlanTransferService.Instance.GetRecipeInfos(x => x.RequestFlag == false).ToList(); // List<ZxMesPlanTransferEntity> transferEntity = ZxMesPlanTransferService.Instance.GetRecipeInfos(x => x.RequestFlag == false).ToList();
ZxMesPlanTransferEntity newRecipes; // ZxMesPlanTransferEntity newRecipes;
if (transferEntity.Count > 1) // if (transferEntity.Count > 1)
{ // {
newRecipes = transferEntity.Where(x => x.SyncTime == transferEntity.Max(y => y.SyncTime)).Single(); // newRecipes = transferEntity.Where(x => x.SyncTime == transferEntity.Max(y => y.SyncTime)).Single();
} // }
else if (transferEntity.Count == 0) // else if (transferEntity.Count == 0)
{ // {
return; // return;
} // }
else // else
{ // {
newRecipes = transferEntity.Single(); // newRecipes = transferEntity.Single();
} // }
//同步配方 // //同步配方
SyncRecipe(newRecipes); // SyncRecipe(newRecipes);
ZxMesPlanTransferService.Instance.SetFlagTrue(); // ZxMesPlanTransferService.Instance.SetFlagTrue();
//同步到对应硫化排程的界面 // //同步到对应硫化排程的界面
ZxSchedulingEntity schedulingEntity; // ZxSchedulingEntity schedulingEntity;
if ((destinationVulcanizationNo + 1) <= 62) //上模 // if ((destinationVulcanizationNo + 1) <= 62) //上模
{ // {
schedulingEntity = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1); // schedulingEntity = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1);
schedulingEntity.RecipeName2 = newRecipes.RecipeName; // schedulingEntity.RecipeName2 = newRecipes.RecipeName;
schedulingEntity.RecipeCode2 = newRecipes.RecipeCode; // schedulingEntity.RecipeCode2 = newRecipes.RecipeCode;
} // }
else //下模 // else //下模
{ // {
schedulingEntity = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1 - 62); // schedulingEntity = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1 - 62);
schedulingEntity.RecipeName1 = newRecipes.RecipeName; // schedulingEntity.RecipeName1 = newRecipes.RecipeName;
schedulingEntity.RecipeCode1 = newRecipes.RecipeCode; // schedulingEntity.RecipeCode1 = newRecipes.RecipeCode;
} // }
ZxSchedulingService.Instance.UpdateSchedulingInfo(schedulingEntity); // ZxSchedulingService.Instance.UpdateSchedulingInfo(schedulingEntity);
BaseForm.SchdulingRefreshAction.Invoke(); // BaseForm.SchdulingRefreshAction.Invoke();
} //}
string recipeNo; string recipeNo;
ZxRecipeParaEntity recipeParaInfo; ZxRecipeParaEntity recipeParaInfo;
List<ZxRecipePositionParaEntity> zxRecipePositionParaEntities; List<ZxRecipePositionParaEntity> zxRecipePositionParaEntities;
if ((destinationVulcanizationNo + 1) <= 62) //上模 if ((destinationVulcanizationNo + 1) <= 62) //上模
{ {
recipeNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1).RecipeCode1; recipeNo = schedulingInfo.Single(x => x.Id == destinationVulcanizationNo + 1).RecipeCode1;
//从数据库中取出配方
recipeParaInfo = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeNo).FirstOrDefault(); recipeParaInfo = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(recipeNo).FirstOrDefault();
zxRecipePositionParaEntities = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.RecipeCode == recipeNo); zxRecipePositionParaEntities = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.RecipeCode == recipeNo);
if (recipeParaInfo == null) if (recipeParaInfo == null)
@ -127,6 +128,7 @@ namespace HighWayIot.Winform.Business
LogHelper.Instance.Error("配方信息获取失败,请检查所选机台是否配置了相应配方"); LogHelper.Instance.Error("配方信息获取失败,请检查所选机台是否配置了相应配方");
return; return;
} }
//没问题就在此下传PLC
if (recipeParaHelper.UploadToPLC(recipeParaInfo, zxRecipePositionParaEntities)) if (recipeParaHelper.UploadToPLC(recipeParaInfo, zxRecipePositionParaEntities))
{ {
//PlcConnect.PlcWrite2($"B{(destinationVulcanizationNo + 0x901).ToString("X")}", false, DataTypeEnum.Bool); //PlcConnect.PlcWrite2($"B{(destinationVulcanizationNo + 0x901).ToString("X")}", false, DataTypeEnum.Bool);
@ -169,279 +171,279 @@ namespace HighWayIot.Winform.Business
} }
} }
/// <summary> ///// <summary>
/// 配方同步方法 ///// 配方同步方法
/// </summary> ///// </summary>
public void SyncRecipe(ZxMesPlanTransferEntity newRecipe) //public void SyncRecipe(ZxMesPlanTransferEntity newRecipe)
{ //{
if (newRecipe == null) // if (newRecipe == null)
{ // {
return; // return;
} // }
//同步到配方(配方和称量,如果是新的加字段) // //同步到配方(配方和称量,如果是新的加字段)
List<ZxRecipeEntity> RecipeLists = ZxRecipeService.Instance.GetRecipeInfos(); // List<ZxRecipeEntity> RecipeLists = ZxRecipeService.Instance.GetRecipeInfos();
var nowEneity = RecipeLists.Where(x => x.RecipeCode == newRecipe.RecipeCode && x.IsDeleted == false).FirstOrDefault(); // var nowEneity = RecipeLists.Where(x => x.RecipeCode == newRecipe.RecipeCode && x.IsDeleted == false).FirstOrDefault();
if (nowEneity != null) //有就更新 只更新配方和称量信息 // if (nowEneity != null) //有就更新 只更新配方和称量信息
{ // {
//同步配方 // //同步配方
nowEneity.RecipeName = newRecipe.RecipeName; // nowEneity.RecipeName = newRecipe.RecipeName;
nowEneity.RecipeSpecCode = newRecipe.SpecCode; // nowEneity.RecipeSpecCode = newRecipe.SpecCode;
nowEneity.RecipeSpecName = newRecipe.SpecName; // nowEneity.RecipeSpecName = newRecipe.SpecName;
nowEneity.SizeKind = newRecipe.RimInch; // nowEneity.SizeKind = newRecipe.RimInch;
nowEneity.FixedWidth = newRecipe.FixRubWidth; // nowEneity.FixedWidth = newRecipe.FixRubWidth;
if (!ZxRecipeService.Instance.UpdateRecipeInfo(nowEneity)) // if (!ZxRecipeService.Instance.UpdateRecipeInfo(nowEneity))
{ // {
return; // return;
} // }
//同步称量信息 // //同步称量信息
List<ZxWeightEntity> zxWeightEntities = ZxWeightService.Instance.GetWeightInfos(nowEneity.RecipeCode); // List<ZxWeightEntity> zxWeightEntities = ZxWeightService.Instance.GetWeightInfos(nowEneity.RecipeCode);
for (int i = 1; i <= 3; i++) // for (int i = 1; i <= 3; i++)
{ // {
string typeName = string.Empty; // string typeName = string.Empty;
switch (i) // switch (i)
{ // {
case 1: // case 1:
typeName = "基部胶"; // typeName = "基部胶";
break; // break;
case 2: // case 2:
typeName = "中层胶"; // typeName = "中层胶";
break; // break;
case 3: // case 3:
typeName = "胎面胶"; // typeName = "胎面胶";
break; // break;
default: // default:
break; // break;
} // }
string MaterialName = Convert.ToString(newRecipe.GetType().GetProperty($"MaterialName{i}").GetValue(newRecipe)); // string MaterialName = Convert.ToString(newRecipe.GetType().GetProperty($"MaterialName{i}").GetValue(newRecipe));
if (!string.IsNullOrEmpty(MaterialName)) // if (!string.IsNullOrEmpty(MaterialName))
{ // {
ZxWeightEntity weight = zxWeightEntities.FirstOrDefault(x => x.MaterialCode == MaterialName); // ZxWeightEntity weight = zxWeightEntities.FirstOrDefault(x => x.MaterialCode == MaterialName);
if (weight != null) //原来就有 // if (weight != null) //原来就有
{ // {
weight.SetThickness = Convert.ToDecimal(newRecipe.GetType().GetProperty($"MaterialThickness{i}").GetValue(newRecipe)); //(decimal)newRecipe.MaterialThickness1; // weight.SetThickness = Convert.ToDecimal(newRecipe.GetType().GetProperty($"MaterialThickness{i}").GetValue(newRecipe)); //(decimal)newRecipe.MaterialThickness1;
weight.SetWidth = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)); //newRecipe.MaterialWidth1; // weight.SetWidth = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)); //newRecipe.MaterialWidth1;
weight.SetWidth2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)); //newRecipe.MaterialWidth12; // weight.SetWidth2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)); //newRecipe.MaterialWidth12;
weight.SetWidth3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)); //newRecipe.MaterialWidth13; // weight.SetWidth3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)); //newRecipe.MaterialWidth13;
weight.SetLayer = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)); //newRecipe.MaterialLayers1; // weight.SetLayer = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)); //newRecipe.MaterialLayers1;
weight.SetLayer2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)); //newRecipe.MaterialLayers12; // weight.SetLayer2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)); //newRecipe.MaterialLayers12;
weight.SetLayer3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)); //newRecipe.MaterialLayers13; // weight.SetLayer3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)); //newRecipe.MaterialLayers13;
ZxWeightService.Instance.UpdateWeightInfo(weight); // ZxWeightService.Instance.UpdateWeightInfo(weight);
} // }
else //原来没有就添加 // else //原来没有就添加
{ // {
ZxWeightService.Instance.InsertWeightInfo(new ZxWeightEntity() // ZxWeightService.Instance.InsertWeightInfo(new ZxWeightEntity()
{ // {
RecipeCode = newRecipe.RecipeCode, // RecipeCode = newRecipe.RecipeCode,
MaterialCode = MaterialName, // MaterialCode = MaterialName,
MaterialName = MaterialName + typeName, // MaterialName = MaterialName + typeName,
MaterialType = typeName, // MaterialType = typeName,
SetThickness = Convert.ToDecimal(newRecipe.GetType().GetProperty($"MaterialThickness{i}").GetValue(newRecipe)), // SetThickness = Convert.ToDecimal(newRecipe.GetType().GetProperty($"MaterialThickness{i}").GetValue(newRecipe)),
SetWidth = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)), // SetWidth = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)),
SetWidth2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)), // SetWidth2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)),
SetWidth3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)), // SetWidth3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)),
SetLayer = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)), // SetLayer = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)),
SetLayer2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)), // SetLayer2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)),
SetLayer3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)), // SetLayer3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)),
SetError = 1, // SetError = 1,
IsUse = true, // IsUse = true,
IsDeleted = false, // IsDeleted = false,
}); // });
} // }
} // }
} // }
} // }
else //没有就插入 全部同步 // else //没有就插入 全部同步
{ // {
//同步配方 // //同步配方
ZxRecipeEntity entity = new ZxRecipeEntity() // ZxRecipeEntity entity = new ZxRecipeEntity()
{ // {
RecipeName = newRecipe.RecipeName, // RecipeName = newRecipe.RecipeName,
RecipeCode = newRecipe.RecipeCode, // RecipeCode = newRecipe.RecipeCode,
RecipeSpecCode = newRecipe.SpecCode, // RecipeSpecCode = newRecipe.SpecCode,
RecipeSpecName = newRecipe.SpecName, // RecipeSpecName = newRecipe.SpecName,
SizeKind = newRecipe.RimInch, // SizeKind = newRecipe.RimInch,
FixedWidth = newRecipe.FixRubWidth, // FixedWidth = newRecipe.FixRubWidth,
IsUse = true, // IsUse = true,
IsDeleted = false, // IsDeleted = false,
}; // };
ZxRecipeService.Instance.InsertRecipeInfo(entity); // ZxRecipeService.Instance.InsertRecipeInfo(entity);
//同步称量信息 // //同步称量信息
List<ZxWeightEntity> zxWeightEntities = ZxWeightService.Instance.GetWeightInfos(nowEneity.RecipeCode); // List<ZxWeightEntity> zxWeightEntities = ZxWeightService.Instance.GetWeightInfos(nowEneity.RecipeCode);
for (int i = 1; i <= 3; i++) // for (int i = 1; i <= 3; i++)
{ // {
string typeName = string.Empty; // string typeName = string.Empty;
switch (i) // switch (i)
{ // {
case 1: // case 1:
typeName = "基部胶"; // typeName = "基部胶";
break; // break;
case 2: // case 2:
typeName = "中层胶"; // typeName = "中层胶";
break; // break;
case 3: // case 3:
typeName = "胎面胶"; // typeName = "胎面胶";
break; // break;
default: // default:
break; // break;
} // }
string MaterialName = Convert.ToString(newRecipe.GetType().GetProperty($"MaterialName{i}").GetValue(newRecipe)); // string MaterialName = Convert.ToString(newRecipe.GetType().GetProperty($"MaterialName{i}").GetValue(newRecipe));
if (!string.IsNullOrEmpty(MaterialName)) // if (!string.IsNullOrEmpty(MaterialName))
{ // {
ZxWeightEntity weight = zxWeightEntities.FirstOrDefault(x => x.MaterialCode == MaterialName); // ZxWeightEntity weight = zxWeightEntities.FirstOrDefault(x => x.MaterialCode == MaterialName);
if (weight != null) //原来就有 // if (weight != null) //原来就有
{ // {
weight.SetThickness = Convert.ToDecimal(newRecipe.GetType().GetProperty($"MaterialThickness{i}").GetValue(newRecipe)); //(decimal)newRecipe.MaterialThickness1; // weight.SetThickness = Convert.ToDecimal(newRecipe.GetType().GetProperty($"MaterialThickness{i}").GetValue(newRecipe)); //(decimal)newRecipe.MaterialThickness1;
weight.SetWidth = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)); //newRecipe.MaterialWidth1; // weight.SetWidth = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)); //newRecipe.MaterialWidth1;
weight.SetWidth2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)); //newRecipe.MaterialWidth12; // weight.SetWidth2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)); //newRecipe.MaterialWidth12;
weight.SetWidth3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)); //newRecipe.MaterialWidth13; // weight.SetWidth3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)); //newRecipe.MaterialWidth13;
weight.SetLayer = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)); //newRecipe.MaterialLayers1; // weight.SetLayer = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)); //newRecipe.MaterialLayers1;
weight.SetLayer2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)); //newRecipe.MaterialLayers12; // weight.SetLayer2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)); //newRecipe.MaterialLayers12;
weight.SetLayer3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)); //newRecipe.MaterialLayers13; // weight.SetLayer3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)); //newRecipe.MaterialLayers13;
ZxWeightService.Instance.UpdateWeightInfo(weight); // ZxWeightService.Instance.UpdateWeightInfo(weight);
} // }
else //原来没有就添加 // else //原来没有就添加
{ // {
ZxWeightService.Instance.InsertWeightInfo(new ZxWeightEntity() // ZxWeightService.Instance.InsertWeightInfo(new ZxWeightEntity()
{ // {
RecipeCode = newRecipe.RecipeCode, // RecipeCode = newRecipe.RecipeCode,
MaterialCode = MaterialName, // MaterialCode = MaterialName,
MaterialName = MaterialName + typeName, // MaterialName = MaterialName + typeName,
MaterialType = typeName, // MaterialType = typeName,
SetThickness = Convert.ToDecimal(newRecipe.GetType().GetProperty($"MaterialThickness{i}").GetValue(newRecipe)), // SetThickness = Convert.ToDecimal(newRecipe.GetType().GetProperty($"MaterialThickness{i}").GetValue(newRecipe)),
SetWidth = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)), // SetWidth = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)),
SetWidth2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)), // SetWidth2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)),
SetWidth3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)), // SetWidth3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)),
SetLayer = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)), // SetLayer = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)),
SetLayer2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)), // SetLayer2 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)),
SetLayer3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)), // SetLayer3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)),
SetError = 1, // SetError = 1,
IsUse = true, // IsUse = true,
IsDeleted = false, // IsDeleted = false,
}); // });
} // }
} // }
} // }
//同步公共参数 // //同步公共参数
ZxRecipeParaEntity recipeParaEntity = new ZxRecipeParaEntity(); // ZxRecipeParaEntity recipeParaEntity = new ZxRecipeParaEntity();
recipeParaEntity.RimInch = newRecipe.RimInch; // recipeParaEntity.RimInch = newRecipe.RimInch;
recipeParaEntity.LightWidth = newRecipe.FixRubWidth; // recipeParaEntity.LightWidth = newRecipe.FixRubWidth;
recipeParaEntity.SlowDistance = 0; // recipeParaEntity.SlowDistance = 0;
recipeParaEntity.StopDistance = 0; // recipeParaEntity.StopDistance = 0;
recipeParaEntity.TireWeight = newRecipe.TireWeight; // recipeParaEntity.TireWeight = newRecipe.TireWeight;
recipeParaEntity.SpecCode = newRecipe.SpecCode; // recipeParaEntity.SpecCode = newRecipe.SpecCode;
recipeParaEntity.SpecName = newRecipe.SpecName; // recipeParaEntity.SpecName = newRecipe.SpecName;
recipeParaEntity.RecipeCode = newRecipe.RecipeCode; // recipeParaEntity.RecipeCode = newRecipe.RecipeCode;
//自动工位选择 // //自动工位选择
zxWeightEntities.Clear(); // zxWeightEntities.Clear();
zxWeightEntities = ZxWeightService.Instance.GetWeightInfos(nowEneity.RecipeCode); // zxWeightEntities = ZxWeightService.Instance.GetWeightInfos(nowEneity.RecipeCode);
List<ZxOpenMixMaterialEntity> openMixConfig = ZxOpenMixMaterialService.Instance.GetInfos(); // List<ZxOpenMixMaterialEntity> openMixConfig = ZxOpenMixMaterialService.Instance.GetInfos();
foreach (ZxWeightEntity weightEntity in zxWeightEntities) // foreach (ZxWeightEntity weightEntity in zxWeightEntities)
{ // {
var config = openMixConfig.Where(x => x.MaterialName == weightEntity.MaterialName).FirstOrDefault(); // var config = openMixConfig.Where(x => x.MaterialName == weightEntity.MaterialName).FirstOrDefault();
if (config == null) // if (config == null)
{ // {
continue; // continue;
} // }
var prop = recipeParaEntity.GetType().GetProperty($"S{config.StationNo + 1}"); // var prop = recipeParaEntity.GetType().GetProperty($"S{config.StationNo + 1}");
if (prop != null) // if (prop != null)
{ // {
prop.SetValue(recipeParaEntity, true); // prop.SetValue(recipeParaEntity, true);
} // }
//自动包边选择 // //自动包边选择
if (!(weightEntity.SetLayer2 == 0 // if (!(weightEntity.SetLayer2 == 0
|| weightEntity.SetLayer2 == null // || weightEntity.SetLayer2 == null
|| weightEntity.SetWidth2 == null // || weightEntity.SetWidth2 == null
|| weightEntity.SetWidth2 == 0)) // || weightEntity.SetWidth2 == 0))
{ // {
var propp = recipeParaEntity.GetType().GetProperty($"B{config.StationNo - 1}"); // var propp = recipeParaEntity.GetType().GetProperty($"B{config.StationNo - 1}");
if (propp != null) // if (propp != null)
{ // {
propp.SetValue(recipeParaEntity, true); // propp.SetValue(recipeParaEntity, true);
} // }
} // }
if (!(weightEntity.SetLayer3 == 0 // if (!(weightEntity.SetLayer3 == 0
|| weightEntity.SetLayer3 == null // || weightEntity.SetLayer3 == null
|| weightEntity.SetWidth3 == null // || weightEntity.SetWidth3 == null
|| weightEntity.SetWidth3 == 0)) // || weightEntity.SetWidth3 == 0))
{ // {
var propp = recipeParaEntity.GetType().GetProperty($"B{config.StationNo + 4}"); // var propp = recipeParaEntity.GetType().GetProperty($"B{config.StationNo + 4}");
if (propp != null) // if (propp != null)
{ // {
propp.SetValue(recipeParaEntity, true); // propp.SetValue(recipeParaEntity, true);
} // }
} // }
//设置胎体重量 // //设置胎体重量
if (weightEntity.MaterialType == "胎面胶") // if (weightEntity.MaterialType == "胎面胶")
{ // {
recipeParaEntity.TireWeight = Convert.ToSingle(weightEntity.SetWeight); // recipeParaEntity.TireWeight = Convert.ToSingle(weightEntity.SetWeight);
switch (config.StationNo) // switch (config.StationNo)
{ // {
case 3: // case 3:
recipeParaEntity.S7 = true; // recipeParaEntity.S7 = true;
break; // break;
case 4: // case 4:
recipeParaEntity.S8 = true; // recipeParaEntity.S8 = true;
break; // break;
case 5: // case 5:
recipeParaEntity.S9 = true; // recipeParaEntity.S9 = true;
break; // break;
default: // default:
break; // break;
} // }
} // }
} // }
ZxRecipeParaEntity nowRecipeParaEntity = ZxRecipeParaService.Instance.GetRecipeParaInfoByRecipeCode(nowEneity.RecipeCode).FirstOrDefault(); // ZxRecipeParaEntity nowRecipeParaEntity = ZxRecipeParaService.Instance.GetRecipeParaInfoByRecipeCode(nowEneity.RecipeCode).FirstOrDefault();
if (nowRecipeParaEntity != null) //如果存在就更改 // if (nowRecipeParaEntity != null) //如果存在就更改
{ // {
recipeParaEntity.Id = nowRecipeParaEntity.Id; // recipeParaEntity.Id = nowRecipeParaEntity.Id;
ZxRecipeParaService.Instance.UpdateRecipeParaInfo(recipeParaEntity); // ZxRecipeParaService.Instance.UpdateRecipeParaInfo(recipeParaEntity);
} // }
else // else
{ // {
ZxRecipeParaService.Instance.InsertRecipeParaInfo(recipeParaEntity); // ZxRecipeParaService.Instance.InsertRecipeParaInfo(recipeParaEntity);
} // }
//同步工位参数 // //同步工位参数
ZxRecipePositionParaService.Instance.DeleteRecipePositionParaInfoByRecipeCode(newRecipe.RecipeCode); //删除可能存在的脏数据 // ZxRecipePositionParaService.Instance.DeleteRecipePositionParaInfoByRecipeCode(newRecipe.RecipeCode); //删除可能存在的脏数据
for (int i = 1; i <= 3; i++) // for (int i = 1; i <= 3; i++)
{ // {
string MaterialName = Convert.ToString(newRecipe.GetType().GetProperty($"MaterialName{i}").GetValue(newRecipe)); // string MaterialName = Convert.ToString(newRecipe.GetType().GetProperty($"MaterialName{i}").GetValue(newRecipe));
if (string.IsNullOrEmpty(MaterialName)) // if (string.IsNullOrEmpty(MaterialName))
{ // {
continue; // continue;
} // }
var config = openMixConfig.Where(x => x.MaterialName.Contains(MaterialName)).FirstOrDefault(); // var config = openMixConfig.Where(x => x.MaterialName.Contains(MaterialName)).FirstOrDefault();
if (config == null) // if (config == null)
{ // {
continue; // continue;
} // }
ZxRecipePositionParaEntity positionEntity = new ZxRecipePositionParaEntity() // ZxRecipePositionParaEntity positionEntity = new ZxRecipePositionParaEntity()
{ // {
RecipeCode = newRecipe.RecipeCode, // RecipeCode = newRecipe.RecipeCode,
Position = config.StationNo, // Position = config.StationNo,
E1 = 15, // E1 = 15,
E2 = 52, // E2 = 52,
E5 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)) * 10, // E5 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}").GetValue(newRecipe)) * 10,
E9 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)), // E9 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}").GetValue(newRecipe)),
E6 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)) * 10, // E6 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}2").GetValue(newRecipe)) * 10,
E7 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)), // E7 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}2").GetValue(newRecipe)),
E3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)) * 10, // E3 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialLayers{i}3").GetValue(newRecipe)) * 10,
E4 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)), // E4 = Convert.ToInt32(newRecipe.GetType().GetProperty($"MaterialWidth{i}3").GetValue(newRecipe)),
E10 = 800, // E10 = 800,
E8 = 300 // E8 = 300
}; // };
ZxRecipePositionParaService.Instance.InsertRecipePositionParaInfo(positionEntity); // ZxRecipePositionParaService.Instance.InsertRecipePositionParaInfo(positionEntity);
} // }
} // }
} //}
} }
} }

@ -352,17 +352,17 @@ namespace HighWayIot.Winform.MainForm
/// <param name="e"></param> /// <param name="e"></param>
private void RecipeStateChangeButton_Click(object sender, EventArgs e) private void RecipeStateChangeButton_Click(object sender, EventArgs e)
{ {
RecipeSendBusiness.RecipeSendMode = !RecipeSendBusiness.RecipeSendMode; //RecipeSendBusiness.RecipeSendMode = !RecipeSendBusiness.RecipeSendMode;
if (RecipeSendBusiness.RecipeSendMode) //if (RecipeSendBusiness.RecipeSendMode)
{ //{
ModeSelectLabel.Text = "自动"; // ModeSelectLabel.Text = "自动";
ModeSelectLabel.BackColor = Color.FromArgb(100, 128, 255, 128); // ModeSelectLabel.BackColor = Color.FromArgb(100, 128, 255, 128);
} //}
else //else
{ //{
ModeSelectLabel.Text = "手动"; // ModeSelectLabel.Text = "手动";
ModeSelectLabel.BackColor = Color.FromArgb(100, 255, 255, 128); // ModeSelectLabel.BackColor = Color.FromArgb(100, 255, 255, 128);
} //}
} }
/// <summary> /// <summary>

@ -105,6 +105,8 @@ namespace HighWayIot.Winform.UserControlPages
/// 白夜班时间,现在时间控件刷新 /// 白夜班时间,现在时间控件刷新
/// </summary> /// </summary>
private void DateTimeRefresh() private void DateTimeRefresh()
{
try
{ {
var timeList = _shiftTimeService.GetShiftInfos(); var timeList = _shiftTimeService.GetShiftInfos();
var morningShift = timeList.Where(x => x.ShiftName == "早").FirstOrDefault(); var morningShift = timeList.Where(x => x.ShiftName == "早").FirstOrDefault();
@ -172,6 +174,12 @@ namespace HighWayIot.Winform.UserControlPages
NowDateProductNumLabel.Text = (DateTime.Now - TimeSpan.FromDays(1)).ToString("MM 月 dd 日 产量"); NowDateProductNumLabel.Text = (DateTime.Now - TimeSpan.FromDays(1)).ToString("MM 月 dd 日 产量");
} }
catch(Exception ex)
{
logHelper.Error("班次时间更新异常:" + ex.Message);
return;
}
}
/// <summary> /// <summary>
/// 数据刷新 /// 数据刷新
@ -254,7 +262,7 @@ namespace HighWayIot.Winform.UserControlPages
} }
catch(Exception ex) catch(Exception ex)
{ {
logHelper.Error("监视页面数据绑定异常:" + ex.Message);
} }
} }
} }
@ -288,9 +296,9 @@ namespace HighWayIot.Winform.UserControlPages
} }
} }
} }
catch catch(Exception ex)
{ {
logHelper.Error("单元格格式回调方法异常", ex);
} }
} }
@ -300,6 +308,8 @@ namespace HighWayIot.Winform.UserControlPages
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void MoveText_DoubleClick(object sender, EventArgs e) private void MoveText_DoubleClick(object sender, EventArgs e)
{
try
{ {
ScrollTextSetForm form = new ScrollTextSetForm(); ScrollTextSetForm form = new ScrollTextSetForm();
if (form.ShowDialog() == DialogResult.OK) if (form.ShowDialog() == DialogResult.OK)
@ -307,7 +317,18 @@ namespace HighWayIot.Winform.UserControlPages
MoveText.Text = form.OutValue; MoveText.Text = form.OutValue;
} }
} }
catch
{
}
}
/// <summary>
/// 锁定刷新框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MonitorDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) private void MonitorDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
{ {
lock (GridRefreshLocker) lock (GridRefreshLocker)

@ -38,6 +38,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = 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 dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
this.SchedulingDataGridView = new System.Windows.Forms.DataGridView(); this.SchedulingDataGridView = new System.Windows.Forms.DataGridView();
this.SelectConfigButton = new System.Windows.Forms.Button(); this.SelectConfigButton = new System.Windows.Forms.Button();
this.ButtonPanel = new System.Windows.Forms.Panel(); this.ButtonPanel = new System.Windows.Forms.Panel();
@ -46,6 +47,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
this.DeviceNo = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.DeviceNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeCode2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.RecipeCode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeName2 = new System.Windows.Forms.DataGridViewComboBoxColumn(); this.RecipeName2 = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.DeviceNo1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeCode1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.RecipeCode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RecipeName1 = new System.Windows.Forms.DataGridViewComboBoxColumn(); this.RecipeName1 = new System.Windows.Forms.DataGridViewComboBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.SchedulingDataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.SchedulingDataGridView)).BeginInit();
@ -71,6 +73,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
this.DeviceNo, this.DeviceNo,
this.RecipeCode2, this.RecipeCode2,
this.RecipeName2, this.RecipeName2,
this.DeviceNo1,
this.RecipeCode1, this.RecipeCode1,
this.RecipeName1}); this.RecipeName1});
this.SchedulingDataGridView.Location = new System.Drawing.Point(0, 65); this.SchedulingDataGridView.Location = new System.Drawing.Point(0, 65);
@ -78,7 +81,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
this.SchedulingDataGridView.Name = "SchedulingDataGridView"; this.SchedulingDataGridView.Name = "SchedulingDataGridView";
this.SchedulingDataGridView.RowHeadersVisible = false; this.SchedulingDataGridView.RowHeadersVisible = false;
this.SchedulingDataGridView.RowTemplate.Height = 25; this.SchedulingDataGridView.RowTemplate.Height = 25;
this.SchedulingDataGridView.Size = new System.Drawing.Size(1105, 676); this.SchedulingDataGridView.Size = new System.Drawing.Size(1492, 889);
this.SchedulingDataGridView.TabIndex = 0; this.SchedulingDataGridView.TabIndex = 0;
this.SchedulingDataGridView.Tag = ""; this.SchedulingDataGridView.Tag = "";
this.SchedulingDataGridView.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.SchedulingDataGridView_CellEnter); this.SchedulingDataGridView.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.SchedulingDataGridView_CellEnter);
@ -104,7 +107,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
this.ButtonPanel.Location = new System.Drawing.Point(0, 0); this.ButtonPanel.Location = new System.Drawing.Point(0, 0);
this.ButtonPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ButtonPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonPanel.Name = "ButtonPanel"; this.ButtonPanel.Name = "ButtonPanel";
this.ButtonPanel.Size = new System.Drawing.Size(1105, 61); this.ButtonPanel.Size = new System.Drawing.Size(1492, 61);
this.ButtonPanel.TabIndex = 4; this.ButtonPanel.TabIndex = 4;
// //
// UpdateConfigButton // UpdateConfigButton
@ -138,6 +141,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
this.DeviceNo.Name = "DeviceNo"; this.DeviceNo.Name = "DeviceNo";
this.DeviceNo.ReadOnly = true; this.DeviceNo.ReadOnly = true;
this.DeviceNo.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.DeviceNo.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.DeviceNo.Width = 70;
// //
// RecipeCode2 // RecipeCode2
// //
@ -162,15 +166,26 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
this.RecipeName2.Name = "RecipeName2"; this.RecipeName2.Name = "RecipeName2";
this.RecipeName2.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.RecipeName2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
// //
// DeviceNo1
//
this.DeviceNo1.DataPropertyName = "DeviceNo";
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F);
this.DeviceNo1.DefaultCellStyle = dataGridViewCellStyle6;
this.DeviceNo1.HeaderText = "机台编号";
this.DeviceNo1.Name = "DeviceNo1";
this.DeviceNo1.ReadOnly = true;
this.DeviceNo1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.DeviceNo1.Width = 70;
//
// RecipeCode1 // RecipeCode1
// //
this.RecipeCode1.DataPropertyName = "RecipeCode1"; this.RecipeCode1.DataPropertyName = "RecipeCode1";
dataGridViewCellStyle6.BackColor = System.Drawing.Color.White; dataGridViewCellStyle7.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black; dataGridViewCellStyle7.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.White; dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.White;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.Black; dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.Black;
this.RecipeCode1.DefaultCellStyle = dataGridViewCellStyle6; this.RecipeCode1.DefaultCellStyle = dataGridViewCellStyle7;
this.RecipeCode1.HeaderText = "成品代号 - 下模"; this.RecipeCode1.HeaderText = "成品代号 - 下模";
this.RecipeCode1.Name = "RecipeCode1"; this.RecipeCode1.Name = "RecipeCode1";
this.RecipeCode1.ReadOnly = true; this.RecipeCode1.ReadOnly = true;
@ -181,8 +196,8 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
// //
this.RecipeName1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.RecipeName1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeName1.DataPropertyName = "RecipeName1"; this.RecipeName1.DataPropertyName = "RecipeName1";
dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.RecipeName1.DefaultCellStyle = dataGridViewCellStyle7; this.RecipeName1.DefaultCellStyle = dataGridViewCellStyle8;
this.RecipeName1.HeaderText = "标称尺度 - 下模"; this.RecipeName1.HeaderText = "标称尺度 - 下模";
this.RecipeName1.Name = "RecipeName1"; this.RecipeName1.Name = "RecipeName1";
this.RecipeName1.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.RecipeName1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@ -197,7 +212,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
this.Controls.Add(this.SchedulingDataGridView); this.Controls.Add(this.SchedulingDataGridView);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "ProductionScheduling"; this.Name = "ProductionScheduling";
this.Size = new System.Drawing.Size(1105, 741); this.Size = new System.Drawing.Size(1492, 954);
((System.ComponentModel.ISupportInitialize)(this.SchedulingDataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.SchedulingDataGridView)).EndInit();
this.ButtonPanel.ResumeLayout(false); this.ButtonPanel.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
@ -214,6 +229,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
private DataGridViewTextBoxColumn DeviceNo; private DataGridViewTextBoxColumn DeviceNo;
private DataGridViewTextBoxColumn RecipeCode2; private DataGridViewTextBoxColumn RecipeCode2;
private DataGridViewComboBoxColumn RecipeName2; private DataGridViewComboBoxColumn RecipeName2;
private DataGridViewTextBoxColumn DeviceNo1;
private DataGridViewTextBoxColumn RecipeCode1; private DataGridViewTextBoxColumn RecipeCode1;
private DataGridViewComboBoxColumn RecipeName1; private DataGridViewComboBoxColumn RecipeName1;
} }

@ -150,7 +150,7 @@ namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
int column = SchedulingDataGridView.CurrentCell.ColumnIndex; int column = SchedulingDataGridView.CurrentCell.ColumnIndex;
string DeviceNo = SchedulingDataGridView.Rows[row].Cells[1].Value.ToString(); string DeviceNo = SchedulingDataGridView.Rows[row].Cells[1].Value.ToString();
if (column == 5) if (column == 6)
{ {
ZxRecipeEntity recipe = zxRecipeService.GetSingleInfoByRecipeName(combox.Text); ZxRecipeEntity recipe = zxRecipeService.GetSingleInfoByRecipeName(combox.Text);
if (recipe == null) if (recipe == null)

@ -129,6 +129,9 @@
<metadata name="RecipeName2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="RecipeName2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="DeviceNo1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RecipeCode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="RecipeCode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>

@ -1605,7 +1605,6 @@ namespace HighWayIot.Winform.UserControlPages
this.RecipeName.FillWeight = 52.74404F; this.RecipeName.FillWeight = 52.74404F;
this.RecipeName.HeaderText = "标称尺度"; this.RecipeName.HeaderText = "标称尺度";
this.RecipeName.Name = "RecipeName"; this.RecipeName.Name = "RecipeName";
this.RecipeName.ReadOnly = true;
this.RecipeName.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.RecipeName.Resizable = System.Windows.Forms.DataGridViewTriState.False;
// //
// RecipeSpecCode // RecipeSpecCode

Loading…
Cancel
Save