| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WCS.Application.Entity; |
| | | using static Elastic.Clients.Elasticsearch.JoinField; |
| | | |
| | | namespace WCS.Application.Util; |
| | | |
| | |
| | | //} |
| | | if (currentModel.Make != locationModel.Make) |
| | | { |
| | | neighbor.IsSendPlc = true; |
| | | //if (current.X != neighbor.X) |
| | | //{ |
| | | // current.IsSendPlc = true; |
| | | //} |
| | | |
| | | if (current.Y > neighbor.Y) |
| | | { |
| | | current.IsSendPlc = true; |
| | | } |
| | | else if (current.Y < neighbor.Y) |
| | | { |
| | | neighbor.IsSendPlc = true; |
| | | } |
| | | |
| | | //current.IsSendPlc = true; |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取总任务表下发ID主键 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static int GetTaskId() |
| | | { |
| | | var list = _db.Queryable<WcsTask>().ToList(); |
| | | var maxNo = list.Max(m => m.TaskId); |
| | | |
| | | if (maxNo != null && maxNo > 0) |
| | | { |
| | | if (maxNo++ > 99999999) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | return (int)maxNo++; |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 计算曼哈顿距离 |
| | | /// </summary> |
| | | /// <param name="start">起始位置</param> |