From c43408b6acfb4e15688726b8b9405802d72cc261 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Mon, 13 May 2024 16:13:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=B7=A5=E6=8B=A3=E9=80=89=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Enums/Inventory/EnumTransSubType.cs | 8 +- .../GaoTongs/IGaoTongAppService.cs | 8 ++ .../GaoTongs/GaoTongAppService.cs | 97 +++++++++++++++++++ 3 files changed, 110 insertions(+), 3 deletions(-) diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs index d29f32c3a..c0569f598 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs @@ -214,8 +214,10 @@ public enum EnumTransSubType /// [Display(Name = "导入盘点计划")] ExcelInCountPlan = 6002, - - - + /// + /// 立库出库 + /// + [Display(Name = "立库出库")] + Depot_Out = 1510 } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs index 13399f076..24cebd522 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs @@ -26,4 +26,12 @@ public interface IGaoTongAppService : IApplicationService /// 位置码列表 /// 库位信息列表 Task> GetLocationInfoByPositionCode(LocationCodeInfoEditInput input); + + /// + /// 人工拣选反馈富维东阳WMS【我方提供】【出库、立库系统直接出库、通知我方】 + /// 人工拣选出库缴库完成,高通WMS反馈到富维东阳WMS + /// + /// + /// + Task ManualSelection(ZuPanEditInput input); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs index aece5cf16..80143b4d8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs @@ -162,5 +162,102 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService }).ToList(); return ret; } + + /// + /// 人工拣选反馈富维东阳WMS【我方提供】【出库、立库系统直接出库、通知我方】 + /// 人工拣选出库缴库完成,高通WMS反馈到富维东阳WMS + /// + /// + /// + [HttpPost("manual-selection")] + public async Task ManualSelection(ZuPanEditInput input) + { + GaoTongResultDTO ret = new GaoTongResultDTO(); + try + { + ItemBasicDTO itemBasicObj = await _itemBasicAppService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); + if (itemBasicObj == null) + { + throw new UserFriendlyException($"{input.ItemCode}在Item表不存在!"); + } + + TransferNoteEditInput transferNoteEditInput = new TransferNoteEditInput(); + transferNoteEditInput.TenantId = null; + transferNoteEditInput.Remark = String.Empty; + transferNoteEditInput.Worker = _currentUser.UserName; + transferNoteEditInput.ActiveDate = CommonHelper.CurTime; + transferNoteEditInput.Type = EnumTransSubType.Depot_Out.ToString(); //喷涂完工转储 + transferNoteEditInput.UseOnTheWayLocation = false; + //transferNoteEditInput.number + //transferNoteEditInput.CallServerName + //transferNoteEditInput.Confirmed = true; + //transferNoteEditInput.ConfirmTime = CommonHelper.CurTime; + if (transferNoteEditInput.Details == null) + { + transferNoteEditInput.Details = new List(); + } + TransferNoteDetailInput detailObj = new TransferNoteDetailInput(); + transferNoteEditInput.Details.Add(detailObj); + detailObj.Remark = ""; + detailObj.ItemCode = input.ItemCode; + detailObj.ItemName = itemBasicObj.Name; + detailObj.ItemDesc1 = itemBasicObj.Desc1; + detailObj.ItemDesc2 = itemBasicObj.Desc2; + detailObj.Uom = itemBasicObj.BasicUom; + detailObj.Qty = input.Qty.TryToDecimalZero(); + detailObj.StdPackQty = itemBasicObj.StdPackQty; + + #region 去箱、去批、去托 + detailObj.FromPackingCode = String.Empty; + detailObj.ToPackingCode = String.Empty; + detailObj.FromContainerCode = String.Empty; + detailObj.ToContainerCode = String.Empty; + detailObj.FromLot = String.Empty; + detailObj.ToLot = String.Empty; + #endregion + + detailObj.SupplierBatch = String.Empty; + detailObj.ArriveDate = CommonHelper.CurTime; + detailObj.ProduceDate = CommonHelper.CurTime; + detailObj.ExpireDate = DateTime.MaxValue; + var fromLocationObj = await _locationAppService.GetByCodeAsync(input.FromLocationCode).ConfigureAwait(false); + if (fromLocationObj == null) + { + throw new UserFriendlyException($"{input.FromLocationCode}在Location表不存在!"); + } + detailObj.FromLocationCode = input.FromLocationCode; + detailObj.FromLocationArea = fromLocationObj.AreaCode; + detailObj.FromLocationGroup = fromLocationObj.LocationGroupCode; + detailObj.FromLocationErpCode = fromLocationObj.ErpLocationCode; + detailObj.FromWarehouseCode = fromLocationObj.WarehouseCode; + var toLocationObj = await _locationAppService.GetByCodeAsync(input.ToLocationCode).ConfigureAwait(false); + if (toLocationObj == null) + { + throw new UserFriendlyException($"{input.ToLocationCode}在Location表不存在!"); + } + detailObj.ToLocationCode = input.ToLocationCode; + detailObj.ToLocationArea = toLocationObj.AreaCode; + detailObj.ToLocationGroup = toLocationObj.LocationGroupCode; + detailObj.ToLocationErpCode = toLocationObj.ErpLocationCode; + detailObj.ToWarehouseCode = toLocationObj.WarehouseCode; + detailObj.FromStatus = EnumInventoryStatus.OK; + detailObj.ToStatus = EnumInventoryStatus.OK; + detailObj.OnTheWayLocationCode = String.Empty; + detailObj.Reason = ""; + var temp = await _transferNoteAppService.CreateAsync(transferNoteEditInput).ConfigureAwait(false); + ret.Code = GaoTongResultStatus.Success; + ret.Message = "接收成功"; + ret.OperateTime = CommonHelper.CurTimeStr; + return ret; + } + catch (Exception ex) + { + ret.Code = GaoTongResultStatus.Failure; + ret.Message = "ManualSelection执行失败:" + ex.Message; + ret.OperateTime = CommonHelper.CurTimeStr; + return ret; + } + } + }