|
@@ -58,15 +58,21 @@ public class TBranchManageController extends BaseController {
|
|
|
int year = calendar.get(Calendar.YEAR);//年
|
|
|
int month = calendar.get(Calendar.MONTH) + 1;//月
|
|
|
|
|
|
- TBranchManage tBranchManage = new TBranchManage();
|
|
|
- tBranchManage.setYear(year + "");
|
|
|
- tBranchManage.setMonthly(month + "");
|
|
|
- List<TBranchManage> tBranchManages = tBranchManageService.selectTBranchManageList(tBranchManage);
|
|
|
-
|
|
|
- TFile tFile = new TFile();
|
|
|
- tFile.setTableName("branchManage");
|
|
|
- tFile.setTableId(tBranchManages.get(0).getManageId());
|
|
|
- List<TFile> tFiles = tFileService.selectTFileList(tFile);
|
|
|
+ List<TFile> tFiles = null;
|
|
|
+
|
|
|
+ do {
|
|
|
+ TBranchManage tBranchManage = new TBranchManage();
|
|
|
+ tBranchManage.setYear(year + "");
|
|
|
+ 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);
|
|
|
+
|
|
|
+ month -= 1;
|
|
|
+ } while (tFiles.size() == 0);
|
|
|
|
|
|
return AjaxResult.success(tFiles);
|
|
|
}
|