|
@@ -4831,7 +4831,7 @@ namespace Business.Replenishment
|
|
|
}
|
|
}
|
|
|
var pretreatList = pretreatments.Select(x => x.item_number).Distinct().ToList();
|
|
var pretreatList = pretreatments.Select(x => x.item_number).Distinct().ToList();
|
|
|
itemNums.AddRange(pretreatList);
|
|
itemNums.AddRange(pretreatList);
|
|
|
- AsyncItemStockFromWMS(itemNums);
|
|
|
|
|
|
|
+ AsyncItemStockFromWMS(itemNums, analogCalcVersion);
|
|
|
|
|
|
|
|
//数据库快照-同步mysql库数据到mongoDB中
|
|
//数据库快照-同步mysql库数据到mongoDB中
|
|
|
await DbSnapShot(input.company_id, input.factoryId, bangid, pretreatments, analogCalcVersion);
|
|
await DbSnapShot(input.company_id, input.factoryId, bangid, pretreatments, analogCalcVersion);
|
|
@@ -5587,7 +5587,10 @@ namespace Business.Replenishment
|
|
|
}
|
|
}
|
|
|
item.sqty += lctQty;
|
|
item.sqty += lctQty;
|
|
|
}
|
|
}
|
|
|
- item.sqty += sapInvList.Where(x => x.MATNR == item.icitem_number && x.SOBKZ.ToUpper() == "O").Sum(p => p.LABST + p.INSME);
|
|
|
|
|
|
|
+ if(!string.IsNullOrEmpty(analogCalcVersion))
|
|
|
|
|
+ {
|
|
|
|
|
+ item.sqty += sapInvList.Where(x => x.MATNR == item.icitem_number && x.SOBKZ.ToUpper() == "O").Sum(p => p.LABST + p.INSME);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
var moIcitemStokc = ObjectMapper.Map<List<ic_item_stock>, List<mo_ic_item_stock>>(icitemStokc);
|
|
var moIcitemStokc = ObjectMapper.Map<List<ic_item_stock>, List<mo_ic_item_stock>>(icitemStokc);
|
|
|
moIcitemStokc.ForEach(item => { item.GenerateNewId(help.NextId()); });
|
|
moIcitemStokc.ForEach(item => { item.GenerateNewId(help.NextId()); });
|
|
@@ -6556,7 +6559,7 @@ namespace Business.Replenishment
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void AsyncItemStockFromWMS(List<string> itemList)
|
|
|
|
|
|
|
+ public void AsyncItemStockFromWMS(List<string> itemList,string analogCalcVersion)
|
|
|
{
|
|
{
|
|
|
//产品编码
|
|
//产品编码
|
|
|
//var itemList = bom_Pretreatments.Select(a => a.item_number).Distinct().ToList();
|
|
//var itemList = bom_Pretreatments.Select(a => a.item_number).Distinct().ToList();
|
|
@@ -6624,7 +6627,7 @@ namespace Business.Replenishment
|
|
|
}
|
|
}
|
|
|
item.sqty += lctQty;
|
|
item.sqty += lctQty;
|
|
|
}
|
|
}
|
|
|
- if (param.checkPlan)
|
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(analogCalcVersion))
|
|
|
{
|
|
{
|
|
|
item.sqty += sapInvList.Where(x => x.MATNR == item.icitem_number && x.SOBKZ.ToUpper() == "O").Sum(p => p.LABST + p.INSME);
|
|
item.sqty += sapInvList.Where(x => x.MATNR == item.icitem_number && x.SOBKZ.ToUpper() == "O").Sum(p => p.LABST + p.INSME);
|
|
|
}
|
|
}
|