Parcourir la source

在制数量取数范围调整

Murphy il y a 2 ans
Parent
commit
3313a27974

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

@@ -531,7 +531,7 @@ namespace Business.Replenishment
             var shipList = _ASNBOLShipperDetail.Select(a => a.Domain == input.factory_id.ToString() && a.IsActive && a.shtype == "SH" && a.Typed != "S" && a.RealQty > 0 && yearDemands.Select(p => p.SAPItemNumber).Contains(a.ContainerItem)).Where(s => s.ShipDate >= start && s.ShipDate <= end);
             #region 在制数量
             //获取在制数量 获取工单数取每年4月到12月底的工单
-            DateTime startYear = new DateTime(DateTime.Now.Year, 4, 1);
+            DateTime startYear = new DateTime(DateTime.Now.AddYears(-1).Year, 4, 1);
             DateTime endYear = new DateTime(DateTime.Now.Year, 12, 31);
             List<WorkOrdRouting> workOrdRoutings = _workOrdRouting.Select(x => x.IsActive && x.QtyComplete > 0 && x.Domain == input.factory_id.ToString()).Where(p => p.DueDate >= startYear && p.DueDate <= endYear).ToList();
             decimal? InProductionQty = 0.00m;