|
@@ -51,7 +51,7 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// 是否正排
|
|
/// 是否正排
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
- public bool IsStraight = true;
|
|
|
|
|
|
|
+ public bool IsStraight = false;
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// 工单类型
|
|
/// 工单类型
|
|
@@ -449,7 +449,8 @@ namespace Business.ResourceExamineManagement
|
|
|
if (plan != null)
|
|
if (plan != null)
|
|
|
{
|
|
{
|
|
|
//减去提前期
|
|
//减去提前期
|
|
|
- LeadTime = plan.self_inspection_date.GetValueOrDefault() + plan.Warehousing_date.GetValueOrDefault() + plan.Shipping_date.GetValueOrDefault();
|
|
|
|
|
|
|
+ //LeadTime = plan.self_inspection_date.GetValueOrDefault() + plan.Warehousing_date.GetValueOrDefault() + plan.Shipping_date.GetValueOrDefault();
|
|
|
|
|
+ LeadTime = plan.self_inspection_date.GetValueOrDefault() + plan.PurLT;
|
|
|
}
|
|
}
|
|
|
mes_Morders.moentry_sys_etime = plan_date.GetValueOrDefault().AddDays(-(int)Math.Ceiling(LeadTime));
|
|
mes_Morders.moentry_sys_etime = plan_date.GetValueOrDefault().AddDays(-(int)Math.Ceiling(LeadTime));
|
|
|
|
|
|
|
@@ -461,6 +462,14 @@ namespace Business.ResourceExamineManagement
|
|
|
mes_Morders.moentry_sys_stime = childList.Max(s => s.kitting_time.GetValueOrDefault()).AddDays(1).Date;//数据齐套完成后隔天开始生产;
|
|
mes_Morders.moentry_sys_stime = childList.Max(s => s.kitting_time.GetValueOrDefault()).AddDays(1).Date;//数据齐套完成后隔天开始生产;
|
|
|
mes_Morders.moentry_sys_etime = mes_Morders.moentry_sys_stime.GetValueOrDefault().AddDays(make_time);
|
|
mes_Morders.moentry_sys_etime = mes_Morders.moentry_sys_stime.GetValueOrDefault().AddDays(make_time);
|
|
|
}
|
|
}
|
|
|
|
|
+ if (mes_Morders.moentry_sys_etime < DateTime.Now.Date)
|
|
|
|
|
+ {
|
|
|
|
|
+ mes_Morders.moentry_sys_etime = DateTime.Now.Date;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (mes_Morders.moentry_sys_stime < DateTime.Now.Date)
|
|
|
|
|
+ {
|
|
|
|
|
+ mes_Morders.moentry_sys_stime = DateTime.Now.Date;
|
|
|
|
|
+ }
|
|
|
if (!string.IsNullOrEmpty(mes_Morders.bom_number))
|
|
if (!string.IsNullOrEmpty(mes_Morders.bom_number))
|
|
|
{
|
|
{
|
|
|
mes_Morders.mat_start_date = childList.Max(s => s.kitting_time.GetValueOrDefault()).AddDays(1).Date;//数据齐套完成后隔天开始生产;
|
|
mes_Morders.mat_start_date = childList.Max(s => s.kitting_time.GetValueOrDefault()).AddDays(1).Date;//数据齐套完成后隔天开始生产;
|
|
@@ -487,7 +496,7 @@ namespace Business.ResourceExamineManagement
|
|
|
mes_Morders.morder_need_time = (decimal)span.TotalMinutes;*/
|
|
mes_Morders.morder_need_time = (decimal)span.TotalMinutes;*/
|
|
|
}
|
|
}
|
|
|
//满足资源检查的时间需加上提前期
|
|
//满足资源检查的时间需加上提前期
|
|
|
- level1Dto.satisfy_time = mes_Morders.moentry_sys_etime;
|
|
|
|
|
|
|
+ level1Dto.satisfy_time = childList.Max(s => s.kitting_time.GetValueOrDefault()).AddDays(make_time).Date;
|
|
|
if (sentrys != null)
|
|
if (sentrys != null)
|
|
|
{
|
|
{
|
|
|
sentrys.sys_capacity_date = level1Dto.satisfy_time.GetValueOrDefault().AddDays(1);
|
|
sentrys.sys_capacity_date = level1Dto.satisfy_time.GetValueOrDefault().AddDays(1);
|