Selaa lähdekoodia

修改不能设置分配比率BUG

luocaiyang 9 kuukautta sitten
vanhempi
commit
b4c524963d
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  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)