bug修复

This commit is contained in:
tongfei
2023-12-06 15:55:46 +08:00
parent acb90e8202
commit 95bc5d7ced
6 changed files with 21 additions and 3 deletions

View File

@@ -2821,6 +2821,11 @@
序列号集 序列号集
</summary> </summary>
</member> </member>
<member name="P:WMS.Web.Core.Dto.Inventory.BoxInventoryQueryResponse.Org">
<summary>
组织
</summary>
</member>
<member name="P:WMS.Web.Core.Dto.Inventory.BoxInventoryQueryResponse.Qty"> <member name="P:WMS.Web.Core.Dto.Inventory.BoxInventoryQueryResponse.Qty">
<summary> <summary>
物料库存数量 物料库存数量

View File

@@ -47,6 +47,11 @@ namespace WMS.Web.Core.Dto.Inventory
/// 序列号集 /// 序列号集
/// </summary> /// </summary>
public string SerialNumbers { get; set; } public string SerialNumbers { get; set; }
/// <summary>
/// 组织
/// </summary>
public string Org { get; set; }
/// <summary> /// <summary>
/// 物料库存数量 /// 物料库存数量
/// </summary> /// </summary>

View File

@@ -63,6 +63,6 @@ namespace WMS.Web.Core.Dto.Inventory
/// <summary> /// <summary>
/// 创建日期 /// 创建日期
/// </summary> /// </summary>
public DateTime CreateTime { get; set; } public string CreateTime { get; set; }
} }
} }

View File

@@ -41,7 +41,7 @@ namespace WMS.Web.Domain.Entitys
/// <summary> /// <summary>
/// 同步成功或者失败 /// 同步成功或者失败
/// </summary> /// </summary>
public bool? SuccessSync { get; set; } public int? SuccessSync { get; set; }
/// <summary> /// <summary>
/// 操作人 /// 操作人

View File

@@ -64,6 +64,12 @@ namespace WMS.Web.Repositories
if (!string.IsNullOrEmpty(dto.MaterialNumber)) if (!string.IsNullOrEmpty(dto.MaterialNumber))
materials = materials.Where(w => w.MaterialNumber.Contains(dto.MaterialNumber)).ToList(); materials = materials.Where(w => w.MaterialNumber.Contains(dto.MaterialNumber)).ToList();
//组织集合
var orgs_result = await _erpService.BillQueryForOrg();
if (!orgs_result.IsSuccess)
return (new List<BoxInventoryQueryResponse>(), 0);
var orgs = orgs_result.Data.ToList();
var query = _context.BoxInventoryDetails var query = _context.BoxInventoryDetails
.GroupJoin(_context.BoxInventory, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders }) .GroupJoin(_context.BoxInventory, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order }) .SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
@@ -99,6 +105,8 @@ namespace WMS.Web.Repositories
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialId), Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialId),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.order.StockCode+s.order.OrgCode), Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.order.StockCode+s.order.OrgCode),
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.order.SubStockId), SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.order.SubStockId),
SerialNumbers=(string.Join(",",s.detail.SerialNumbers)).TrimEnd(','),
Org = _erpBasicDataExtendService.GetOrgName(orgs, s.order.OrgCode),
Qty = s.detail.Qty, Qty = s.detail.Qty,
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync(); }).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
return (list,total); return (list,total);

View File

@@ -106,7 +106,7 @@ namespace WMS.Web.Repositories
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.StockCode+s.OrgCode), Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.StockCode+s.OrgCode),
Qty = s.Qty, Qty = s.Qty,
SurplusQty=s.SurplusQty, SurplusQty=s.SurplusQty,
CreateTime = s.CreateTime CreateTime = s.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync(); }).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
return (list,total); return (list,total);