|
|
|
|
@ -472,11 +472,11 @@ namespace HighWayIot.Winform.UserControlPages
|
|
|
|
|
E1 = 15,
|
|
|
|
|
E2 = 52,
|
|
|
|
|
E5 = form.OutValue.SetLayer * 10,
|
|
|
|
|
E9 = (int)form.OutValue.SetWidth,
|
|
|
|
|
E9 = form.OutValue.SetWidth,
|
|
|
|
|
E6 = form.OutValue.SetLayer2 * 10,
|
|
|
|
|
E7 = (int)form.OutValue.SetWidth2,
|
|
|
|
|
E7 = form.OutValue.SetWidth2,
|
|
|
|
|
E3 = form.OutValue.SetLayer3 * 10,
|
|
|
|
|
E4 = (int)form.OutValue.SetWidth3,
|
|
|
|
|
E4 = form.OutValue.SetWidth3,
|
|
|
|
|
E10 = 800,
|
|
|
|
|
E8 = 300
|
|
|
|
|
};
|
|
|
|
|
@ -1461,456 +1461,5 @@ namespace HighWayIot.Winform.UserControlPages
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 配方数据同步
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 同步数据按钮
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
private void SyncDataButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
// RecipeDataSync(zxMesPlanTransferService.GetRecipeInfos(x => x.Uuid != "syncsignal"));
|
|
|
|
|
zxMesPlanTransferService.SetFlagTrue();
|
|
|
|
|
//if (zxMesPlanTransferService.GetFlagState())
|
|
|
|
|
//{
|
|
|
|
|
// MessageBox.Show("正在同步数据,请稍后");
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
//if (zxMesPlanTransferService.SetFlagTrue())
|
|
|
|
|
//{
|
|
|
|
|
// Task.Run(() =>
|
|
|
|
|
// {
|
|
|
|
|
// while (true)
|
|
|
|
|
// {
|
|
|
|
|
// if (!zxMesPlanTransferService.GetFlagState())
|
|
|
|
|
// {
|
|
|
|
|
// RecipeDataSync(zxMesPlanTransferService.GetRecipeInfos(x => x.Uuid != "syncsignal"));
|
|
|
|
|
// MessageBox.Show("同步完成");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// Task.Delay(1000);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 配方数据同步方法
|
|
|
|
|
///// </summary>
|
|
|
|
|
//private void RecipeDataSync(List<ZxMesPlanTransferEntity> 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 = (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 = (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
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
|
|
|
|
|
// 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);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// /////////////////////////////////////更新配方工位参数//////////////////////////////////////
|
|
|
|
|
// List<ZxRecipePositionParaEntity> 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++;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// catch
|
|
|
|
|
// {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
private void RecipeDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|