|
|
@@ -708,7 +708,7 @@ namespace Business.ResourceExamineManagement
|
|
|
foreach (var item in returnlist)
|
|
|
{
|
|
|
//最顶级、虚拟件
|
|
|
- if (item.level == 1 || item.erp_cls == 4 ||!childidList.Contains(item.bom_child_id.GetValueOrDefault()))
|
|
|
+ if (item.level == 1 || item.erp_cls == 4 || !childidList.Contains(item.bom_child_id.GetValueOrDefault()))
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
@@ -874,6 +874,8 @@ namespace Business.ResourceExamineManagement
|
|
|
returnlist = returnlist.OrderBy(s => s.num).ToList();
|
|
|
var childList = returnlist.Where(s => s.parent_id == returnlist[0].id && s.type == 0).ToList();
|
|
|
|
|
|
+ var planList = GetICPlan(returnlist.Select(p => p.item_id).ToList(), bangid, param.factoryId);//plan列表
|
|
|
+
|
|
|
//1.如果主料够的时候,不需要显示替代料的平铺视图,如果主料不够,显示替代料的平铺视图。
|
|
|
//2.替代策略和替代方式,影响到的是甲乙组概念,替代按主料有限,取代按组的优先级。A与B的替代,则A和B各自会存在一个组。
|
|
|
List<long> calcIds = new List<long>();
|
|
|
@@ -927,10 +929,12 @@ namespace Business.ResourceExamineManagement
|
|
|
factoryId = param.factoryId
|
|
|
|
|
|
};
|
|
|
+ var plan = planList.Find(x => x.icitem_id == returnlist[0].item_id);
|
|
|
var ProductiveDate = _productExamineAppService.ProductiveExamine(prodExamine);
|
|
|
var Day = ProductiveDate.Result / (60 * 10); //返回的分钟除以十个小时得出工作天数;
|
|
|
mes_Morders.moentry_sys_stime = returnlist[0].kitting_time.Value.AddDays(1);//数据齐套完成后隔天开始生产;
|
|
|
- mes_Morders.moentry_sys_etime = returnlist[0].kitting_time.Value.AddDays((double)Day);//TODO:结束日期=开始时间+生成时长+自检提前期+入库提前期+发运提前期;
|
|
|
+ var LeadTime = Day + plan.self_inspection_date.Value + plan.Shipping_date.Value + plan.Warehousing_date.Value;
|
|
|
+ mes_Morders.moentry_sys_etime = returnlist[0].kitting_time.Value.AddDays((double)LeadTime);//结束日期=开始时间+生产时长+自检提前期+入库提前期+发运提前期;
|
|
|
mes_Morders.morder_need_time = ProductiveDate.Result;
|
|
|
returnlist[0].satisfy_time = mes_Morders.moentry_sys_etime;
|
|
|
}
|
|
|
@@ -1013,7 +1017,7 @@ namespace Business.ResourceExamineManagement
|
|
|
}
|
|
|
else if (item.erp_cls == 3)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
if (item.erp_cls == 3)
|
|
|
{
|
|
|
//1.先生成委外工单。
|