From ec76c5defdd8018ce4efcc8795508498a84de4b7 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期二, 09 四月 2024 19:09:33 +0800
Subject: [PATCH] 平台历史数据 导入导出接口

---
 ruoyi-admin-dept/src/main/java/com/ruoyi/web/controller/api/CurrentQuarterController.java |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/ruoyi-admin-dept/src/main/java/com/ruoyi/web/controller/api/CurrentQuarterController.java b/ruoyi-admin-dept/src/main/java/com/ruoyi/web/controller/api/CurrentQuarterController.java
index f1b72e4..67e1049 100644
--- a/ruoyi-admin-dept/src/main/java/com/ruoyi/web/controller/api/CurrentQuarterController.java
+++ b/ruoyi-admin-dept/src/main/java/com/ruoyi/web/controller/api/CurrentQuarterController.java
@@ -6,6 +6,7 @@
 import com.ruoyi.system.dto.BasicDataDTO;
 import com.ruoyi.system.query.ScoreQuery;
 import com.ruoyi.system.service.TbBasicDataService;
+import com.ruoyi.system.service.TbFieldService;
 import com.ruoyi.system.vo.BasicDataReportingVO;
 import com.ruoyi.system.vo.ScoreVO;
 import io.swagger.annotations.Api;
@@ -13,7 +14,12 @@
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
 /**
@@ -28,6 +34,7 @@
 public class CurrentQuarterController {
 
     private final TbBasicDataService tbBasicDataService;
+    private final TbFieldService tbFieldService;
 
     /**
      * 获取基础数据填报相关信息
@@ -50,6 +57,7 @@
 
     /**
      * 保存当前季度数据
+     *
      * @param dto 当前季度基础数据数据传输对象
      * @return R<Void>
      */
@@ -67,6 +75,7 @@
         }
         return R.ok();
     }
+
     /**
      * 导入模板下载
      */
@@ -74,15 +83,16 @@
     @ApiOperation("模板下载")
     public void downloadImportTemplate() {
         try {
-            tbBasicDataService.downloadImportTemplate();
+            tbFieldService.downloadImportTemplate();
         } catch (Exception e) {
-            log.error("模板下载异常",e);
+            log.error("模板下载异常", e);
             throw new ServiceException("模板下载失败,请联系管理员!");
         }
     }
 
     /**
      * 基础数据导入
+     *
      * @param file file
      * @return R<Void>
      */
@@ -95,7 +105,7 @@
             if (e instanceof ServiceException) {
                 return R.fail(e.getMessage());
             }
-            log.error("基础数据导入异常",e);
+            log.error("基础数据导入异常", e);
             return R.fail("基础数据导入失败,请联系管理员!");
         }
         return R.ok();
@@ -103,6 +113,7 @@
 
     /**
      * 得分计算分页查询
+     *
      * @param query 得分计算条件查询对象
      * @return R<PageDTO < ScoreVO>>
      */
@@ -115,7 +126,7 @@
             if (e instanceof ServiceException) {
                 return R.fail(e.getMessage());
             }
-            log.error("查询得分计算异常",e);
+            log.error("查询得分计算异常", e);
             return R.fail();
         }
     }

--
Gitblit v1.7.1