瀏覽代碼

首页bugfix

Wang Zi Wen 1 年之前
父節點
當前提交
806c714ad7

+ 7 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchManageController.java

@@ -66,13 +66,15 @@ public class TBranchManageController extends BaseController {
             tBranchManage.setMonthly(month + "");
             List<TBranchManage> tBranchManages = tBranchManageService.selectTBranchManageList(tBranchManage);
 
-            TFile tFile = new TFile();
-            tFile.setTableName("branchManage");
-            tFile.setTableId(tBranchManages.get(0).getManageId());
-            tFiles = tFileService.selectTFileList(tFile);
+            if (tBranchManages.size() > 0) {
+                TFile tFile = new TFile();
+                tFile.setTableName("branchManage");
+                tFile.setTableId(tBranchManages.get(0).getManageId());
+                tFiles = tFileService.selectTFileList(tFile);
+            }
 
             month -= 1;
-        } while (tFiles.size() == 0);
+        } while (tFiles == null || tFiles.size() == 0);
 
         return AjaxResult.success(tFiles);
     }