Преглед изворни кода

发布周计划取当前时间到28天

Murphy пре 2 година
родитељ
комит
b48b2b64b1

+ 1 - 3
MicroServices/Business/Business.Application/ReplenishmentManagement/ReplenishmentAppService.cs

@@ -3414,10 +3414,8 @@ namespace Business.Replenishment
         public async Task<string> PublishWeekPlan(InputDto input)
         {
             //默认发布未来四周工单
-            DateTime nextWeekMonday = getPreWeekStartTime().AddDays(14);
-            DateTime next2WeekMonday = getPreWeekStartTime().AddDays(42);
             //主工单发布,子工单需要一起发布
-            var weekPlan = _replenishmentWeekPlan.GetListAsync(a => a.PlanStartDate >= nextWeekMonday && a.PlanStartDate < next2WeekMonday && a.IsReplenishmentModel == "N" && string.IsNullOrEmpty(a.ProductionStatus)).Result.OrderBy(a => a.Priority).ToList();
+            var weekPlan = _replenishmentWeekPlan.GetListAsync(a => a.PlanStartDate > DateTime.Now.AddDays(-1) && a.PlanStartDate < DateTime.Now.AddDays(29) && a.IsReplenishmentModel == "N" && string.IsNullOrEmpty(a.ProductionStatus)).Result.OrderBy(a => a.Priority).ToList();
             List<mes_morder> mes_Morders = _mysql_mes_morder.GetListAsync(a => weekPlan.Select(p => p.ProductionOrder).ToList().Contains(a.morder_no) && a.factory_id == input.factory_id).Result;
             if(mes_Morders!=null&& mes_Morders.Count>0)
             {