@@ -767,6 +767,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if (!ml_morkf.InitialComplete) | if (!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show("电磁阀启停出错,菜品库未初始化"); | |||||
return; | return; | ||||
} | } | ||||
@@ -781,6 +782,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if (!ml_morkf.InitialComplete) | if (!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show("爪子去到1号位出错,菜品库未初始化"); | |||||
return false; | return false; | ||||
} | } | ||||
@@ -806,6 +808,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if (!ml_morkf.InitialComplete) | if (!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show("爪子去到2号位出错,菜品库未初始化"); | |||||
return false; | return false; | ||||
} | } | ||||
@@ -831,6 +834,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if (!ml_morkf.InitialComplete) | if (!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show("爪子去到3号位出错,菜品库未初始化"); | |||||
return false; | return false; | ||||
} | } | ||||
@@ -856,6 +860,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if (!ml_morkf.InitialComplete) | if (!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show("1号测距出错,菜品库未初始化"); | |||||
return false; | return false; | ||||
} | } | ||||
@@ -870,6 +875,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if (!ml_morkf.InitialComplete) | if (!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show("2号测距出错,菜品库未初始化"); | |||||
return false; | return false; | ||||
} | } | ||||
@@ -884,6 +890,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if (!ml_morkf.InitialComplete) | if (!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show("3号测距出错,菜品库未初始化"); | |||||
return false; | return false; | ||||
} | } | ||||
@@ -959,6 +966,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if (!ml_morkf.InitialComplete) | if (!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show($"机械臂移动出错,菜品库未初始化"); | |||||
return false; | return false; | ||||
} | } | ||||
@@ -1231,10 +1239,11 @@ namespace BPASmartClient.MorkF | |||||
//判断是否初始化 | //判断是否初始化 | ||||
if(!ml_morkf.InitialComplete) | if(!ml_morkf.InitialComplete) | ||||
{ | { | ||||
MessageLog.GetInstance.Show("更新菜品库存量出错,菜品库未初始化"); | |||||
return false; | return false; | ||||
} | } | ||||
foreach(var item in MaterialCoordinate.dicNoMaterialCoordinate) | |||||
foreach(var item in MaterialCoordinate.GetInstance().dicNoMaterialCoordinate) | |||||
{ | { | ||||
//设置到抓菜处 | //设置到抓菜处 | ||||
if (!SetArmPosition(item.Value.X, item.Value.Y)) | if (!SetArmPosition(item.Value.X, item.Value.Y)) | ||||
@@ -1418,6 +1427,7 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
//指定位置菜品减一 | //指定位置菜品减一 | ||||
MaterialSurplusOperation.GetInstance().ReduceSurplus(materialOperation.materialInfo.Loc); | MaterialSurplusOperation.GetInstance().ReduceSurplus(materialOperation.materialInfo.Loc); | ||||
SaveMaterialData(); | |||||
} | } | ||||
} | } | ||||
@@ -2234,8 +2244,6 @@ namespace BPASmartClient.MorkF | |||||
StirArmGoOrigin(i); | StirArmGoOrigin(i); | ||||
MessageLog.GetInstance.Show($"菜品{res.GoodName}完成"); | MessageLog.GetInstance.Show($"菜品{res.GoodName}完成"); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -2265,9 +2273,9 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
if(materialOperationQuenes.Count > 0) | if(materialOperationQuenes.Count > 0) | ||||
{ | { | ||||
//判断是否初始化与是否在工作中 | |||||
if (ml_morkf.InitialComplete && !ml_morkf.MaterailIsWorking) | |||||
{ | |||||
////判断是否初始化与是否在工作中 | |||||
//if (ml_morkf.InitialComplete && !ml_morkf.MaterailIsWorking) | |||||
//{ | |||||
//待菜品库操作列出队列 | //待菜品库操作列出队列 | ||||
if (materialOperationQuenes.TryDequeue(out var res)) | if (materialOperationQuenes.TryDequeue(out var res)) | ||||
{ | { | ||||
@@ -2279,7 +2287,7 @@ namespace BPASmartClient.MorkF | |||||
//}),"菜品库操作"); | //}),"菜品库操作"); | ||||
GetMaterailTest(res); | GetMaterailTest(res); | ||||
} | } | ||||
} | |||||
//} | |||||
} | } | ||||
} | } | ||||
@@ -2351,9 +2359,9 @@ namespace BPASmartClient.MorkF | |||||
try | try | ||||
{ | { | ||||
if(MaterialCoordinate.dicNoMaterialCoordinate.ContainsKey(no)) | |||||
if(MaterialCoordinate.GetInstance().dicNoMaterialCoordinate.ContainsKey(no)) | |||||
{ | { | ||||
coordinate = MaterialCoordinate.dicNoMaterialCoordinate[no]; | |||||
coordinate = MaterialCoordinate.GetInstance().dicNoMaterialCoordinate[no]; | |||||
return true; | return true; | ||||
} | } | ||||
else | else | ||||
@@ -1,4 +1,5 @@ | |||||
using System; | |||||
using BPA.Helper; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
using System.Text; | using System.Text; | ||||
@@ -6,12 +7,12 @@ using System.Threading.Tasks; | |||||
namespace BPASmartClient.MorkF.Model | namespace BPASmartClient.MorkF.Model | ||||
{ | { | ||||
internal class MaterialCoordinate | |||||
internal class MaterialCoordinate : Singleton<MaterialCoordinate> | |||||
{ | { | ||||
public static List<string> MLNumberList = new List<string>() { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16" | |||||
public List<string> MLNumberList = new List<string>() { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16" | |||||
, "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27" }; | , "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27" }; | ||||
public static List<Coordinate> MLCoordinateList = new List<Coordinate>() | |||||
public List<Coordinate> MLCoordinateList = new List<Coordinate>() | |||||
{ new Coordinate() { X = 34500, Y = 0 }, new Coordinate() { X = 34500, Y = 9000 } , new Coordinate() { X = 34500, Y = 0 } , //第1层 | { new Coordinate() { X = 34500, Y = 0 }, new Coordinate() { X = 34500, Y = 9000 } , new Coordinate() { X = 34500, Y = 0 } , //第1层 | ||||
new Coordinate(){ X = 34500,Y=0} , new Coordinate() { X = 34500, Y = 83000 }, new Coordinate(){ X = 34500,Y=0}, //第1层 | new Coordinate(){ X = 34500,Y=0} , new Coordinate() { X = 34500, Y = 83000 }, new Coordinate(){ X = 34500,Y=0}, //第1层 | ||||
new Coordinate(){ X = 34500,Y=0} , new Coordinate() { X = 34500, Y = 0 }, new Coordinate(){ X = 34500,Y=0}, //第1层 | new Coordinate(){ X = 34500,Y=0} , new Coordinate() { X = 34500, Y = 0 }, new Coordinate(){ X = 34500,Y=0}, //第1层 | ||||
@@ -40,7 +41,7 @@ namespace BPASmartClient.MorkF.Model | |||||
/// <summary> | /// <summary> | ||||
/// 每个取菜点的编号与坐标字典 | /// 每个取菜点的编号与坐标字典 | ||||
/// </summary> | /// </summary> | ||||
public static Dictionary<string, Coordinate> dicNoMaterialCoordinate { get; set; } = new Dictionary<string, Coordinate>(); | |||||
public Dictionary<string, Coordinate> dicNoMaterialCoordinate { get; set; } = new Dictionary<string, Coordinate>(); | |||||
//{ | //{ | ||||
// {"A1",new Coordinate(){ X = 34500,Y=0} }, | // {"A1",new Coordinate(){ X = 34500,Y=0} }, | ||||
// {"A2",new Coordinate(){ X = 34500,Y=9000} }, | // {"A2",new Coordinate(){ X = 34500,Y=9000} }, | ||||
@@ -86,7 +86,8 @@ namespace BPASmartClient.MorkF | |||||
{ | { | ||||
foreach(MaterialInfo material in materials) | foreach(MaterialInfo material in materials) | ||||
{ | { | ||||
surplus += int.Parse(material.Qty.ToString()); | |||||
//surplus += int.Parse(material.Qty.ToString()); | |||||
surplus += Convert.ToInt32(material.Qty); | |||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||