| | |
| | | 锘縰sing log4net.Core; |
| | | using Mapster; |
| | | using Masuit.Tools; |
| | | using System.Collections.Generic; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Comm.AGVTask; |
| | | using WIDESEA_Comm.WCSInterface.Requst; |
| | | using WIDESEA_Common; |
| | |
| | | |
| | | private DtLocationInfo GetEmptyLocation(List<DtLocationInfo> dtLocationInfos) |
| | | { |
| | | var locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Layer).ThenByDescending(x => x.Depth).ThenBy(x => x.Row).ThenBy(x => x.Column).FirstOrDefault(); |
| | | var locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Column).ThenBy(x => x.Row).ThenBy(x => x.Layer).FirstOrDefault(); //.ThenByDescending(x => x.Depth) |
| | | |
| | | return locationinfo; |
| | | } |
| | |
| | | #endregion 鑾峰彇璐т綅 |
| | | #endregion 搴撲綅鍒嗛厤 |
| | | |
| | | public WebResponseContent confirmTask(int taskNum) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var taskInfo = BaseDal.QueryFirst(x => x.TaskNum == taskNum); |
| | | if (taskInfo != null) |
| | | { |
| | | var taskHty = taskInfo.Adapt<Dt_Task_Hty>(); |
| | | taskHty.FinishTime = DateTime.Now; |
| | | taskHty.OperateType = (int)OperateTypeEnum.浜哄伐纭; |
| | | |
| | | BaseDal.DeleteData(taskInfo); |
| | | _task_HtyRepository.AddData(taskHty); |
| | | } |
| | | |
| | | content.OK("纭瀹屾垚"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error($"纭寮傚父:{ex.Message}"); |
| | | } |
| | | |
| | | return content; |
| | | } |
| | | |
| | | } |