| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WCS.Application.Entity; |
| | | using static Elastic.Clients.Elasticsearch.JoinField; |
| | | using static SKIT.FlurlHttpClient.Wechat.Api.Models.CustomServiceKfSessionGetWaitCaseResponse.Types; |
| | | |
| | | namespace WCS.Application.Util; |
| | |
| | | /// <returns></returns> |
| | | public static List<CarModel> GetCarPathUp(List<CarModel> list, int moveType) |
| | | { |
| | | if (list == null) |
| | | { |
| | | return null; |
| | | } |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | if (i >= 0 && i < list.Count - 1) |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取小车路径 |
| | | /// </summary> |
| | |
| | | |
| | | if (current.Equals(end)) |
| | | { |
| | | Log.Error(ReconstructPath(cameFrom, current).ToString()); |
| | | Log.Error("小车路径分配:" +ReconstructPath(cameFrom, current).ToString()); |
| | | return ReconstructPath(cameFrom, current); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /// <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> |