XiangdianStockerExcute.cs
2.97 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HHECS.Bll;
using HHECS.Model;
using S7.Net;
namespace HHECS.Common
{
/// <summary>
/// todo:湘电单叉双伸位堆垛机处理函数
/// </summary>
public class XiangdianStockerExcute : IStockerExcute
{
/// <summary>
/// 标记这个堆垛机处理类所处理的设备类型
/// </summary>
public EquipmentType EquipmentType { get; set; }
public BllResult Excute(List<Equipment> stockers, List<Plc> plcs)
{
throw new NotImplementedException();
}
public BllResult ExcuteTaskComplete(Equipment stocker, Plc plc)
{
throw new NotImplementedException();
}
public BllResult ExcuteTaskIn(Equipment stocker, Plc plc)
{
throw new NotImplementedException();
}
public BllResult ExcuteTaskOut(Equipment stocker, Plc plc)
{
throw new NotImplementedException();
}
public BllResult ExcuteTaskTransferInRoadway(Equipment stocker, Plc plc)
{
throw new NotImplementedException();
}
public BllResult ValidateStockerForCompleteTask(Equipment stocker)
{
throw new NotImplementedException();
}
public BllResult ValidateStockerIn(Equipment stocker)
{
try
{
//判断条件,这里没有判断货叉故障和堆垛机故障,这特么怎么判断,这么多字段
//1.操作模式 = 5 联机;
//2.双货叉原位,任务货叉上无货;
//3.任务货叉无故障无任务;
//4.堆垛机无故障
//5.对应货叉任务类型:0 - 无任务
//6.对应货叉任务标志:1待机
if (stocker.EquipmentProps.Find(t => t.EquipmentTypePropTemplateCode == "OperationModel").Value == "5"&&stocker.EquipmentProps.Find(t=>t.EquipmentTypePropTemplateCode== "Fork1ForkHasPallet").Value=="False"&& stocker.EquipmentProps.Find(t => t.EquipmentTypePropTemplateCode == "Fork1TaskNo").Value == "0"&& stocker.EquipmentProps.Find(t => t.EquipmentTypePropTemplateCode == "Fork1TaskType").Value == "0"&& stocker.EquipmentProps.Find(t => t.EquipmentTypePropTemplateCode == "Fork1TaskExcuteStatus").Value == "1")
{
return BllResultFactory.Sucess();
}
else
{
return BllResultFactory.Error();
}
}
catch (Exception ex)
{
Logger.Log($"校验堆垛机{stocker.Name}入库条件异常:{ex.Message}", LogLevel.Exception);
return BllResultFactory.Error();
}
}
public BllResult ValidateStockerOut(Equipment stocker)
{
throw new NotImplementedException();
}
}
}