lyhzzz il y a 1 mois
Parent
commit
3e3d1a3713

+ 5 - 3
src/main/java/com/fdkankan/fusion/controller/CaseOverviewController.java

@@ -55,9 +55,11 @@ public class CaseOverviewController {
     @PostMapping("/addOrUpdate")
     public ResultData addOrUpdate (@RequestBody CaseOverview caseOverview){
         caseOverviewService.saveOrUpdate(caseOverview);
-        caseOverview.getCaseTabulation().setOverviewId(caseOverview.getId());
-        caseOverview.getCaseTabulation().setCaseId(caseOverview.getCaseId());
-        caseTabulationService.addOrUpdate(caseOverview.getCaseTabulation());
+        if(caseOverview.getCaseTabulation() != null){
+            caseOverview.getCaseTabulation().setOverviewId(caseOverview.getId());
+            caseOverview.getCaseTabulation().setCaseId(caseOverview.getCaseId());
+            caseTabulationService.addOrUpdate(caseOverview.getCaseTabulation());
+        }
         return ResultData.ok(caseOverview);
     }