|
|
@@ -150,7 +150,10 @@ namespace Business.ResourceExamineManagement
|
|
|
private IRepository<b_ooder, long> _mysql_ooder;
|
|
|
private IRepository<b_purchase, long> _mysql_purchase;
|
|
|
private IRepository<b_purchase_occupy, long> _mysql_purchase_occupy;
|
|
|
-
|
|
|
+ /// <summary>
|
|
|
+ /// 库存主数据
|
|
|
+ /// </summary>
|
|
|
+ private ISqlRepository<InvMaster> _invMaster;
|
|
|
/// <summary>
|
|
|
/// 替代方案
|
|
|
/// </summary>
|
|
|
@@ -482,7 +485,8 @@ namespace Business.ResourceExamineManagement
|
|
|
IUnitOfWorkManager unitOfWorkManager,
|
|
|
SerialNumberAppService serialNumberAppService,
|
|
|
ReplenishmentAppService replenishmentAppService,
|
|
|
- IRepository<ReplenishmentWeekPlan,long> replenishmentWeekPlan
|
|
|
+ IRepository<ReplenishmentWeekPlan,long> replenishmentWeekPlan,
|
|
|
+ ISqlRepository<InvMaster> invMaster
|
|
|
)
|
|
|
{
|
|
|
_mes_technique = mes_technique;
|
|
|
@@ -573,6 +577,7 @@ namespace Business.ResourceExamineManagement
|
|
|
_serialNumberAppService = serialNumberAppService;
|
|
|
_replenishmentAppService = replenishmentAppService;
|
|
|
_replenishmentWeekPlan = replenishmentWeekPlan;
|
|
|
+ _invMaster = invMaster;
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
@@ -1878,7 +1883,7 @@ namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
List<string> numbers = pretreatments.Select(s => s.item_number).ToList();
|
|
|
List<string> locationList = new List<string> { "1000", "1001", "5008","8000","8001" };
|
|
|
- var locStock = _locationDetail.Select(a => numbers.Contains(a.ItemNum) && a.IsActive && a.Domain == factoryId.ToString() && locationList.Contains(a.Location));
|
|
|
+ var locStock = _invMaster.Select(a => numbers.Contains(a.ItemNum) && a.IsActive && a.Domain == factoryId.ToString() && locationList.Contains(a.Location));
|
|
|
//设置当前计算bangid
|
|
|
icitemStokc.ForEach(item => {
|
|
|
item.bang_id = bangid;
|
|
|
@@ -3877,7 +3882,7 @@ namespace Business.ResourceExamineManagement
|
|
|
itemChildList.AddRange(GetChildItemNumber(a, new List<string>()));
|
|
|
});
|
|
|
List<string> locationList = new List<string> { "1000", "1001", "5008", "8000", "8001" };
|
|
|
- var stockList = _locationDetail.Select(a => a.Domain == param.factoryId.ToString() && locationList.Contains(a.Location) && a.IsActive && itemChildList.Distinct().Contains(a.ItemNum));
|
|
|
+ var stockList = _invMaster.Select(a => a.Domain == param.factoryId.ToString() && locationList.Contains(a.Location) && a.IsActive && itemChildList.Distinct().Contains(a.ItemNum));
|
|
|
var groupList = stockList.
|
|
|
GroupBy(m => new { m.ItemNum }).
|
|
|
Select(a => new { ItemNum = a.Key.ItemNum, Qty = a.Sum(c => c.QtyOnHand) }).ToList();
|