소스 검색

首页bugfix

Wang Zi Wen 1 년 전
부모
커밋
806c714ad7
1개의 변경된 파일7개의 추가작업 그리고 5개의 파일을 삭제
  1. 7 5
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchManageController.java

+ 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);
     }