Kaynağa Gözat

1. 本地下发的配方,不对MES系统返回结束数据。

master
ZhaoGang 1 yıl önce
ebeveyn
işleme
d934dfdffe
6 değiştirilmiş dosya ile 39 ekleme ve 7 silme
  1. +23
    -5
      BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
  2. +4
    -1
      BPASmartClient.JXJFoodBigStation/View/RecipeSendDownView.xaml
  3. +3
    -1
      BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
  4. +7
    -0
      BPASmartClient.JXJFoodSmallStation/Model/Siemens/RemoteRecipeData.cs
  5. +1
    -0
      BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs
  6. +1
    -0
      BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs

+ 23
- 5
BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs Dosyayı Görüntüle

@@ -1355,7 +1355,8 @@ namespace BPASmartClient.JXJFoodBigStation.Model
GVL_BigStation.Recipe1DosingStatus = 3;
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:{code},托盘编号:{trayCode},配料完成");
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index));
if (SiemensDevice.IsConnected && !GVL_BigStation.IsUseLocalRecipe)
//2023-8-21:如果不是MES系统下发的配方,不要返回结束数据。
if (SiemensDevice.IsConnected && SiemensRecipes.ElementAt(index).RecipesSource==RecipeSource.远程 /*!GVL_BigStation.IsUseLocalRecipe*/)
{
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode;
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName;
@@ -1375,7 +1376,11 @@ namespace BPASmartClient.JXJFoodBigStation.Model
double a = DateTime.Now.Subtract(GVL_BigStation.DosingRecipe1Time).TotalSeconds;
FinishData.ProcessTime = Convert.ToInt16(a);
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361);
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子");
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子。");
}
else
{
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:【{code}】,托盘编号:【{trayCode}】,配料完成,西门子未连接或配方为本地下发未将完成数据反馈至MES系统。");
}
HKDevice.HK_PLC_S7.Write("DB99.DBX1.4", true);
GVL_BigStation.Recipe1DosingStatus = 3;
@@ -1468,7 +1473,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model
GVL_BigStation.Recipe2DosingFinish = true;
MessageNotify.GetInstance.ShowRunLog($"配方2,配方编号:{code},托盘编号:{trayCode},配料完成");
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index));
if (SiemensDevice.IsConnected && !GVL_BigStation.IsUseLocalRecipe)
if (SiemensDevice.IsConnected && SiemensRecipes.ElementAt(index).RecipesSource == RecipeSource.远程 /*!GVL_BigStation.IsUseLocalRecipe*/)
{
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode;
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName;
@@ -1490,9 +1495,14 @@ namespace BPASmartClient.JXJFoodBigStation.Model
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361);
MessageNotify.GetInstance.ShowRunLog($"配方2,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子");
}
else
{
MessageNotify.GetInstance.ShowRunLog($"配方2,配方编号:【{code}】,托盘编号:【{trayCode}】,配料完成,西门子未连接或配方为本地下发未将完成数据反馈至MES系统。");
}
HKDevice.HK_PLC_S7.Write("DB99.DBX1.5", true);
GVL_BigStation.Recipe2DosingStatus = 3;
}
if (GVL_BigStation.Recipe2DosingStatus == 3 && HKDevice.PlcRead.Recipe2DosingFinish == false)
{
HKDevice.HK_PLC_S7.Write("DB99.DBX1.5", false);
@@ -1582,7 +1592,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model
GVL_BigStation.Recipe3DosingStatus = 3;
MessageNotify.GetInstance.ShowRunLog($"配方3,配方编号:{code},托盘编号:{trayCode},配料完成");
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index));
if (SiemensDevice.IsConnected && !GVL_BigStation.IsUseLocalRecipe)
if (SiemensDevice.IsConnected && SiemensRecipes.ElementAt(index).RecipesSource == RecipeSource.远程 /*!GVL_BigStation.IsUseLocalRecipe*/)
{
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode;
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName;
@@ -1604,6 +1614,10 @@ namespace BPASmartClient.JXJFoodBigStation.Model
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361);
MessageNotify.GetInstance.ShowRunLog($"配方3,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子");
}
else
{
MessageNotify.GetInstance.ShowRunLog($"配方3,配方编号:【{code}】,托盘编号:【{trayCode}】,配料完成,西门子未连接或配方为本地下发未将完成数据反馈至MES系统。");
}
HKDevice.HK_PLC_S7.Write("DB99.DBX1.6", true);
GVL_BigStation.Recipe3DosingStatus = 3;
}
@@ -1695,7 +1709,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model
GVL_BigStation.Recipe4DosingStatus = 3;
MessageNotify.GetInstance.ShowRunLog($"配方4,配方编号:{code},托盘编号:{trayCode},配料完成");
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index));
if (SiemensDevice.IsConnected && !GVL_BigStation.IsUseLocalRecipe)
if (SiemensDevice.IsConnected && SiemensRecipes.ElementAt(index).RecipesSource == RecipeSource.远程 /*!GVL_BigStation.IsUseLocalRecipe*/)
{
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode;
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName;
@@ -1717,6 +1731,10 @@ namespace BPASmartClient.JXJFoodBigStation.Model
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361);
MessageNotify.GetInstance.ShowRunLog($"配方4,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子");
}
else
{
MessageNotify.GetInstance.ShowRunLog($"配方4,配方编号:【{code}】,托盘编号:【{trayCode}】,配料完成,西门子未连接或配方为本地下发未将完成数据反馈至MES系统。");
}
HKDevice.HK_PLC_S7.Write("DB99.DBX1.7", true);
GVL_BigStation.Recipe4DosingStatus = 3;
}


