日志
This commit is contained in:
@@ -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;
|
||||
@@ -25,6 +27,7 @@ namespace WMS.Web.Domain.Services
|
||||
{
|
||||
private readonly IMapper _mapper;
|
||||
private readonly ILoginService _loginService;
|
||||
private readonly ILogger<BackRecordService> _logger;
|
||||
public readonly IBasicsRepositories _basicsRepositories;
|
||||
private readonly ISerialNumberService _serialNumberService;
|
||||
private readonly IBackRecordRepositories _backRecordRepositories;
|
||||
@@ -33,6 +36,7 @@ namespace WMS.Web.Domain.Services
|
||||
private readonly ISerialNumbersRepositories _serialNumbersRepositories;
|
||||
private readonly IInStockTaskBoxService _inStockTaskBoxService;
|
||||
public BackRecordService(IMapper mapper, ILoginService loginService,
|
||||
ILogger<BackRecordService> logger,
|
||||
IBasicsRepositories basicsRepositories,
|
||||
IBoxInventoryService boxInventoryService,
|
||||
ISerialNumberService serialNumberService,
|
||||
@@ -42,6 +46,7 @@ namespace WMS.Web.Domain.Services
|
||||
IInStockTaskBoxService inStockTaskBoxService)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_logger = logger;
|
||||
_loginService = loginService;
|
||||
_inStockTaskBoxService = inStockTaskBoxService;
|
||||
_changeMoveBoxService = changeMoveBoxService;
|
||||
@@ -146,10 +151,14 @@ namespace WMS.Web.Domain.Services
|
||||
//下架:需要解绑收货过的箱子
|
||||
if (entity.Type == BackRecordType.InstockOff)
|
||||
{
|
||||
_logger.LogInformation("入库回退下架:" + entity.BillNo);
|
||||
var boxIds= entity.Details.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
||||
var unBindResult= await _inStockTaskBoxService.UnBind(boxIds, isTransaction);
|
||||
_logger.LogInformation("入库回退下架-BOXID:" + JsonConvert.SerializeObject(boxIds));
|
||||
if (!unBindResult.IsSuccess)
|
||||
return unBindResult;
|
||||
|
||||
_logger.LogInformation("入库回退下架-结果:" + unBindResult.IsSuccess);
|
||||
}
|
||||
|
||||
//提交事务
|
||||
|
||||
Reference in New Issue
Block a user