出入库回退增加备注
This commit is contained in:
@@ -71,7 +71,7 @@ namespace WMS.Web.Domain.Services
|
||||
else
|
||||
_logger.LogInformation($"回退上架:{JsonConvert.SerializeObject(dto)} 操作人:{loginInfo.UserInfo.StaffId + loginInfo.UserInfo.Nickname}");
|
||||
//回退上下架:不能扫同样的箱,按箱入库时候
|
||||
if (dto.Details != null && dto.Details.Count != 0 && dto.Method== (int)InventoryInOutMethod.Box)
|
||||
if (dto.Details != null && dto.Details.Count != 0 && dto.Method == (int)InventoryInOutMethod.Box)
|
||||
{
|
||||
var mIds = dto.Details.GroupBy(g => g.MaterialNumber).Select(s => s.Key).ToList();
|
||||
foreach (var m in mIds)
|
||||
@@ -113,11 +113,11 @@ namespace WMS.Web.Domain.Services
|
||||
return boxInventoryResult;
|
||||
|
||||
//下架:需要解绑收货过的箱子
|
||||
if (entity.Type == BackRecordType.InstockOff)
|
||||
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);
|
||||
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;
|
||||
@@ -132,5 +132,24 @@ namespace WMS.Web.Domain.Services
|
||||
return Result.ReSuccess();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改备注
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <param name="loginInfo"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task<Result> UpdateRemark(UpdateRemarkRequest dto, LoginInDto loginInfo)
|
||||
{
|
||||
var entity = await _backRecordRepositories.GetEntity(dto.Id);
|
||||
if (entity == null) return Result.ReFailure(ResultCodes.NoDateError);
|
||||
|
||||
var res = entity.UpdateRemark(dto.DetailsId, dto.Remark);
|
||||
if (!res.IsSuccess) return res;
|
||||
|
||||
entity = await _backRecordRepositories.Edit(entity, true);
|
||||
if (entity == null) return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user