Merge branch 'master' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api
This commit is contained in:
Binary file not shown.
@@ -1,5 +1,7 @@
|
||||
using AutoMapper;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -30,10 +32,12 @@ namespace WMS.Web.Domain.Services
|
||||
private readonly ISerialNumberService _serialNumberService;
|
||||
private readonly IBoxInventoryService _boxInventoryService;
|
||||
private readonly IBoxInventoryRepositories _boxInventoryRepositories;
|
||||
private readonly ILogger<ChangeMoveBoxService> _logger;
|
||||
public ChangeMoveBoxService(IMapper mapper, ILoginService loginService,
|
||||
IChangeBoxRecordRepositories changeBoxRecordRepositories, IBasicsRepositories basbicsRepositories,
|
||||
IMoveBoxRecordRepositories moveBoxRecordRepositories, IBoxRepositories boxRepositories,
|
||||
ISerialNumberService serialNumberService, IBoxInventoryService boxInventoryService, IBoxInventoryRepositories boxInventoryRepositories)
|
||||
ISerialNumberService serialNumberService, IBoxInventoryService boxInventoryService, IBoxInventoryRepositories boxInventoryRepositories,
|
||||
ILogger<ChangeMoveBoxService> logger)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_loginService = loginService;
|
||||
@@ -44,6 +48,7 @@ namespace WMS.Web.Domain.Services
|
||||
_serialNumberService = serialNumberService;
|
||||
_boxInventoryService = boxInventoryService;
|
||||
_boxInventoryRepositories = boxInventoryRepositories;
|
||||
_logger = logger;
|
||||
}
|
||||
/// <summary>
|
||||
/// 改箱保存
|
||||
@@ -53,6 +58,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// <returns></returns>
|
||||
public async Task<Result> ChangeBoxSave(List<SaveChangeBoxRecordRequest> dto, LoginInDto loginInfo, bool isTransaction = false, bool IsInventory = true)
|
||||
{
|
||||
_logger.LogInformation($"改箱:{JsonConvert.SerializeObject(dto)} 操作人:{loginInfo.UserInfo.StaffId}");
|
||||
//1.有原箱时 需要判断 物料对应的序列号是否存在
|
||||
var srcIds = dto.Select(s => s.SrcBoxId).ToList();
|
||||
var destIds = dto.Select(s => s.DestBoxId).ToList();
|
||||
@@ -169,6 +175,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// <returns></returns>
|
||||
public async Task<Result> MoveBoxSave(List<SaveMoveBoxRecordRequest> dto, bool IsUp, LoginInDto loginInfo)
|
||||
{
|
||||
_logger.LogInformation($"移箱:{JsonConvert.SerializeObject(dto)} 是否上架:{IsUp} 操作人:{loginInfo.UserInfo.StaffId}");
|
||||
//1.下架时 需要验证箱是否在库存里
|
||||
if (!IsUp)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using AutoMapper;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -38,12 +40,13 @@ namespace WMS.Web.Domain.Services
|
||||
private readonly IBoxInventoryService _boxInventoryService;
|
||||
private readonly IInventoryInOutDetailsService _inventoryInOutDetailsService;
|
||||
private readonly IBoxInventoryRepositories _boxInventoryRepositories;
|
||||
private readonly ILogger<OutStockService> _logger;
|
||||
public OutStockService(IMapper mapper, ILoginService loginService,
|
||||
IBasicsRepositories transactionRepositories,
|
||||
IOutStockRepositories outStockRepositories, IOutStockTaskRepositories outStockTaskRepositories,
|
||||
IOutStockTaskService outStockTaskService, IErpService erpService, ISerialNumberService serialNumberService,
|
||||
IBoxInventoryService boxInventoryService, IInventoryInOutDetailsService inventoryInOutDetailsService,
|
||||
IBoxInventoryRepositories boxInventoryRepositories)
|
||||
IBoxInventoryRepositories boxInventoryRepositories, ILogger<OutStockService> logger)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_loginService = loginService;
|
||||
@@ -56,6 +59,7 @@ namespace WMS.Web.Domain.Services
|
||||
_boxInventoryService = boxInventoryService;
|
||||
_inventoryInOutDetailsService = inventoryInOutDetailsService;
|
||||
_boxInventoryRepositories = boxInventoryRepositories;
|
||||
_logger = logger;
|
||||
}
|
||||
/// <summary>
|
||||
/// 出库单
|
||||
@@ -65,6 +69,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// <returns></returns>
|
||||
public async Task<Result> Save(SaveOutStockRequest dto, LoginInDto loginInfo)
|
||||
{
|
||||
_logger.LogInformation($"出库:{JsonConvert.SerializeObject(dto)} 操作人:{loginInfo.UserInfo.StaffId}");
|
||||
var outStockTask = await _outStockTaskRepositories.Get(dto.TaskId);
|
||||
if (outStockTask.Status == OutStockStatus.Already)
|
||||
return Result.ReFailure(ResultCodes.OutStockTaskAlready);
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// <returns></returns>
|
||||
public async Task<Result> Save(List<SaveTakeStockRequest> dto, LoginInDto loginInfo)
|
||||
{
|
||||
_logger.LogInformation($"盘点保存:{JsonConvert.SerializeObject(dto)} 盘点人:{loginInfo.UserInfo.StaffId}" );
|
||||
List<TakeStock> list = _mapper.Map<List<TakeStock>>(dto);
|
||||
foreach (var entity in list)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user