| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_BasicService; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | } |
| | | |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æ£é宿.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æºä»å
¥æºä»ç»çæå.ObjToInt()) |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æ£é宿.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æºä»å
¥æºä»ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鿣åºå宿.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æçç¶æä¸æ£ç¡®,ä¸å¯ç³è¯·å
¥åº"); |
| | | } |
| | |
| | | return WebResponseContent.Instance.Error($"è´§ä½åé
失败,æªæ¾å°å¯åé
è´§ä½"); |
| | | } |
| | | |
| | | |
| | | var newTask = new Dt_Task() |
| | | { |
| | | CurrentAddress = stations.GetValueOrDefault(stationCode) ?? "", |
| | |
| | | TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | PalletType = stockInfo.PalletType, |
| | | OrderNo= stockInfo.Details.FirstOrDefault()?.OrderNo |
| | | OrderNo= stockInfo.Details.FirstOrDefault()?.OrderNo, |
| | | }; |
| | | //空箱 |
| | | if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt()) |
| | | if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt()|| stockInfo.StockStatus == StockStatusEmun.æºä»å
¥æºä»ç»çæå.ObjToInt() || stockInfo.StockStatus == StockStatusEmun.鿣åºå宿.ObjToInt()) |
| | | { |
| | | _unitOfWorkManage.BeginTran(); |
| | | newTask.TaskType = TaskTypeEnum.InEmpty.ObjToInt(); |
| | | int taskId = BaseDal.AddData(newTask); |
| | | newTask.TaskId = taskId; |
| | | |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | _locationInfoService.UpdateData(locationInfo); |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(); |
| | | |
| | | _stockRepository.UpdateData(stockInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | //æºä»å
¥æºä» |
| | | if (stockInfo.StockStatus == StockStatusEmun.æºä»å
¥æºä»ç»çæå.ObjToInt()) |
| | | { |
| | | _unitOfWorkManage.BeginTran(); |
| | | newTask.TaskType = TaskTypeEnum.AllocateInWarehouse.ObjToInt(); |
| | | if (stockInfo.StockStatus == StockStatusEmun.æºä»å
¥æºä»ç»çæå.ObjToInt()) |
| | | { |
| | | newTask.TaskType = TaskTypeEnum.AllocateInWarehouse.ObjToInt(); |
| | | } |
| | | if (stockInfo.StockStatus == StockStatusEmun.鿣åºå宿.ObjToInt()) |
| | | { |
| | | newTask.TaskType = TaskTypeEnum.InQuality.ObjToInt(); |
| | | } |
| | | int taskId = BaseDal.AddData(newTask); |
| | | newTask.TaskId = taskId; |
| | | |
| | |
| | | inboundOrder = _inboundOrderService.Repository.QueryFirst(x => x.InboundOrderNo == orderNo && x.OrderStatus < InOrderStatusEnum.å
¥åºå®æ.ObjToInt()); |
| | | |
| | | } |
| | | |
| | | |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(); |
| | | |
| | | LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus; |
| | |
| | | _stockRepository.UpdateData(stockInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | //TaskModel esstask = new TaskModel() |
| | | //{ |
| | | // taskType = "putaway", |
| | | // taskGroupCode = "", |
| | | // groupPriority = 0, |
| | | // tasks = new List<TasksType> |
| | | // { |
| | | // new() |
| | | // { |
| | | // taskCode=newTask.TaskNum.ToString(), |
| | | // taskPriority=0, |
| | | // taskDescribe=new TaskDescribeType{ |
| | | // containerCode=palletCode, |
| | | // containerType= "CT_KUBOT_STANDARD", |
| | | // fromLocationCode=stations.GetValueOrDefault(stationCode)??"", |
| | | // toStationCode="", |
| | | // toLocationCode=locationInfo.LocationCode, |
| | | // deadline=0,storageTag="" |
| | | // } |
| | | // } |
| | | // } |
| | | //}; |
| | | |
| | | //var result = await _eSSApiService.CreateTaskAsync(esstask); |
| | | |
| | | //_logger.LogInformation("å建任å¡è¿å: " + result); |
| | | //if (result) |
| | | await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest |
| | | { |
| | | try |
| | | { |
| | | await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest |
| | | { |
| | | slotCode = stationCode, |
| | | containerCode = palletCode |
| | | }); |
| | | } |
| | | catch (Exception ex) { |
| | | |
| | | slotCode = stationCode, |
| | | containerCode = palletCode |
| | | }); |
| | | |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | //else |
| | | //{ |
| | | // return WebResponseContent.Instance.Error("ä¸åæºå¨äººä»»å¡å¤±è´¥ï¼"); |
| | | //} |
| | | return WebResponseContent.Instance.OK(); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |