소스 검색

修改不能设置分配比率BUG

luocaiyang 9 달 전
부모
커밋
b4c524963d
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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)