+ 4
- 1
BPASmartClient.JXJFoodBigStation/View/RecipeSendDownView.xaml Dosyayı Görüntüle

@@ -427,7 +427,10 @@
<RowDefinition Height="40" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Button Content="筛选配方" Style="{StaticResource ButtonStyle}" Command="{Binding SelectRecipesCommand}" />
<Button
Command="{Binding SelectRecipesCommand}"
Content="筛选配方"
Style="{StaticResource ButtonStyle}" />

<Grid
Name="ggr"


+ 3
- 1
BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs Dosyayı Görüntüle

@@ -1406,7 +1406,8 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
RecipeCode = recipe.RecipeCode,
RawMaterial = RawMaterials,
TrayCode = recipe.StockCode,
WindSend = WindSendData
WindSend = WindSendData,
RecipesSource=RecipeSource.远程
});
});
}
@@ -1424,6 +1425,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
newRecipe.RecipeName = rm.RecipeName;
newRecipe.RecipeCode = rm.RecipeCode;
newRecipe.TrayCode = rm.TrayCode;
newRecipe.RecipesSource = RecipeSource.本地;

foreach (var item in rm.RawMaterial)
{


+ 7
- 0
BPASmartClient.JXJFoodSmallStation/Model/Siemens/RemoteRecipeData.cs Dosyayı Görüntüle

@@ -39,5 +39,12 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
public ObservableCollection<WindSendRawMaterial> WindSend { get; set; } = new ObservableCollection<WindSendRawMaterial>();


public RecipeSource RecipesSource { get { return _mRecipesSource; } set { _mRecipesSource = value; OnPropertyChanged(); } }
private RecipeSource _mRecipesSource = RecipeSource.远程;
}
public enum RecipeSource
{
本地,
远程
}
}

+ 1
- 0
BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs Dosyayı Görüntüle

@@ -237,6 +237,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
TrayCode = TrayNum,
RawMaterial = RawMaterials,
WindSend = WindSendRawMaterials,
RecipesSource=RecipeSource.本地
};
Json<LocalRecipeDataColl>.Data.Recipes.Add(newRemoteRecipeData);
//新增一条配方应该默认显示出来。


+ 1
- 0
BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs Dosyayı Görüntüle

@@ -150,6 +150,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
RecipeCode = recipeCode,
TrayCode = trayCode,
RawMaterial = RawMaterials,
RecipesSource=RecipeSource.本地,
};
Json<LocalRecipeDataColl>.Data.Recipes.Add(newRemoteRecipedata);



Yükleniyor…
İptal
Kaydet