From d14994e10797ce5bc0d29668d358f7c5274dcc5b Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 15 四月 2026 15:46:17 +0800
Subject: [PATCH] 新增调用外部接口api
---
service/src/main/java/com/ruoyi/cwgl/controller/FundFlowController.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/service/src/main/java/com/ruoyi/cwgl/controller/FundFlowController.java b/service/src/main/java/com/ruoyi/cwgl/controller/FundFlowController.java
index 7f05682..7a1bda6 100644
--- a/service/src/main/java/com/ruoyi/cwgl/controller/FundFlowController.java
+++ b/service/src/main/java/com/ruoyi/cwgl/controller/FundFlowController.java
@@ -18,7 +18,9 @@
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cwgl.domain.FundFlow;
import com.ruoyi.cwgl.service.IFundFlowService;
+import com.ruoyi.cwgl.service.ICmbsBankSyncService;
import com.ruoyi.common.utils.poi.ExcelUtil;
+import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.core.page.TableDataInfo;
/**
@@ -34,8 +36,30 @@
@Autowired
private IFundFlowService fundFlowService;
+ @Autowired
+ private ICmbsBankSyncService cmbsBankSyncService;
+
+ /**
+ * 浠嶤MBS鍚屾閾惰娴佹按鍒拌祫閲戞祦姘磋〃
+ *
+ * @param acctNum 璐﹀彿
+ * @param startDate 寮�濮嬫棩鏈� yyyy-MM-dd
+ * @param endDate 缁撴潫鏃ユ湡 yyyy-MM-dd
+ */
+ @PreAuthorize("@ss.hasPermi('cwgl:fundFlow:sync')")
+ @Log(title = "CMBS閾惰娴佹按鍚屾", businessType = BusinessType.OTHER)
+ @PostMapping("/syncFromCmbs")
+ public AjaxResult syncFromCmbs(String acctNum, String startDate, String endDate)
+ {
+ try {
+ String result = cmbsBankSyncService.syncFromCmbs(acctNum, startDate, endDate);
+ return AjaxResult.success(result);
+ } catch (Exception e) {
+ return AjaxResult.error("鍚屾澶辫触: " + e.getMessage());
+ }
+ }
/**
* 鏌ヨ璧勯噾娴佹按鍒楄〃
*/
@@ -116,4 +140,29 @@
{
return toAjax(fundFlowService.confirmFundFlow(id));
}
+
+ /**
+ * 瀵煎叆璧勯噾娴佹按Excel
+ */
+ @PreAuthorize("@ss.hasPermi('cwgl:fundFlow:import')")
+ @Log(title = "璧勯噾娴佹按", businessType = BusinessType.IMPORT)
+ @PostMapping("/importData")
+ public AjaxResult importData(MultipartFile file ) throws Exception
+ {
+ ExcelUtil<FundFlow> util = new ExcelUtil<FundFlow>(FundFlow.class);
+ List<FundFlow> fundFlowList = util.importExcel(file.getInputStream());
+ String message = fundFlowService.importFundFlow(fundFlowList);
+ return AjaxResult.success(message);
+ }
+
+ /**
+ * 涓嬭浇瀵煎叆璧勯噾娴佹按妯℃澘
+ */
+ @PreAuthorize("@ss.hasPermi('cwgl:fundFlow:import')")
+ @GetMapping("/importTemplate")
+ public AjaxResult importTemplate(String exportKey)
+ {
+ fundFlowService.importTemplate(exportKey);
+ return AjaxResult.success("瀵煎嚭璇锋眰鎴愬姛锛岃绋嶅悗鐐瑰嚮涓嬭浇...!");
+ }
}
--
Gitblit v1.8.0