| | |
| | | } |
| | | if (stockInfos1.Count > 0) |
| | | { |
| | | Dt_LocationInfo? locationInfo2 = _basicService.LocationInfoService.AssignLocation(); |
| | | if (locationInfo2 == null) throw new Exception("æ å¯ç§»åºè´§ä½"); |
| | | locationInfo2.LocationStatus = LocationStatusEnum.Relocationing.ObjToInt(); |
| | | locationInfos.Add(locationInfo2); |
| | | List<string> strings = new List<string>(); |
| | | foreach (var item in stockInfos1.GroupBy(x => x.LocationCode)) |
| | | { |
| | | Dt_LocationInfo? locationInfo2 = _basicService.LocationInfoService.AssignLocation(strings); |
| | | if (locationInfo2 == null) throw new Exception("æ å¯ç§»åºè´§ä½"); |
| | | locationInfo2.LocationStatus = LocationStatusEnum.Relocationing.ObjToInt(); |
| | | strings.Add(locationInfo2.LocationCode); |
| | | locationInfos.Add(locationInfo2); |
| | | foreach (var item1 in item.OrderByDescending(x => x.SerialNumber)) |
| | | { |
| | | locationInfo2.CurrentQty++; |
| | | Dt_Task task = new() |
| | | { |
| | | CurrentAddress = item1.LocationCode, |
| | |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)) |
| | | }; |
| | | dt_Tasks.Add(task); |
| | | item1.SerialNumber = locationInfo2.CurrentQty; |
| | | item1.StockStatus = StockStatusEmun.ç§»åºä¸.ObjToInt(); |
| | | //locationInfo2.CurrentQty++; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | return (tasks, stockInfos, new List<Dt_OutboundOrderDetail> { outboundOrderDetail }, outStockLockInfos, locationInfos, locationInfos1, outboundOrder); |
| | | } |
| | | public WebResponseContent NewGenerateOutboundTask(int orderDetailId, List<Dt_Inventory_Batch> inventory_Batches) |
| | | { |
| | | try |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_InventoryInfo> stockInfos = new List<Dt_InventoryInfo>(); |
| | | List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>(); |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | Dt_OutboundOrder order = new Dt_OutboundOrder(); |
| | | |
| | | |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// çæåºåºä»»å¡ |
| | | /// </summary> |