Commit 6e820300 authored by liudong1993's avatar liudong1993

修复重新入库相同商品

parent 9932eb88
...@@ -817,7 +817,7 @@ namespace Mall.Module.Property ...@@ -817,7 +817,7 @@ namespace Mall.Module.Property
if (demodel.StockInState == 1) if (demodel.StockInState == 1)
{ {
//新增库存表数据 //新增库存表数据
var ilist = supplies_InventoryRepository.GetList(new RB_Supplies_Inventory_Extend() { RB_Group_Id = demodel.RB_Group_Id, WarehouseId = demodel.WarehouseId, SuppliesId = item.SuppliesId }); var ilist = supplies_InventoryRepository.GetList(new RB_Supplies_Inventory_Extend() { RB_Group_Id = demodel.RB_Group_Id, WarehouseId = demodel.WarehouseId, SuppliesId = item.SuppliesId }, trans);
if (ilist.Any()) if (ilist.Any())
{ {
var iModel = ilist.FirstOrDefault(); var iModel = ilist.FirstOrDefault();
...@@ -1624,7 +1624,7 @@ namespace Mall.Module.Property ...@@ -1624,7 +1624,7 @@ namespace Mall.Module.Property
{ {
//查询出该仓库 耗材下 所有的库存 //查询出该仓库 耗材下 所有的库存
string Sstr = string.Join(",", list.Select(x => x.Id).Distinct()); string Sstr = string.Join(",", list.Select(x => x.Id).Distinct());
iList = supplies_InventoryRepository.GetList(new RB_Supplies_Inventory_Extend() { RB_Group_Id = demodel.RB_Group_Id, WarehouseIdStr = demodel.WareHouseId.Value.ToString(), SuppliesIdStr = Sstr }); iList = supplies_InventoryRepository.GetList(new RB_Supplies_Inventory_Extend() { RB_Group_Id = demodel.RB_Group_Id, WarehouseIdStr = demodel.WareHouseId.Value.ToString(), SuppliesIdStr = Sstr }, null);
} }
foreach (var item in list) foreach (var item in list)
{ {
......
...@@ -44,7 +44,7 @@ namespace Mall.Repository.Property ...@@ -44,7 +44,7 @@ namespace Mall.Repository.Property
/// </summary> /// </summary>
/// <param name="dmodel"></param> /// <param name="dmodel"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Supplies_Inventory_Extend> GetList(RB_Supplies_Inventory_Extend dmodel) public List<RB_Supplies_Inventory_Extend> GetList(RB_Supplies_Inventory_Extend dmodel, System.Data.IDbTransaction trans)
{ {
string where = " where 1=1 "; string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_Inventory_Extend.Status), 0); where += string.Format(" AND {0}={1}", nameof(RB_Supplies_Inventory_Extend.Status), 0);
...@@ -67,7 +67,7 @@ namespace Mall.Repository.Property ...@@ -67,7 +67,7 @@ namespace Mall.Repository.Property
} }
string sql = $@" select * from RB_Supplies_Inventory {where} order by Id desc"; string sql = $@" select * from RB_Supplies_Inventory {where} order by Id desc";
return Get<RB_Supplies_Inventory_Extend>(sql).ToList(); return Get<RB_Supplies_Inventory_Extend>(sql, null, trans).ToList();
} }
/// <summary> /// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment