@@ -199,35 +199,35 @@ | |||
Grid.Column="0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Top" | |||
FontSize="20" | |||
FontSize="16" | |||
Foreground="#FF2AB2E7" | |||
Text="{Binding RawMaterialName}" /> | |||
<TextBlock | |||
Grid.Column="1" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Top" | |||
FontSize="20" | |||
FontSize="16" | |||
Foreground="#FF2AB2E7" | |||
Text="{Binding RawMaterialLocation}" /> | |||
<TextBlock | |||
Grid.Column="2" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Top" | |||
FontSize="20" | |||
FontSize="16" | |||
Foreground="#FF2AB2E7" | |||
Text="{Binding RawMaterialBarrelNum}" /> | |||
<TextBlock | |||
Grid.Column="3" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Top" | |||
FontSize="20" | |||
FontSize="16" | |||
Foreground="#FF2AB2E7" | |||
Text="{Binding RawMaterialWeight}" /> | |||
<TextBlock | |||
Grid.Column="4" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Top" | |||
FontSize="20" | |||
FontSize="16" | |||
Foreground="#FF2AB2E7" | |||
Text="{Binding RawMaterialType}" /> | |||
</Grid> | |||
@@ -28,6 +28,12 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||
time = GVL_SmallStation.GetInstance.Time; | |||
Test1Command = new RelayCommand(() => | |||
{ | |||
//if (!Delay.GetInstance("CanManualGetTray").Start(GVL_SmallStation.GetInstance.ManualIssueRecipe, 10)) | |||
//{ | |||
// NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, App.MainWindow, "提示", $"手动下发订单间隔不足10秒,请稍后再点击。"); | |||
// return; | |||
//} | |||
ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX8.0", PlcVarType = PlcVarType.Bool, Value = true }); | |||
//Thread.Sleep(200); | |||
//ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX8.0", PlcVarType = PlcVarType.Bool, Value = false }); | |||
@@ -40,7 +46,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||
GVL_SmallStation.GetInstance.ManualIssueRecipe = false; | |||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,AGV送托盘完成"); | |||
}, () => { return Delay.GetInstance("CanManualGetTray").Start(GVL_SmallStation.GetInstance.ManualIssueRecipe, 10); }); | |||
}); | |||
Test2Command = new RelayCommand(() => | |||
{ | |||
@@ -58,7 +58,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||
var res = Json<DevicePar>.Data.windSendRawMaterial.FirstOrDefault(p => p.Location == item1.Location); | |||
if (res != null) | |||
{ | |||
item1.RawMaterialName = res.RawMaterialName; | |||
item1.RawMaterialName = res.RawMaterialChineseName; | |||
} | |||
AllRawMaterial.Add(new RemoteRecipeRawMaterial() | |||
@@ -27,11 +27,45 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||
TrayCode = rm.TrayCode; | |||
foreach (var item in rm.RawMaterial) | |||
{ | |||
RawMaterialsInfo.Add(item); | |||
//RawMaterialsInfo.Add(item); | |||
var res = Json<DevicePar>.Data.rawMaterialStockBin.FirstOrDefault(p => p.RawMaterialLocation == item.RawMaterialLocation); | |||
if (res != null && !string.IsNullOrEmpty(res.RawMaterialName)) | |||
{ | |||
var temp = Json<DevicePar>.Data.BomMaterial.FirstOrDefault(p => p.MaterialCode == res.RawMaterialName); | |||
if (temp != null && !string.IsNullOrEmpty(temp.MaterialName)) | |||
{ | |||
item.RawMaterialName = temp.MaterialName; | |||
} | |||
} | |||
RawMaterialsInfo.Add(new RemoteRecipeRawMaterial() | |||
{ | |||
RawMaterialType = item.RawMaterialType, | |||
RawMaterialName = item.RawMaterialName, | |||
RawMaterialWeight = item.RawMaterialWeight, | |||
RawMaterialLocation = item.RawMaterialLocation, | |||
RawMaterialBarrelNum = item.RawMaterialBarrelNum, | |||
}); | |||
} | |||
foreach (var item1 in rm.WindSend) | |||
{ | |||
RawMaterialsInfo.Add(new RemoteRecipeRawMaterial() { RawMaterialName= item1.RawMaterialName, RawMaterialLocation= item1.Location,RawMaterialBarrelNum= item1.RawMaterialBarrelNum,RawMaterialWeight= item1.RawMaterialWeight,RawMaterialType=item1.RawMaterialType}); | |||
// RawMaterialsInfo.Add(new RemoteRecipeRawMaterial() { RawMaterialName= item1.RawMaterialName, RawMaterialLocation= item1.Location,RawMaterialBarrelNum= item1.RawMaterialBarrelNum,RawMaterialWeight= item1.RawMaterialWeight,RawMaterialType=item1.RawMaterialType}); | |||
var res = Json<DevicePar>.Data.windSendRawMaterial.FirstOrDefault(p => p.Location == item1.Location); | |||
if (res != null) | |||
{ | |||
item1.RawMaterialName = res.RawMaterialChineseName; | |||
} | |||
RawMaterialsInfo.Add(new RemoteRecipeRawMaterial() | |||
{ | |||
RawMaterialType = item1.RawMaterialType, | |||
RawMaterialName = item1.RawMaterialName, | |||
RawMaterialWeight = item1.RawMaterialWeight, | |||
RawMaterialLocation = item1.Location, | |||
RawMaterialBarrelNum = item1.RawMaterialBarrelNum, | |||
}); | |||
} | |||
} | |||
}), "RecipeInfo"); | |||