Browse Source

Merge branch 'dev_DY_CC' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into dev_DY_CC

dev_DY_CC
赵新宇 6 months ago
parent
commit
9441e6a23c
  1. 34
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SalePriceSheetController.cs
  2. 46
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
  3. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SalePrices/ISalePriceSheetAppService.cs
  4. 19
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAppService.cs

34
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;
/// <summary>
///
/// </summary>
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}SalePriceSheet")]
public class SalePriceSheetController : AbpController
{
private readonly ISalePriceSheetAppService _SalePriceSheetAppService;
/// <summary>
///
/// </summary>
/// <param name="SalePriceSheetAppService"></param>
public SalePriceSheetController(ISalePriceSheetAppService SalePriceSheetAppService)
{
_SalePriceSheetAppService = SalePriceSheetAppService;
}
[HttpPost("get-list-by-itemcode-and-customercode")]
public virtual async Task<string> GetListByItemCodeAndCustomerCodeAsync(List<SalePriceSheetDTO> list)
{
return await _SalePriceSheetAppService.GetListByItemCodeAndCustomerCodeAsync(list).ConfigureAwait(false);
}
}

46
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs

@ -609,22 +609,23 @@ public class BalanceController : AbpController
/// <param name="itemCode"></param>
/// <param name="productLine"></param>
/// <param name="isPackingCode"></param>
/// <param name="erpLocationCode"></param>
/// <returns></returns>
[HttpPost("get-recommend-balance-erplocation")]
public async Task<List<SortBalance>> GetRecommendBalanceByErpLocation(string itemCode, bool isPackingCode,string erpLocationCode)
public async Task<List<SortBalance>> GetRecommendBalanceByErpLocation(SearchErpAndLocation erpLocationCode)
{
var codes=await _locationAppService.GetListByErpLocationCodes(new List<string>{erpLocationCode}).ConfigureAwait(false);
var codes=await _locationAppService.GetListByErpLocationCodes(new List<string>{ erpLocationCode.erpLocationCode}).ConfigureAwait(false);
if(codes.Any()){
//获取可用库存
var input = new RecommendBalanceRequestInput
{
ItemCode = itemCode,
ItemCode = erpLocationCode.itemCode,
Qty = decimal.MaxValue,
Statuses = new EditableList<EnumInventoryStatus> { 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; }
}
/*
/// <summary>
/// 查询库余额
/// </summary>
/// <param name="listInput"></param>
/// <returns></returns>
[HttpPost("get-list-balance-by-input")]
public async Task<PagedResultDto<BalanceDTO>> GetListBalanceByInputAsync(List<EnumLocationType> enumLocationTypes)
{
var sfsInventoryRequestInputBase= new BalanceRequestInput
{
MaxResultCount =list.pageSize,
SkipCount = (listInput.pageIndex - 1) * listInput.pageSize,
Sorting = listInput.sortBy,
Condition = new Condition()
public class SearchErpAndLocation
{
Filters = new List<Filter>()
}
}
var balanceDTOs = await _balanceAppService.GetListAsync();
return balanceDTOs;
public string itemCode { get; set; }
public bool isPackingCode { get; set; }
public string erpLocationCode { get; set; }
}
/// <summary>
/// 获取可以上架的库存状态
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
[HttpGet("allow-putaway-inventory-status")]
public virtual async Task<List<EnumInventoryStatus>> GetAllowPutawayInventoryStatusAsync()
{
return await _balanceAppService .GetAllowPutawayInventoryStatusAsync();
}
*/
}

2
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<SalePric
{
Task<SalePriceSheetDTO> GetByItemCodeAndCustomerCode(string itemCode, string customerCode);
Task UpsertAsyncByInterface(SalePriceSheetEditInput input);
Task<string> GetListByItemCodeAndCustomerCodeAsync(List<SalePriceSheetDTO> list);
}

19
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<SalePriceSheet
var dto = ObjectMapper.Map<SalePriceSheet, SalePriceSheetDTO>(entity);
return dto;
}
[HttpPost("get-list-by-itemcode-and-customercode")]
public virtual async Task<string> GetListByItemCodeAndCustomerCodeAsync(List<SalePriceSheetDTO> 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;
}
}

Loading…
Cancel
Save