| | |
| | |  |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | } |
| | | content.Message = result.Item6; |
| | | //å¤çåºåºæ°æ® |
| | | return GenerateOutboundTaskDataUpdate(tasks, stockInfos, outSGOrderDetails, outStockLockInfos, locationInfos); |
| | | return GenerateOutboundTaskDataUpdate(tasks, stockInfos, outSGOrderDetails, outStockLockInfos, locationInfos, result.Item6); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | //åé
åºå |
| | | (List<Dt_StockInfo>, List<Dt_OutSGOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>,string) result = _outboundService.OutSGOrderDetailService.AssignStockOutbound(outSGOrderDetails); |
| | | |
| | | //ä¿å缺æç¶æï¼æ 论æ¯å¦çæäºä»»å¡ |
| | | var shortageDetails = result.Item2.Where(x => x.OutSGOrderDetailStatus == OutOrderStatusEnum.缺æ.ObjToInt()).ToList(); |
| | | if (shortageDetails.Any()) |
| | | { |
| | | _outboundRepository.OutSGOrderDetailRepository.UpdateData(shortageDetails); |
| | | } |
| | | |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | //è·åä»»å¡ |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("æ åºå"); |
| | | //没æåºåï¼ä½å·²ç»å¨AssignStockOutboundæ¹æ³ä¸æ è®°äºç¼ºæç¶æï¼å¹¶ä¸å·²ç»ä¿å |
| | | orderDetails = result.Item2; |
| | | } |
| | | |
| | | return (tasks, stockInfos, orderDetails, outStockLockInfos, locationInfos, result.Item5); |
| | |
| | | /// å¤çåºåºæ°æ® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutSGOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null) |
| | | public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutSGOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null, string message = "") |
| | | { |
| | | try |
| | | { |
| | |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | return WebResponseContent.Instance.OK(); |
| | | return WebResponseContent.Instance.OK(message); |
| | | } |
| | | catch (Exception ex) |
| | | { |