From fed0a447df51e633ab6453261dc6e3d8a906d4a2 Mon Sep 17 00:00:00 2001
From: DELL <1525436766@qq.com>
Date: 星期一, 23 十二月 2024 14:08:25 +0800
Subject: [PATCH] 添加注释

---
 src/main/java/com/whyc/controller/TestController.java |   56 ++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 44 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/whyc/controller/TestController.java b/src/main/java/com/whyc/controller/TestController.java
index 4298c3e..b96bb12 100644
--- a/src/main/java/com/whyc/controller/TestController.java
+++ b/src/main/java/com/whyc/controller/TestController.java
@@ -1,12 +1,15 @@
 package com.whyc.controller;
 
+import com.whyc.bts.BTS_ChargeData;
+import com.whyc.bts.BTS_DisChargeData;
 import com.whyc.fbo.FboData;
 import com.whyc.fbo.FboDataHeadStart;
 import com.whyc.fbo.FboDataHeadStop;
 import com.whyc.fbo.FboDataInf;
+import com.whyc.mcp.TestDataInfo;
 import com.whyc.pojo.Response;
-import com.whyc.service.ExcelExportService;
-import com.whyc.service.FboDataInfService;
+import com.whyc.res.RESDataInfo;
+import com.whyc.service.*;
 import com.whyc.util.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -37,6 +40,18 @@
     @Autowired
     private ExcelExportService exportService;
 
+    @Autowired
+    private RESDataInfoService resService;
+
+    @Autowired
+    private TestDataInfoService testDataInfoService;
+
+    @Autowired
+    private BtsDisChargeService disDataService;
+
+    @Autowired
+    private BtsChargeDataService chargeDataService;
+
     @GetMapping("/hello")
     public Response hello(){
         return new Response().set(1,"hello");
@@ -48,17 +63,29 @@
         String suffix=filePath.substring(filePath.lastIndexOf(".")+1).toLowerCase(Locale.ROOT);
         Response response=new Response();
         switch (suffix){
-            case "fbx":FboDataInf fboDataInf = fboService.readFboFile(filePath);
+            case "fbx":
+                       FboDataInf fboDataInf = fboService.readFboFile(filePath);
                        response.set(1,fboDataInf,filePath);
                        break;
-            case "bres":response.set(1,filePath);
+            case "bres":
+                       RESDataInfo resDataInfo =resService.readFileData(filePath);
+                       response.set(1,resDataInfo,filePath);
                        break;
             case "alm":response.set(1,filePath);
                        break;
-            case "mcp":response.set(1,filePath);
+            case "mcp":
+                       TestDataInfo testDataInfoMcp=testDataInfoService.readFileData(filePath);
+                       response.set(1,testDataInfoMcp,filePath);
                        break;
-            case "mch":response.set(1,filePath);
-                      break;
+            case "mch":TestDataInfo testDataInfoMch=testDataInfoService.readFileData(filePath);
+                       response.set(1,testDataInfoMch,filePath);
+                       break;
+            case "bcp": BTS_DisChargeData disData=disDataService.getDisData(filePath);
+                response.set(1,disData,filePath);
+                break;
+            case "chr":BTS_ChargeData chargeData=chargeDataService.getChrData(filePath);
+                response.set(1,chargeData,filePath);
+                break;
             default:response.set(1,false,filePath);
         }
 
@@ -68,17 +95,22 @@
     @PostMapping("/export")
     @ApiOperation(value = "鏂囦欢瀵煎嚭")
     public void export(HttpServletRequest req, HttpServletResponse resp ){
-        String suffix=req.getParameter("suffix").toLowerCase(Locale.ROOT);
+        String filePath = req.getParameter("filePath");
+        String suffix=filePath.substring(filePath.lastIndexOf(".")+1).toLowerCase(Locale.ROOT);
         switch (suffix){
             case "fbx":exportService.exportFbx(req,resp);
                 break;
-            case "bres":
+            case "bres":exportService.exportBres(req,resp);
                 break;
-            case "alm":
+            /*case "alm":exportService.exportAlm(req,resp);
+                break;*/
+            case "mcp":exportService.exportMcph(req,resp);
                 break;
-            case "mcp":
+            case "mch":exportService.exportMcph(req,resp);
                 break;
-            case "mch":
+            case "bcp":exportService.exportBcp(req,resp);
+                break;
+            case "chr":exportService.exportChr(req,resp);
                 break;
         }
     }

--
Gitblit v1.9.1