出库增加箱信息填写

This commit is contained in:
18942506660
2024-09-20 11:09:30 +08:00
parent 06fcd26b5b
commit 8c284d1823
13 changed files with 349 additions and 2 deletions

View File

@@ -359,5 +359,27 @@ namespace WMS.Web.Domain.Services
_logger.LogInformation($"同步金蝶成功");
return (Result.ReSuccess(), SyncStatus.Success, o_dto.Numbers.First());
}
/// <summary>
/// 修改出库箱信息
/// </summary>
/// <param name="dto"></param>
/// <param name="loginInfo"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public async Task<Result> EditBoxInfo(List<EditBoxInfoRequest> dto, LoginInDto loginInfo)
{
var ids = dto.Select(s => s.OutStockId).ToList();
var entityList = await _outStockRepositories.GetEntityList(ids);
foreach (var d in dto)
{
var entity = entityList.FirstOrDefault(f => f.Id == d.OutStockId);
if (entity == null) return Result.ReFailure(ResultCodes.NoDateError);
var res = entity.EditBoxInfo(d.OutStockBoxDetailsId, d.BoxLength, d.BoxWide, d.BoxHigh, d.BoxWeight, loginInfo.UserInfo.StaffId);
if (!res.IsSuccess) return res;
}
var isSuccess = await _outStockRepositories.EditEntityList(entityList);
if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);
return Result.ReSuccess();
}
}
}