测试
This commit is contained in:
1 parent
3467d4aa9d
commit
820d9d065b
27 files changed
+249
-59
No files matched your search
@@ -25,8 +25,14 @@ namespace HHWMS.Web
|
||||
var _unitwork = new UnitWork(Wtm);
|
||||
|
||||
var taskList = _unitwork.Find<TaskHeader>(x => x.Status == TaskStatusEnum.新建).Take(10);
|
||||
var begin = new Location();
|
||||
var end = new Location();
|
||||
var locationCodeList = taskList.Select(x => x.FromLocation).Union(taskList.Select(x => x.ToLocation)).ToList();
|
||||
var locationList = _unitwork.Find<Location>(x => locationCodeList.Contains(x.Code)).ToList(); ;
|
||||
foreach (var task in taskList)
|
||||
{
|
||||
begin = locationList.FirstOrDefault(x => x.Code.Equals(task.FromLocation));
|
||||
end = locationList.FirstOrDefault(x => x.Code.Equals(task.ToLocation));
|
||||
var taskInfo = new TaskInfo
|
||||
{
|
||||
TaskId = task.TaskNo,
|
||||
@@ -34,15 +40,15 @@ namespace HHWMS.Web
|
||||
ObjId = task.ContainerCode,
|
||||
StartPos = new CoordPos
|
||||
{
|
||||
X = int.Parse(task.FromLocation.Split("-")[2]),
|
||||
Y = int.Parse(task.FromLocation.Split("-")[1]),
|
||||
Z = int.Parse(task.FromLocation.Split("-")[3])
|
||||
X = begin.Line,
|
||||
Y = begin.Row,
|
||||
Z = begin.Layer
|
||||
},
|
||||
EndPos = new CoordPos
|
||||
{
|
||||
X = int.Parse(task.ToLocation.Split("-")[2]),
|
||||
Y = int.Parse(task.ToLocation.Split("-")[1]),
|
||||
Z = int.Parse(task.ToLocation.Split("-")[3])
|
||||
X = end.Line,
|
||||
Y = end.Row,
|
||||
Z = end.Layer
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user