LIVE_YE 11 månader sedan
förälder
incheckning
97ca0a25c7

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -5,6 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.data.map.repository.config.EnableMapRepositories;
 import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 /**
  * 启动程序
@@ -12,6 +13,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
  * @author ruoyi
  */
 @EnableAsync
+@EnableScheduling
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
 public class RuoYiApplication
 {

+ 42 - 3
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/LoanApplicationServiceImpl.java

@@ -1495,7 +1495,10 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
             }
         }
         String loanApplicationNumber = loanApplication.getLoanApplicationNumber();
+        // 向word中添加数据
         Map<String, Object> params = new HashMap<>();
+        // 向列表中添加数据
+        Map<String, Object> excelMap = new HashMap<>();
         //获取当前年、月、日
         String year = DateUtils.getYear();
         String month = DateUtils.getMonth();
@@ -1737,8 +1740,6 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
                 break;
             case "12":
 
-                // 向列表中添加数据
-                Map<String, Object> excelMap = new HashMap<>();
                 //申请人名称
                 excelMap.put("sqr", loanApplication.getEnterpriseName() + "   " + loanApplication.getCorporationName());
                 //公司住址
@@ -1787,7 +1788,7 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
                 //贷款金额
                 excelMap.put("je", loanApplication.getActuallyAmount());
                 //贷款期限
-
+                list.add(excelMap);
                 //fileName = FileUploadUtils.extractFilenameLoanApplicationNumberNoHzm("项目评审意见签批表");
                 fileName = loanApplication.getEnterpriseName() + "-项目评审意见签批表";
                 fileNameHz = fileName + ".xlsx";
@@ -1894,6 +1895,44 @@ public class LoanApplicationServiceImpl implements ILoanApplicationService {
                 wordPath = WordUtil.createWord(templatePath, fileDir, fileName, params);
                 path = path + "/" + fileName + ".docx";
                 break;
+            case "19":
+                //申请人名称
+                excelMap.put("sqr", loanApplication.getEnterpriseName());
+                //申请金额
+                excelMap.put("sqje", loanApplication.getActuallyAmount());
+                //申请期限
+                excelMap.put("sqqx", loanApplication.getUsagePeriod());
+                //申请银行
+                excelMap.put("bank", loanApplication.getApplicationBank());
+                list.add(excelMap);
+                //fileName = FileUploadUtils.extractFilenameLoanApplicationNumberNoHzm("项目评审意见签批表");
+                fileName = loanApplication.getEnterpriseName() + "-t+1保后首次检查报告";
+                fileNameHz = fileName + ".xlsx";
+                templatePath = RuoYiConfig.getProfile() + "/mb/t+1保后首次检查报告.xlsx";
+                fileDir = RuoYiConfig.getProfile() + "/mb/temporarily/" + loanApplicationNumber + "/" + fileNameHz;
+                sheet = ExcelFillUtils.fillOneSheet(templatePath, fileDir, "Sheet1", list);
+
+                path = path + "/" + fileNameHz;
+                break;
+            case "20":
+                //申请人名称
+                excelMap.put("sqr", loanApplication.getEnterpriseName());
+                //申请金额
+                excelMap.put("sqje", loanApplication.getActuallyAmount());
+                //申请期限
+                excelMap.put("sqqx", loanApplication.getUsagePeriod());
+                //申请银行
+                excelMap.put("bank", loanApplication.getApplicationBank());
+                list.add(excelMap);
+                //fileName = FileUploadUtils.extractFilenameLoanApplicationNumberNoHzm("项目评审意见签批表");
+                fileName = loanApplication.getEnterpriseName() + "-T+N保后检查报告";
+                fileNameHz = fileName + ".xlsx";
+                templatePath = RuoYiConfig.getProfile() + "/mb/T+N保后检查报告.xlsx";
+                fileDir = RuoYiConfig.getProfile() + "/mb/temporarily/" + loanApplicationNumber + "/" + fileNameHz;
+                sheet = ExcelFillUtils.fillOneSheet(templatePath, fileDir, "Sheet1", list);
+
+                path = path + "/" + fileNameHz;
+                break;
             default:
                 break;
         }

+ 24 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/Task.java

@@ -0,0 +1,24 @@
+package com.ruoyi.system.service;
+
+
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
+
+@Component
+public class Task {
+
+
+    /***
+     *
+     * @throws Exception
+     */
+    @Async
+    //@Scheduled(cron = "0 0/2 * * * ? ")
+    //@Scheduled(cron = "0 20 0 * * ? ")
+    public void popover() throws Exception {
+
+
+    }
+
+
+}