WorkManage.cs
980 字节
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
namespace BLL
{
public static class WorkManage
{
public static string GetChargingName(AgvInfo info)
{
string name = null;
if (Common.chargingPile == null) return name;
//空闲充电桩
for (int i = 0; i < Common.chargingPile.Count; i++)
{
if (Common.chargingPile[i].Employ == "")
{
int idx = Array.FindIndex(Common.chargingPile[i].User, s => s == info.Name);
if (idx > -1)
{
name = Common.chargingPile[i].Name;
return name;
}
}
}
if (info.Battery <= info.BatteryMin)
{
}
return name;
}
}
}