diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/LocationCodeInfoDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/LocationCodeInfoDTO.cs new file mode 100644 index 000000000..2a1456dbd --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/LocationCodeInfoDTO.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class LocationCodeInfoDTO : EntityDto +{ + /// + /// 位置码 + /// + [Display(Name = "位置码")] + public string PositionCode { get; set; } + + /// + /// 库位码 + /// + [Display(Name = "库位码")] + public string LocationCode { get; set; } +} 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 b7daebf3c..13399f076 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 @@ -18,4 +18,12 @@ public interface IGaoTongAppService : IApplicationService /// 组盘接口输入参数 /// 立库接口通用输出参数 Task FeedbackZuPanAsync(ZuPanEditInput input); + + /// + /// 【立库接口】 回库器具或空器具AGV搬运 + /// 提供一个用位置码查询库位的接口给立体库使用 + /// + /// 位置码列表 + /// 库位信息列表 + Task> GetLocationInfoByPositionCode(LocationCodeInfoEditInput input); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/LocationCodeInfoEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/LocationCodeInfoEditInput.cs new file mode 100644 index 000000000..398b467dc --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/LocationCodeInfoEditInput.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; +public class LocationCodeInfoEditInput : EntityDto +{ + [Display(Name = "每次生成一个不会重复值,用于防重")] + public string Uuid { get; set; } + + [Display(Name = "接口动作的标识:ReceiveBackStockAction")] + public string OperatorName { get; set; } + + [Display(Name = "位置码列表")] + public List DataList { get; set; } + + public LocationCodeInfoEditInput() + { + DataList = new List(); + } + + +} + +public class SiteData : EntityDto +{ + /// + /// 位置码 + /// + public string Site { get; set; } +} + +/* + { + "uuid": "每次生成一个不会重复值,用于防重", + "operatorName": "ReceiveTractorAction", + "datalist": [ + { + "site": "A001" + } + ] +} + + */ 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 f898c8741..aece5cf16 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 @@ -9,6 +9,7 @@ using Volo.Abp; using Volo.Abp.Application.Services; using Volo.Abp.Users; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Inventory.Application.Contracts; @@ -30,19 +31,22 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService private readonly CurrentUser _currentUser; private readonly IItemBasicAppService _itemBasicAppService; private readonly ILocationAppService _locationAppService; + private readonly IPositionCodeAppService _positionCodeAppService; public GaoTongAppService( IBalanceAppService balanceAppService , ITransferNoteAppService transferNoteAppService , CurrentUser currentUser , IItemBasicAppService itemBasicAppService - ,ILocationAppService locationAppService) + , ILocationAppService locationAppService + , IPositionCodeAppService positionCodeAppService) { _balanceAppService = balanceAppService; _transferNoteAppService = transferNoteAppService; _currentUser = currentUser; _itemBasicAppService = itemBasicAppService; _locationAppService = locationAppService; + _positionCodeAppService = positionCodeAppService; } /// /// 组盘信息反馈到东阳WMS @@ -138,5 +142,25 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService return ret; } } + + /// + /// 【立库接口】 回库器具或空器具AGV搬运 + /// 提供一个用位置码查询库位的接口给立体库使用 + /// + /// 位置码列表 + /// 库位信息列表 + [HttpPost("get-location-info-by-position-code")] + public async Task> GetLocationInfoByPositionCode(LocationCodeInfoEditInput input) + { + List strLst = input.DataList.Select(itm => itm.Site).ToList(); + var lst = await _positionCodeAppService.GetByCodesAsync(strLst).ConfigureAwait(false); + + var ret = lst.Select(itm => new LocationCodeInfoDTO() + { + PositionCode = itm.Code, + LocationCode = itm.LocationCode + }).ToList(); + return ret; + } }