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/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; }
}
- */
+
}
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..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
@@ -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;
+ }
}