InOutDevice_Static.cs
1.5 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
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeviceLibrary
{
partial class InOutDevice
{
public static bool GetInStoreWaitSide(out InOutSideE inOutSide, out InOutDevice iod, bool dontCheckPosid = false)
{
inOutSide = InOutSideE.Left;
iod = null;
for (int i = 0; i < InOutDeviceList.Count; i++)
{
var ioddic = InOutDeviceList.ElementAt(i);
var InMoveInfo = ioddic.Value.MoveInfo;
if (InMoveInfo.MoveStep >= MoveStep.StartInStore && InMoveInfo.MoveStep <= MoveStep.InWaitBoxLeave && (!string.IsNullOrEmpty(InMoveInfo.MoveParam.PosID)|| dontCheckPosid))
{
inOutSide = ioddic.Key;
iod = ioddic.Value;
return true;
}
}
return false;
}
public static bool GetOutStoreFreeSide(out InOutSideE inOutSide, out InOutDevice iod)
{
inOutSide = InOutSideE.Left;
iod = null;
for (int i = 0; i < InOutDeviceList.Count; i++)
{
var ioddic = InOutDeviceList.ElementAt(i);
if (!ioddic.Value.CanOut())
continue;
inOutSide = ioddic.Key;
iod = ioddic.Value;
return true;
}
return false;
}
}
}