物料收发明细加入操作人
This commit is contained in:
@@ -918,6 +918,11 @@
|
|||||||
操作时间
|
操作时间
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Entitys.InventoryInOutDetails.Create(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
创建
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Entitys.MoveBoxRecord">
|
<member name="T:WMS.Web.Domain.Entitys.MoveBoxRecord">
|
||||||
<summary>
|
<summary>
|
||||||
wms移箱记录
|
wms移箱记录
|
||||||
@@ -2081,6 +2086,11 @@
|
|||||||
公司Id
|
公司Id
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Domain.Infrastructure.ILoginRepositories.StaffId">
|
||||||
|
<summary>
|
||||||
|
员工ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Infrastructure.IMoveBoxRecordRepositories.AddRange(System.Collections.Generic.List{WMS.Web.Domain.Entitys.MoveBoxRecord},System.Boolean)">
|
<member name="M:WMS.Web.Domain.Infrastructure.IMoveBoxRecordRepositories.AddRange(System.Collections.Generic.List{WMS.Web.Domain.Entitys.MoveBoxRecord},System.Boolean)">
|
||||||
批量添加
|
批量添加
|
||||||
</member>
|
</member>
|
||||||
|
|||||||
@@ -70,5 +70,14 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
/// 操作时间
|
/// 操作时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建
|
||||||
|
/// </summary>
|
||||||
|
public void Create(int staffId)
|
||||||
|
{
|
||||||
|
this.CreatorId = staffId;
|
||||||
|
this.CreateTime = DateTime.Now;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,5 +10,10 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
/// 公司Id
|
/// 公司Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
int CompanyId { get; set; }
|
int CompanyId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 员工ID
|
||||||
|
/// </summary>
|
||||||
|
int StaffId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ using WMS.Web.Core.Internal.Results;
|
|||||||
using WMS.Web.Domain.Entitys;
|
using WMS.Web.Domain.Entitys;
|
||||||
using WMS.Web.Domain.Infrastructure;
|
using WMS.Web.Domain.Infrastructure;
|
||||||
using WMS.Web.Domain.IService;
|
using WMS.Web.Domain.IService;
|
||||||
|
using WMS.Web.Domain.IService.Public;
|
||||||
|
using WMS.Web.Domain.Services.Public;
|
||||||
using WMS.Web.Domain.Values;
|
using WMS.Web.Domain.Values;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.Services
|
namespace WMS.Web.Domain.Services
|
||||||
@@ -19,16 +21,19 @@ namespace WMS.Web.Domain.Services
|
|||||||
public class InventoryInOutDetailsService: IInventoryInOutDetailsService
|
public class InventoryInOutDetailsService: IInventoryInOutDetailsService
|
||||||
{
|
{
|
||||||
private readonly IMapper _mapper;
|
private readonly IMapper _mapper;
|
||||||
|
private readonly ILoginRepositories _loginRepositories;
|
||||||
private readonly IBoxRepositories _boxRepositories;
|
private readonly IBoxRepositories _boxRepositories;
|
||||||
private readonly ISerialNumbersRepositories _serialNumbersRepositories;
|
private readonly ISerialNumbersRepositories _serialNumbersRepositories;
|
||||||
private readonly IInventoryDetailsRepositories _inventoryDetailsRepositories;
|
private readonly IInventoryDetailsRepositories _inventoryDetailsRepositories;
|
||||||
private readonly IInventoryInOutDetailsRepositories _inventoryInOutDetailsRepositories;
|
private readonly IInventoryInOutDetailsRepositories _inventoryInOutDetailsRepositories;
|
||||||
public InventoryInOutDetailsService(IMapper mapper, IBoxRepositories boxRepositories,
|
public InventoryInOutDetailsService(IMapper mapper, IBoxRepositories boxRepositories,
|
||||||
|
ILoginRepositories loginRepositories,
|
||||||
ISerialNumbersRepositories serialNumbersRepositories,
|
ISerialNumbersRepositories serialNumbersRepositories,
|
||||||
IInventoryDetailsRepositories inventoryDetailsRepositories,
|
IInventoryDetailsRepositories inventoryDetailsRepositories,
|
||||||
IInventoryInOutDetailsRepositories inventoryInOutDetailsRepositories)
|
IInventoryInOutDetailsRepositories inventoryInOutDetailsRepositories)
|
||||||
{
|
{
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
|
_loginRepositories = loginRepositories;
|
||||||
_boxRepositories = boxRepositories;
|
_boxRepositories = boxRepositories;
|
||||||
_inventoryDetailsRepositories = inventoryDetailsRepositories;
|
_inventoryDetailsRepositories = inventoryDetailsRepositories;
|
||||||
_serialNumbersRepositories = serialNumbersRepositories;
|
_serialNumbersRepositories = serialNumbersRepositories;
|
||||||
@@ -43,6 +48,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<Result> GenerateInOrOutDetails(List<InventoryInOutDetailsGenerateDto> dtos,bool isTransaction)
|
public async Task<Result> GenerateInOrOutDetails(List<InventoryInOutDetailsGenerateDto> dtos,bool isTransaction)
|
||||||
{
|
{
|
||||||
|
|
||||||
//找到物料对应的即时库存明细
|
//找到物料对应的即时库存明细
|
||||||
var orgCodes = dtos.Select(x => x.OrgCode).ToList();
|
var orgCodes = dtos.Select(x => x.OrgCode).ToList();
|
||||||
var materialIds = dtos.Select(x => x.MaterialId).ToList();
|
var materialIds = dtos.Select(x => x.MaterialId).ToList();
|
||||||
@@ -66,6 +72,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
//2.2组装物料收发明细实体
|
//2.2组装物料收发明细实体
|
||||||
var entity = _mapper.Map<InventoryInOutDetails>(dto);
|
var entity = _mapper.Map<InventoryInOutDetails>(dto);
|
||||||
entity.SurplusQty = currentDetail == null ? 0 : currentDetail.Qty;
|
entity.SurplusQty = currentDetail == null ? 0 : currentDetail.Qty;
|
||||||
|
entity.Create(_loginRepositories.StaffId);
|
||||||
add_entitys.Add(entity);
|
add_entitys.Add(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace WMS.Web.Repositories
|
|||||||
public class LoginRepositories:ILoginRepositories
|
public class LoginRepositories:ILoginRepositories
|
||||||
{
|
{
|
||||||
public int CompanyId { get; set; } = 0;
|
public int CompanyId { get; set; } = 0;
|
||||||
|
public int StaffId { get; set; } = 0;
|
||||||
private readonly RedisClientService _redisClientService;
|
private readonly RedisClientService _redisClientService;
|
||||||
public LoginRepositories(ILogger<LoginRepositories> logger, IHttpContextAccessor httpContextAccessor, RedisClientService redisClientService)
|
public LoginRepositories(ILogger<LoginRepositories> logger, IHttpContextAccessor httpContextAccessor, RedisClientService redisClientService)
|
||||||
{
|
{
|
||||||
@@ -29,12 +30,14 @@ namespace WMS.Web.Repositories
|
|||||||
if (string.IsNullOrEmpty(token))
|
if (string.IsNullOrEmpty(token))
|
||||||
{
|
{
|
||||||
this.CompanyId = 0;
|
this.CompanyId = 0;
|
||||||
|
this.StaffId = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_redisClientService = redisClientService;
|
_redisClientService = redisClientService;
|
||||||
var logininfo = _redisClientService.GetStringKey<LoginInDto>($"wms_login_{token}");
|
var logininfo = _redisClientService.GetStringKey<LoginInDto>($"wms_login_{token}");
|
||||||
this.CompanyId = logininfo == null ? 0 : logininfo.UserInfo.CompanyId;
|
this.CompanyId = logininfo == null ? 0 : logininfo.UserInfo.CompanyId;
|
||||||
|
this.StaffId = logininfo == null ? 0 : logininfo.UserInfo.StaffId;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user