From 35e0479ffee5698ae76e3cc8dd43bb6ee9a28a20 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Mon, 28 Oct 2024 14:14:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=87=BA=E8=B4=A7?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseDatas/SalePriceSheetController.cs | 34 +++++++++++++++++++ .../SalePrices/ISalePriceSheetAppService.cs | 2 ++ .../SalePrices/SalePriceSheetAppService.cs | 19 +++++++++++ 3 files changed, 55 insertions(+) create mode 100644 be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SalePriceSheetController.cs diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SalePriceSheetController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SalePriceSheetController.cs new file mode 100644 index 000000000..96c2d4c13 --- /dev/null +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SalePriceSheetController.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Domain.Repositories; +using Win_in.Sfs.Basedata.Application.Contracts; + +namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; + +/// +/// +/// +[ApiController] +[Route($"{PdaHostConst.ROOT_ROUTE}SalePriceSheet")] +public class SalePriceSheetController : AbpController +{ + private readonly ISalePriceSheetAppService _SalePriceSheetAppService; + + /// + /// + /// + /// + public SalePriceSheetController(ISalePriceSheetAppService SalePriceSheetAppService) + { + _SalePriceSheetAppService = SalePriceSheetAppService; + } + + [HttpPost("get-list-by-itemcode-and-customercode")] + public virtual async Task GetListByItemCodeAndCustomerCodeAsync(List list) + { + return await _SalePriceSheetAppService.GetListByItemCodeAndCustomerCodeAsync(list).ConfigureAwait(false); + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SalePrices/ISalePriceSheetAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SalePrices/ISalePriceSheetAppService.cs index c146d6d00..d5f8c08b0 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SalePrices/ISalePriceSheetAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SalePrices/ISalePriceSheetAppService.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Threading.Tasks; namespace Win_in.Sfs.Basedata.Application.Contracts; @@ -6,4 +7,5 @@ public interface ISalePriceSheetAppService : ISfsBaseDataAppServiceBase GetByItemCodeAndCustomerCode(string itemCode, string customerCode); Task UpsertAsyncByInterface(SalePriceSheetEditInput input); + Task GetListByItemCodeAndCustomerCodeAsync(List list); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs index e44928e0e..608c74654 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs @@ -1,4 +1,7 @@ +using System; +using System.Collections.Generic; using System.Threading.Tasks; +using DocumentFormat.OpenXml.Spreadsheet; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Caching; @@ -38,4 +41,20 @@ public class SalePriceSheetAppService : SfsBaseDataAppServiceBase(entity); return dto; } + + [HttpPost("get-list-by-itemcode-and-customercode")] + public virtual async Task GetListByItemCodeAndCustomerCodeAsync(List list) + { + var message=string.Empty; + foreach (var dto in list) + { + var salePriceSheet=await _repository.FindAsync(p => p.ItemCode == dto.ItemCode && p.CustomerCode == dto.CustomerCode).ConfigureAwait(false); + if (salePriceSheet == null) + { + message += $"客户代码:【{dto.CustomerCode}】ERP料号:【{dto.ItemCode}】的零件没有销售价格"; + } + } + + return message; + } } From 11256f108156e54d7bba546cf1a44bcb53f92c08 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Mon, 28 Oct 2024 14:17:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SalePrices/SalePriceSheetAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs index 608c74654..c433e719c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs @@ -51,7 +51,7 @@ public class SalePriceSheetAppService : SfsBaseDataAppServiceBase p.ItemCode == dto.ItemCode && p.CustomerCode == dto.CustomerCode).ConfigureAwait(false); if (salePriceSheet == null) { - message += $"客户代码:【{dto.CustomerCode}】ERP料号:【{dto.ItemCode}】的零件没有销售价格"; + message += $" 客户代码:【{dto.CustomerCode}】ERP料号:【{dto.ItemCode}】的零件没有销售价格"; } } From 027c2b7371f5a3cbdda08d2a2e458e401632c878 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Mon, 28 Oct 2024 17:31:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=BA=93=E5=AD=98ERP?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Inventories/BalanceController.cs | 48 ++++--------------- 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs index 2f2d8aa97..3517ec18f 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs @@ -609,22 +609,23 @@ public class BalanceController : AbpController /// /// /// + /// /// [HttpPost("get-recommend-balance-erplocation")] - public async Task> GetRecommendBalanceByErpLocation(string itemCode, bool isPackingCode,string erpLocationCode) + public async Task> GetRecommendBalanceByErpLocation(SearchErpAndLocation erpLocationCode) { - var codes=await _locationAppService.GetListByErpLocationCodes(new List{erpLocationCode}).ConfigureAwait(false); + var codes=await _locationAppService.GetListByErpLocationCodes(new List{ erpLocationCode.erpLocationCode}).ConfigureAwait(false); if(codes.Any()){ //获取可用库存 var input = new RecommendBalanceRequestInput { - ItemCode = itemCode, + ItemCode = erpLocationCode.itemCode, Qty = decimal.MaxValue, Statuses = new EditableList { EnumInventoryStatus.OK }, Locations = codes.Select(p=>p.Code).ToList(), - IsPackingCode = isPackingCode + IsPackingCode = erpLocationCode.isPackingCode }; var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); @@ -704,40 +705,11 @@ public class BalanceController : AbpController public int LocationRow { get; set; } } - /* - /// - /// 查询库余额 - /// - /// - /// - [HttpPost("get-list-balance-by-input")] - public async Task> GetListBalanceByInputAsync(List enumLocationTypes) - { - var sfsInventoryRequestInputBase= new BalanceRequestInput - { - MaxResultCount =list.pageSize, - SkipCount = (listInput.pageIndex - 1) * listInput.pageSize, - Sorting = listInput.sortBy, - Condition = new Condition() - { - Filters = new List() - } - } - - var balanceDTOs = await _balanceAppService.GetListAsync(); - - return balanceDTOs; - } - - /// - /// 获取可以上架的库存状态 - /// - /// - /// - [HttpGet("allow-putaway-inventory-status")] - public virtual async Task> GetAllowPutawayInventoryStatusAsync() + public class SearchErpAndLocation { - return await _balanceAppService .GetAllowPutawayInventoryStatusAsync(); + public string itemCode { get; set; } + public bool isPackingCode { get; set; } + public string erpLocationCode { get; set; } } - */ + }