修复bug
This commit is contained in:
@@ -373,6 +373,8 @@ namespace WMS.Web.Api.Controllers
|
||||
return Result<BoxResponse>.ReFailure("箱号" + boxBillNo + "不存在", 800000);
|
||||
var response = res[0];
|
||||
var detail = await _outStockRepositories.GetDetailsByBoxId(response.Id);
|
||||
if (detail.Count() == 0)
|
||||
return Result<BoxResponse>.ReFailure("箱号" + boxBillNo + "未出库", 800000);
|
||||
response.Details = detail;
|
||||
response.TotalQty = detail.Sum(s => s.Qty);
|
||||
return Result<BoxResponse>.ReSuccess(response);
|
||||
|
||||
@@ -325,15 +325,16 @@ namespace WMS.Web.Repositories
|
||||
.Include(s => s.Details).ThenInclude(s => s.BoxsDetails.Where(w => w.BoxId == boxId))
|
||||
.Where(f => f.Details.SelectMany(s => s.BoxsDetails).Where(w => w.BoxId == boxId).Any())
|
||||
.OrderByDescending(o => o.Id)
|
||||
.FirstAsync();
|
||||
.ToListAsync();
|
||||
List<BoxDetailResponse> details = new List<BoxDetailResponse>();
|
||||
if (res.Count() == 0) return details;
|
||||
|
||||
var materials_result = await _erpService.BillQueryForMaterial();
|
||||
if (!materials_result.IsSuccess)
|
||||
return new List<BoxDetailResponse>();
|
||||
var materials = materials_result.Data.ToList();
|
||||
|
||||
foreach (var d in res.Details)
|
||||
foreach (var d in res.First().Details)
|
||||
{
|
||||
var boxDetail = d.BoxsDetails.FirstOrDefault(f => f.BoxId == boxId);
|
||||
if (boxDetail == null) continue;
|
||||
|
||||
Reference in New Issue
Block a user