|
|
@@ -3227,6 +3227,12 @@ namespace Business.Replenishment
|
|
|
routingOps = _routingOpDetail.Select(p => p.Domain == input.factory_id.ToString()).ToList();
|
|
|
long bang_id = help.NextId();
|
|
|
var weekplans=_replenishmentWeekPlan.GetListAsync(a=>a.IsReplenishmentModel=="N" && string.IsNullOrEmpty(a.ProductionStatus) && string.IsNullOrEmpty(a.ProductionOrder) && a.factory_id==input.factory_id).Result;
|
|
|
+ if (weekplans.Any())
|
|
|
+ {
|
|
|
+ input.company_id = weekplans[0].company_id.GetValueOrDefault();
|
|
|
+ input.tenant_id = weekplans[0].tenant_id.GetValueOrDefault();
|
|
|
+ input.org_id = weekplans[0].org_id.GetValueOrDefault();
|
|
|
+ }
|
|
|
var itemIds = weekplans.Select(a => a.ItemNumber).Distinct().ToList();
|
|
|
var items = _itemMaster.Select(a => itemIds.Contains(a.ItemNum));
|
|
|
; List<mes_morder> moList = new List<mes_morder>();
|