Explorar el Código

修改不能设置分配比率BUG

luocaiyang hace 9 meses
padre
commit
b4c524963d
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      wispro.sp.api/Controllers/PerformanceItemController.cs

+ 5 - 0
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -2369,6 +2369,11 @@ namespace wispro.sp.api.Controllers
             var lstARs = spDb.AllocationRatios.Where<AllocationRatio>(i => i.ItemId == item.Id).ToList();
             double? baseMony = item.BasePoint;
 
+            if (item.CalMonth == null)
+            {
+                item.CalMonth = spDb.CalMonths.Where(cal => cal.Id == item.CalMonthId).FirstOrDefault();
+            }
+
             if (DateTime.Parse($"{item.CalMonth.Year}-{item.CalMonth.Month}-01") > DateTime.Parse("2024-11-01"))
             {
                 if (item.isDanger() && item.OverDueMemo == null)