Parcourir la source

日计划调整

heteng il y a 2 ans
Parent
commit
e9575f8d93

+ 3 - 3
MicroServices/Business/Business.Application/ResourceExamineManagement/ProductionScheduleAppService.cs

@@ -384,7 +384,7 @@ namespace Business.ResourceExamineManagement
                 //特殊工单工序
                 var curOp = tsWoRoutings.Where(p => p.WorkOrd == item.WorkOrd).OrderByDescending(p => p.OP).First();
                 //特殊工单排产开始时间
-                DateTime tStartTime = item.OrdDate.GetValueOrDefault();
+                DateTime tStartTime = item.OrdDate.GetValueOrDefault() < scheTime ? scheTime : item.OrdDate.GetValueOrDefault();
                 //获取特殊工单开始排产时间记录
                 var curRecord = timeRecords.FirstOrDefault(p=>p.WorkOrd == item.WorkOrd && p.Op == curOp.OP);
                 if (curRecord == null)
@@ -887,7 +887,7 @@ namespace Business.ResourceExamineManagement
                         var first = fstWOMasters.First();
                         if (item != first)
                         {
-                            tsStartTime = item.OrdDate.GetValueOrDefault();
+                            tsStartTime = item.OrdDate.GetValueOrDefault() < scheTime ? scheTime : item.OrdDate.GetValueOrDefault();
                         }
                         //特殊工单工序
                         var curOp = tsWoRoutings.Where(p => p.WorkOrd == item.WorkOrd).OrderByDescending(p => p.OP).First();
@@ -3943,7 +3943,7 @@ namespace Business.ResourceExamineManagement
                 //工单生产时长(分钟)
                 decimal sumTimes = item.LbrVar;
                 //工单的排产开始时间
-                DateTime workStartTime = scheTime;
+                DateTime workStartTime = item.OrdDate;
                 //当前产线的工作日历
                 var mLCalendars = calendars.Where(p => p.ProdLine == item.ProdLine || string.IsNullOrEmpty(p.ProdLine)).ToList();
                 //当前产线的休息时间设置